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

Next file: linux/fs/ext2/super.c
Previous file: linux/drivers/scsi/scsi.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.40/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -1133,6 +1133,12 @@
 	
 	rscsi_disks[i].sector_size = (buffer[4] << 24) |
 	    (buffer[5] << 16) | (buffer[6] << 8) | buffer[7];
+
+	if (rscsi_disks[i].sector_size == 0) {
+	  rscsi_disks[i].sector_size = 512;
+	  printk("sd%c : sector size 0 reported, assuming 512.\n", 'a' + i);
+	}
+ 
 	
 	if (rscsi_disks[i].sector_size != 512 &&
 	    rscsi_disks[i].sector_size != 1024 &&

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