DragonFly BSD
DragonFly commits List (threaded) for 2012-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: DragonFly_RELEASE_3_0 ahci(4)/sili(4): Fix for drives >2TB.


From: Sascha Wildner <swildner@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 12 Aug 2012 18:20:33 -0700 (PDT)

commit 0d92877ac3b7bf4b9127049da7d2b82f83638ed4
Author: Sascha Wildner <saw@online.de>
Date:   Mon Aug 13 02:33:30 2012 +0200

    ahci(4)/sili(4): Fix for drives >2TB.
    
    CAM will issue the 16 byte version of the READ CAPACITY command when
    maxsector is 0xffffffff:
    
    ----- scsi_da.c -----
    if (maxsector == 0xffffffff) {
    	softc->state = DA_STATE_PROBE2;
    	kfree(rdcap, M_SCSIDA);
    	xpt_release_ccb(done_ccb);
    	xpt_schedule(periph, /*priority*/5);
    	return;
    }
    ---------------------
    
    However, we are subtracting 1 from it (presumably because it's a "last
    sector on the device" value starting at 0) so in CAM, it ended up being
    0xfffffffe, resulting in disks attached via ahci(4) and sili(4) to be
    limited to 2TB.
    
    To fix, set the local var to 0 in this case, so that after subtracting 1
    from the value (cast to 32 bit) CAM gets 0xffffffff.
    
    Fix-by: dillon

Summary of changes:
 sys/dev/disk/ahci/ahci_cam.c |   10 ++++++++--
 sys/dev/disk/sili/sili_cam.c |   10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0d92877ac3b7bf4b9127049da7d2b82f83638ed4


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]