1. 11 8月, 2010 1 次提交
  2. 27 7月, 2010 1 次提交
  3. 19 7月, 2010 1 次提交
  4. 05 6月, 2010 1 次提交
    • A
      USB: cdc-acm: fix resource reclaim in error path of acm_probe · c2572b78
      Axel Lin 提交于
      This patch fixes resource reclaim in error path of acm_probe:
      
      1. In the case of "out of memory (read urbs usb_alloc_urb)\n")", there
         is no need to call acm_read_buffers_free(acm) here.  Fix it by goto
         alloc_fail6 instead of alloc_fail7.
      2. In the case of "out of memory (write urbs usb_alloc_urb)",
         usb_alloc_urb may fail in any iteration of the for loop.  Current
         implementation does not properly free allocated snd->urb.  Fix it by
         goto alloc_fail8 instead of alloc_fail7.
      3. In the case of device_create_file(&intf->dev,&dev_attr_iCountryCodeRelDate)
         fail, acm->country_codes is kfreed. As a result, device_remove_file
         for dev_attr_wCountryCodes will not be executed in acm_disconnect.
         Fix it by calling device_remove_file for dev_attr_wCountryCodes
         before goto skip_countries.
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Acked-by: NOliver Neukum <oneukum@suse.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c2572b78
  5. 21 5月, 2010 1 次提交
  6. 01 5月, 2010 1 次提交
  7. 19 3月, 2010 1 次提交
  8. 03 3月, 2010 7 次提交
  9. 12 12月, 2009 1 次提交
    • A
      USB: Exposing second ACM channel as tty for Nokia S60 phones. · c1479a92
      Adrian Taylor 提交于
      Nokia S60 phones expose two ACM channels. The first is a modem and is picked
      up by the standard AT-command interface information in the CDC-ACM driver. The
      second is marked as having a vendor-specific protocol. Normally, we don't
      expose those as ttys. (On some other devices, they may be claimed by the
      rndis_host driver and used as a network interface).
      
      But on S60 this second ACM channel is the way that third-party S60 application
      developers are expected to communicate over USB. It acts as a serial device
      at the S60 end, and so it should on Linux too.
      
      The list of devices is largely derived from:
      http://wiki.forum.nokia.com/index.php/S60_Platform_and_device_identification_codes
      http://wiki.forum.nokia.com/index.php/Nokia_USB_Product_IDs
      and includes only the S60 3rd Edition+ devices documented there.
      
      There are many devices for which the USB device ID is not documented,
      including:
          Nokia 6290
          Nokia E63
          Nokia 5630 XpressMusic
          Nokia 5730 XpressMusic
          Nokia 6710 Navigator
          Nokia 6720 classic
          Nokia 6730 Classic
          Nokia 6760 slide
          Nokia 6790 slide
          Nokia 6790 Surge
          Nokia E52
          Nokia E55
          Nokia E71x (AT&T)
          Nokia E72
          Nokia E75
          Nokia E75 US+LTA variant
          Nokia N79
          Nokia N86 8MP
          Nokia 5230 (RM-588)
          Nokia 5230 (RM-594)
          Nokia 5530 XpressMusic
          Nokia 5530 XpressMusic (china)
          Nokia 5800 XM
          Nokia N97 (RM-506)
          Nokia N97 mini
          Nokia X6
      It would be good to add those subsequently.
      Signed-off-by: NAdrian Taylor <aat@realvnc.com>
      Acked-by: NOliver Neukum <oliver@neukum.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c1479a92
  10. 18 11月, 2009 2 次提交
    • F
      USB: cdc_acm: Fix memory leak after hangup · 051522bb
      Francesco Lavra 提交于
      Am Donnerstag, 10. September 2009 15:43:53 schrieb Dietmar Hilbrich:
      > Hello,
      >
      > i have the following problem with the cdc-acm - driver:
      >
      > I'm using the driver with an "Ericsson F3507G" on a Thinkpad T400.
      >
      > If a disable the device (with the RFKill-Switch) while it is used by a
      > programm like ppp, the driver doesn't seem to correctly clean up the tty,
      > even after the program has been closed)
      >
      > The tty is still active (e.g. there still exists an entry in
      > /sys/dev/char/166:0 if ttyACM0 was used) and if a reacticate the device,
      > this device entry will be skipped and the Device-Nodes ttyACM1, ttyACM2
      > and ttyACM3 will be used.
      >
      > This problem was introduced with the commit
      > 10077d4a (before 2.6.31-rc1) and still
      > exists in 2.6.31.
      >
      > I was able the fix this problem with the following patch:
      >
      > diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
      > index 2bfc41e..0970d2f 100644
      > --- a/drivers/usb/class/cdc-acm.c
      > +++ b/drivers/usb/class/cdc-acm.c
      > @@ -676,6 +676,7 @@ static void acm_tty_hangup(struct tty_struct *tty)
      >         struct acm *acm = tty->driver_data;
      >         tty_port_hangup(&acm->port);
      >         acm_port_down(acm, 0);
      > +       acm_tty_unregister(acm);
      >  }
      
      I have the same problem with cdc-acm (I'm using a Samsung SGH-U900): when I
      unplug it from the USB port during a PPP connection, the ppp daemon gets the
      hangup correctly (and closes the device), but the struct acm corresponding to
      the device disconnected is not freed. Hence reconnecting the device results in
      creation of /dev/ttyACM(x+1). The same happens when the system is hibernated
      during a PPP connection.
      
      This memory leak is due to the fact that when the tty is hung up,
      tty_port_close_start() returns always zero, and acm_tty_close() never reaches
      the point where acm_tty_unregister() is called.
      
      Here is a fix for this.
      Signed-off-by: NFrancesco Lavra <francescolavra@interfree.it>
      Acked-by: NOliver Neukum <oliver@neukum.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      051522bb
    • H
      USB: cdc_acm: Fix race condition when opening tty · 18a77b5d
      Henry Gebhardt 提交于
      If acm_rx_tasklet() gets called before tty_port_block_til_ready()
      returns, then bulk IN urbs may not be sent. This fixes it.
      Signed-off-by: NHenry Gebhardt <gebhardt@astro.uni-tuebingen.de>
      Acked-by: NOliver Neukum <oliver@neukum.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      18a77b5d
  11. 23 9月, 2009 1 次提交
  12. 20 9月, 2009 1 次提交
  13. 08 8月, 2009 1 次提交
  14. 21 7月, 2009 1 次提交
  15. 13 7月, 2009 1 次提交
  16. 26 6月, 2009 2 次提交
  17. 16 6月, 2009 2 次提交
  18. 11 6月, 2009 3 次提交
  19. 29 5月, 2009 1 次提交
  20. 14 4月, 2009 1 次提交
  21. 07 4月, 2009 2 次提交
  22. 28 2月, 2009 2 次提交
  23. 10 2月, 2009 1 次提交
  24. 28 1月, 2009 3 次提交
  25. 08 1月, 2009 1 次提交
    • A
      USB: Enhance usage of pm_message_t · 65bfd296
      Alan Stern 提交于
      This patch (as1177) modifies the USB core suspend and resume
      routines.  The resume functions now will take a pm_message_t argument,
      so they will know what sort of resume is occurring.  The new argument
      is also passed to the port suspend/resume and bus suspend/resume
      routines (although they don't use it for anything but debugging).
      
      In addition, special pm_message_t values are used for user-initiated,
      device-initiated (i.e., remote wakeup), and automatic suspend/resume.
      By testing these values, drivers can tell whether or not a particular
      suspend was an autosuspend.  Unfortunately, they can't do the same for
      resumes -- not until the pm_message_t argument is also passed to the
      drivers' resume methods.  That will require a bigger change.
      
      IMO, the whole Power Management framework should have been set up this
      way in the first place.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65bfd296