1. 12 Oct, 2007 17 commits
    • Alan Stern's avatar
      USB: avoid urb->pipe in usbfs · 93cf9b90
      Alan Stern authored
      
      
      This patch (as948) removes most of the references to urb->pipe from
      the usbfs routines in devio.c.  The one tricky aspect is in
      snoop_urb(), which can be called before the URB is submitted and which
      uses usb_urb_dir_in().  For this to work properly, the URB's direction
      flag must be set manually in proc_do_submiturb().
      
      The patch also fixes a minor bug; the wValue, wIndex, and wLength
      fields were snooped in proc_do_submiturb() without conversion from
      le16 to CPU-byte-ordering.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      93cf9b90
    • Alan Stern's avatar
      USB: address-0 handling during device initialization · 4326ed0b
      Alan Stern authored
      
      
      This patch (as947) changes the device initialization and enumeration
      code in hub.c; now udev->devnum will be set to 0 while the device is
      being accessed at address 0.  Until now this wasn't needed because the
      address value was passed as part of urb->pipe; without that field the
      device address must be stored elsewhere.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4326ed0b
    • Alan Stern's avatar
      USB: avoid using urb->pipe in usbcore · 5e60a161
      Alan Stern authored
      
      
      This patch (as946) eliminates many of the uses of urb->pipe in
      usbcore.  Unfortunately there will have to be a significant API
      change, affecting all USB drivers, before we can remove it entirely.
      This patch contents itself with changing only the interface to
      usb_buffer_map_sg() and friends: The pipe argument is replaced with a
      direction flag.  That can be done easily because those routines get
      used in only one place.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5e60a161
    • Alan Stern's avatar
      USB: add direction bit to urb->transfer_flags · fea34091
      Alan Stern authored
      
      
      This patch (as945) adds a bit to urb->transfer_flags for recording the
      direction of the URB.  The bit is set/cleared automatically in
      usb_submit_urb() so drivers don't have to worry about it (although as
      a result, it isn't valid until the URB has been submitted).  Inline
      routines are added for easily checking an URB's direction.  They
      replace calls to usb_pipein in the DMA-mapping parts of hcd.c.
      
      For non-control endpoints, the direction is determined directly from
      the endpoint descriptor.  However control endpoints are
      bi-directional; for them the direction is determined from the
      bRequestType byte and the wLength value in the setup packet.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fea34091
    • Alan Stern's avatar
      USB: add ep->enable · bdd016ba
      Alan Stern authored
      
      
      This patch (as944) adds an explicit "enabled" field to the
      usb_host_endpoint structure and uses it in place of the current
      mechanism.  This is merely a time-space tradeoff; it makes checking
      whether URBs may be submitted to an endpoint simpler.  The existing
      mechanism is efficient when converting urb->pipe to an endpoint
      pointer, but it's not so efficient when urb->ep is used instead.
      
      As a side effect, the procedure for enabling an endpoint is now a
      little more complicated.  The ad-hoc inline code in usb.c and hub.c
      for enabling ep0 is now replaced with calls to usb_enable_endpoint,
      which is no longer static.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bdd016ba
    • Alan Stern's avatar
      USB: add urb->ep · 5b653c79
      Alan Stern authored
      
      
      This patch (as943) prepares the way for eliminating urb->pipe by
      introducing an endpoint pointer into struct urb.  For now urb->ep
      is set by usb_submit_urb() from the pipe value; eventually drivers
      will set it themselves and we will remove urb->pipe completely.
      
      The patch also adds new inline routines to retrieve an endpoint
      descriptor's number and transfer type, essentially as replacements for
      usb_pipeendpoint and usb_pipetype.
      
      usb_submit_urb(), usb_hcd_submit_urb(), and usb_hcd_unlink_urb() are
      converted to use the new field and new routines.  Other parts of
      usbcore will be converted in later patches.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5b653c79
    • Adrian Bunk's avatar
      USB: Storage: usbat_check_status(): fix check-after-use · a96173af
      Adrian Bunk authored
      
      
      The Coverity checker spotted that we have already oops'ed if "us"
      was NULL.
      
      Since "us" can't be NULL in the only caller this patch removes the
      NULL check.
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarMatthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a96173af
    • David Brownell's avatar
      USB: usb_gadget.h whitespace fixes · efc9052e
      David Brownell authored
      
      
      This just fixes some whitespace bugs in <linux/usb_gadget.h>,
      mostly extraneous spaces where a single tab suffices.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      efc9052e
    • Robert P. J. Day's avatar
      USB: Remove dead references to "SAFE_SERIAL" CONFIG variables. · 9f705bde
      Robert P. J. Day authored
      
      
      Remove the references to CONFIG_USBD_SAFE_SERIAL_{VENDOR,PRODUCT},
      which aren't defined in any Kconfig file.
      Signed-off-by: default avatarRobert P. J. Day <rpjday@mindspring.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9f705bde
    • Mike Nuss's avatar
      USB: OHCI handles more ZFMicro quirks · 89a0fd18
      Mike Nuss authored
      
      
      The ZF Micro OHCI controller exhibits unexpected behavior that seems to be
      related to high load.  Under certain conditions, the controller will
      complete a TD, remove it from the endpoint's queue, and fail to add it to
      the donelist. This causes the endpoint to appear to stop responding. Worse,
      if the device is removed while in that state, OHCI will hang while waiting
      for the orphaned TD to complete.  The situation is not recoverable without
      rebooting.
      
      This fix enhances the scope of the existing OHCI_QUIRK_ZFMICRO flag:
      
       1. A watchdog routine periodically scans the OHCI structures to check
          for orphaned TDs. In these cases the TD is taken back from the
          controller and completed normally.
      
       2. If a device is removed while the endpoint is hung but before the
          watchdog catches the situation, any outstanding TDs are taken back
          from the controller in the 'sanitize' phase.
      
      The ohci-hcd driver used to print "INTR_SF lossage" in this situation;
      this changes it to the universally accurate "ED unlink timeout".  Other
      instances of this message presumably have different root causes.
      
      Both this Compaq quirk and a NEC quirk are now properly compiled out for
      non-PCI builds of this driver.
      Signed-off-by: default avatarMike Nuss <mike@terascala.com>
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      89a0fd18
    • Pete Zaitcev's avatar
      usblp: Make use of URB_FREE_BUFFER · e8fa0ce6
      Pete Zaitcev authored
      
      
      Employ the new API URB_FREE_BUFFER that we've got. There was talk of a combined
      constructor for this case, but apparently it's not happening, so just set the
      flag explicitly for now.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e8fa0ce6
    • Pete Zaitcev's avatar
      usblp: Implement the ENOSPC convention · 7f477358
      Pete Zaitcev authored
      
      
      This patch implements a mode when a printer returns ENOSPC when it runs
      out of paper. The default remains the same as before. An application which
      wishes to use this function has to enable it explicitly with an ioctl
      LPABORT.
      
      This is done on a request by our (Fedora) CUPS guy, Tim Waugh. The API is
      similar enough to the lp0's one that CUPS works with both (but see below),
      but it's has some differences.
      
      Most importantly, the abort mode is persistent in case of lp0: once tunelp
      was run your cat fill blow up until you reboot or run tunelp again. For
      usblp, I made it so the abort mode is only in effect as long as device
      is open. This way you can mix and match CUPS and cat(1) freely and nothing
      bad happens even if you run out of paper. It is also safer in the face
      of any unexpected crashes.
      
      It has to be noted that mixing LPABORT and O_NONBLOCK is not advised.
      It probably does not do what you want: instead of returning -ENOSPC
      it will always return -EAGAIN (because it would otherwise block while
      waiting for the paper). Applications which use O_NONBLOCK should continue
      to use LPGETSTATUS like before.
      
      Finally, CUPS actually requires patching to take full advantage of this.
      It has several components; those which invoke LPABORT work, but some of
      them need the ioctl added. This is completely compatible, you can mix
      old CUPS and new kernels or vice versa.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7f477358
    • Jesper Juhl's avatar
      USB: Clean up duplicate includes in drivers/usb/ · ca337db6
      Jesper Juhl authored
      
      
      This patch cleans up duplicate includes in
      	drivers/usb/
      Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ca337db6
    • Micah Gruber's avatar
      USB: Remove unneeded pointer intf from speedtch_upload_firmware() · 011db815
      Micah Gruber authored
      
      
      This trivial patch removes the unneeded pointer intf returned from
      usb_ifnum_to_if(), which is never used. The check for NULL can be simply done
      by if (!usb_ifnum_to_if(usb_dev, 2)).
      Signed-off-by: default avatarMicah Gruber <micah.gruber@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      011db815
    • Al Viro's avatar
      Fix up more bio fallout · 782e3b3b
      Al Viro authored
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      782e3b3b
    • Linus Torvalds's avatar
      Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · cbd09dbb
      Linus Torvalds authored
      * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
        [ZLIB]: Fix external builds of zlib_inflate code.
        [TG3]: Fix APE induced regression
        [SKY2]: version 1.19
        [SKY2]: use netdevice stats struct
        [SKY2]: fiber advertise bits initialization (trivial)
        [SKY2]: fix power settings on Yukon XL
        [SKY2]: ethtool register reserved area blackout
      cbd09dbb
    • Al Viro's avatar
      missed bio_endio() in axonram · d81fec0f
      Al Viro authored
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d81fec0f
  2. 11 Oct, 2007 23 commits