1. 27 9月, 2011 4 次提交
  2. 21 9月, 2011 8 次提交
  3. 18 9月, 2011 18 次提交
  4. 10 9月, 2011 10 次提交
    • K
      usb gadget: clean up FSF boilerplate text · 28c9fc68
      Klaus Schwarzkopf 提交于
      remove the following two paragraphs as they are not needed:
      
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      License for more details.
      
      You should have received a copy of the GNU General Public License along with
      this program; if not, write to the Free Software Foundation, Inc.,59
      Temple Place - Suite 330, Boston, MA  02111-1307, USA.
      Signed-off-by: NKlaus Schwarzkopf <schwarzkopf@sensortherm.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      28c9fc68
    • H
      musb_gadget: Fix for spurious interrupts on endpoint zero. · de76cc2b
      Hans Petter Selasky 提交于
      There is a multi-year old bug in the MUSB hardware which is not documented.
      It causes spurious interrupts and have various symptoms, like endless
      "SetupEnd came in a wrong ep0stage" messages. The fix is taken from the
      FreeBSD's musb driver.
      
      How to reproduce:
      For example issue clear-stall on a couple of endpoints very fast,
      like one request per 125us. After a while the bug triggers and the
      musb-chip becomes unusable until next re-enumeration.
      Signed-off-by: NHans Petter Selasky <hps@bitfrost.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      de76cc2b
    • J
      USB: for usb_autopm_get_interface_async -EINPROGRESS is not an error · c5a48592
      Jim Wylder 提交于
      A return value of -EINPROGRESS from pm_runtime_get indicates that
      the device is already resuming due to a previous call.  Internally,
      usb_autopm_get_interface_async doesn't treat this as an error and
      increments the usage count, but passes the error status along
      to the caller.  The logical assumption of the caller is that
      any negative return value reflects the device not resuming
      and the pm_usage_cnt not being incremented.  Since the usage count
      is being incremented and the device is resuming, return success (0)
      instead.
      Signed-off-by: NJames Wylder <james.wylder@motorola.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c5a48592
    • L
      USB: storage: Use normalized sense when emulating autosense · e16da02f
      Luben Tuikov 提交于
      This patch solves two things:
      1) Enables autosense emulation code to correctly
      interpret descriptor format sense data, and
      2) Fixes a bug whereby the autosense emulation
      code would overwrite descriptor format sense data
      with SENSE KEY HARDWARE ERROR in fixed format, to
      incorrectly look like this:
      
      Oct 21 14:11:07 localhost kernel: sd 7:0:0:0: [sdc]  Sense Key : Recovered Error [current] [descriptor]
      Oct 21 14:11:07 localhost kernel: Descriptor sense data with sense descriptors (in hex):
      Oct 21 14:11:07 localhost kernel:        72 01 04 1d 00 00 00 0e 09 0c 00 00 00 00 00 00
      Oct 21 14:11:07 localhost kernel:        00 4f 00 c2 00 50
      Oct 21 14:11:07 localhost kernel: sd 7:0:0:0: [sdc]  ASC=0x4 ASCQ=0x1d
      Signed-off-by: NLuben Tuikov <ltuikov@yahoo.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e16da02f
    • S
      xhci: Redundant check in xhci_check_args for xhci->devs · 73ddc247
      sifram.rajas@gmail.com 提交于
      The xhci_hcd->devs is an array of pointers rather than pointer to pointer.
      Hence this check is not required.
      
      Signed-off-by: Sifram Rajas <Sifram Rajas sifram.rajas@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      73ddc247
    • A
      xHCI: refine td allocation · 2ffdea25
      Andiry Xu 提交于
      In xhci_urb_enqueue(), allocate a block of memory for all the TDs instead
      of allocating memory for each of them separately. This reduces the number
      of kzalloc calling when an isochronous usb is submitted.
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2ffdea25
    • S
      xhci: Don't print short isoc packets. · fd984d24
      Sarah Sharp 提交于
      Now that the xHCI driver always return a status value of zero for isochronous
      URBs, when the last TD of an isochronous URB is short, the local variable
      "status" stays set to -EINPROGRESS.  When xHCI driver debugging is turned on,
      this causes the log file to fill with messages like this:
      
      [   38.859282] xhci_hcd 0000:00:14.0: Giveback URB ffff88013ad47800, len = 1408, expected = 580, status = -115
      
      Don't print out the status of an URB for isochronous URBs.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fd984d24
    • S
      xhci: Add software BW checking quirk to Intel PPT xHCI · 86cc558e
      Sarah Sharp 提交于
      The xHCI host controller in the Intel Panther Point chipset needs to have
      software check whether new devices will fit in the available bus
      bandwidth.  Activate the software bandwidth checking quirk when we find
      the right PCI device.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      86cc558e
    • S
      xhci: Implement HS/FS/LS bandwidth checking. · c29eea62
      Sarah Sharp 提交于
      Now that we have a bandwidth interval table per root port or TT that
      describes the endpoint bandwidth information, we can finally use it to
      check whether the bus bandwidth is oversubscribed for a new device
      configuration/alternate interface setting.
      
      The complication for this algorithm is that the bit of hardware logic that
      creates the bus schedule is only 12-bit logic.  In order to make sure it
      can represent the maximum bus bandwidth in 12 bits, it has to convert the
      endpoint max packet size and max esit payload into "blocks" (basically a
      less-precise representation).  The block size for each speed of device is
      different, aside from low speed and full speed.  In order to make sure we
      don't allow a setup where the scheduler might fail, we also have to do the
      bandwidth checking in blocks.
      
      After checking that the endpoints fit in the schedule, we store the
      bandwidth used for this root port or TT.  If this is a FS/LS device under
      an external HS hub, we also update the TT bandwidth and the root port
      bandwidth (if this is a newly activated or deactivated TT).
      
      I won't go into the details of the algorithm, as it's pretty well
      documented in the comments.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c29eea62
    • S
      xhci: Track interval bandwidth tables per port/TT. · 2e27980e
      Sarah Sharp 提交于
      In order to update the root port or TT's bandwidth interval table, we will
      need to keep track of a list of endpoints, per interval.  That way we can
      easily know the new largest max packet size when we have to remove an
      endpoint.
      
      Add an endpoint list for each root port or TT structure, sorted by
      endpoint max packet size.  Insert new endpoints into the list such that
      the head of the list always has the endpoint with the greatest max packet
      size.  Only insert endpoints and update the interval table with new
      information when those endpoints are periodic.
      
      Make sure to update the number of active TTs when we add or drop periodic
      endpoints.  A TT is only considered active if it has one or more periodic
      endpoints attached (control and bulk are best effort, and counted in the
      20% reserved on the high speed bus).  If the number of active endpoints
      for a TT was zero, and it's now non-zero, increment the number of active
      TTs for the rootport.  If the number of active endpoints was non-zero, and
      it's now zero, decrement the number of active TTs.
      
      We have to be careful when we're checking the bandwidth for a new
      configuration/alt setting.  If we don't have enough bandwidth, we need to
      be able to "roll back" the bandwidth information stored in the endpoint
      and the root port/TT interval bandwidth table.  We can't just create a
      copy of the interval bandwidth table, modify it, and check the bandwidth
      with the copy because we have lists of endpoints and entries can't be on
      more than one list.  Instead, we copy the old endpoint bandwidth
      information, and use it to revert the interval table when the bandwidth
      check fails.
      
      We don't check the bandwidth after endpoints are dropped from the interval
      table when a device is reset or freed after a disconnect, because having
      endpoints use less bandwidth should not push the bandwidth usage over the
      limits.  Besides which, we can't fail a device disconnect.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2e27980e