1. 20 Mar, 2013 32 commits
  2. 14 Mar, 2013 8 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.4.36 · 92a7adfb
      Greg Kroah-Hartman authored
      92a7adfb
    • Sarah Sharp's avatar
      USB: Fix connected device switch to Inactive state. · 8420d82e
      Sarah Sharp authored
      [This is upstream commit d3b9d7a9.
      It needs to be backported to kernels as old as 3.2, because it fixes the
      buggy commit 9dbcaec8 "USB: Handle warm
      reset failure on empty port."]
      
      A USB 3.0 device can transition to the Inactive state if a U1 or U2 exit
      transition fails.  The current code in hub_events simply issues a warm
      reset, but does not call any pre-reset or post-reset driver methods (or
      unbind/rebind drivers without them).  Therefore the drivers won't know
      their device has just been reset.
      
      hub_events should instead call usb_reset_device.  This means
      hub_port_reset now needs to figure out whether it should issue a warm
      reset or a hot reset.
      
      Remove the FIXME note about needing disconnect() for a NOTATTACHED
      device.  This patch fixes that.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8420d82e
    • Greg Kroah-Hartman's avatar
      Revert "ALSA: hda - hdmi: Make jacks phantom, if they're not detectable" · 983c9b4e
      Greg Kroah-Hartman authored
      This reverts commit 30efd8de upstream
      (dd54ec40 in this tree) as it is not
      needed for the 3.4-stable tree.
      
      Cc: David Henningsson <david.henningsson@canonical.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      983c9b4e
    • Sarah Sharp's avatar
      USB: Rip out recursive call on warm port reset. · beabe204
      Sarah Sharp authored
      [This is upstream commit 24a6078754f28528bc91e7e7b3e6ae86bd936d8.
      It needs to be backported to kernels as old as 3.2, because it fixes the
      buggy commit 9dbcaec8 "USB: Handle warm
      reset failure on empty port."]
      
      When a hot reset fails on a USB 3.0 port, the current port reset code
      recursively calls hub_port_reset inside hub_port_wait_reset.  This isn't
      ideal, since we should avoid recursive calls in the kernel, and it also
      doesn't allow us to issue multiple warm resets on reset failures.
      
      Rip out the recursive call.  Instead, add code to hub_port_reset to
      issue a warm reset if the hot reset fails, and try multiple warm resets
      before giving up on the port.
      
      In hub_port_wait_reset, remove the recursive call and re-indent.  The
      code is basically the same, except:
      
      1. It bails out early if the port has transitioned to Inactive or
      Compliance Mode after the reset completed.
      
      2. It doesn't consider a connect status change to be a failed reset.  If
      multiple warm resets needed to be issued, the connect status may have
      changed, so we need to ignore that and look at the port link state
      instead.  hub_port_reset will now do that.
      
      3. It unconditionally sets udev->speed on all types of successful
      resets.  The old recursive code would set the port speed when the second
      hub_port_reset returned.
      
      The old code did not handle connected devices needing a warm reset well.
      There were only two situations that the old code handled correctly: an
      empty port needing a warm reset, and a hot reset that migrated to a warm
      reset.
      
      When an empty port needed a warm reset, hub_port_reset was called with
      the warm variable set.  The code in hub_port_finish_reset would skip
      telling the USB core and the xHC host that the device was reset, because
      otherwise that would result in a NULL pointer dereference.
      
      When a USB 3.0 device reset migrated to a warm reset, the recursive call
      made the call stack look like this:
      
      hub_port_reset(warm = false)
              hub_wait_port_reset(warm = false)
                      hub_port_reset(warm = true)
                              hub_wait_port_reset(warm = true)
                              hub_port_finish_reset(warm = true)
                              (return up the call stack to the first wait)
      
              hub_port_finish_reset(warm = false)
      
      The old code didn't want to notify the USB core or the xHC host of device reset
      twice, so it only did it in the second call to hub_port_finish_reset,
      when warm was set to false.  This was necessary because
      before patch two ("USB: Ignore xHCI Reset Device status."), the USB core
      would pay attention to the xHC Reset Device command error status, and
      the second call would always fail.
      
      Now that we no longer have the recursive call, and warm can change from
      false to true in hub_port_reset, we need to have hub_port_finish_reset
      unconditionally notify the USB core and the xHC of the device reset.
      
      In hub_port_finish_reset, unconditionally clear the connect status
      change (CSC) bit for USB 3.0 hubs when the port reset is done.  If we
      had to issue multiple warm resets for a device, that bit may have been
      set if the device went into SS.Inactive and then was successfully warm
      reset.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      beabe204
    • Sarah Sharp's avatar
      USB: Prepare for refactoring by adding extra udev checks. · e850004e
      Sarah Sharp authored
      [This is upstream commit 2d4fa940.
      It needs to be backported to kernels as old as 3.2, because it fixes the
      buggy commit 9dbcaec8 "USB: Handle warm
      reset failure on empty port."]
      
      The next patch will refactor the hub port code to rip out the recursive
      call to hub_port_reset on a failed hot reset.  In preparation for that,
      make sure all code paths can deal with being called with a NULL udev.
      The usb_device will not be valid if warm reset was issued because a port
      transitioned to the Inactive or Compliance Mode on a device connect.
      
      This patch should have no effect on current behavior.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e850004e
    • Sarah Sharp's avatar
      USB: Don't use EHCI port sempahore for USB 3.0 hubs. · ac79dc9b
      Sarah Sharp authored
      [This is upstream commit 0fe51aa5.
      It needs to be backported to kernels as old as 3.2, because it fixes the
      buggy commit 9dbcaec8 "USB: Handle warm
      reset failure on empty port."]
      
      The EHCI host controller needs to prevent EHCI initialization when the
      UHCI or OHCI companion controller is in the middle of a port reset.  It
      uses ehci_cf_port_reset_rwsem to do this.  USB 3.0 hubs can't be under
      an EHCI host controller, so it makes no sense to down the semaphore for
      USB 3.0 hubs.  It also makes the warm port reset code more complex.
      
      Don't down ehci_cf_port_reset_rwsem for USB 3.0 hubs.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ac79dc9b
    • Ben Hutchings's avatar
      dmi_scan: fix missing check for _DMI_ signature in smbios_present() · d2c96b72
      Ben Hutchings authored
      commit a40e7cf8 upstream.
      
      Commit 9f9c9cbb ("drivers/firmware/dmi_scan.c: fetch dmi version
      from SMBIOS if it exists") hoisted the check for "_DMI_" into
      dmi_scan_machine(), which means that we don't bother to check for
      "_DMI_" at offset 16 in an SMBIOS entry.  smbios_present() may also call
      dmi_present() for an address where we found "_SM_", if it failed further
      validation.
      
      Check for "_DMI_" in smbios_present() before calling dmi_present().
      
      [akpm@linux-foundation.org: fix build]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Reported-by: default avatarTim McGrath <tmhikaru@gmail.com>
      Tested-by: default avatarTim Mcgrath <tmhikaru@gmail.com>
      Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d2c96b72
    • Steven Rostedt's avatar
      ftrace: Update the kconfig for DYNAMIC_FTRACE · abf73cb1
      Steven Rostedt authored
      commit db05021d upstream.
      
      The prompt to enable DYNAMIC_FTRACE (the ability to nop and
      enable function tracing at run time) had a confusing statement:
      
       "enable/disable ftrace tracepoints dynamically"
      
      This was written before tracepoints were added to the kernel,
      but now that tracepoints have been added, this is very confusing
      and has confused people enough to give wrong information during
      presentations.
      
      Not only that, I looked at the help text, and it still references
      that dreaded daemon that use to wake up once a second to update
      the nop locations and brick NICs, that hasn't been around for over
      five years.
      
      Time to bring the text up to the current decade.
      Reported-by: default avatarEzequiel Garcia <elezegarcia@gmail.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      abf73cb1