1. 23 10月, 2010 4 次提交
  2. 12 12月, 2009 1 次提交
    • A
      USB: usb-storage: add BAD_SENSE flag · a0bb1081
      Alan Stern 提交于
      This patch (as1311) fixes a problem in usb-storage: Some devices are
      pretty broken when it comes to reporting sense data.  The information
      they send back indicates that they have more than 18 bytes of sense
      data available, but when the system asks for more than 18 they fail or
      hang.  The symptom is that probing fails with multiple resets.
      
      The patch adds a new BAD_SENSE flag to indicate that usb-storage
      should never ask for more than 18 bytes of sense data.  The flag can
      be set in an unusual_devs entry or via the "quirks=" module parameter,
      and it is set automatically whenever a REQUEST SENSE command for more
      than 18 bytes fails or times out.
      
      An unusual_devs entry is added for the Agfa photo frame, which uses a
      Prolific chip having this bug.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NDaniel Kukula <daniel.kuku@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a0bb1081
  3. 25 3月, 2009 1 次提交
    • A
      usb-storage: prepare for subdriver separation · e6e244b6
      Alan Stern 提交于
      This patch (as1206) is the first step in converting usb-storage's
      subdrivers into separate modules.  It makes the following large-scale
      changes:
      
      	Remove a bunch of unnecessary #ifdef's from usb_usual.h.
      	Not truly necessary, but it does clean things up.
      
      	Move the USB device-ID table (which is duplicated between
      	libusual and usb-storage) into its own source file,
      	usual-tables.c, and arrange for this to be linked with
      	either libusual or usb-storage according to whether
      	USB_LIBUSUAL is configured.
      
      	Add to usual-tables.c a new usb_usual_ignore_device()
      	function to detect whether a particular device needs to be
      	managed by a subdriver and not by the standard handlers
      	in usb-storage.
      
      	Export a whole bunch of functions in usb-storage, renaming
      	some of them because their names don't already begin with
      	"usb_stor_".  These functions will be needed by the new
      	subdriver modules.
      
      	Split usb-storage's probe routine into two functions.
      	The subdrivers will call the probe1 routine, then fill in
      	their transport and protocol settings, and then call the
      	probe2 routine.
      
      	Take the default cases and error checking out of
      	get_transport() and get_protocol(), which run during
      	probe1, and instead put a check for invalid transport
      	or protocol values into the probe2 function.
      
      	Add a new probe routine to be used for standard devices,
      	i.e., those that don't need a subdriver.  This new routine
      	checks whether the device should be ignored (because it
      	should be handled by ub or by a subdriver), and if not,
      	calls the probe1 and probe2 functions.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e6e244b6
  4. 08 1月, 2009 2 次提交
    • A
      USB: storage: add last-sector hacks · 25ff1c31
      Alan Stern 提交于
      This patch (as1189b) adds some hacks to usb-storage for dealing with
      the growing problems involving bad capacity values and last-sector
      accesses:
      
      	A new flag, US_FL_CAPACITY_OK, is created to indicate that
      	the device is known to report its capacity correctly.  An
      	unusual_devs entry for Linux's own File-backed Storage Gadget
      	is added with this flag set, since g_file_storage always
      	reports the correct capacity and since the capacity need
      	not be even (it is determined by the size of the backing
      	file).
      
      	An entry in unusual_devs.h which has only the CAPACITY_OK
      	flag set shouldn't prejudice libusual, since the device will
      	work perfectly well with either usb-storage or ub.  So a
      	new macro, COMPLIANT_DEV, is added to let libusual know
      	about these entries.
      
      	When a last-sector access succeeds and the total number of
      	sectors is odd (the unexpected case, in which guessing that
      	the number is even might cause trouble), a WARN is triggered.
      	The kerneloops.org project will collect these warnings,
      	allowing us to add CAPACITY_OK flags for the devices in
      	question before implementing the default-to-even heuristic.
      	If users want to prevent the stack dump produced by the WARN,
      	they can disable the hack by adding an unusual_devs entry
      	for their device with the CAPACITY_OK flag.
      
      	When a last-sector access fails three times in a row and
      	neither the FIX_CAPACITY nor the CAPACITY_OK flag is set,
      	we assume the last-sector bug is present.  We replace the
      	existing status and sense data with values that will cause
      	the SCSI core to fail the access immediately rather than
      	retry indefinitely.  This should fix the difficulties
      	people have been having with Nokia phones.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      25ff1c31
    • B
      USB: storage devices and SAT · 1537e0ad
      Ben Efros 提交于
      Add the SANE SENSE flag to indicate that a device is capable of handling
      more than 18-bytes of sense data.  This functionality is required for
      USB-ATA bridges implementing SAT.  A future patch will actually enable this
      function for several devices.
      
      The logic behind this is that we can detect support for SANE_SENSE in a few ways:
       1) ATA PASS THROUGH (12) or (16) execute successfully
       2) SPC-3 or higher is in use
       3) A previous CHECK CONDITION occurred with sense format 70-73 and had
          a length greater than 18-bytes total
      Signed-off-by: NBen Efros <ben@pc-doctor.com>
      Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      1537e0ad
  5. 25 4月, 2008 1 次提交
  6. 25 3月, 2008 1 次提交
  7. 02 2月, 2008 1 次提交
    • A
      USB: usb-storage: new "lockable" subclass 0x07 · 676d3aa1
      Alan Stern 提交于
      This patch (as1011) adds a #define for the newly-created Lockable
      (i.e., password-protected) subclass 0x07 for USB mass-storage devices.
      The private ISD200 entry (which had been mapped to subclass 0x07) is
      moved to 0xf0, which is unlikely to conflict with any official
      subclass designation.
      
      The US_SC_MIN and US_SC_MAX constants aren't used anywhere, so the
      patch removes them.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      676d3aa1
  8. 18 12月, 2007 1 次提交
    • D
      usb-storage: Fix devices that cannot handle 32k transfers · 33abc04f
      Doug Maxey 提交于
      When a device cannot handle the smallest previously limited transfer
      size (64 blocks) without stalling, limit the device to the amount of
      packets that fit in a platform native page.
      
      The lowest possible limit is PAGE_CACHE_SIZE, so if the device is ever
      used on a platform that has larger than 8K pages, you lose unless you
      can convince the device firmware folks to fix the issue.
      
      Cc: Mathew Dharm <mdharm-scsi@one-eyed-alien.net>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NDoug Maxey <dwm@austin.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      33abc04f
  9. 17 2月, 2007 1 次提交
  10. 28 9月, 2006 1 次提交
  11. 03 8月, 2006 1 次提交
  12. 13 7月, 2006 1 次提交
  13. 26 4月, 2006 1 次提交
  14. 05 1月, 2006 2 次提交