1. 21 5月, 2010 9 次提交
    • H
      USB: remove duplicated #include · 45f30e0b
      Huang Weiyi 提交于
      Remove duplicated #include('s) in
        drivers/usb/core/hcd.c
      Signed-off-by: NHuang Weiyi <weiyi.huang@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      45f30e0b
    • I
      USB: Remove large struct from the stack in USB storage isd200 driver · 0df4d8ef
      Ian Munsie 提交于
      The compiler throws the following warning when compiling for a PowerPC 64
      bit machine:
      
      drivers/usb/storage/isd200.c:580: warning: the frame size of 2208 bytes is larger than 2048 bytes
      
      There is a struct scsi_device which is placed on the stack and is
      largely responsible for such wastage. The struct is just a dummy struct
      filled with NULLs and set as the scsi_cmnd->device to make the
      usb_stor_Bulk_transport function happy.
      
      This patch makes the struct static, so that it is never placed onto the
      stack and silences the compiler warning.
      Signed-off-by: NIan Munsie <imunsie@au.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0df4d8ef
    • R
      USB: cdc-acm: make bitfields unsigned · fa4dc364
      Randy Dunlap 提交于
      Fix usb/class sparse warnings:
      
      drivers/usb/class/cdc-acm.h:128:34: error: dubious one-bit signed bitfield
      drivers/usb/class/cdc-acm.h:129:24: error: dubious one-bit signed bitfield
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fa4dc364
    • A
      USB: sisusbvga: Remove the BKL from ioctl · 41f2c6e8
      Alessio Igor Bogani 提交于
      Seems to me that BKL is not needed here because necessary locking is already
      provided by mutex sisusb->lock.
      
      Also change the returned value to long.
      Signed-off-by: NAlessio Igor Bogani <abogani@texware.it>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      41f2c6e8
    • E
      USB: make hub.h public (drivers dependency) · d65d7e7e
      Eric Lescouet 提交于
      The usbcore headers: hcd.h and hub.h are shared between usbcore,
      HCDs and a couple of other drivers (e.g. USBIP modules).
      So, it makes sense to move them into a more public location and
      to cleanup dependency of those modules on kernel internal headers.
      This patch moves hub.h from drivers/usb/core into include/linux/usb/
      Signed-of-by: NEric Lescouet <eric@lescouet.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d65d7e7e
    • E
      USB: make hcd.h public (drivers dependency) · 27729aad
      Eric Lescouet 提交于
      The usbcore headers: hcd.h and hub.h are shared between usbcore,
      HCDs and a couple of other drivers (e.g. USBIP modules).
      So, it makes sense to move them into a more public location and
      to cleanup dependency of those modules on kernel internal headers.
      This patch moves hcd.h from drivers/usb/core into include/linux/usb/
      Signed-of-by: NEric Lescouet <eric@lescouet.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      27729aad
    • S
      USB: xhci: Fix check for room on the ring. · 44ebd037
      Sarah Sharp 提交于
      The length of the scatter gather list a driver can enqueue is limited by
      the bus' sg_tablesize to 62 entries.  Each entry will be described by at
      least one transfer request block (TRB).  If the entry's buffer crosses a
      64KB boundary, then that entry will have to be described by two or more
      TRBs.  So even if the USB device driver respects sg_tablesize, the whole
      scatter list may take more than 62 TRBs to describe, and won't fit on
      the ring.
      
      Don't assume that an empty ring means there is enough room on the
      transfer ring.  The old code would unconditionally queue this too-large
      transfer, and over write the beginning of the transfer.  This would mean
      the cycle bit was unchanged in those overwritten transfers, causing the
      hardware to think it didn't own the TRBs, and the host would seem to
      hang.
      
      Now drivers may see submit_urb() fail with -ENOMEM if the transfers are
      too big to fit on the ring.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      44ebd037
    • S
      USB: xhci: Limit bus sg_tablesize to 62 TRBs. · bc88d2eb
      Sarah Sharp 提交于
      When a scatter-gather list is enqueued to the xHCI driver, it translates
      each entry into a transfer request block (TRB).  Only 63 TRBs can be
      used per ring segment, and there must be one additional TRB reserved to
      make sure the hardware does not think the ring is empty (so the enqueue
      pointer doesn't equal the dequeue pointer).  Limit the bus sg_tablesize
      to 62 TRBs.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bc88d2eb
    • S
      USB: xhci: Fix issue with set interface after stall. · 1624ae1c
      Sarah Sharp 提交于
      When the USB core installs a new interface, it unconditionally clears the
      halts on all the endpoints on the new interface.  Usually the xHCI host
      needs to know when an endpoint is reset, so it can change its internal
      endpoint state.  In this case, it doesn't care, because the endpoints were
      never halted in the first place.
      
      To avoid issuing a redundant Reset Endpoint command, the xHCI driver looks
      at xhci_virt_ep->stopped_td to determine if the endpoint was actually
      halted.  However, the functions that handle the stall never set that
      variable to NULL after it dealt with the stall.  So if an endpoint stalled
      and a Reset Endpoint command completed, and then the class driver tried to
      install a new alternate setting, the xHCI driver would access the old
      xhci_virt_ep->stopped_td pointer.  A similar problem occurs if the
      endpoint has been stopped to cancel a transfer.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1624ae1c
  2. 16 5月, 2010 1 次提交
  3. 15 5月, 2010 1 次提交
    • A
      Fix the regression created by "set S_DEAD on unlink()..." commit · d83c49f3
      Al Viro 提交于
      1) i_flags simply doesn't work for mount/unlink race prevention;
      we may have many links to file and rm on one of those obviously
      shouldn't prevent bind on top of another later on.  To fix it
      right way we need to mark _dentry_ as unsuitable for mounting
      upon; new flag (DCACHE_CANT_MOUNT) is protected by d_flags and
      i_mutex on the inode in question.  Set it (with dont_mount(dentry))
      in unlink/rmdir/etc., check (with cant_mount(dentry)) in places
      in namespace.c that used to check for S_DEAD.  Setting S_DEAD
      is still needed in places where we used to set it (for directories
      getting killed), since we rely on it for readdir/rmdir race
      prevention.
      
      2) rename()/mount() protection has another bogosity - we unhash
      the target before we'd checked that it's not a mountpoint.  Fixed.
      
      3) ancient bogosity in pivot_root() - we locked i_mutex on the
      right directory, but checked S_DEAD on the different (and wrong)
      one.  Noticed and fixed.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d83c49f3
  4. 14 5月, 2010 3 次提交
  5. 13 5月, 2010 5 次提交
  6. 12 5月, 2010 12 次提交
  7. 11 5月, 2010 5 次提交
  8. 10 5月, 2010 1 次提交
    • A
      cpuidle: Fix incorrect optimization · 1c6fe036
      Arjan van de Ven 提交于
      commit 672917dc ("cpuidle: menu governor: reduce latency on exit")
      added an optimization, where the analysis on the past idle period moved
      from the end of idle, to the beginning of the new idle.
      
      Unfortunately, this optimization had a bug where it zeroed one key
      variable for new use, that is needed for the analysis.  The fix is
      simple, zero the variable after doing the work from the previous idle.
      
      During the audit of the code that found this issue, another issue was
      also found; the ->measured_us data structure member is never set, a
      local variable is always used instead.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Corrado Zoccolo <czoccolo@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1c6fe036
  9. 08 5月, 2010 3 次提交