1. 13 10月, 2007 6 次提交
    • A
      USB: Eliminate urb->status usage! · 4a00027d
      Alan Stern 提交于
      This patch (as979) removes the last vestiges of urb->status from the
      host controller drivers and the root-hub emulator.  Now the field
      doesn't get set until just before the URB's completion routine is
      called.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a00027d
    • A
      USB: reorganize urb->status use in r8a66597-hcd · 888fda47
      Alan Stern 提交于
      This patch (as977) reorganizes the way r8a66597-hcd sets urb->status.  It
      now keeps the information in a local variable until the last moment.
      
      Parts of this patch were written by Yoshihiro Shimoda.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      888fda47
    • A
      USB: add urb->unlinked field · eb231054
      Alan Stern 提交于
      This patch (as970) adds a new urb->unlinked field, which is used to
      store the status of unlinked URBs since we can't use urb->status for
      that purpose any more.  To help simplify the HCDs, usbcore will check
      urb->unlinked before calling the completion handler; if the value is
      set it will automatically override the status reported by the HCD.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eb231054
    • A
      USB: centralize -EREMOTEIO handling · b0d9efba
      Alan Stern 提交于
      This patch (as969) continues the ongoing changes to the way HCDs
      report URB statuses.  The programming interface has been simplified by
      making usbcore responsible for clearing urb->hcpriv and for setting
      -EREMOTEIO status when an URB with the URB_SHORT_NOT_OK flag ends up
      as a short transfer.
      
      By moving the work out of the HCDs, this removes a fair amount of
      repeated code.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b0d9efba
    • A
      USB: minor fixes for r8a66597 driver · dfd1e537
      Alan Stern 提交于
      This patch (as967) makes a few relatively minor changes to the
      r8a66597 driver:
      
      	finish_request() does nothing but call done(), so merge the
      	two routines.
      
      	Detect and report -EOVERFLOW errors.
      
      	Fix the calculation that checks for short packets.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dfd1e537
    • A
      USB: make HCDs responsible for managing endpoint queues · e9df41c5
      Alan Stern 提交于
      This patch (as954) implements a suggestion of David Brownell's.  Now
      the host controller drivers are responsible for linking and unlinking
      URBs to/from their endpoint queues.  This eliminates the possiblity of
      strange situations where usbcore thinks an URB is linked but the HCD
      thinks it isn't.  It also means HCDs no longer have to check for URBs
      being dequeued before they were fully enqueued.
      
      In addition to the core changes, this requires changing every host
      controller driver and the root-hub URB handler.  For the most part the
      required changes are fairly small; drivers have to call
      usb_hcd_link_urb_to_ep() in their urb_enqueue method,
      usb_hcd_check_unlink_urb() in their urb_dequeue method, and
      usb_hcd_unlink_urb_from_ep() before giving URBs back.  A few HCDs make
      matters more complicated by the way they split up the flow of control.
      
      In addition some method interfaces get changed.  The endpoint argument
      for urb_enqueue is now redundant so it is removed.  The unlink status
      is required by usb_hcd_check_unlink_urb(), so it has been added to
      urb_dequeue.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: David Brownell <david-b@pacbell.net>
      CC: Olav Kongas <ok@artecdesign.ee>
      CC: Tony Olech <tony.olech@elandigitalsystems.com>
      CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e9df41c5
  2. 23 8月, 2007 1 次提交
    • P
      usb: r8a66597-hcd: fix up error path. · 71ee9a6c
      Paul Mundt 提交于
      Currently when registration fails we're left with a stray reference to
      release_mem_region(), this leads to the following case:
      
          r8a66597_hcd r8a66597_hcd: irq 13, io base 0x18040000
          drivers/usb/host/r8a66597-hcd.c: register access fail.
          r8a66597_hcd r8a66597_hcd: startup error -6
          r8a66597_hcd r8a66597_hcd: USB bus 1 deregistered
          drivers/usb/host/r8a66597-hcd.c: Failed to add hcd
          Trying to free nonexistent resource <0000000018040000-0000000018040000>
      
      This fixes it up.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      71ee9a6c
  3. 20 7月, 2007 1 次提交
  4. 13 7月, 2007 2 次提交
    • Y
      USB: r8a66597-hcd: fix NULL access · f6ace2c9
      Yoshihiro Shimoda 提交于
      This patch fixes the problem that accesses NULL pointer
      when disconnected a cable while play music with usb-speaker.
      Signed-off-by: NYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f6ace2c9
    • Y
      USB: r8a66597-hcd: host controller driver for R8A66597 · 5d304358
      Yoshihiro Shimoda 提交于
      I would like to submit Renesas R8A66597 USB HCD driver.
      
      R8A66597 is Renesas USB 2.0 host and peripheral combined
      controller device originally designed for embedded products.
      As a limitation of this device, it does not support externel
      hub more than 2 tier, and cannot communicate with a USB
      device more than 10. Then this device is not compatible with
      EHCI and/or OHCI, I wrote driver support patch based on
      sl811 code.
      
      This driver has the following unique specifications:
      - Implement transfer timeout to share one pipe with plural endpoint.
      - Detach detection of a USB device connected to externel hub.
      
      The driver has been tested external hub, usb-hdd, usb-cdrom,
      usb-speaker, mice, keyboard, and usbtest driver.
      
      Signed-off-by : Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5d304358