1. 13 10月, 2007 5 次提交
    • M
      USB: OHCI handles more ZFMicro quirks · 89a0fd18
      Mike Nuss 提交于
      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: NMike Nuss <mike@terascala.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      89a0fd18
    • P
      usblp: Make use of URB_FREE_BUFFER · e8fa0ce6
      Pete Zaitcev 提交于
      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: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e8fa0ce6
    • P
      usblp: Implement the ENOSPC convention · 7f477358
      Pete Zaitcev 提交于
      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: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7f477358
    • J
      USB: Clean up duplicate includes in drivers/usb/ · ca337db6
      Jesper Juhl 提交于
      This patch cleans up duplicate includes in
      	drivers/usb/
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ca337db6
    • M
      USB: Remove unneeded pointer intf from speedtch_upload_firmware() · 011db815
      Micah Gruber 提交于
      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: NMicah Gruber <micah.gruber@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      011db815
  2. 12 10月, 2007 35 次提交