Re: Why is the kernel complaining about large SCSI LUNs

Douglas Gilbert
2005-01-08T01:27:09Z

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

James Bottomley wrote:
> On Fri, 2005-01-07 at 18:25 -0500, Maurice Volaski wrote:
>
>>Are you saying that MPT driver is seeing some garbage data where
>>there should be valid data structures and that garbage data is being
>>generated by the external hardware RAID attached to the card (the
>>only thing attached to it).
>
>
> I'm not saying anything yet, because I have insufficient data to form a
> conclusion. What I want to know is what the kernel was doing before it
> got this message. It currently looks like the REPORT_LUNS command
> didn't return any data in even though returned status was GOOD, so it's
> probably a fault either of the device or the controller.

James,
Perhaps a bit of defensive programming would make that code
more robust. Also the resid could/should be checked as well
(and in many other cases).
[Tracking down the cause would obviously be useful as well.]

Doug Gilbert

[-- Attachment #2: scsi_scan2610bk5pl.diff --]
[-- Type: text/x-patch, Size: 338 bytes --]

--- linux/drivers/scsi/scsi_scan.c 2005-01-03 20:52:55.000000000 +1000
+++ linux/drivers/scsi/scsi_scan.c2610bk5pl 2005-01-08 11:18:25.066656384 +1000
@@ -940,6 +940,7 @@
(sdev->host->unchecked_isa_dma ? __GFP_DMA : 0));
if (!lun_data)
goto out_release_request;
+ memset(lun_data, 0, length);

scsi_cmd[0] = REPORT_LUNS;