summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/scsiglue.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "usb-storage: implement autosuspend"Greg Kroah-Hartman2007-09-131-9/+4
| | | | | | | | | | This reverts commit 8dfe4b14869fd185ca25ee88b02ada58a3005eaf. There are a number of issues still remaining in usb-storage autosuspend, so, to be safe, we need to revert this for now. Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb-storage: implement autosuspendAlan Stern2007-07-121-4/+9
| | | | | | | | | | This patch (as930) implements autosuspend for usb-storage. It is adapted from a patch by Oliver Neukum. Autosuspend is allowed except during LUN scanning, resets, and command execution. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add reset_resume methodAlan Stern2007-07-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as918) introduces a new USB driver method: reset_resume. It is called when a device needs to be reset as part of a resume procedure (whether because of a device quirk or because of the USB-Persist facility), thereby taking over a role formerly assigned to the post_reset method. As a consequence, post_reset no longer needs an argument indicating whether it is being called as part of a reset-resume. This separation of functions makes the code clearer. In addition, the pre_reset and post_reset method return types are changed; they now must return an error code. The return value is unused at present, but at some later time we may unbind drivers and re-probe if they encounter an error during reset handling. The existing pre_reset and post_reset methods in the usbhid, usb-storage, and hub drivers are updated to match the new requirements. For usbhid the post_reset routine is also used for reset_resume (duplicate method pointers); for the other drivers a new reset_resume routine is added. The change to hub.c looks bigger than it really is, because mark_children_for_reset_resume() gets moved down next to the new hub_reset_resume() routine. A minor change to usb-storage makes the usb_stor_report_bus_reset() routine acquire the host lock instead of requiring the caller to hold it already. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB Storage: indistinguishable devices with broken and unbroken firmwareOliver Neukum2007-02-161-0/+6
| | | | | | | | | | | | | | | there's a USB mass storage device which exists in two version. One reports the correct size and the other does not. Apart from that they are identical and cannot be told apart. Here's a heuristic based on the empirical finding that drives have even sizes. Signed-off-by: Oliver Neukum <oneukum@suse.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb-storage: SCSI level fixesAlan Stern2007-02-071-18/+13
| | | | | | | | | | | | | | | | This patch (as835) removes from usb-storage the code which sets all devices to a SCSI level of at least SCSI-2. The original reasons for doing this no longer apply, and in fact it prevents certain kinds of ATA pass-thru commands from being used. The patch also marks CB and CBI devices that are SCSI-0 (legacy SCSI) as being single-LUN, since the combined SCSI-over-USB transport protocol has no way to convey LUN information to these devices. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb-storage: fix for UFI LUN detectionAlan Stern2006-09-271-0/+15
| | | | | | | | | | | | The UFI specification doesn't permit devices to indicate non-existent LUNs in the manner prescribed by the SCSI spec. This patch (as773) sets a special flag so that the SCSI scanner will recognize these devices and treat them specially. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Storage: US_FL_MAX_SECTORS_64 flagPhil Dibowitz2006-07-121-7/+5
| | | | | | | | | | This patch adds a US_FL_MAX_SECTORS_64 and removes the Genesys special-cases for this that were in scsiglue.c. It also adds the flag to other devices reported to need it. Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] usb-storage: use usb_reset_composite_deviceAlan Stern2006-06-211-4/+0
| | | | | | | | | This patch (as701) modifies usb-storage to take advantage of the new usb_reset_composite_device() API. Now we will be able to safely request port resets even if other drivers are bound to a mass-storage device. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: convert a bunch of USB semaphores to mutexesArjan van de Ven2006-03-201-4/+5
| | | | | | | | the patch below converts a bunch of semaphores-used-as-mutex in the USB code to mutexes Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Storage: Force starget->scsi_level in usb-storage scsiglue.cPaul Walmsley2005-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | When the usb-storage module forces sdev->scsi_level to SCSI_2, it should also force starget->scsi_level to the same value. Otherwise, the SCSI layer may attempt to issue SCSI-3 commands to the device, such as REPORT LUNS, which it cannot handle. This can prevent the device from working with Linux. The AMS Venus DS3 DS2316SU2S SATA-to-SATA+USB enclosure, based on the Oxford Semiconductor OXU921S chip, requires this patch to function correctly on Linux. The enclosure reports a SCSI-3 SPC-2 command set level, but does not correctly handle the REPORT LUNS SCSI command - probably due to a bug in its firmware. It seems likely that other USB storage enclosures with similar bugs will also benefit from this patch. Tony Lindgren <tony@atomide.com> collaborated in the development of this patch. Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] USB: storage: Fix messed-up lockingMatthew Dharm2005-09-121-11/+9
| | | | | | | | | | | | | | | | | | | This is patch as550 from Alan Stern. Apparently someone changed the SCSI core so that it no longer holds the host lock when doing a device or bus reset. usb-storage was updated at the time, but the change was done carelessly. Some of the code depends on that lock being held. This patch reintroduces the host lock where needed and tries to clarify the comments explaining why the lock is necessary. It also moves the code that clears the TIMED_OUT and ABORTING bitflags so that it executes as soon as the timed-out command has completed (and while the host lock is held). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Storage: wedge SCSI revision at 2 for usb-storage devicesMatthew Dharm2005-09-081-0/+8
| | | | | | | | | | | | | | | | | This patch started life as as479b, and has been rediffed. Please note the order of submission of this latest patch series -- even tho this has an older original number, it is the last patch I'll be sending today. This patch changes the reported SCSI revision level to 2 for all disk-type devices. This is needed in a few cases because the device reports a level of 3 or higher but then crashes when given a REPORT LUNS command (for which support is supposed to be mandatory at those levels). This shouldn't harm us, since it only matters for sparse LUNs and we have separate ways of coping with that. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Storage: retry hard errorsMatthew Dharm2005-06-271-0/+9
| | | | | | | | | | | | | | | | | This patch started life as as527, and was rediffed by me. Since the IDE interface doesn't convey much information about types of errors, many USB-IDE adapters report all low-level errors with SK = 0x04, which is supposed to be used only for non-recoverable errors. As a result the SCSI midlayer doesn't retry the command. But quite often a retry would succeed, whereas an unnecessary retry doesn't really hurt anything. This patch uses a recently-implemented flag to tell the SCSI midlayer that such hardware errors should be retried. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Storage: port reset on transport errorMatthew Dharm2005-06-271-32/+13
| | | | | | | | | | | | This patch causes a port reset whenever there's a transport error or abort. If that fails it reverts back to doing a mass-storage device reset. It started life as as497 and was rediffed by me. This makes error recovery a lot quicker and more reliable. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Driver Core: drivers/usb/input/aiptek.c - ↵Yani Ioannou2005-06-201-2/+2
| | | | | | | drivers/zorro/zorro-sysfs.c: update device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [SCSI] allow sleeping in ->eh_bus_reset_handler()Jeff Garzik2005-06-171-3/+0
| | | | Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] allow sleeping in ->eh_device_reset_handler()Jeff Garzik2005-06-171-4/+0
| | | | Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] allow sleeping in ->eh_abort_handler()Jeff Garzik2005-06-171-2/+0
| | | | Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+500
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud