1. 27 2月, 2010 1 次提交
    • L
      Lower USB storage settling delay to something more reasonable · a4a47bc0
      Linus Torvalds 提交于
      The five-second delay can be rather annoying, and makes the system
      appear much less responsive when you connect a USB drive.
      
      It's also not entirely clear that it is needed - the settling delay has
      at least historically been an issue on some Apple iPods, for example,
      and some devices have been reported to need even more than the old 5s
      delay.
      
      But before we penalize them all, let's see how bad it really is.  Some
      of the reasons for long delays seem to be actual historical kernel bugs
      that should probably never have been papered over with a delay in the
      first place (there's a Ubuntu bug report for 2.6.20 about a NULL pointer
      dereference unless 'delay_use' is 8 or more, for example).
      
      It also looks like some distros have already shipped with delay_use=0,
      so the five second default may well be totally historical.
      
      In other words: "Let's see if anybody screams".
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a4a47bc0
  2. 21 1月, 2010 1 次提交
  3. 12 12月, 2009 5 次提交
  4. 25 3月, 2009 13 次提交
  5. 08 1月, 2009 8 次提交
    • A
      USB: storage: make the "quirks=" module parameter writable · c838ea46
      Alan Stern 提交于
      This patch (as1190) makes usb-storage's "quirks=" module parameter
      writable, so that users can add entries for their devices at runtime
      with no need to reboot or reload usb-storage.
      
      New codes are added for the SANE_SENSE, CAPACITY_HEURISTICS, and
      CAPACITY_OK flags.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c838ea46
    • 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
    • D
      USB: unusual dev for Option N.V. ZeroCD modems · 281b064f
      Dan Williams 提交于
      Many newer Option mobile broadband devices initially provide a
      usb-storage "driver CD" device that's pretty useless on Linux since
      any software on it most likely wouldn't be compatible with your
      kernel or distro anyway.  Thus, by default just kill the driver
      CD device by sending the SCSI 'rezero' command, but allow override
      of the default behavior via usb-storage module parameter so users
      can keep the ZeroCD device if they really want to.  Inspired by
      the Sierra TruInstall patch.
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Cc: Peter Henn <p.henn@option.com
      Cc: Denis Joseph Barrow <D.Barow@option.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      281b064f
    • A
      USB: usb-storage: merge DPCM support into SDDR09 · c20b15fd
      Alan Stern 提交于
      The DPCM subdriver is a little peculiar, in that it's meant to support
      devices where LUN 0 is Compact Flash and uses the CB transport whereas
      LUN 1 is SmartMedia and uses the SDDR09 transport.  Thus DPCM isn't
      really a transport in itself; it's more like a demultiplexer.
      
      Much of the DPCM code is part of the SDDR09 subdriver already, and the
      remaining part is fairly small.  This patch (as1182) moves that extra
      piece into sddr09.c, thereby eliminating dpcm.c.  Also eliminated is
      the Kconfig entry for DPCM support; it is now listed as part of the
      SDDR09 entry.
      
      In order to make sure that the semantics are the same as before, each
      unusual_devs entry for DPCM is now present twice: once with DPCM
      support if SDDR09 is configured (as before), and once with the
      SINGLE_LUN flag and CB support otherwise.
      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>
      c20b15fd
    • A
      USB: usb-storage: merge ATAPI and QIC-157 protocol routines · 3dae5345
      Alan Stern 提交于
      This patch (as1174) merges usb-storage's QIC-157 and ATAPI protocol
      routines.  Since the two functions are identical, there's no reason to
      keep them separate.
      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>
      3dae5345
    • A
      USB: usb-storage: merge CB and CBI transport routines · 64648a9d
      Alan Stern 提交于
      This patch (as1173) merges usb-storage's CB and CBI transports into a
      single routine.  So much of their code is common, it's silly to keep
      them separate.
      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>
      64648a9d
    • A
      USB: usb-storage: remove us->sensebuf · a658367d
      Alan Stern 提交于
      This patch (as1171) removes us->sensebuf, since it isn't used anywhere.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      a658367d
    • A
      USB: usb-storage: add "quirks=" module parameter · d4f373e5
      Alan Stern 提交于
      This patch (as1163b) adds a "quirks=" module parameter to usb-storage.
      This will allow people to make short-term changes to their
      unusual_devs list without rebuilding the entire driver.  Testing will
      become much easier, and less-sophisticated users will be able to
      access their buggy devices after a simple config-file change instead
      of having to wait for a new kernel release.
      
      The patch also adds a documentation entry for usb-storage's
      "delay_use" parameter, which has been around for years but but was
      never listed among the kernel parameters.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d4f373e5
  6. 24 9月, 2008 1 次提交
  7. 14 8月, 2008 1 次提交
    • K
      USB Storage Sierra: TRU-Install feature update · 32fe5e39
      Kevin Lloyd 提交于
      This patch upgrades the support for the Sierra Wireless TRU-Install
      feature (i.e. zeroCD) to allow for future support of Linux enabled
      TRU-Install devices.
      
      By default all devices that do not have a Linux enabled TRU-Install
      device (i.e. the device does not have a Linux package on the virtual CD
      partition) will be switched into "modem mode." Devices that do contain a
      Linux package in the TRU-Install virtual CD will be allowed to enumerate
      as a CD-Rom so that either (a) a user can install the packaged software
      or (b) a user-space application (e.g. udev) can switch it to modem mode.
      
      This patch does allow for manual override by adding a usb-storage module
      parameter 'swi_tru_install' which can force the modem into either mode
      regardless of what packages it contains.
      Signed-off-by: NKevin Lloyd <klloyd@sierrawireless.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      32fe5e39
  8. 22 7月, 2008 4 次提交
    • A
      USB: remove CVS keywords · ea05af61
      Adrian Bunk 提交于
      This patch removes CVS keywords that weren't updated for a long time
      from comments.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ea05af61
    • A
      usb-storage: implement "soft" unbinding · 543f7810
      Alan Stern 提交于
      This patch (as1092) implements "soft" unbinding for usb-storage.  When
      the disconnect routine is called, all commands and reset delays are
      allowed to complete normally until after scsi_remove_host() returns.
      This means that the commands needed for an orderly shutdown will be
      sent through to the device.
      
      Unlike before, the driver will now execute every command that it
      accepts.  Hence there's no need for special code to catch unexecuted
      commands and fail them.
      
      The new sequence of events when disconnect runs goes as follows:
      
      	If the device is truly unplugged, set the DISCONNECTING
      	flag so we won't try to access it any more.
      
      	If the SCSI-scanning thread hasn't started up yet, prevent
      	it from doing anything by setting the new DONT_SCAN flag.
      	Then wake it up and wait for it to terminate.
      
      	Remove the SCSI host.  This unbinds the upper-level drivers,
      	doing an orderly shutdown.  Commands sent to quiesce the
      	device will be transmitted normally, unless the device is
      	unplugged.
      
      	Set the DISCONNECTING flag so that we won't accept any new
      	commands that might get submitted (there aren't supposed to be
      	any) and we won't try to access the device for resets.
      
      	Tell the control thread to exit by waking it up with no
      	pending command, and wait for it to terminate.
      
      	Go on to do all the other normal stuff: releasing resources,
      	freeing memory, and so on.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      543f7810
    • A
      usb-storage: change remaining semaphore to completion · 7119e3c3
      Alan Stern 提交于
      This patch (as1090) converts the one remaining semaphore in
      usb-storage into a completion.
      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>
      7119e3c3
    • A
      usb-storage: separate dynamic flags from fixed flags · 7e4d6c38
      Alan Stern 提交于
      This patch (as1089) separates out the dynamic atomic bitflags and the
      static bitfields in usb-storage.  Until now the two sorts of flags
      have been sharing the same word; this has always been awkward.
      
      To help prevent possible confusion, the two new fields each have a
      different name from the original.  us->fflags contains the fixed
      bitfields (mostly taken from the USB ID table in unusual_devs.h), and
      us->dflags contains the dynamic atomic bitflags (used with set_bit,
      test_bit, and so on).
      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>
      7e4d6c38
  9. 03 5月, 2008 1 次提交
  10. 25 4月, 2008 2 次提交
  11. 19 10月, 2007 1 次提交
  12. 13 10月, 2007 1 次提交
  13. 13 9月, 2007 1 次提交