1. 25 2月, 2012 2 次提交
    • A
      usb-serial: use new registration API in [a-c]* drivers · 08a4f6bc
      Alan Stern 提交于
      This patch (as1523) modifies the following usb-serial drivers to
      utilize the new usb_serial_{de}register_drivers() routines:
      
      	aircable, ark3116, belkin_sa, ch341, cp210x, cyberjack,
      	and cypress_m8.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      08a4f6bc
    • A
      usb-serial: new API for driver registration · 765e0ba6
      Alan Stern 提交于
      This patch (as1522) adds two new routines to the usb-serial core, for
      registering and unregistering serial drivers.  Instead of registering
      the usb_driver and usb_serial_drivers separately, with error checking
      for each one, the drivers can all be registered and unregistered by a
      single function call.  This reduces duplicated code.
      
      More importantly, the new core routines change the order in which the
      drivers are registered.  Currently the usb-serial drivers are all
      registered first and the usb_driver is done last, which leaves a
      window for problems.  A udev script may quickly add a new dynamic-ID
      for a usb-serial driver, causing the corresponding usb_driver to be
      probed.  If the usb_driver hasn't been registered yet then an oops
      will occur.
      
      The new routine prevents such problems by registering the usb_driver
      first.  To insure that it gets probed properly for already-attached
      serial devices, we call driver_attach() after all the usb-serial
      drivers have been registered.
      
      Along with adding the new routines, the patch modifies the "generic"
      serial driver to use them.  Further patches will similarly modify all
      the other in-tree USB serial drivers.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      765e0ba6
  2. 22 2月, 2012 10 次提交
    • A
      drm/radeon/kms/atom: dpms bios scratch reg updates · 3ac0eb6d
      Alex Deucher 提交于
      dpms bits not used on DCE4+
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3ac0eb6d
    • J
      drm/radeon/kms: properly set accel working flag and bailout when false · 6b7746e8
      Jerome Glisse 提交于
      If accel is not working many subsystem such as the ib pool might not be
      initialized properly that can lead to segfault inside kernel when cs
      ioctl is call with non working acceleration. To avoid this make sure
      the accel working flag is false when an error in GPU startup happen and
      return EBUSY from cs ioctl if accel is not working.
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      6b7746e8
    • M
      drm/radeon: Only create additional ring debugfs files on Cayman or newer. · f0d14daa
      Michel Dänzer 提交于
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46274
      
      Tested with a Cayman card in a Llano system: The additional files are created
      and working for the Cayman card but not created for the CPU's built-in GPU.
      Signed-off-by: NMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f0d14daa
    • H
      asm-generic: architecture independent readq/writeq for 32bit environment · 797a796a
      Hitoshi Mitake 提交于
      This provides unified readq()/writeq() helper functions for 32-bit
      drivers.
      
      For some cases, readq/writeq without atomicity is harmful, and order of
      io access has to be specified explicitly.  So in this patch, new two
      header files which contain non-atomic readq/writeq are added.
      
       - <asm-generic/io-64-nonatomic-lo-hi.h> provides non-atomic readq/
         writeq with the order of lower address -> higher address
      
       - <asm-generic/io-64-nonatomic-hi-lo.h> provides non-atomic readq/
         writeq with reversed order
      
      This allows us to remove some readq()s that were added drivers when the
      default non-atomic ones were removed in commit dbee8a0a ("x86:
      remove 32-bit versions of readq()/writeq()")
      
      The drivers which need readq/writeq but can do with the non-atomic ones
      must add the line:
      
        #include <asm-generic/io-64-nonatomic-lo-hi.h> /* or hi-lo.h */
      
      But this will be nop in 64-bit environments, and no other #ifdefs are
      required.  So I believe that this patch can solve the problem of
       1. driver-specific readq/writeq
       2. atomicity and order of io access
      
      This patch is tested with building allyesconfig and allmodconfig as
      ARCH=x86 and ARCH=i386 on top of tip/master.
      
      Cc: Kashyap Desai <Kashyap.Desai@lsi.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Ravi Anand <ravi.anand@qlogic.com>
      Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Jason Uhlenkott <juhlenko@akamai.com>
      Cc: James Bottomley <James.Bottomley@parallels.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NHitoshi Mitake <h.mitake@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      797a796a
    • B
      USB: Added Kamstrup VID/PIDs to cp210x serial driver. · c6c1e449
      Bruno Thomsen 提交于
      Signed-off-by: NBruno Thomsen <bruno.thomsen@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c6c1e449
    • A
      USB: Serial: ti_usb_3410_5052: Add Abbot Diabetes Care cable id · 7fd25702
      Andrew Lunn 提交于
      This USB-serial cable with mini stereo jack enumerates as:
      Bus 001 Device 004: ID 1a61:3410 Abbott Diabetes Care
      
      It is a TI3410 inside.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7fd25702
    • A
      usb-storage: fix freezing of the scanning thread · bb94a406
      Alan Stern 提交于
      This patch (as1521b) fixes the interaction between usb-storage's
      scanning thread and the freezer.  The current implementation has a
      race: If the device is unplugged shortly after being plugged in and
      just as a system sleep begins, the scanning thread may get frozen
      before the khubd task.  Khubd won't be able to freeze until the
      disconnect processing is complete, and the disconnect processing can't
      proceed until the scanning thread finishes, so the sleep transition
      will fail.
      
      The implementation in the 3.2 kernel suffers from an additional
      problem.  There the scanning thread calls set_freezable_with_signal(),
      and the signals sent by the freezer will mess up the thread's I/O
      delays, which are all interruptible.
      
      The solution to both problems is the same: Replace the kernel thread
      used for scanning with a delayed-work routine on the system freezable
      work queue.  Freezable work queues have the nice property that you can
      cancel a work item even while the work queue is frozen, and no signals
      are needed.
      
      The 3.2 version of this patch solves the problem in Bugzilla #42730.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NSeth Forshee <seth.forshee@canonical.com>
      CC: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bb94a406
    • S
      xhci: Fix encoding for HS bulk/control NAK rate. · 340a3504
      Sarah Sharp 提交于
      The xHCI 0.96 spec says that HS bulk and control endpoint NAK rate must
      be encoded as an exponent of two number of microframes.  The endpoint
      descriptor has the NAK rate encoded in number of microframes.  We were
      just copying the value from the endpoint descriptor into the endpoint
      context interval field, which was not correct.  This lead to the VIA
      host rejecting the add of a bulk OUT endpoint from any USB 2.0 mass
      storage device.
      
      The fix is to use the correct encoding.  Refactor the code to convert
      number of frames to an exponential number of microframes, and make sure
      we convert the number of microframes in HS bulk and control endpoints to
      an exponent.
      
      This should be back ported to kernels as old as 2.6.31, that contain the
      commit dfa49c4a "USB: xhci - fix math
      in xhci_get_endpoint_interval"
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Suggested-by: NAndiry Xu <andiry.xu@amd.com>
      Cc: stable@vger.kernel.org
      340a3504
    • E
      USB: Set hub depth after USB3 hub reset · a45aa3b3
      Elric Fu 提交于
      The superspeed device attached to a USB 3.0 hub(such as VIA's)
      doesn't respond the address device command after resume. The
      root cause is the superspeed hub will miss the Hub Depth value
      that is used as an offset into the route string to locate the
      bits it uses to determine the downstream port number after
      reset, and all packets can't be routed to the device attached
      to the superspeed hub.
      
      Hub driver sends a Set Hub Depth request to the superspeed hub
      except for USB 3.0 root hub when the hub is initialized and
      doesn't send the request again after reset due to the resume
      process. So moving the code that sends the Set Hub Depth request
      to the superspeed hub from hub_configure() to hub_activate()
      is to cover those situations include initialization and reset.
      
      The patch should be backported to kernels as old as 2.6.39.
      Signed-off-by: NElric Fu <elricfu1@gmail.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable@vger.kernel.org
      a45aa3b3
    • S
      USB: Fix handoff when BIOS disables host PCI device. · cab928ee
      Sarah Sharp 提交于
      On some systems with an Intel Panther Point xHCI host controller, the
      BIOS disables the xHCI PCI device during boot, and switches the xHCI
      ports over to EHCI.  This allows the BIOS to access USB devices without
      having xHCI support.
      
      The downside is that the xHCI BIOS handoff mechanism will fail because
      memory mapped I/O is not enabled for the disabled PCI device.
      Jesse Barnes says this is expected behavior.  The PCI core will enable
      BARs before quirks run, but it will leave it in an undefined state, and
      it may not have memory mapped I/O enabled.
      
      Make the generic USB quirk handler call pci_enable_device() to re-enable
      MMIO, and call pci_disable_device() once the host-specific BIOS handoff
      is finished.  This will balance the ref counts in the PCI core.  When
      the PCI probe function is called, usb_hcd_pci_probe() will call
      pci_enable_device() again.
      
      This should be back ported to kernels as old as 2.6.31.  That was the
      first kernel with xHCI support, and no one has complained about BIOS
      handoffs failing due to memory mapped I/O being disabled on other hosts
      (EHCI, UHCI, or OHCI).
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: NOliver Neukum <oneukum@suse.de>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: stable@vger.kernel.org
      cab928ee
  3. 17 2月, 2012 1 次提交
  4. 16 2月, 2012 21 次提交
  5. 15 2月, 2012 6 次提交
    • L
      USB: option: cleanup zte 3g-dongle's pid in option.c · b9e44fe5
      li.rui27@zte.com.cn 提交于
        1. Remove all old mass-storage ids's pid:
           0x0026,0x0053,0x0098,0x0099,0x0149,0x0150,0x0160;
        2. As the pid from 0x1401 to 0x1510 which have not surely assigned to
           use for serial-port or mass-storage port,so i think it should be
           removed now, and will re-add after it have assigned in future;
        3. sort the pid to WCDMA and CDMA.
      Signed-off-by: NRui li <li.rui27@zte.com.cn>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b9e44fe5
    • E
      3c59x: shorten timer period for slave devices · 3013dc0c
      Eric Dumazet 提交于
      Jean Delvare reported bonding on top of 3c59x adapters was not detecting
      network cable removal fast enough.
      
      3c59x indeed uses a 60 seconds timer to check link status if carrier is
      on, and 5 seconds if carrier is off.
      
      This patch reduces timer period to 5 seconds if device is a bonding
      slave.
      Reported-by: NJean Delvare <jdelvare@suse.de>
      Acked-by: NJean Delvare <jdelvare@suse.de>
      Acked-by: NSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3013dc0c
    • S
      USB: Turn on auto-suspend for USB 3.0 hubs. · 2839f5bc
      Sarah Sharp 提交于
      Now that USB 3.0 hub remote wakeup on port status changes is enabled,
      and USB 3.0 device remote wakeup is handled in the USB core properly,
      let's turn on auto-suspend for all USB 3.0 hubs.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      2839f5bc
    • S
      USB: Set wakeup bits for all children hubs. · 72937e1e
      Sarah Sharp 提交于
      This patch takes care of the race condition between the Function Wake
      Device Notification and the auto-suspend timeout for this situation:
      
      Roothub
        | (U3)
      hub A
        | (U3)
      hub B
        | (U3)
      device C
      
      When device C signals a resume, the xHCI driver will set the wakeup_bits
      for the roothub port that hub A is attached to.  However, since USB 3.0
      hubs do not set a link state change bit on device-initiated resume, hub
      A will not indicate a port event when polled.  Without this patch, khubd
      will notice the wakeup-bits are set for the roothub port, it will resume
      hub A, and then it will poll the events bits for hub A and notice that
      nothing has changed.  Then it will be suspended after 2 seconds.
      
      Change hub_activate() to look at the port link state for each USB 3.0
      hub port, and set hub->change_bits if the link state is U0, indicating
      the device has finished resume.  Change the resume function called by
      hub_events(), hub_handle_remote_wakeup(), to check the link status
      for resume instead of just the port's wakeup_bits.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      72937e1e
    • S
      USB/xHCI: Support device-initiated USB 3.0 resume. · 4ee823b8
      Sarah Sharp 提交于
      USB 3.0 hubs don't have a port suspend change bit (that bit is now
      reserved).  Instead, when a host-initiated resume finishes, the hub sets
      the port link state change bit.
      
      When a USB 3.0 device initiates remote wakeup, the parent hubs with
      their upstream links in U3 will pass the LFPS up the chain.  The first
      hub that has an upstream link in U0 (which may be the roothub) will
      reflect that LFPS back down the path to the device.
      
      However, the parent hubs in the resumed path will not set their link
      state change bit.  Instead, the device that initiated the resume has to
      send an asynchronous "Function Wake" Device Notification up to the host
      controller.  Therefore, we need a way to notify the USB core of a device
      resume without going through the normal hub URB completion method.
      
      First, make the xHCI roothub act like an external USB 3.0 hub and not
      pass up the port link state change bit when a device-initiated resume
      finishes.  Introduce a new xHCI bit field, port_remote_wakeup, so that
      we can tell the difference between a port coming out of the U3Exit state
      (host-initiated resume) and the RExit state (ending state of
      device-initiated resume).
      
      Since the USB core can't tell whether a port on a hub has resumed by
      looking at the Hub Status buffer, we need to introduce a bitfield,
      wakeup_bits, that indicates which ports have resumed.  When the xHCI
      driver notices a port finishing a device-initiated resume, we call into
      a new USB core function, usb_wakeup_notification(), that will set
      the right bit in wakeup_bits, and kick khubd for that hub.
      
      We also call usb_wakeup_notification() when the Function Wake Device
      Notification is received by the xHCI driver.  This covers the case where
      the link between the roothub and the first-tier hub is in U0, and the
      hub reflects the resume signaling back to the device without giving any
      indication it has done so until the device sends the Function Wake
      notification.
      
      Change the code in khubd that handles the remote wakeup to look at the
      state the USB core thinks the device is in, and handle the remote wakeup
      if the port's wakeup bit is set.
      
      This patch only takes care of the case where the device is attached
      directly to the roothub, or the USB 3.0 hub that is attached to the root
      hub is the device sending the Function Wake Device Notification (e.g.
      because a new USB device was attached).  The other cases will be covered
      in a second patch.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      4ee823b8
    • S
      USB: Refactor hub remote wake handling. · 714b07be
      Sarah Sharp 提交于
      Refactor the code to check for a remote wakeup on a port into its own
      function.  Keep the behavior the same, and set connect_change in
      hub_events if the device disconnected on resume.  Cleanup references to
      hdev->children[i-1] to use a common variable.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      714b07be