This is a note to let you know that I've just added the patch titled Subject: USB: usb-storage: don't clear-halt when Get-Max-LUN stalls
to my gregkh-2.6 tree. Its filename is usb-usb-storage-don-t-clear-halt-when-get-max-lun-stalls.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ >From [EMAIL PROTECTED] Wed Feb 13 07:46:39 2008 From: Alan Stern <[EMAIL PROTECTED]> Date: Wed, 13 Feb 2008 10:45:28 -0500 (EST) Subject: USB: usb-storage: don't clear-halt when Get-Max-LUN stalls To: Matthew Dharm <[EMAIL PROTECTED]> Cc: Robert Spitzenpfeil <[EMAIL PROTECTED]>, Andre Welter <[EMAIL PROTECTED]>, USB list <linux-usb@vger.kernel.org>, USB Storage list <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> This patch (as1032) removes the Clear-Halt calls in usb_stor_Bulk_max_lun(). Evidently some devices (such as the Oracom MP3 player) really don't like to receive these requests when their bulk endpoints aren't halted. The only reason for adding them originally was to get an ancient ZIP-100 drive to work. But since this device has only a single LUN, we don't need to send it a Get-Max-LUN request at all. Adding an unusual_devs entry for the ZIP-100 with the SINGLE_LUN flag set will cause this step to be skipped. Signed-off-by: Alan Stern <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/usb/storage/transport.c | 11 ----------- drivers/usb/storage/unusual_devs.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c @@ -891,17 +891,6 @@ int usb_stor_Bulk_max_lun(struct us_data if (result > 0) return us->iobuf[0]; - /* - * Some devices (i.e. Iomega Zip100) need this -- apparently - * the bulk pipes get STALLed when the GetMaxLUN request is - * processed. This is, in theory, harmless to all other devices - * (regardless of if they stall or not). - */ - if (result == -EPIPE) { - usb_stor_clear_halt(us, us->recv_bulk_pipe); - usb_stor_clear_halt(us, us->send_bulk_pipe); - } - /* * Some devices don't like GetMaxLUN. They may STALL the control * pipe, they may return a zero-length result, they may do nothing at --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -759,6 +759,18 @@ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x "Digital Camera EX-20 DSC", US_SC_8070, US_PR_DEVICE, NULL, 0 ), +/* Reported by Andre Welter <[EMAIL PROTECTED]> + * This antique device predates the release of the Bulk-only Transport + * spec, and if it gets a Get-Max-LUN then it requires the host to do a + * Clear-Halt on the bulk endpoints. The SINGLE_LUN flag will prevent + * us from sending the request. + */ +UNUSUAL_DEV( 0x059b, 0x0001, 0x0100, 0x0100, + "Iomega", + "ZIP 100", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_SINGLE_LUN ), + /* Reported by <[EMAIL PROTECTED]> */ UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000, "LaCie", Patches currently in gregkh-2.6 which might be from [EMAIL PROTECTED] are driver/cpufreq-fix-kobject-reference-count-handling.patch usb/usb-convert-usb.h-struct-usb_device-to-kernel-doc.patch usb/usb-make-usb_storage_onetouch-available-with-pm.patch usb/usb-usb-ohci-sm501-driver-use-the-conventional-convention-for-suspend-and-resume.patch usb/usb-usb-storage-don-t-clear-halt-when-get-max-lun-stalls.patch - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html