1. 12 12月, 2009 1 次提交
  2. 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
  3. 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
    • 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
  4. 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
  5. 23 8月, 2007 1 次提交
    • A
      usb-storage: fix bugs in the disconnect pathway · 2f67cd5b
      Alan Stern 提交于
      This patch (as961) fixes a couple of bugs in the disconnect pathway of
      usb-storage.
      
      The first problem, which apparently has been around for a while
      although nobody noticed it, shows up when an aborted command is still
      pending when a disconnect occurs.  The SCSI error-handler will
      continue to wait in command_abort() until the us->notify completion is
      signalled.  Thus quiesce_and_remove_host() needs to signal it.
      
      The second problem was introduced recently along with autosuspend
      support.  Since usb_stor_scan_thread() now calls
      usb_autopm_put_interface() before exiting, we can't simply leave the
      scanning thread running after a disconnect; we must wait until the
      thread exits.  This is solved by adding a new struct completion to the
      private data structure.  Fortuitously, it allows the removal of the
      rather clunky mechanism used in the past to insure that all threads
      have finished before the module is unloaded.
      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>
      2f67cd5b
  6. 13 7月, 2007 1 次提交
  7. 09 5月, 2007 1 次提交
  8. 13 7月, 2006 1 次提交
  9. 27 6月, 2006 1 次提交
    • J
      Clean up 'inline is not at beginning' warnings for usb storage · f274afc9
      Jesper Juhl 提交于
      Usually we don't care much about 'gcc -W' warnings, but some of us do build
      kernels that way to look for problems, and then the fewer warnings we have
      to wade through the better. Especially when they are very easy and
      non-intrusive to clean up. Which is the case for the following warnings
      spewed by drivers/usb/storage/usb.h :
      
        drivers/usb/storage/usb.h:163: warning: `inline' is not at beginning of
      +declaration
        drivers/usb/storage/usb.h:166: warning: `inline' is not at beginning of
      +declaration
      
      There's also some precedence for cleaning up these warnings. I've had
      a few patches merged in the past that remove exactly this class of
      warnings.
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      f274afc9
  10. 21 3月, 2006 1 次提交
  11. 05 1月, 2006 2 次提交
  12. 29 10月, 2005 2 次提交
  13. 09 9月, 2005 1 次提交
  14. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4