]> git.neil.brown.name Git - history.git/commitdiff
This patch fixes a bug that appears when you have more than 16 physical
authorJens Axboe <axboe@burns.home.kernel.dk>
Mon, 11 Feb 2002 10:33:09 +0000 (11:33 +0100)
committerJens Axboe <axboe@burns.home.kernel.dk>
Mon, 11 Feb 2002 10:33:09 +0000 (11:33 +0100)
LUNs attached to a cciss controller, and a tape drive is beyond the 16th
LUN.  In such a case, the tape drive would not be accessible without this
patch.  Applies to 2.5.4-pre3.  -- steve.cameron@compaq.com

drivers/block/cciss_scsi.c

index 5951c91677b5945a487c1f9c9a84fcde2899f14d..13cf784798cae402e5bb6341d0ea143b2737e634 100644 (file)
@@ -1086,10 +1086,10 @@ cciss_scsi_do_report_phys_luns(ctlr_info_t *c,
        cdb[3] = 0;
        cdb[4] = 0;
        cdb[5] = 0;
-       cdb[6] = (sizeof(*buf) >> 24) & 0xFF;  //MSB
-       cdb[7] = (sizeof(*buf) >> 16) & 0xFF;
-       cdb[8] = (sizeof(*buf) >> 8) & 0xFF;
-       cdb[9] = sizeof(*buf) & 0xFF;
+       cdb[6] = (bufsize >> 24) & 0xFF;  //MSB
+       cdb[7] = (bufsize >> 16) & 0xFF;
+       cdb[8] = (bufsize >> 8) & 0xFF;
+       cdb[9] = bufsize & 0xFF;
        cdb[10] = 0;
        cdb[11] = 0;