1. 03 3月, 2010 2 次提交
    • J
      USB: serial: Eliminate useless code · a45a1e07
      Julia Lawall 提交于
      The variables priv and portdata are initialized twice to the same (side
      effect-free) expressions.  Drop one initialization in each case.
      
      A simplified version of the semantic match that finds this problem is:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @forall@
      idexpression *x;
      identifier f!=ERR_PTR;
      @@
      
      x = f(...)
      ... when != x
      (
      x = f(...,<+...x...+>,...)
      |
      * x = f(...)
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a45a1e07
    • N
      USB serial: make USB device id constant · 7d40d7e8
      Németh Márton 提交于
      The id_table field of the struct usb_device_id is constant in <linux/usb.h>
      so it is worth to make the initialization data also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      disable decl_init,const_decl_init;
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      Signed-off-by: NNémeth Márton <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: cocci@diku.dk
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7d40d7e8
  2. 17 2月, 2010 1 次提交
  3. 12 12月, 2009 2 次提交
    • A
      USB: remove the auto_pm flag · fb34d537
      Alan Stern 提交于
      This patch (as1302) removes the auto_pm flag from struct usb_device.
      The flag's only purpose was to distinguish between autosuspends and
      external suspends, but that information is now available in the
      pm_message_t argument passed to suspend methods.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fb34d537
    • E
      USB: serial: sierra driver memory reduction · 3a2b808e
      Elina Pasheva 提交于
      This patch deals with reducing the memory footprint for sierra driver.
      This optimization is aimed for embedded software customers.
      
      Some sierra modems can expose upwards of 7 USB interfaces, each possibly
      offering different services. In general, interfaces used for the
      exchange of wireless data require much higher throughput, hence require
      more memory (i.e. more URBs) than lower performance interfaces. URBs
      used for the IN direction are pre-allocated by the driver and this patch
      introduces a way to configure the number of IN URBs allocated on a
      per-interface basis. Interfaces with lower throughput requirements
      receive fewer URBs, thereby reducing the RAM memory consumed by the
      driver.
      
      NOTE1: This driver has always pre-allocated URBs for the IN direction.
      
      NOTE2: The number of URBs pre-allocated for the low-performance
      interfaces has already been extensively tested in previous versions of
      this driver.
      
      We also added the capability to log function calls by adding DEBUG flag.
      Please note that  this flag is commented out because this is the default
      state
      for it.
      Signed-off-by: NElina Pasheva <epasheva@sierrawireless.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3a2b808e
  4. 31 10月, 2009 2 次提交
  5. 10 10月, 2009 1 次提交
  6. 24 9月, 2009 1 次提交
  7. 23 9月, 2009 1 次提交
  8. 20 9月, 2009 1 次提交
  9. 13 7月, 2009 2 次提交
  10. 16 6月, 2009 9 次提交
  11. 11 6月, 2009 4 次提交
    • E
      sierra: driver interface blacklisting · 4db2299d
      Elina Pasheva 提交于
      Interface blacklisting is necessary for non-serial interfaces that are handled
      by a different driver. The interface blacklisting is implemented in sierra
      driver per device. Each device in need of a blacklist has a static information
      array kept in the driver. This array contains the interface numbers that are
      blacklisted. The pointer for each blacklist array and the length
      of that blacklist are 'bundled' in data structure sierra_iface_info. A pointer
      to this information is set in id_table when the device is added to the id_table.
      
      The following is summary of changes we have made to sierra.c driver in
      this patch dealing with interface blacklisting support:
      - Added data structure sierra_iface_info and function is_blacklisted()
      to support blacklisting
      - Modified sierra_probe() to handle blacklisted interfaces accordingly
      - Improved comments in id_table
      - Added new device in id_table with blacklist interface support
      Signed-off-by: NElina Pasheva <epasheva@sierrawireless.com>
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4db2299d
    • E
      sierra: driver urb handling improvements · b9a44bc1
      Elina Pasheva 提交于
      [Folded from eight patches into one as the original set according to the
       author "All of the patches need to be applied to obtain a working product"
       so keeping them split seems unhelpful
      
       Merge fixes done versus other conflicting changes and moved the
       spin_lock_init from open to setup time -- Alan]
      
      Summary of the changes and code re-organization in this patch:
      
      - The memory for urbs is allocated and urbs are submitted only for the active
        interfaces (instead of pre-allocating these for all interfaces). This will
        save memory especially in the case of using composite devices.
      - The code has been re-organized and functionality has been extracted from
        sierra_startup(), sierra_shutdown(), sierra_open(), sierra_close() and added
        in helper functions sierra_release_urb(), sierra_stop_rx_urbs(),
        sierra_submit_rx_urbs() and sierra_setup_urb()
      
      - Added function sierra_release_urb() to free an urb and its transfer
      buffer.
      - Removed unecessary include file reference and comment.
      - Added function sierra_stop_rx_urbs() that takes care of the release of
      receive and interrupt urbs. This function is to be called by sierra_close()
      whenever an interface is de-activated.
      - Added new function sierra_submit_rx_urbs() that handles the submission of
      receive urbs and interrupt urbs (if any) during the interface activation.
      This function is to be called by sierra_open(). Added a second parameter to
      pass the memory allocation (as suggested by Oliver Neukum) so that this
      function can be used in post_reset() and resume().
      - Added new function sierra_setup_urb() that contains the functionality to
      allocate an urb, fill bulk urb using the supplied memory allocation flag
      and release urb upon error. Added parameter so that the caller pass the
      memory allocation flag for flexibility.
      - Moved sierra_close() before sierra_open() to resolve dependencies
      introduced by the code reorganization.
      - Modified sierra_close() to call sierra_stop_rx_urbs() and
      sierra_release_urb() functions added in previous patch.
      - Modified sierra_open() to call sierra_setup_urb() and sierra_submit_rx_urbs()
      functions; note urbs are allocated and submitted for each activated interface.
      - Modified sierra_startup() so that allocation of urbs happens whenever an
      interface is activated (urb allocation is moved to sierra_open()).
      - Modified sierra_shutdown() so that urbs are freed whenever an interface is
      de-activated (urb freeing moved to sierra_close() as shown in previous patch
      from the series)
      - Removed unecessary data structure from sierra_port_private_data
      - Suppress an entry in logs by not re-submitting an urb when usb_submit_urb()
      returns -EPERM, as this shows that usb_kill_urb() is running (as suggested by
      Oliver Neukum)
      Signed-off-by: NElina Pasheva <epasheva@sierrawireless.com>
      Signed-off-by: NAlan Cox <alan.cox@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b9a44bc1
    • A
      tty: resolve some sierra breakage · 00b040de
      Alan Cox 提交于
      The various merges into the sierra driver inadvertently undid
      commit 212b8f0c by Elina Pasheva
      <epasheva@sierrawireless.com>. Put it back so the OBEX port works again.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      00b040de
    • A
      tty: Bring the usb tty port structure into more use · 335f8514
      Alan Cox 提交于
      This allows us to clean stuff up, but is probably also going to cause
      some app breakage with buggy apps as we now implement proper POSIX behaviour
      for USB ports matching all the other ports. This does also mean other apps
      that break on USB will now work properly.
      Signed-off-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      335f8514
  12. 24 4月, 2009 2 次提交
  13. 03 1月, 2009 1 次提交
  14. 18 10月, 2008 2 次提交
  15. 14 10月, 2008 1 次提交
    • A
      tty: usb-serial krefs · 4a90f09b
      Alan Cox 提交于
      Use kref in the USB serial drivers so that we don't free tty structures
      from under the URB receive handlers as has historically been the case if
      you were unlucky. This also gives us a framework for general tty drivers to
      use tty_port objects and refcount.
      
      Contains two err->dev_err changes merged together to fix clashes in the
      -next tree.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4a90f09b
  16. 24 9月, 2008 3 次提交
    • K
      USB Serial: Sierra: Add MC8785 VID/PID · b77a5c70
      Kevin Lloyd 提交于
      Add another MC8785 VID/PID
      Signed-off-by: NKevin Lloyd <klloyd@sierrawireless.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b77a5c70
    • T
      USB: Correct Sierra Wireless USB EVDO Modem Device ID · f8834f1f
      Tony Murray 提交于
      I was trying to figure out why my device wasn't supported by the
      drivers/usb/serial/sierra.c driver, while looking throught the device
      IDs I spotted what I believe to be a typo in the device IDs.  Please
      apply the following patch
      
      If you look down further, there is another HP wireless broadband card,
      which has a vendor ID of 03f0, like my device.  Below is my "lsusb -v
      -d 03f0:1b1d".
      
      Bus 001 Device 005: ID 03f0:1b1d Hewlett-Packard
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               1.10
        bDeviceClass            0 (Defined at Interface level)
        bDeviceSubClass         0
        bDeviceProtocol         0
        bMaxPacketSize0        64
        idVendor           0x03f0 Hewlett-Packard
        idProduct          0x1b1d
        bcdDevice            0.01
        iManufacturer           1 HP
        iProduct                2 HP ev2200 1xEV-DO Broadband Wireless Module
        iSerial                 0
        bNumConfigurations      1
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength           67
          bNumInterfaces          1
          bConfigurationValue     1
          iConfiguration          0
          bmAttributes         0xe0
            Self Powered
            Remote Wakeup
          MaxPower                0mA
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        0
            bAlternateSetting       0
            bNumEndpoints           7
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              3 Data Interface
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x81  EP 1 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0010  1x 16 bytes
              bInterval             128
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x82  EP 2 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x02  EP 2 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x84  EP 4 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x04  EP 4 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x85  EP 5 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x05  EP 5 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
      Device Status:     0x0000
        (Bus Powered)
      
      From: Tony Murray <murraytony@gmail.com>
      Cc: Kevin Lloyd <klloyd@sierrawireless.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      
      f8834f1f
    • K
      USB Serial: Sierra: Device addition & version rev · 73b2c205
      Kevin Lloyd 提交于
      This patch adds devices to the sierra driver and rev's the driver version.
      Signed-off-by: NKevin Lloyd <klloyd@sierrawireless.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      73b2c205
  17. 14 8月, 2008 4 次提交
  18. 23 7月, 2008 1 次提交