patch-1.3.76 linux/drivers/scsi/sd.c

Next file: linux/drivers/scsi/sr.c
Previous file: linux/drivers/scsi/scsi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.75/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -1126,10 +1126,10 @@
 	 */
 	rscsi_disks[i].ready = 1;
 
-	rscsi_disks[i].capacity = (buffer[0] << 24) |
-	    (buffer[1] << 16) |
-		(buffer[2] << 8) |
-		    buffer[3];
+	rscsi_disks[i].capacity = 1 + ((buffer[0] << 24) |
+				       (buffer[1] << 16) |
+				       (buffer[2] << 8) |
+				       buffer[3]);
 	
 	rscsi_disks[i].sector_size = (buffer[4] << 24) |
 	    (buffer[5] << 16) | (buffer[6] << 8) | buffer[7];

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this