1. 16 3月, 2012 2 次提交
  2. 15 3月, 2012 2 次提交
    • J
      USB: ftdi_sio: add support for FT-X series devices · dc0827c1
      Jim Paris 提交于
      Add PID 0x6015, corresponding to the new series of FT-X chips
      (FT220XD, FT201X, FT220X, FT221X, FT230X, FT231X, FT240X).  They all
      appear as serial devices, and seem indistinguishable except for the
      default product string stored in their EEPROM.  The baudrate
      generation matches FT232RL devices.
      
      Tested with a FT201X and FT230X at various baudrates (100 - 3000000).
      
      Sample dmesg:
          ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
          usb 2-1: new full-speed USB device number 6 using ohci_hcd
          usb 2-1: New USB device found, idVendor=0403, idProduct=6015
          usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
          usb 2-1: Product: FT230X USB Half UART
          usb 2-1: Manufacturer: FTDI
          usb 2-1: SerialNumber: DC001WI6
          ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
          drivers/usb/serial/ftdi_sio.c: ftdi_sio_port_probe
          drivers/usb/serial/ftdi_sio.c: ftdi_determine_type: bcdDevice = 0x1000, bNumInterfaces = 1
          usb 2-1: Detected FT-X
          usb 2-1: Number of endpoints 2
          usb 2-1: Endpoint 1 MaxPacketSize 64
          usb 2-1: Endpoint 2 MaxPacketSize 64
          usb 2-1: Setting MaxPacketSize 64
          drivers/usb/serial/ftdi_sio.c: read_latency_timer
          drivers/usb/serial/ftdi_sio.c: write_latency_timer: setting latency timer = 1
          drivers/usb/serial/ftdi_sio.c: create_sysfs_attrs
          drivers/usb/serial/ftdi_sio.c: sysfs attributes for FT-X
          usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
      Signed-off-by: NJim Paris <jim@jtan.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dc0827c1
    • D
      USB: serial: mos7840: Fixed MCS7820 device attach problem · 093ea2d3
      Donald Lee 提交于
      A MCS7820 device supports two serial ports and a MCS7840 device supports
      four serial ports. Both devices use the same driver, but the attach function
      in driver was unable to correctly handle the port numbers for MCS7820
      device. This problem has been fixed in this patch and this fix has been
      verified on x86 Linux kernel 3.2.9 with both MCS7820 and MCS7840 devices.
      Signed-off-by: NDonald Lee <donald@asix.com.tw>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      093ea2d3
  3. 14 3月, 2012 19 次提交
  4. 13 3月, 2012 4 次提交
  5. 11 3月, 2012 1 次提交
  6. 10 3月, 2012 12 次提交
    • A
      aio: fix the "too late munmap()" race · c7b28555
      Al Viro 提交于
      Current code has put_ioctx() called asynchronously from aio_fput_routine();
      that's done *after* we have killed the request that used to pin ioctx,
      so there's nothing to stop io_destroy() waiting in wait_for_all_aios()
      from progressing.  As the result, we can end up with async call of
      put_ioctx() being the last one and possibly happening during exit_mmap()
      or elf_core_dump(), neither of which expects stray munmap() being done
      to them...
      
      We do need to prevent _freeing_ ioctx until aio_fput_routine() is done
      with that, but that's all we care about - neither io_destroy() nor
      exit_aio() will progress past wait_for_all_aios() until aio_fput_routine()
      does really_put_req(), so the ioctx teardown won't be done until then
      and we don't care about the contents of ioctx past that point.
      
      Since actual freeing of these suckers is RCU-delayed, we don't need to
      bump ioctx refcount when request goes into list for async removal.
      All we need is rcu_read_lock held just over the ->ctx_lock-protected
      area in aio_fput_routine().
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
      Acked-by: NBenjamin LaHaise <bcrl@kvack.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c7b28555
    • A
      aio: fix io_setup/io_destroy race · 86b62a2c
      Al Viro 提交于
      Have ioctx_alloc() return an extra reference, so that caller would drop it
      on success and not bother with re-grabbing it on failure exit.  The current
      code is obviously broken - io_destroy() from another thread that managed
      to guess the address io_setup() would've returned would free ioctx right
      under us; gets especially interesting if aio_context_t * we pass to
      io_setup() points to PROT_READ mapping, so put_user() fails and we end
      up doing io_destroy() on kioctx another thread has just got freed...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: NBenjamin LaHaise <bcrl@kvack.org>
      Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      86b62a2c
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 86e06008
      Linus Torvalds 提交于
      Pull btrfs updates from Chris Mason:
       "I have two additional and btrfs fixes in my for-linus branch.  One is
        a casting error that leads to memory corruption on i386 during scrub,
        and the other fixes a corner case in the backref walking code (also
        triggered by scrub)."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix casting error in scrub reada code
        btrfs: fix locking issues in find_parent_nodes()
      86e06008
    • G
      USB: serial: use module_driver() macro · b790f5d1
      Greg Kroah-Hartman 提交于
      Now that module_driver() can handle varargs, use it instead of rolling
      our own version.
      
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b790f5d1
    • L
      driver-core: Allow additional parameters for module_driver · cd494618
      Lars-Peter Clausen 提交于
      Allow module_driver take additional parameters which will be passed to the
      register and unregister function calls. This allows it to be used in cases
      where additional parameters are required (e.g. usb_serial_register_drivers).
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cd494618
    • H
      memcg: revert fix to mapcount check for this release · be22aece
      Hugh Dickins 提交于
      Respectfully revert commit e6ca7b89 "memcg: fix mapcount check
      in move charge code for anonymous page" for the 3.3 release, so that
      it behaves exactly like releases 2.6.35 through 3.2 in this respect.
      
      Horiguchi-san's commit is correct in itself, 1 makes much more sense
      than 2 in that check; but it does not go far enough - swapcount
      should be considered too - if we really want such a check at all.
      
      We appear to have reached agreement now, and expect that 3.4 will
      remove the mapcount check, but had better not make 3.3 different.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Reviewed-by: NNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      be22aece
    • B
      net: qmi_wwan: add Gobi and Pantech UML290 device IDs · b086cf04
      Bjørn Mork 提交于
      Adding the Pantech UML290 and all non-QDL Gobi device IDs from the
      qcserial driver now that we have support for shared net/QMI USB
      interfaces.  Most of these are not yet tested with this driver, but
      should be mostly identical to tested devices, except for device IDs.
      
      Gobi devices provide several different interfaces (serial/net/other)
      using the exact same class, subclass and protocol values.  This driver
      will only support the net/QMI function while there are other drivers
      supporting other device functions. The net/QMI interface number may
      also differ from device to device.  It has been noted that all the
      other interfaces have additional functional descriptors, so we use that
      to detect the interface supported by this driver.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b086cf04
    • B
      net: qmi_wwan: support devices having a shared QMI/wwan interface · c3ecb08a
      Bjørn Mork 提交于
      Use the new cdc-wdm subdriver interface to create a device management
      device even for USB devices having a single combined QMI/wwan USB
      interface with three endpoints (int, bulk in, bulk out) instead of
      separate data and control interfaces.
      
      Some Huawei devices can be switched to a single interface mode for
      use with other operating systems than Linux.  This adds support
      for these devices when they run in such non-Linux modes.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c3ecb08a
    • B
      net: usb: qmi_wwan: New driver for Huawei QMI based WWAN devices · 423ce8ca
      Bjørn Mork 提交于
      Some WWAN LTE/3G devices based on chipsets from Qualcomm provide
      near standard CDC ECM interfaces in addition to the usual serial
      interfaces.   The Huawei E392/E398 are examples of such devices.
      
      These typically cannot be fully configured using AT commands
      over a serial interface.  It is necessary to speak the proprietary
      Qualcomm MSM Interface (QMI) protocol to the device to enable the
      ethernet proxy functionality.
      
      The devices embed the QMI protocol in CDC on the control interface,
      using standard CDC commands and notifications. The do not otherwise
      use CDC commands for the ethernet function.  This driver does
      therefore not need access to any other aspects of the control
      interface than the descriptors attached to it.
      
      Another driver, cdc-wdm, will provide userspace access to the
      QMI protocol independently of this driver.  To facilitate this,
      this driver avoids binding to the control interface, and uses
      only the associated data interface after parsing the common CDC
      functional descriptors on the control interface.
      
      You will want both the cdc-wdm and option drivers as companions to
      this driver, to have full access to all interfaces and protocols
      exported by the device.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      423ce8ca
    • T
      x86: Derandom delay_tsc for 64 bit · a7f4255f
      Thomas Gleixner 提交于
      Commit f0fbf0ab ("x86: integrate delay functions") converted
      delay_tsc() into a random delay generator for 64 bit.  The reason is
      that it merged the mostly identical versions of delay_32.c and
      delay_64.c.  Though the subtle difference of the result was:
      
       static void delay_tsc(unsigned long loops)
       {
      -	unsigned bclock, now;
      +	unsigned long bclock, now;
      
      Now the function uses rdtscl() which returns the lower 32bit of the
      TSC. On 32bit that's not problematic as unsigned long is 32bit. On 64
      bit this fails when the lower 32bit are close to wrap around when
      bclock is read, because the following check
      
             if ((now - bclock) >= loops)
             	  	break;
      
      evaluated to true on 64bit for e.g. bclock = 0xffffffff and now = 0
      because the unsigned long (now - bclock) of these values results in
      0xffffffff00000001 which is definitely larger than the loops
      value. That explains Tvortkos observation:
      
      "Because I am seeing udelay(500) (_occasionally_) being short, and
       that by delaying for some duration between 0us (yep) and 491us."
      
      Make those variables explicitely u32 again, so this works for both 32
      and 64 bit.
      Reported-by: NTvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org # >= 2.6.27
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a7f4255f
    • M
      USB: ftdi_sio: new PID: Distortec JTAG-lock-pick · 47594d55
      Michał Wróbel 提交于
      Signed-off-by: NMichał Wróbel <michal.wrobel@flytronic.pl>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      47594d55
    • L
      Merge tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · c447064d
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "Nothing exciting here: just a few regression fixes for HD-audio and
        ASoC, also the support of missing 32bit compat ioctl for HDSPM."
      
      * tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hdspm - Provide ioctl_compat
        ALSA: hda/realtek - Apply the coef-setup only to ALC269VB
        ALSA: hda - add quirk to detect CD input on Gigabyte EP45-DS3
        ASoC: neo1973: fix neo1973 wm8753 initialization
      c447064d