1. 12 Apr, 2012 1 commit
    • Greg Kroah-Hartman's avatar
      Merge tag 'for-usb-linus-2012-04-11' of... · 5c15c9a6
      Greg Kroah-Hartman authored
      Merge tag 'for-usb-linus-2012-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus
      
      Hi Greg,
      
      Here's 11 xHCI bug fixes for 3.4.
      
      Some of the patches fix issues with crashes on system resume related to
      VIA xHCI host controllers accessing bad memory addresses.  The patches
      change the register restore ordering, so I had several vendors confirm
      that the patches don't break their xHCI hosts.
      
      Elric Fu confirms this patchset fixes the VIA issue, Alex He confirms
      the changes does not break suspend/resume on AMD xHCI systems, and I've
      made sure it doesn't break Intel host controllers.  I have not heard
      back from Felipe about the TI host, so at this point, I'm just going to
      send them off.
      
      Several of the patches are marked for stable.  Please pull.
      
      Sarah Sharp
      5c15c9a6
  2. 11 Apr, 2012 9 commits
    • Alex He's avatar
      xHCI: Correct the #define XHCI_LEGACY_DISABLE_SMI · 95018a53
      Alex He authored
      Re-define XHCI_LEGACY_DISABLE_SMI and used it in right way. All SMI enable
      bits will be cleared to zero and flag bits 29:31 are also cleared to zero.
      Other bits should be presvered as Table 146.
      
      This patch should be backported to kernels as old as 2.6.31.
      Signed-off-by: default avatarAlex He <alex.he@amd.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      95018a53
    • Dan Carpenter's avatar
      xHCI: use gfp flags from caller instead of GFP_ATOMIC · 3fc8206d
      Dan Carpenter authored
      The caller is allowed to specify the GFP flags for these functions.
      We should prefer their flags unless we have good reason.  For
      example, if we take a spin_lock ourselves we'd need to use
      GFP_ATOMIC.  But in this case it's safe to use the callers GFP
      flags.
      
      The callers all pass GFP_ATOMIC here, so this change doesn't affect
      how the kernel behaves but we may add other callers later and this
      is a cleanup.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      3fc8206d
    • Elric Fu's avatar
      xHCI: add XHCI_RESET_ON_RESUME quirk for VIA xHCI host · 457a4f61
      Elric Fu authored
      The suspend operation of VIA xHCI host have some issues and
      hibernate operation works fine, so The XHCI_RESET_ON_RESUME
      quirk is added for it.
      
      This patch should base on "xHCI: Don't write zeroed pointer
      to xHC registers" that is released by Sarah. Otherwise, the
      host system error will ocurr in the hibernate operation
      process.
      
      This should be backported to stable kernels as old as 2.6.37,
      that contain the commit c877b3b2
      "xhci: Add reset on resume quirk for asrock p67 host".
      Signed-off-by: default avatarElric Fu <elricfu1@gmail.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      457a4f61
    • Elric Fu's avatar
      USB: fix bug of device descriptor got from superspeed device · d8aec3db
      Elric Fu authored
      When the Seagate Goflex USB3.0 device is attached to VIA xHCI
      host, sometimes the device will downgrade mode to high speed.
      By the USB analyzer, I found the device finished the link
      training process and worked at superspeed mode. But the device
      descriptor got from the device shows the device works at 2.1.
      It is very strange and seems like the device controller of
      Seagate Goflex has a little confusion.
      
      The first 8 bytes of device descriptor should be:
      12 01 00 03 00 00 00 09
      
      But the first 8 bytes of wrong device descriptor are:
      12 01 10 02 00 00 00 40
      
      The wrong device descriptor caused the initialization of mass
      storage failed. After a while, the device would be recognized
      as a high speed device and works fine.
      
      This patch will warm reset the device to fix the issue after
      finding the bcdUSB field of device descriptor isn't 0x0300
      but the speed mode of device is superspeed.
      
      This patch should be backported to kernels as old as 3.2, or ones that
      contain the commit 75d7cf72 "usbcore:
      refine warm reset logic".
      Signed-off-by: default avatarElric Fu <elricfu1@gmail.com>
      Acked-by: default avatarAndiry Xu <Andiry.Xu@amd.com>
      Acked-by: default avatarSergei Shtylyov <sshtylyov@mvista.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      d8aec3db
    • Sarah Sharp's avatar
      xhci: Fix register save/restore order. · c7713e73
      Sarah Sharp authored
      The xHCI 1.0 spec errata released on June 13, 2011, changes the ordering
      that the xHCI registers are saved and restored in.  It moves the
      interrupt pending (IMAN) and interrupt control (IMOD) registers to be
      saved and restored last.  I believe that's because the host controller
      may attempt to fetch the event ring table when interrupts are
      re-enabled.  Therefore we need to restore the event ring registers
      before we re-enable interrupts.
      
      This should be backported to kernels as old as 2.6.37, that contain the
      commit 5535b1d5 "USB: xHCI: PCI power
      management implementation"
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: default avatarElric Fu <elricfu1@gmail.com>
      Cc: Andiry Xu <andiry.xu@amd.com>
      Cc: stable@vger.kernel.org
      c7713e73
    • Sarah Sharp's avatar
      xhci: Restore event ring dequeue pointer on resume. · fb3d85bc
      Sarah Sharp authored
      The xhci_save_registers() function saved the event ring dequeue pointer
      in the s3 register structure, but xhci_restore_registers() never
      restored it.  No other code in the xHCI successful resume path would
      ever restore it either.  Fix that.
      
      This should be backported to kernels as old as 2.6.37, that contain the
      commit 5535b1d5 "USB: xHCI: PCI power
      management implementation".
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: default avatarElric Fu <elricfu1@gmail.com>
      Cc: Andiry Xu <andiry.xu@amd.com>
      Cc: stable@vger.kernel.org
      fb3d85bc
    • Sarah Sharp's avatar
      xhci: Don't write zeroed pointers to xHC registers. · 159e1fcc
      Sarah Sharp authored
      When xhci_mem_cleanup() is called, we can't be sure if the xHC is
      actually halted.  We can ask the xHC to halt by writing to the RUN bit
      in the command register, but that might timeout due to a HW hang.
      
      If the host controller is still running, we should not write zeroed
      values to the event ring dequeue pointers or base tables, the DCBAA
      pointers, or the command ring pointers.  Eric Fu reports his VIA VL800
      host accesses the event ring pointers after a failed register restore on
      resume from suspend.  The hypothesis is that the host never actually
      halted before the register write to change the event ring pointer to
      zero.
      
      Remove all writes of zeroed values to pointer registers in
      xhci_mem_cleanup().  Instead, make all callers of the function reset the
      host controller first, which will reset those registers to zero.
      xhci_mem_init() is the only caller that doesn't first halt and reset the
      host controller before calling xhci_mem_cleanup().
      
      This should be backported to kernels as old as 2.6.32.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: default avatarElric Fu <elricfu1@gmail.com>
      Cc: stable@vger.kernel.org
      159e1fcc
    • Sarah Sharp's avatar
      xhci: Warn when hosts don't halt. · 5af98bb0
      Sarah Sharp authored
      Eric Fu reports a problem with his VIA host controller fetching a zeroed
      event ring pointer on resume from suspend.  The host should have been
      halted, but we can't be sure because that code ignores the return value
      from xhci_halt().  Print a warning when the host controller refuses to
      halt within XHCI_MAX_HALT_USEC (currently 16 seconds).
      
      (Update: it turns out that the VIA host controller is reporting a halted
      state when it fetches the zeroed event ring pointer.  However, we still
      need this warning for other host controllers.)
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      5af98bb0
    • Felipe Balbi's avatar
      xhci: don't re-enable IE constantly · 4e833c0b
      Felipe Balbi authored
      While we're at that, define IMAN bitfield to aid readability.
      
      The interrupt enable bit should be set once on driver init, and we
      shouldn't need to continually re-enable it.  Commit c21599a3 introduced
      a read of the irq_pending register, and that allows us to preserve the
      state of the IE bit.  Before that commit, we were blindly writing 0x3 to
      the register.
      
      This patch should be backported to kernels as old as 2.6.36, or ones
      that contain the commit c21599a3 "USB:
      xhci: Reduce reads and writes of interrupter registers".
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      4e833c0b
  3. 10 Apr, 2012 3 commits
    • Gerard Snitselaar's avatar
      usb: xhci: fix section mismatch in linux-next · a46c46a1
      Gerard Snitselaar authored
      xhci_unregister_pci() is called in xhci_hcd_init().
      Signed-off-by: default avatarGerard Snitselaar <dev@snitselaar.org>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      a46c46a1
    • Alex He's avatar
      xHCI: correct to print the true HSEE of USBCMD · bb334e90
      Alex He authored
      Correct the print of HSEE of USBCMD in xhci-dbg.c.
      Signed-off-by: default avatarAlex He <alex.he@amd.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      bb334e90
    • Johan Hovold's avatar
      USB: serial: fix race between probe and open · a65a6f14
      Johan Hovold authored
      Fix race between probe and open by making sure that the disconnected
      flag is not cleared until all ports have been registered.
      
      A call to tty_open while probe is running may get a reference to the
      serial structure in serial_install before its ports have been
      registered. This may lead to usb_serial_core calling driver open before
      port is fully initialised.
      
      With ftdi_sio this result in the following NULL-pointer dereference as
      the private data has not been initialised at open:
      
      [  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
      [  199.698297] *pde = 00000000
      [  199.698303] Oops: 0000 [#1] PREEMPT SMP
      [  199.698313] Modules linked in: ftdi_sio usbserial
      [  199.698323]
      [  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
      [  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
      [  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
      [  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
      [  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
      [  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      [  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
      [  199.698364] Stack:
      [  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
      [  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
      [  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
      [  199.698496] Call Trace:
      [  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
      [  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
      [  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
      [  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
      [  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
      [  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
      [  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
      [  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
      [  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
      [  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
      [  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
      [  199.698576]  [<c10f3e08>] do_last+0x198/0x730
      [  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
      [  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
      [  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
      [  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
      [  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
      [  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
      [  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
      [  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
      [  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
      [  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
      [  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
      [  199.698893] CR2: 0000000000000078
      [  199.698925] ---[ end trace 77c43ec023940cff ]---
      Reported-and-tested-by: default avatarKen Huang <csuhgw@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a65a6f14
  4. 09 Apr, 2012 11 commits
    • Alan Stern's avatar
      UHCI: hub_status_data should indicate if ports are resuming · b446b96f
      Alan Stern authored
      This patch (as1538) causes uhci_hub_status_data() to return a nonzero
      value when any port is undergoing a resume transition while the root
      hub is suspended.  This will allow usbcore to handle races between
      root-hub suspend and port wakeup.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b446b96f
    • Alan Stern's avatar
      EHCI: keep track of ports being resumed and indicate in hub_status_data · a448e4dc
      Alan Stern authored
      This patch (as1537) adds a bit-array to ehci-hcd for keeping track of
      which ports are undergoing a resume transition.  If any of the bits
      are set when ehci_hub_status_data() is called, the routine will return
      a nonzero value even if no ports have any status changes pending.
      This will allow usbcore to handle races between root-hub suspend and
      port wakeup.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      CC: Chen Peter-B29397 <B29397@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a448e4dc
    • Alan Stern's avatar
      USB: fix race between root-hub suspend and remote wakeup · 879d38e6
      Alan Stern authored
      This patch (as1533) fixes a race between root-hub suspend and remote
      wakeup.  If a wakeup event occurs while a root hub is suspending, it
      might not cause the suspend to fail.  Although the host controller
      drivers check for pending wakeup events at the start of their
      bus_suspend routines, they generally do not check for wakeup events
      while the routines are running.
      
      In addition, if a wakeup event occurs any time after khubd is frozen
      and before the root hub is fully suspended, it might not cause a
      system sleep transition to fail.  For example, the host controller
      drivers do not fail root-hub suspends when a connect-change event is
      pending.
      
      To fix both these issues, this patch causes hcd_bus_suspend() to query
      the controller driver's hub_status_data method after a root hub is
      suspended, if the root hub is enabled for wakeup.  Any pending status
      changes will count as wakeup events, causing the root hub to be
      resumed and the overall suspend to fail with -EBUSY.
      
      A significant point is that not all events are reflected immediately
      in the status bits.  Both EHCI and UHCI controllers notify the CPU
      when remote wakeup begins on a port, but the port's suspend-change
      status bit doesn't get set until after the port has completed the
      transition out of the suspend state, some 25 milliseconds later.
      Consequently, the patch will interpret any nonzero return value from
      hub_status_data as indicating a pending event, even if none of the
      status bits are set in the data buffer.  Follow-up patches make the
      necessary changes to ehci-hcd and uhci-hcd.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      CC: Chen Peter-B29397 <B29397@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      879d38e6
    • Anton Samokhvalov's avatar
      USB: sierra: add support for Sierra Wireless MC7710 · c5d703dc
      Anton Samokhvalov authored
      Just add new device id. 3G works fine, LTE not tested.
      Signed-off-by: default avatarAnton Samokhvalov <pg83@yandex.ru>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c5d703dc
    • Simon Arlott's avatar
      USB: ftdi_sio: fix race condition in TIOCMIWAIT, and abort of TIOCMIWAIT when the device is removed · 876ae50d
      Simon Arlott authored
      There are two issues here, one is that the device is generating
      spurious very fast modem status line changes somewhere:
      
      CTS becomes high then low 18µs later:
      [121226.924373] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=6
      [121226.924378] ftdi_process_packet: status=10 prev=00 diff=10
      [121226.924382] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=7
      (wake_up_interruptible is called)
      [121226.924391] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=7
      [121226.924394] ftdi_process_packet: status=00 prev=10 diff=10
      [121226.924397] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=8
      (wake_up_interruptible is called)
      
      This wakes up the task in TIOCMIWAIT:
      [121226.924405] ftdi_ioctl: 19451 rng=0->0 dsr=10->10 dcd=0->0 cts=6->8
      (wait from 20:51:46 returns and observes both changes)
      
      Which then calls TIOCMIWAIT again:
      20:51:46.400239 ioctl(3, TIOCMIWAIT, 0x20) = 0
      22:11:09.441818 ioctl(3, TIOCMGET, [TIOCM_DTR|TIOCM_RTS]) = 0
      22:11:09.442812 ioctl(3, TIOCMIWAIT, 0x20) = -1 EIO (Input/output error)
      (the second wake_up_interruptible takes effect and an I/O error occurs)
      
      The other issue is that TIOCMIWAIT will wait forever (unless the task is
      interrupted) if the device is removed.
      
      This change removes the -EIO return that occurs if the counts don't
      appear to have changed. Multiple counts may have been processed as
      one or the waiting task may have started waiting after recording the
      current count.
      
      It adds a bool to indicate that the device has been removed so that
      TIOCMIWAIT doesn't wait forever, and wakes up any tasks so that they can
      return -EIO.
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      876ae50d
    • Simon Arlott's avatar
      USB: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT · fca5430d
      Simon Arlott authored
      Handling of TIOCMIWAIT was changed by commit 1d749f9a
       USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers
      
      FTDI_STATUS_B0_MASK does not indicate the changed modem status lines,
      it indicates the value of the current modem status lines. An xor is
      still required to determine which lines have changed.
      
      The count was only being incremented if the line was high. The only
      reason TIOCMIWAIT still worked was because the status packet is
      repeated every 1ms, so the count was always changing. The wakeup
      itself still ran based on the status lines changing.
      
      This change fixes handling of updates to the modem status lines and
      allows multiple processes to use TIOCMIWAIT concurrently.
      
      Tested with two processes waiting on different status lines being
      toggled independently.
      Signed-off-by: default avatarSimon Arlott <simon@fire.lp0.eu>
      Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fca5430d
    • Alan Stern's avatar
      USB: don't ignore suspend errors for root hubs · cd4376e2
      Alan Stern authored
      This patch (as1532) fixes a mistake in the USB suspend code.  When the
      system is going to sleep, we should ignore errors in powering down USB
      devices, because they don't really matter.  The devices will go to low
      power anyway when the entire USB bus gets suspended (except for
      SuperSpeed devices; maybe they will need special treatment later).
      
      However we should not ignore errors in suspending root hubs,
      especially if the error indicates that the suspend raced with a wakeup
      request.  Doing so might leave the bus powered on while the system was
      supposed to be asleep, or it might cause the suspend of the root hub's
      parent controller device to fail, or it might cause a wakeup request
      to be ignored.
      
      The patch fixes the problem by ignoring errors only when the device in
      question is not a root hub.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-by: default avatarChen Peter <B29397@freescale.com>
      CC: <stable@vger.kernel.org>
      Tested-by: default avatarChen Peter <peter.chen@freescale.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cd4376e2
    • Alan Stern's avatar
      USB: fix bug in serial driver unregistration · 891a3b1f
      Alan Stern authored
      This patch (as1536) fixes a bug in the USB serial core.  Unloading and
      reloading a serial driver while a serial device is plugged in causes
      errors because of the code in usb_serial_disconnect() that tries to
      make sure the port_remove method is called.  With the new order of
      driver registration introduced in the 3.4 kernel, this is definitely
      not the right thing to do (if indeed it ever was).
      
      The patch removes that whole section code, along with the mechanism
      for keeping track of each port's registration state, which is no
      longer needed.  The driver core can handle all that stuff for us.
      
      Note: This has been tested only with one or two USB serial drivers.
      In theory, other drivers might still run into trouble.  But if they
      do, it will be the fault of the drivers, not of this patch -- that is,
      the drivers will need to be fixed.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-and-tested-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      891a3b1f
    • Aleksey Babahin's avatar
      USB: serial: metro-usb: Fix idProduct for Uni-Directional mode. · 3a450850
      Aleksey Babahin authored
      The right idProduct for Metrologic Bar Code Scanner
      in Uni-Directional Serial Emulation mode is 0x0700.
      
      Also rename idProduct for Bi-Directional mode to be a bit more informative.
      Signed-off-by: default avatarAleksey Babahin <tamerlan311@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3a450850
    • Santiago Garcia Mantinan's avatar
      USB: option: re-add NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED to option_id array · 9ac2feb2
      Santiago Garcia Mantinan authored
      Re-add NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED to option_id array
      Signed-off-by: default avatarSantiago Garcia Mantinan <manty@debian.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9ac2feb2
    • Johan Hovold's avatar
      USB: pl2303: fix DTR/RTS being raised on baud rate change · ce5c9851
      Johan Hovold authored
      DTR/RTS should only be raised when changing baudrate from B0 and not on
      any baud rate change (> B0).
      Reported-by: default avatarSøren Holm <sgh@sgh.dk>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ce5c9851
  5. 08 Apr, 2012 2 commits
  6. 07 Apr, 2012 13 commits
    • Linus Torvalds's avatar
      Merge tag 'regmap-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · f4e52e7f
      Linus Torvalds authored
      Pull two more small regmap fixes from Mark Brown:
       - Now we have users for it that aren't running Android it turns out
         that regcache_sync_region() is much more useful to drivers if it's
         exported for use by modules.  Who knew?
       - Make sure we don't divide by zero when doing debugfs dumps of
         rbtrees, not visible up until now because everything was providing at
         least some cache on startup.
      
      * tag 'regmap-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: prevent division by zero in rbtree_show
        regmap: Export regcache_sync_region()
      f4e52e7f
    • Linus Torvalds's avatar
      Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm · a3fac080
      Linus Torvalds authored
      Pull a few KVM fixes from Avi Kivity:
       "A bunch of powerpc KVM fixes, a guest and a host RCU fix (unrelated),
        and a small build fix."
      
      * 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: Resolve RCU vs. async page fault problem
        KVM: VMX: vmx_set_cr0 expects kvm->srcu locked
        KVM: PMU: Fix integer constant is too large warning in kvm_pmu_set_msr()
        KVM: PPC: Book3S: PR: Fix preemption
        KVM: PPC: Save/Restore CR over vcpu_run
        KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry
        KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears exist
        KVM: PPC: Book3S: Compile fix for ppc32 in HIOR access code
      a3fac080
    • Linus Torvalds's avatar
      Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh · 664481ed
      Linus Torvalds authored
      Pull SuperH fixes from Paul Mundt.
      
      * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
        sh: fix clock-sh7757 for the latest sh_mobile_sdhi driver
        serial: sh-sci: use serial_port_in/out vs sci_in/out.
        sh: vsyscall: Fix up .eh_frame generation.
        sh: dma: Fix up device attribute mismatch from sysdev fallout.
        sh: dwarf unwinder depends on SHcompact.
        sh: fix up fallout from system.h disintegration.
      664481ed
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · d6a624ee
      Linus Torvalds authored
      Pull security layer fixlet from James Morris.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        sysctl: fix write access to dmesg_restrict/kptr_restrict
      d6a624ee
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · f21fec96
      Linus Torvalds authored
      Pull ACPI & Power Management patches from Len Brown:
       "Two fixes for cpuidle merge-window changes, plus a URL fix in
        MAINTAINERS"
      
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        MAINTAINERS: Update git url for ACPI
        cpuidle: Fix panic in CPU off-lining with no idle driver
        ACPI processor: Use safe_halt() rather than halt() in acpi_idle_play_dead()
      f21fec96
    • Linus Torvalds's avatar
      Merge branch '3.4-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · a0421da4
      Linus Torvalds authored
      Pull target fixes from Nicholas Bellinger:
       "Pull two tcm_fc fabric related fixes for -rc2:
      
        Note that both have been CC'ed to stable, and patch #1 is the
        important one that addresses a memory corruption bug related to FC
        exchange timeouts + command abort.
      
        Thanks again to MDR for tracking down this issue!"
      
      * '3.4-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        tcm_fc: Do not free tpg structure during wq allocation failure
        tcm_fc: Add abort flag for gracefully handling exchange timeout
      a0421da4
    • Mark Rustad's avatar
      tcm_fc: Do not free tpg structure during wq allocation failure · 06383f10
      Mark Rustad authored
      Avoid freeing a registered tpg structure if an alloc_workqueue call
      fails.  This fixes a bug where the failure was leaking memory associated
      with se_portal_group setup during the original core_tpg_register() call.
      Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
      Acked-by: default avatarKiran Patil <Kiran.patil@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      06383f10
    • Mark Rustad's avatar
      tcm_fc: Add abort flag for gracefully handling exchange timeout · e1c40382
      Mark Rustad authored
      Add abort flag and use it to terminate processing when an exchange
      is timed out or is reset. The abort flag is used in place of the
      transport_generic_free_cmd function call in the reset and timeout
      cases, because calling that function in that context would free
      memory that was in use. The aborted flag allows the lifetime to
      be managed in a more normal way, while truncating the processing.
      
      This change eliminates a source of memory corruption which
      manifested in a variety of ugly ways.
      
      (nab: Drop unused struct fc_exch *ep in ft_recv_seq)
      Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
      Acked-by: default avatarKiran Patil <Kiran.patil@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      e1c40382
    • Len Brown's avatar
      eeaab2d8
    • Igor Murzov's avatar
      MAINTAINERS: Update git url for ACPI · aaef292a
      Igor Murzov authored
      Signed-off-by: default avatarIgor Murzov <e-mail@date.by>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      aaef292a
    • Linus Torvalds's avatar
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 4157368e
      Linus Torvalds authored
      Pull arch/tile bug fixes from Chris Metcalf:
       "This includes Paul Gortmaker's change to fix the <asm/system.h>
        disintegration issues on tile, a fix to unbreak the tilepro ethernet
        driver, and a backlog of bugfix-only changes from internal Tilera
        development over the last few months.
      
        They have all been to LKML and on linux-next for the last few days.
        The EDAC change to MAINTAINERS is an oddity but discussion on the
        linux-edac list suggested I ask you to pull that change through my
        tree since they don't have a tree to pull edac changes from at the
        moment."
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (39 commits)
        drivers/net/ethernet/tile: fix netdev_alloc_skb() bombing
        MAINTAINERS: update EDAC information
        tilepro ethernet driver: fix a few minor issues
        tile-srom.c driver: minor code cleanup
        edac: say "TILEGx" not "TILEPro" for the tilegx edac driver
        arch/tile: avoid accidentally unmasking NMI-type interrupt accidentally
        arch/tile: remove bogus performance optimization
        arch/tile: return SIGBUS for addresses that are unaligned AND invalid
        arch/tile: fix finv_buffer_remote() for tilegx
        arch/tile: use atomic exchange in arch_write_unlock()
        arch/tile: stop mentioning the "kvm" subdirectory
        arch/tile: export the page_home() function.
        arch/tile: fix pointer cast in cacheflush.c
        arch/tile: fix single-stepping over swint1 instructions on tilegx
        arch/tile: implement panic_smp_self_stop()
        arch/tile: add "nop" after "nap" to help GX idle power draw
        arch/tile: use proper memparse() for "maxmem" options
        arch/tile: fix up locking in pgtable.c slightly
        arch/tile: don't leak kernel memory when we unload modules
        arch/tile: fix bug in delay_backoff()
        ...
      4157368e
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.4-rc1-tag' of... · 9479f0f8
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull xen fixes from Konrad Rzeszutek Wilk:
       "Two fixes for regressions:
         * one is a workaround that will be removed in v3.5 with proper fix in
           the tip/x86 tree,
         * the other is to fix drivers to load on PV (a previous patch made
           them only load in PVonHVM mode).
      
        The rest are just minor fixes in the various drivers and some cleanup
        in the core code."
      
      * tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/pcifront: avoid pci_frontend_enable_msix() falsely returning success
        xen/pciback: fix XEN_PCI_OP_enable_msix result
        xen/smp: Remove unnecessary call to smp_processor_id()
        xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'
        xen: only check xen_platform_pci_unplug if hvm
      9479f0f8
    • Linus Torvalds's avatar
      Merge tag 'mmc-fixes-for-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 1ddca057
      Linus Torvalds authored
      Pull MMC fixes from Chris Ball:
       - Disable use of MSI in sdhci-pci, which caused multiple chipsets to
         stop working in 3.4-rc1.  I'll wait to turn this on again until we
         have a chipset whitelist for it.
       - Fix a libertas SDIO powered-resume regression introduced in 3.3;
         thanks to Neil Brown and Rafael Wysocki for this fix.
       - Fix module reloading on omap_hsmmc.
       - Stop trusting the spec/card's specified maximum data timeout length,
         and use three seconds instead.  Previously we used 300ms.
      
      Also cleanups and fixes for s3c, atmel, sh_mmcif and omap_hsmmc.
      
      * tag 'mmc-fixes-for-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (28 commits)
        mmc: use really long write timeout to deal with crappy cards
        mmc: sdhci-dove: Fix compile error by including module.h
        mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
        Revert "mmc: sdhci-pci: Add MSI support"
        Revert "mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers"
        mmc: core: fix power class selection
        mmc: omap_hsmmc: fix module re-insertion
        mmc: omap_hsmmc: convert to module_platform_driver
        mmc: omap_hsmmc: make it behave well as a module
        mmc: omap_hsmmc: trivial cleanups
        mmc: omap_hsmmc: context save after enabling runtime pm
        mmc: omap_hsmmc: use runtime put sync in probe error patch
        mmc: sdio: Use empty system suspend/resume callbacks at the bus level
        mmc: bus: print bus speed mode of UHS-I card
        mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers
        mmc: sh_mmcif: Simplify calculation of mmc->f_min
        mmc: sh_mmcif: mmc->f_max should be half of the bus clock
        mmc: sh_mmcif: double clock speed
        mmc: block: Remove use of mmc_blk_set_blksize
        mmc: atmel-mci: add support for odd clock dividers
        ...
      1ddca057
  7. 06 Apr, 2012 1 commit
    • Linus Torvalds's avatar
      Make the "word-at-a-time" helper functions more commonly usable · f68e556e
      Linus Torvalds authored
      I have a new optimized x86 "strncpy_from_user()" that will use these
      same helper functions for all the same reasons the name lookup code uses
      them.  This is preparation for that.
      
      This moves them into an architecture-specific header file.  It's
      architecture-specific for two reasons:
      
       - some of the functions are likely to want architecture-specific
         implementations.  Even if the current code happens to be "generic" in
         the sense that it should work on any little-endian machine, it's
         likely that the "multiply by a big constant and shift" implementation
         is less than optimal for an architecture that has a guaranteed fast
         bit count instruction, for example.
      
       - I expect that if architectures like sparc want to start playing
         around with this, we'll need to abstract out a few more details (in
         particular the actual unaligned accesses).  So we're likely to have
         more architecture-specific stuff if non-x86 architectures start using
         this.
      
         (and if it turns out that non-x86 architectures don't start using
         this, then having it in an architecture-specific header is still the
         right thing to do, of course)
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f68e556e