[803] in linux-scsi channel archive
Re: Buslogic PCI problems
daemon@ATHENA.MIT.EDU (Leonard N. Zubkoff)
Sat Nov 11 22:04:28 1995
Date: Sat, 11 Nov 1995 12:37:14 -0800
From: "Leonard N. Zubkoff" <lnz@dandelion.com>
To: jake@zeke.ebtech.net
Cc: linux-scsi@vger.rutgers.edu
In-Reply-To: <Pine.LNX.3.91.951110185502.27808C-100000@zeke.ebtech.net> (message from jake on Fri, 10 Nov 1995 19:08:11 -0500 (EST))
<sigh> I sure wish this sector size 0 problem would happen to me sometime so I
could really try to find out what is happening. I've had a few folks who've
had this happen run some debugging code for me and it appears that the drive
really is either genuinely reporting a sector size of 0 or is not providing
anything at all, thereby using the 0's that are in the buffer. The following
kernel patch will probably correct the problem; the few people who've done this
have reported no further problems once the kernel booted correctly.
Leonard
--- linux/drivers/scsi/sd.c- Mon May 1 21:39:45 1995
+++ linux/drivers/scsi/sd.c Sat Nov 11 12:33:39 1995
@@ -1011,6 +1019,11 @@
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 &&