1. 16 Jul, 2012 12 commits
  2. 22 Jun, 2012 28 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.4.4 · ff74ae50
      Greg Kroah-Hartman authored
      ff74ae50
    • Roland Dreier's avatar
      target: Return error to initiator if SET TARGET PORT GROUPS emulation fails · f5f062e1
      Roland Dreier authored
      commit 59e4f541 upstream.
      
      The error paths in target_emulate_set_target_port_groups() are all
      essentially "rc = -EINVAL; goto out;" but the code at "out:" ignores
      rc and always returns success.  This means that even if eg explicit
      ALUA is turned off, the initiator will always see a good SCSI status
      for SET TARGET PORT GROUPS.
      
      Fix this by returning rc as is intended.  It appears this bug was
      added by the following patch:
      
      commit 05d1c7c0
      Author: Andy Grover <agrover@redhat.com>
      Date:   Wed Jul 20 19:13:28 2011 +0000
      
          target: Make all control CDBs scatter-gather
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      [bwh: Backported to 3.2: we have transport_complete_task()
       and not target_complete_cmd()]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f5f062e1
    • Johannes Berg's avatar
      iwlwifi: fix TX power antenna access · 75862961
      Johannes Berg authored
      commit a5fdde28 upstream.
      
      Since my commit
        iwlwifi: use valid TX/RX antenna from hw_params
      the config values are pure overrides, not the
      real values for all hardware. Therefore, the
      EEPROM TX power reading code checks the wrong
      values, it should check the hw_params values.
      Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      75862961
    • Meenakshi Venkataraman's avatar
      iwlwifi: use correct supported firmware for 6035 and 6000g2 · adf26435
      Meenakshi Venkataraman authored
      commit d2c8b15d upstream.
      
      My patch
      
         iwlwifi: use correct released ucode version
      
      did not correctly report supported firmware
      for the 6035 device. This patch fixes it. The
      minimum supported firmware version for 6035
      is v6.
      
      Also correct the minimum supported firmware
      version for the 6000g2 series of devices.
      Signed-off-by: default avatarMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>
      Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      adf26435
    • Emmanuel Grumbach's avatar
      iwlwifi: fix the Transmit Frame Descriptor rings · 77bcff9d
      Emmanuel Grumbach authored
      commit ebed633c upstream.
      
      The logic that allows to have a short TFD queue was completely wrong.
      We do maintain 256 Transmit Frame Descriptors, but they point to
      recycled buffers. We used to attach and de-attach different TFDs for
      the same buffer and it worked since they pointed to the same buffer.
      
      Also zero the number of BDs after unmapping a TFD. This seems not
      necessary since we don't reclaim the same TFD twice, but I like
      housekeeping.
      
      This patch solves this warning:
      
      [ 6427.079855] WARNING: at lib/dma-debug.c:866 check_unmap+0x727/0x7a0()
      [ 6427.079859] Hardware name: Latitude E6410
      [ 6427.079865] iwlwifi 0000:02:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000000296d393c] [size=8 bytes]
      [ 6427.079870] Modules linked in: ...
      [ 6427.079950] Pid: 6613, comm: ifconfig Tainted: G           O 3.3.3 #5
      [ 6427.079954] Call Trace:
      [ 6427.079963]  [<c10337a2>] warn_slowpath_common+0x72/0xa0
      [ 6427.079982]  [<c1033873>] warn_slowpath_fmt+0x33/0x40
      [ 6427.079988]  [<c12dcb77>] check_unmap+0x727/0x7a0
      [ 6427.079995]  [<c12dcdaa>] debug_dma_unmap_page+0x5a/0x80
      [ 6427.080024]  [<fe2312ac>] iwlagn_unmap_tfd+0x12c/0x180 [iwlwifi]
      [ 6427.080048]  [<fe231349>] iwlagn_txq_free_tfd+0x49/0xb0 [iwlwifi]
      [ 6427.080071]  [<fe228e37>] iwl_tx_queue_unmap+0x67/0x90 [iwlwifi]
      [ 6427.080095]  [<fe22d221>] iwl_trans_pcie_stop_device+0x341/0x7b0 [iwlwifi]
      [ 6427.080113]  [<fe204b0e>] iwl_down+0x17e/0x260 [iwlwifi]
      [ 6427.080132]  [<fe20efec>] iwlagn_mac_stop+0x6c/0xf0 [iwlwifi]
      [ 6427.080168]  [<fd8480ce>] ieee80211_stop_device+0x5e/0x190 [mac80211]
      [ 6427.080198]  [<fd833208>] ieee80211_do_stop+0x288/0x620 [mac80211]
      [ 6427.080243]  [<fd8335b7>] ieee80211_stop+0x17/0x20 [mac80211]
      [ 6427.080250]  [<c148dac1>] __dev_close_many+0x81/0xd0
      [ 6427.080270]  [<c148db3d>] __dev_close+0x2d/0x50
      [ 6427.080276]  [<c148d152>] __dev_change_flags+0x82/0x150
      [ 6427.080282]  [<c148e3e3>] dev_change_flags+0x23/0x60
      [ 6427.080289]  [<c14f6320>] devinet_ioctl+0x6a0/0x770
      [ 6427.080296]  [<c14f8705>] inet_ioctl+0x95/0xb0
      [ 6427.080304]  [<c147a0f0>] sock_ioctl+0x70/0x270
      Reported-by: default avatarAntonio Quartulli <ordex@autistici.org>
      Tested-by: default avatarAntonio Quartulli <ordex@autistici.org>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Reviewed-by: default avatarWey-Yi W Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      77bcff9d
    • Richard Cochran's avatar
      ntp: Correct TAI offset during leap second · c17f648b
      Richard Cochran authored
      commit dd48d708 upstream.
      
      When repeating a UTC time value during a leap second (when the UTC
      time should be 23:59:60), the TAI timescale should not stop. The kernel
      NTP code increments the TAI offset one second too late. This patch fixes
      the issue by incrementing the offset during the leap second itself.
      Signed-off-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c17f648b
    • Chris Boot's avatar
      e1000e: Remove special case for 82573/82574 ASPM L1 disablement · e60a87ba
      Chris Boot authored
      commit 59aed952 upstream.
      
      For the 82573, ASPM L1 gets disabled wholesale so this special-case code
      is not required. For the 82574 the previous patch does the same as for
      the 82573, disabling L1 on the adapter. Thus, this code is no longer
      required and can be removed.
      Signed-off-by: default avatarChris Boot <bootc@bootc.net>
      Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e60a87ba
    • Chris Boot's avatar
      e1000e: Disable ASPM L1 on 82574 · 8d87325f
      Chris Boot authored
      commit d4a4206e upstream.
      
      ASPM on the 82574 causes trouble. Currently the driver disables L0s for
      this NIC but only disables L1 if the MTU is >1500. This patch simply
      causes L1 to be disabled regardless of the MTU setting.
      Signed-off-by: default avatarChris Boot <bootc@bootc.net>
      Cc: "Wyborny, Carolyn" <carolyn.wyborny@intel.com>
      Cc: Nix <nix@esperi.org.uk>
      Link: https://lkml.org/lkml/2012/3/19/362Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8d87325f
    • Sjur Brændeland's avatar
      remoteproc: fix missing fault indication in error-path · 6582db31
      Sjur Brændeland authored
      commit 30338cf0 upstream.
      
      If rproc_find_rsc_table() fails, rproc_fw_boot() must set
      return-value before jumping to clean_up label. Otherwise no
      error value is returned.
      Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericsson.com>
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6582db31
    • Sjur Brændeland's avatar
      remoteproc: fix print format warnings · d186a404
      Sjur Brændeland authored
      commit e981f6d4 upstream.
      
      Fix compile warnings from GCC 4.6.1 when printing values of type size_t.
      
      drivers/remoteproc/remoteproc_core.c:251:6:
      warning: format ‘%x’ expects argument of type ‘unsigned int’,
      but argument 4 has type ‘size_t’ [-Wformat]
      drivers/remoteproc/remoteproc_core.c:938:9:
      warning: format ‘%u’ expects argument of type ‘unsigned int’,
      but argument 4 has type ‘size_t’ [-Wformat]
      drivers/remoteproc/remoteproc_core.c:1023:2:
      warning: format ‘%d’ expects argument of type ‘int’,
      but argument 4 has type ‘size_t’ [-Wformat]
      Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericsson.com>
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d186a404
    • Ohad Ben-Cohen's avatar
      remoteproc/omap: fix dev_err typo · efe79381
      Ohad Ben-Cohen authored
      commit 6b039762 upstream.
      
      For some reason one of the dev_err invocations is using a wrong
      device so fix that.
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      efe79381
    • Sasha Levin's avatar
      9p: BUG before corrupting memory · eef458cb
      Sasha Levin authored
      commit 5fcb08be upstream.
      
      The BUG_ON() in pack_sg_list() would get triggered only one time after we've
      corrupted some memory by sg_set_buf() into an invalid sg buffer.
      
      I'm still working on figuring out why I manage to trigger that bug...
      Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      eef458cb
    • Chen Gong's avatar
      edac: fix the error about memory type detection on SandyBridge · 9f138fc8
      Chen Gong authored
      commit 2cbb587d upstream.
      
      On SandyBridge, DDRIOA(Dev: 17 Func: 0 Offset: 328) is used
      to detect whether DIMM is RDIMM/LRDIMM, not TA(Dev: 15 Func: 0).
      Signed-off-by: default avatarChen Gong <gong.chen@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9f138fc8
    • Chen Gong's avatar
      edac: avoid mce decoding crash after edac driver unloaded · 40ca92aa
      Chen Gong authored
      commit e35fca47 upstream.
      
      Some edac drivers register themselves as mce decoders via
      notifier_chain. But in current notifier_chain implementation logic,
      it doesn't accept same notifier registered twice. If so, it will be
      wrong when adding/removing the element from the list. For example,
      on one SandyBridge platform, remove module sb_edac and then trigger
      one error, it will hit oops because it has no mce decoder registered
      but related notifier_chain still points to an invalid callback
      function. Here is an example:
      
      Call Trace:
       [<ffffffff8150ef6a>] atomic_notifier_call_chain+0x1a/0x20
       [<ffffffff8102b936>] mce_log+0x46/0x180
       [<ffffffff8102eaea>] apei_mce_report_mem_error+0x4a/0x60
       [<ffffffff812e19d2>] ghes_do_proc+0x192/0x210
       [<ffffffff812e2066>] ghes_proc+0x46/0x70
       [<ffffffff812e20d8>] ghes_notify_sci+0x48/0x80
       [<ffffffff8150ef05>] notifier_call_chain+0x55/0x80
       [<ffffffff81076f1a>] __blocking_notifier_call_chain+0x5a/0x80
       [<ffffffff812aea11>] ? acpi_os_wait_events_complete+0x23/0x23
       [<ffffffff81076f56>] blocking_notifier_call_chain+0x16/0x20
       [<ffffffff812ddc4d>] acpi_hed_notify+0x19/0x1b
       [<ffffffff812b16bd>] acpi_device_notify+0x19/0x1b
       [<ffffffff812beb38>] acpi_ev_notify_dispatch+0x67/0x7f
       [<ffffffff812aea3a>] acpi_os_execute_deferred+0x29/0x36
       [<ffffffff81069dc2>] process_one_work+0x132/0x450
       [<ffffffff8106bbcb>] worker_thread+0x17b/0x3c0
       [<ffffffff8106ba50>] ? manage_workers+0x120/0x120
       [<ffffffff81070aee>] kthread+0x9e/0xb0
       [<ffffffff81514724>] kernel_thread_helper+0x4/0x10
       [<ffffffff81070a50>] ? kthread_freezable_should_stop+0x70/0x70
       [<ffffffff81514720>] ? gs_change+0x13/0x13
      Code: f3 49 89 d4 45 85 ed 4d 89 c6 48 8b 0f 74 48 48 85 c9 75 17 eb 41
      0f 1f 80 00 00 00 00 41 83 ed 01 4c 89 f9 74 22 4d 85 ff 74 1d <4c> 8b
      79 08 4c 89 e2 48 89 de 48 89 cf ff 11 4d 85 f6 74 04 41
      RIP  [<ffffffff8150eef6>] notifier_call_chain+0x46/0x80
       RSP <ffff88042868fb20>
      CR2: ffffffffa01af838
      ---[ end trace 0100930068e73e6f ]---
      BUG: unable to handle kernel paging request at fffffffffffffff8
      IP: [<ffffffff810705b0>] kthread_data+0x10/0x20
      PGD 1a0d067 PUD 1a0e067 PMD 0
      Oops: 0000 [#2] SMP
      
      Only i7core_edac and sb_edac have such issues because they have more
      than one memory controller which means they have to register mce
      decoder many times.
      Signed-off-by: default avatarChen Gong <gong.chen@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      40ca92aa
    • Peter Korsgaard's avatar
      hwrng: atmel-rng - fix data valid check · bb1b9f8f
      Peter Korsgaard authored
      commit c475c06f upstream.
      
      Brown paper bag: Data valid is LSB of the ISR (status register), and NOT
      of ODATA (current random data word)!
      
      With this, rngtest is a lot happier. Before:
      
      rngtest 3
      Copyright (c) 2004 by Henrique de Moraes Holschuh
      This is free software; see the source for copying conditions.  There is NO warr.
      
      rngtest: starting FIPS tests...
      rngtest: bits received from input: 20000032
      rngtest: FIPS 140-2 successes: 3
      rngtest: FIPS 140-2 failures: 997
      rngtest: FIPS 140-2(2001-10-10) Monobit: 604
      rngtest: FIPS 140-2(2001-10-10) Poker: 996
      rngtest: FIPS 140-2(2001-10-10) Runs: 36
      rngtest: FIPS 140-2(2001-10-10) Long run: 0
      rngtest: FIPS 140-2(2001-10-10) Continuous run: 117
      rngtest: input channel speed: (min=622.371; avg=23682.481; max=28224.350)Kibitss
      rngtest: FIPS tests speed: (min=12.361; avg=12.718; max=12.861)Mibits/s
      rngtest: Program run time: 2331696 microsecondsx
      
      After:
      rngtest 3
      Copyright (c) 2004 by Henrique de Moraes Holschuh
      This is free software; see the source for copying conditions.  There is NO warr.
      
      rngtest: starting FIPS tests...
      rngtest: bits received from input: 20000032
      rngtest: FIPS 140-2 successes: 999
      rngtest: FIPS 140-2 failures: 1
      rngtest: FIPS 140-2(2001-10-10) Monobit: 0
      rngtest: FIPS 140-2(2001-10-10) Poker: 0
      rngtest: FIPS 140-2(2001-10-10) Runs: 1
      rngtest: FIPS 140-2(2001-10-10) Long run: 0
      rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
      rngtest: input channel speed: (min=777.363; avg=43588.270; max=47870.711)Kibitss
      rngtest: FIPS tests speed: (min=11.943; avg=12.716; max=12.844)Mibits/s
      rngtest: Program run time: 1955282 microseconds
      Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
      Reported-by: default avatarGeorge Pontis <GPontis@z9.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bb1b9f8f
    • Mark Brown's avatar
      ASoC: wm8904: Fix GPIO and MICBIAS initialisation for regmap conversion · 064cd019
      Mark Brown authored
      commit 433897f7 upstream.
      
      We no longer have a flat ASoC cache so can't peer directly into the array
      any more but should instead use the register I/O functions to update the
      cache.
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      064cd019
    • Daniel Mack's avatar
      USB: fix gathering of interface associations · bc9b784a
      Daniel Mack authored
      commit b3a3dd07 upstream.
      
      TEAC's UD-H01 (and probably other devices) have a gap in the interface
      number allocation of their descriptors:
      
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength          220
          bNumInterfaces          3
          [...]
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        0
            bAlternateSetting       0
            [...]
          Interface Association:
            bLength                 8
            bDescriptorType        11
            bFirstInterface         2
            bInterfaceCount         2
            bFunctionClass          1 Audio
            bFunctionSubClass       0
            bFunctionProtocol      32
            iFunction               4
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        2
            bAlternateSetting       0
            [...]
      
      Once a configuration is selected, usb_set_configuration() walks the
      known interfaces of a given configuration and calls find_iad() on
      each of them to set the interface association pointer the interface
      is included in.
      
      The problem here is that the loop variable is taken for the interface
      number in the comparison logic that gathers the association. Which is
      fine as long as the descriptors are sane.
      
      In the case above, however, the logic gets out of sync and the
      interface association fields of all interfaces beyond the interface
      number gap are wrong.
      
      Fix this by passing the interface's bInterfaceNumber to find_iad()
      instead.
      Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
      Reported-by: default avatarbEN <ml_all@circa.be>
      Reported-by: default avatarIvan Perrone <ivanperrone@hotmail.com>
      Tested-by: default avatarivan perrone <ivanperrone@hotmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bc9b784a
    • Bjørn Mork's avatar
      USB: serial: Enforce USB driver and USB serial driver match · 3561c241
      Bjørn Mork authored
      commit 954c3f8a upstream.
      
      We need to make sure that the USB serial driver we find
      matches the USB driver whose probe we are currently
      executing. Otherwise we will end up with USB serial
      devices bound to the correct serial driver but wrong
      USB driver.
      
      An example of such cross-probing, where the usbserial_generic
      USB driver has found the sierra serial driver:
      
      May 29 18:26:15 nemi kernel: [ 4442.559246] usbserial_generic 4-4:1.0: Sierra USB modem converter detected
      May 29 18:26:20 nemi kernel: [ 4447.556747] usbserial_generic 4-4:1.2: Sierra USB modem converter detected
      May 29 18:26:25 nemi kernel: [ 4452.557288] usbserial_generic 4-4:1.3: Sierra USB modem converter detected
      
      sysfs view of the same problem:
      
      bjorn@nemi:~$ ls -l /sys/bus/usb/drivers/sierra/
      total 0
      --w------- 1 root root 4096 May 29 18:23 bind
      lrwxrwxrwx 1 root root    0 May 29 18:23 module -> ../../../../module/usbserial
      --w------- 1 root root 4096 May 29 18:23 uevent
      --w------- 1 root root 4096 May 29 18:23 unbind
      bjorn@nemi:~$ ls -l /sys/bus/usb-serial/drivers/sierra/
      total 0
      --w------- 1 root root 4096 May 29 18:23 bind
      lrwxrwxrwx 1 root root    0 May 29 18:23 module -> ../../../../module/sierra
      -rw-r--r-- 1 root root 4096 May 29 18:23 new_id
      lrwxrwxrwx 1 root root    0 May 29 18:32 ttyUSB0 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0/ttyUSB0
      lrwxrwxrwx 1 root root    0 May 29 18:32 ttyUSB1 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.2/ttyUSB1
      lrwxrwxrwx 1 root root    0 May 29 18:32 ttyUSB2 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.3/ttyUSB2
      --w------- 1 root root 4096 May 29 18:23 uevent
      --w------- 1 root root 4096 May 29 18:23 unbind
      
      bjorn@nemi:~$ ls -l /sys/bus/usb/drivers/usbserial_generic/
      total 0
      lrwxrwxrwx 1 root root    0 May 29 18:33 4-4:1.0 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0
      lrwxrwxrwx 1 root root    0 May 29 18:33 4-4:1.2 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.2
      lrwxrwxrwx 1 root root    0 May 29 18:33 4-4:1.3 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.3
      --w------- 1 root root 4096 May 29 18:33 bind
      lrwxrwxrwx 1 root root    0 May 29 18:33 module -> ../../../../module/usbserial
      --w------- 1 root root 4096 May 29 18:22 uevent
      --w------- 1 root root 4096 May 29 18:33 unbind
      bjorn@nemi:~$ ls -l /sys/bus/usb-serial/drivers/generic/
      total 0
      --w------- 1 root root 4096 May 29 18:33 bind
      lrwxrwxrwx 1 root root    0 May 29 18:33 module -> ../../../../module/usbserial
      -rw-r--r-- 1 root root 4096 May 29 18:33 new_id
      --w------- 1 root root 4096 May 29 18:22 uevent
      --w------- 1 root root 4096 May 29 18:33 unbind
      
      So we end up with a mismatch between the USB driver and the
      USB serial driver.  The reason for the above is simple: The
      USB driver probe will succeed if *any* registered serial
      driver matches, and will use that serial driver for all
      serial driver functions.
      
      This makes ref counting go wrong. We count the USB driver
      as used, but not the USB serial driver.  This may result
      in Oops'es as demonstrated by Johan Hovold <jhovold@gmail.com>:
      
      [11811.646396] drivers/usb/serial/usb-serial.c: get_free_serial 1
      [11811.646443] drivers/usb/serial/usb-serial.c: get_free_serial - minor base = 0
      [11811.646460] drivers/usb/serial/usb-serial.c: usb_serial_probe - registering ttyUSB0
      [11811.646766] usb 6-1: pl2303 converter now attached to ttyUSB0
      [11812.264197] USB Serial deregistering driver FTDI USB Serial Device
      [11812.264865] usbcore: deregistering interface driver ftdi_sio
      [11812.282180] USB Serial deregistering driver pl2303
      [11812.283141] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
      [11812.283272] usbcore: deregistering interface driver pl2303
      [11812.301056] USB Serial deregistering driver generic
      [11812.301186] usbcore: deregistering interface driver usbserial_generic
      [11812.301259] drivers/usb/serial/usb-serial.c: usb_serial_disconnect
      [11812.301823] BUG: unable to handle kernel paging request at f8e7438c
      [11812.301845] IP: [<f8e38445>] usb_serial_disconnect+0xb5/0x100 [usbserial]
      [11812.301871] *pde = 357ef067 *pte = 00000000
      [11812.301957] Oops: 0000 [#1] PREEMPT SMP
      [11812.301983] Modules linked in: usbserial(-) [last unloaded: pl2303]
      [11812.302008]
      [11812.302019] Pid: 1323, comm: modprobe Tainted: G        W    3.4.0-rc7+ #101 Dell Inc. Vostro 1520/0T816J
      [11812.302115] EIP: 0060:[<f8e38445>] EFLAGS: 00010246 CPU: 1
      [11812.302130] EIP is at usb_serial_disconnect+0xb5/0x100 [usbserial]
      [11812.302141] EAX: f508a180 EBX: f508a180 ECX: 00000000 EDX: f8e74300
      [11812.302151] ESI: f5050800 EDI: 00000001 EBP: f5141e78 ESP: f5141e58
      [11812.302160]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      [11812.302170] CR0: 8005003b CR2: f8e7438c CR3: 34848000 CR4: 000007d0
      [11812.302180] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
      [11812.302189] DR6: ffff0ff0 DR7: 00000400
      [11812.302199] Process modprobe (pid: 1323, ti=f5140000 task=f61e2bc0 task.ti=f5140000)
      [11812.302209] Stack:
      [11812.302216]  f8e3be0f f8e3b29c f8e3ae00 00000000 f513641c f5136400 f513641c f507a540
      [11812.302325]  f5141e98 c133d2c1 00000000 00000000 f509c400 f513641c f507a590 f5136450
      [11812.302372]  f5141ea8 c12f0344 f513641c f507a590 f5141ebc c12f0c67 00000000 f507a590
      [11812.302419] Call Trace:
      [11812.302439]  [<c133d2c1>] usb_unbind_interface+0x51/0x190
      [11812.302456]  [<c12f0344>] __device_release_driver+0x64/0xb0
      [11812.302469]  [<c12f0c67>] driver_detach+0x97/0xa0
      [11812.302483]  [<c12f001c>] bus_remove_driver+0x6c/0xe0
      [11812.302500]  [<c145938d>] ? __mutex_unlock_slowpath+0xcd/0x140
      [11812.302514]  [<c12f0ff9>] driver_unregister+0x49/0x80
      [11812.302528]  [<c1457df6>] ? printk+0x1d/0x1f
      [11812.302540]  [<c133c50d>] usb_deregister+0x5d/0xb0
      [11812.302557]  [<f8e37c55>] ? usb_serial_deregister+0x45/0x50 [usbserial]
      [11812.302575]  [<f8e37c8d>] usb_serial_deregister_drivers+0x2d/0x40 [usbserial]
      [11812.302593]  [<f8e3a6e2>] usb_serial_generic_deregister+0x12/0x20 [usbserial]
      [11812.302611]  [<f8e3acf0>] usb_serial_exit+0x8/0x32 [usbserial]
      [11812.302716]  [<c1080b48>] sys_delete_module+0x158/0x260
      [11812.302730]  [<c110594e>] ? mntput+0x1e/0x30
      [11812.302746]  [<c145c3c3>] ? sysenter_exit+0xf/0x18
      [11812.302746]  [<c107777c>] ? trace_hardirqs_on_caller+0xec/0x170
      [11812.302746]  [<c145c390>] sysenter_do_call+0x12/0x36
      [11812.302746] Code: 24 02 00 00 e8 dd f3 20 c8 f6 86 74 02 00 00 02 74 b4 8d 86 4c 02 00 00 47 e8 78 55 4b c8 0f b6 43 0e 39 f8 7f a9 8b 53 04 89 d8 <ff> 92 8c 00 00 00 89 d8 e8 0e ff ff ff 8b 45 f0 c7 44 24 04 2f
      [11812.302746] EIP: [<f8e38445>] usb_serial_disconnect+0xb5/0x100 [usbserial] SS:ESP 0068:f5141e58
      [11812.302746] CR2: 00000000f8e7438c
      
      Fix by only evaluating serial drivers pointing back to the
      USB driver we are currently probing.  This still allows two
      or more drivers to match the same device, running their
      serial driver probes to sort out which one to use.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
      Tested-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3561c241
    • Tom Cassidy's avatar
      USB: serial: sierra: Add support for Sierra Wireless AirCard 320U modem · 7eec718a
      Tom Cassidy authored
      commit 19a3dd15 upstream.
      
      Add support for Sierra Wireless AirCard 320U modem
      Signed-off-by: default avatarTomas Cassidy <tomas.cassidy@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7eec718a
    • Otto Meta's avatar
      usb: cdc-acm: fix devices not unthrottled on open · 9cc2d461
      Otto Meta authored
      commit 6c4707f3 upstream.
      
      Currently CDC-ACM devices stay throttled when their TTY is closed while
      throttled, stalling further communication attempts after the next open.
      
      Unthrottling during open/activate got lost starting with kernel
      3.0.0 and this patch reintroduces it.
      Signed-off-by: default avatarOtto Meta <otto.patches@sister-shadow.de>
      Acked-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9cc2d461
    • Bjørn Mork's avatar
      9b81405d
    • Alan Stern's avatar
      USB: add NO_D3_DURING_SLEEP flag and revert 151b6128 · 12ad741b
      Alan Stern authored
      commit c2fb8a3f upstream.
      
      This patch (as1558) fixes a problem affecting several ASUS computers:
      The machine crashes or corrupts memory when going into suspend if the
      ehci-hcd driver is bound to any controllers.  Users have been forced
      to unbind or unload ehci-hcd before putting their systems to sleep.
      
      After extensive testing, it was determined that the machines don't
      like going into suspend when any EHCI controllers are in the PCI D3
      power state.  Presumably this is a firmware bug, but there's nothing
      we can do about it except to avoid putting the controllers in D3
      during system sleep.
      
      The patch adds a new flag to indicate whether the problem is present,
      and avoids changing the controller's power state if the flag is set.
      Runtime suspend is unaffected; this matters only for system suspend.
      However as a side effect, the controller will not respond to remote
      wakeup requests while the system is asleep.  Hence USB wakeup is not
      functional -- but of course, this is already true in the current state
      of affairs.
      
      A similar patch has already been applied as commit
      151b6128 (USB: EHCI: fix crash during
      suspend on ASUS computers).  The patch supersedes that one and reverts
      it.  There are two differences:
      
      	The old patch added the flag at the USB level; this patch
      	adds it at the PCI level.
      
      	The old patch applied to all chipsets with the same vendor,
      	subsystem vendor, and product IDs; this patch makes an
      	exception for a known-good system (based on DMI information).
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Tested-by: default avatarDâniel Fraga <fragabr@gmail.com>
      Tested-by: default avatarAndrey Rahmatullin <wrar@wrar.name>
      Tested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Reviewed-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      12ad741b
    • Evan McNabb's avatar
      USB: ftdi-sio: Add support for RT Systems USB-RTS01 serial adapter · 9a12826c
      Evan McNabb authored
      commit e00a54d7 upstream.
      
      Add support for RT Systems USB-RTS01 USB to Serial adapter:
      http://www.rtsystemsinc.com/Photos/USBRTS01.html
      
      Tested by controlling Icom IC-718 amateur radio transceiver via hamlib.
      Signed-off-by: default avatarEvan McNabb <evan@mcnabbs.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9a12826c
    • Mikko Tuumanen's avatar
    • Ricardo Martins's avatar
      USB: fix PS3 EHCI systems · 5c551ead
      Ricardo Martins authored
      commit 4f7a67e2 upstream.
      
      After commit aaa0ef28 "PS3 EHCI QH
      read work-around", Terratec Grabby (em28xx) stopped working with AMD
      Geode LX 800 (USB controller AMD CS5536). Since this is a PS3 only
      fix, the following patch adds a conditional block around it.
      Signed-off-by: default avatarRicardo Martins <rasm@fe.up.pt>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5c551ead
    • Grazvydas Ignotas's avatar
      usb: musb_gadget: fix crash caused by dangling pointer · d6fe7df7
      Grazvydas Ignotas authored
      commit 08f75bf1 upstream.
      
      usb_ep_ops.disable must clear external copy of the endpoint descriptor,
      otherwise musb crashes after loading/unloading several gadget modules
      in a row:
      
      Unable to handle kernel paging request at virtual address bf013730
      pgd = c0004000
      [bf013730] *pgd=8f26d811, *pte=00000000, *ppte=00000000
      Internal error: Oops: 7 [#1]
      Modules linked in: g_cdc [last unloaded: g_file_storage]
      CPU: 0    Not tainted  (3.2.17 #647)
      PC is at musb_gadget_enable+0x4c/0x24c
      LR is at _raw_spin_lock_irqsave+0x4c/0x58
      [<c027c030>] (musb_gadget_enable+0x4c/0x24c) from [<bf01b760>] (gether_connect+0x3c/0x19c [g_cdc])
      [<bf01b760>] (gether_connect+0x3c/0x19c [g_cdc]) from [<bf01ba1c>] (ecm_set_alt+0x15c/0x180 [g_cdc])
      [<bf01ba1c>] (ecm_set_alt+0x15c/0x180 [g_cdc]) from [<bf01ecd4>] (composite_setup+0x85c/0xac4 [g_cdc])
      [<bf01ecd4>] (composite_setup+0x85c/0xac4 [g_cdc]) from [<c027b744>] (musb_g_ep0_irq+0x844/0x924)
      [<c027b744>] (musb_g_ep0_irq+0x844/0x924) from [<c027a97c>] (musb_interrupt+0x79c/0x864)
      [<c027a97c>] (musb_interrupt+0x79c/0x864) from [<c027aaa8>] (generic_interrupt+0x64/0x7c)
      [<c027aaa8>] (generic_interrupt+0x64/0x7c) from [<c00797cc>] (handle_irq_event_percpu+0x28/0x178)
      ...
      Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d6fe7df7
    • Jon Povey's avatar
      usb: musb: davinci: Fix build breakage · b85ecf1a
      Jon Povey authored
      commit 6594b2d7 upstream.
      
      This appears to have been broken by
      commit 5cfb19ac
      (ARM: davinci: streamline sysmod access)
      
      For now, fix by hardcoding USB_PHY_CTRL and DM355_DEEPSLEEP
      
      Tested on DM365 with defconfig changes.
      Signed-off-by: default avatarJon Povey <jon.povey@racelogic.co.uk>
      Acked-by: default avatarSekhar Nori <nsekhar@ti.com>
      CC: Felipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b85ecf1a
    • Alan Cox's avatar
      USB: mct_u232: Fix incorrect TIOCMSET return · 8951420c
      Alan Cox authored
      commit 1aa3c63c upstream.
      
      The low level helper returns 1 on success. The ioctl should however return
      0. As this is the only user of the helper return, make the helper return 0 or
      an error code.
      
      Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43009Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8951420c