From mboxrd@z Thu Jan 1 00:00:00 1970 From: Douglas Gilbert Subject: Re: Why is the kernel complaining about large SCSI LUNs Date: Sat, 08 Jan 2005 11:27:02 +1000 Message-ID: <41DF36E6.7030804@torque.net> References: <1105115445.4151.11.camel@mulgrave> <1105141041.4151.32.camel@mulgrave> Reply-To: dougg@torque.net Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040602030109010009010207" Return-path: Received: from borg.st.net.au ([65.23.158.22]:31972 "EHLO borg.st.net.au") by vger.kernel.org with ESMTP id S261710AbVAHB1J (ORCPT ); Fri, 7 Jan 2005 20:27:09 -0500 In-Reply-To: <1105141041.4151.32.camel@mulgrave> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: James Bottomley Cc: Maurice Volaski , SCSI Mailing List This is a multi-part message in MIME format. --------------040602030109010009010207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------040602030109010009010207 Content-Type: text/x-patch; name="scsi_scan2610bk5pl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="scsi_scan2610bk5pl.diff" --- 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; --------------040602030109010009010207--