1. 14 Jul, 2004 6 commits
    • Alan Stern's avatar
      [PATCH] USB: Remove hub's children upon unbinding · 9b5310c6
      Alan Stern authored
      This patch fixes a logical hole in the hub driver.  It's possible for the
      driver to be unbound from a hub without physically unplugging the hub.
      For example, writing 0 into the bConfigurationValue attribute file will
      have this effect.  When this happens, we need to make sure that all the
      child devices of the hub are logically disconnected and their ports
      disabled.
      
      That's what this patch does.  It's a little bit tricky because we can't
      simply call usb_disconnect() from within the hub driver's disconnect()
      routine.  While that routine is running it holds the usb bus writelock,
      but usb_disconnect() would try to acquire it again.  Instead
      schedule_work() is used, so after a brief delay the children will be
      removed.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      9b5310c6
    • Alan Stern's avatar
      [PATCH] USB: Store pointer to usb_device in private hub structure · bf02cab8
      Alan Stern authored
      This patch adds a pointer to the hub's usb_device into the usb_hub private
      structure.  It's a small change, and permits a small amount of
      simplification in a few spots, i.e., avoid calling interface_to_usbdev().
      This doesn't really do much in itself, but it's a prerequisite for the
      next patch.  (A situation arises where we can't use the interface pointer
      to find the usb_device because the interface might not exist.)
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      bf02cab8
    • Alan Stern's avatar
      [PATCH] USB: Don't ask for string descriptor lengths · 9506ce58
      Alan Stern authored
      Okay, here's a revised patch (as332b).  This tries first to ask for 255
      bytes, and if that fails then it asks for the length and the full
      descriptor.  Hopefully nobody will object to applying this version...
      
      You know, it occurs to me that the have_langid field in usb_device could
      easily be eliminated.  Just set string_langid to -1 during initialization
      and test for whether or not it is >= 0.  I'll do that some other time.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      9506ce58
    • Alan Stern's avatar
      [PATCH] USB: Make hub driver use usb_kill_urb() · 5106784c
      Alan Stern authored
      This is a rerun of as278, updated to match the current source.  It changes
      the hub driver, replacing calls to synchronous usb_unlink_urb() with
      usb_kill_urb() and removing the machinery formerly needed to synchronize
      the status URB handler with the rest of the driver.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      5106784c
    • Alan Stern's avatar
      [PATCH] USB: Add usb_kill_urb() · 1d92d8c6
      Alan Stern authored
      This patch is a slightly revised version of as277c, updated to match the
      current source.  The only difference from the older version is that this
      makes urb->use_count into an atomic_t, to avoid the overhead of an extra
      locking step each time an URB is submitted and given back.  The important
      features of this patch are:
      
      	-EPERM added to Documentation/usb/error-codes.txt.
      
      	Failure to use URB_ASYNC_UNLINK with usb_unlink_urb() is
      	deprecated in the documentation.
      
      	New ->reject and ->use_count fields added to struct urb.
      	The reject field is protected by urb->lock, and locking is
      	required only in usb_kill_urb() which doesn't have to be fast.
      
      	Single wait_queue used for all processes waiting inside
      	usb_kill_urb().  The wait queue is woken up only when an URB
      	is given back with ->reject set.
      
      	usb_rh_status_dequeue() changed to return int.  It looks like
      	this function should be declared static; it's not used outside
      	the hcd.c file.
      
      	Prototype for unlink_urb() in struct usb_operations is changed
      	to include a status code argument.  This is necessary so that
      	the different unlink paths can return -ENOENT and -ECONNRESET
      	as appropriate.
      
      	Support for synchronous usb_unlink_urb() has been removed;
      	such calls are passed to usb_kill_urb().
      
      	Kerneldoc for usb_unlink_urb() is updated.
      
      	usb_kill_urb() added to urb.c.
      
      	hc_simple() host driver is partially updated -- it should
      	compile but it won't really work right.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      1d92d8c6
    • Greg Kroah-Hartman's avatar
  2. 01 Jul, 2004 12 commits
  3. 30 Jun, 2004 22 commits