From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Jenkins Subject: Re: BUG in handling of last_sector_bug flag Date: Fri, 15 Aug 2008 09:31:34 +0100 Message-ID: <48A53EE6.8010408@tuffmail.co.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alan Stern Cc: Boaz Harrosh , James Bottomley , Hans de Goede , SCSI development list , USB list , Antonio Ospite List-Id: linux-scsi@vger.kernel.org Alan Stern wrote: > On Wed, 13 Aug 2008, Boaz Harrosh wrote: > > >> One thing I don't like is the now blk_end_request(req, -EIO, bytes=0) >> inside scsi_end_request(). What's the point of calling that with 0 bytes? >> Maybe fix that too. >> > > While testing the patch, I learned what the point is. :-) > > Actually it's very simple; you just have to remember that not all > requests are BLOCK_FS type. Other types of request can indeed have a > transfer length of 0, and we want to end those requests normally. > > So this version of the patch works better than the earlier one. In > principle there doesn't seem to be any reason not to call > blk_end_request with bytes = 0, but I left the test in there. > > Alan, you might want to test this version and see how well it works for > you. > Yes, that fixes it! I applied your patch and reduced SD_LAST_BUGGY_SECTORS to 1. As expected, when I inserted my USB cardreader the kernel log shows "uncorrected read errors", as /lib/udev/vol_id triggers the hardware bug. But vol_id doesn't hang any more. udev goes on to create the device node, I get the KDE popup and can successfully mount the device. Great work, thanks. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html