1. 14 May, 2008 20 commits
    • Marcin Slusarz's avatar
      usbtest: comment on why this code "expects" negative and positive errnos · 6def7553
      Marcin Slusarz authored
      On Mon, May 12, 2008 at 01:02:22AM -0700, David Brownell wrote:
      > On Sunday 11 May 2008, Marcin Slusarz wrote:
      > > 
      > > test_ctrl_queue expects (?) positive and negative errnos.
      > > what is going on here?
      > 
      > The sign is just a way to flag something:
      > 
      >                 /* some faults are allowed, not required */
      > 
      > The negative ones are required.  Positive codes are optional,
      > in the sense that, depending on how the peripheral happens
      > to be implemented, they won't necessarily be triggered.
      > 
      > For example, the test to fetch a device qualifier desriptor
      > must succeed if the device is running at high speed.  So that
      > test is marked as negative.  But when it's full speed, it
      > could legitimately fail; marked as positive.  And so on for
      > other tests.
      > 
      > Look at how the codes are *interpreted* to see it work.
      
      Lets document it.
      
      Based on comment from David Brownell <david-b@pacbell.net>.
      Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6def7553
    • Xiaofan Chen's avatar
      USB: remove PICDEM FS USB demo (04d8:000c) device from ldusb · 5fc89390
      Xiaofan Chen authored
      Microchip has changed the PICDEM FS USB demo device (0x04d8:000c)
      to use bulk transfer and not interrupt transfer. So I've updated the libusb
      based program here (Post #31).
      	http://forum.microchip.com/tm.aspx?m=106426&mpage=2
      
      So I believe that the in-kernel ldusb driver will no longer work with the
      demo firmware.  It should be removed.
      Signed-off-by: default avatarXiaofan Chen <xiaofanc@gmail.com>
      Cc: Michael Hund <MHund@LD-Didactic.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      5fc89390
    • Dan Williams's avatar
      USB: option: add new Dell 5520 HSDPA variant · 96cb15cf
      Dan Williams authored
      New variant of the 5520 found by Luke Sheldrick.
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      96cb15cf
    • Filip Aben's avatar
      USB: unusual_devs: Add support for GI 0401 SD-Card interface · e7c6f80f
      Filip Aben authored
      Enables the SD-Card interface on the GI 0401 HSUPA card from Option.
      
      The unusual_devs.h entry is necessary because the device descriptor is
      vendor-specific. That prevents usb-storage from binding to it as an
      interface driver.
      
      This revised patch adds a small comment explaining why and reduces the
      rev range.
      
      T:  Bus=02 Lev=01 Prnt=01 Port=06 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
      P:  Vendor=0af0 ProdID=7401 Rev= 0.00
      S:  Manufacturer=Option N.V.
      S:  Product=Globetrotter HSUPA Modem
      C:* #Ifs=10 Cfg#= 1 Atr=80 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 1 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 2 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 2 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 3 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 3 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 4 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 4 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 5 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 5 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 6 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 6 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 7 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 7 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=89(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 9 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      E:  Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      Signed-off-by: default avatarFilip Aben <f.aben@option.com>
      Signed-off-by: default avatarPhil Dibowitz <phil@ipom.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e7c6f80f
    • David Brownell's avatar
      USB: serial gadget: descriptor cleanup · b9370332
      David Brownell authored
      Bugfix some serial gadget descriptors:
      
       - Stop mangling the low bits (controller type ID) of bcdDevice;
         just use the high bits for a driver revision code.
      
       - Serial numbers that aren't specific to individual devices
         are useless; stop reporting "0" for this.
      
       - Since it's not part of a CDC-conformant function, the "bulk only"
         configuration shouldn't be using "CDC Data" as its interface class.
         Switch over to using CLASS_VENDOR_SPEC (different value, 0xff).
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b9370332
    • David Brownell's avatar
      USB: serial gadget: simplify endpoint handling · 734d37c6
      David Brownell authored
      Switch serial gadget away from a *very* old idiom:  just remember
      the endpoints we'll be using, instead of looking them up by name
      each time.  This is a net code and data (globals) shrink.
      
      Also fix a small memory leak in the rmmod path, by working the
      same as the disconnect code.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      734d37c6
    • David Brownell's avatar
      USB: serial gadget: remove needless data structure · 2c2d28a0
      David Brownell authored
      This removes a needless data structure from the serial gadget code;
      it's a small code shrink, and a larger data shrink.
      
      Since "struct usb_request" already has a "struct list_head" reserved
      for use by gadget drivers, the serial gadget code doesn't need to
      allocate wrapper structs to hold that list ... it can (and should!)
      just use the list_head provided for that exact use.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2c2d28a0
    • David Brownell's avatar
      USB: serial gadget: cleanup/reorg · 9079e91b
      David Brownell authored
      Some cleanup/reorg of g_serial ... simplifying it, and disentangling
      its structure so morphing it into a "function" driver (combinable with
      other interfaces) should be less painful.
      
       - Remove most forward declarations
           * put tty and gadget driver structs after their contents
           * snug module init/exit decls next to their functions
           * reordered some functions
      
       - Other cleanup:
           * convert a funky macro to an inline function
           * snug up module params next to their declarations
           * add missing driver.owner
           * add separator lines between major driver sections
      
       - Add comments re potential parameter/#define changes:
           * only supports one port (shrank GS_NUM_PORTS)
           * changing from 9600-8-N-1 affects multiple sites
      
       - Remove net2280-specific optimization ... it was being done
         way too late, can be done by net2280 module options, and in
         any case doesn't matter at any sane serial data rates.
      
      There are no behavioral changes, but the macro thing saves I-space.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      9079e91b
    • Sebastian Siewior's avatar
      usb: fix compile warning in isp1760 · fe312e77
      Sebastian Siewior authored
      drivers/usb/host/isp1760-if.c:275: warning: 'ret' is used uninitialized in this function
      Signed-off-by: default avatarSebastian Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fe312e77
    • Eugeniy Meshcheryakov's avatar
      USB: do not handle device 1410:5010 in 'option' driver · cdafc37a
      Eugeniy Meshcheryakov authored
      This device is not a serial port, but a virtual CD-ROM device. For
      example with my Novatel MC950D:
      
      lsusb -v -d 1410:5010 | grep InterfaceClass
            bInterfaceClass         8 Mass Storage
      
      After some time (ca. 5min) or if virtual CD is ejected, device id
      changes to 1410:4400:
      
      % lsusb -v -d 1410:4400 | grep InterfaceClass
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceClass       255 Vendor Specific Class
      
      Variable name says that 0x5010 is a Novatel U727, but searching in
      internet shows, that this device also provides virtual CD that should be
      ejected before use. Product id for serial port in this case is 0x4100.
      Signed-off-by: default avatarEugeniy Meshcheryakov <eugen@debian.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      cdafc37a
    • Phil Dibowitz's avatar
      USB: Fix unusual_devs.h ordering · ed3e8fca
      Phil Dibowitz authored
      This patch fixes ordering problems with entries in unusual_devs.h.
      Signed-off-by: default avatarPhil Dibowitz <phil@ipom.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ed3e8fca
    • Iain McFarlane's avatar
      USB: add Zoom Telephonics Model 3095F V.92 USB Mini External modem to cdc-acm · 6149ed5e
      Iain McFarlane authored
      The patch below is a necessary workaround to support the Zoom Telephonics Model 3095F V.92 USB Mini External modem, which fails to initialise properly during normal probing thus:
      
      May  3 22:53:00 imcfarla kernel: drivers/usb/class/cdc-acm.c: Zero length descriptor references
      May  3 22:53:00 imcfarla kernel: cdc_acm: probe of 5-2:1.0 failed with error -22
      
      Adding the patch below causes the probing section to be skipped, and the modem
      then initialises correctly.
      Signed-off-by: default avatarIain McFarlane <iain@imcfarla.homelinux.net>
      Acked-by: default avatarOliver Neukum <oneukum@suse.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6149ed5e
    • andreoli@samba.ing.unimo.it's avatar
      USB: Support for the ET502HS HDSPA modem in option driver · 4c7d3137
      andreoli@samba.ing.unimo.it authored
      the proposed patch allows the ET502HS HDSPA modem to be handled by the
      "option" driver. It has been tested for 1 month and works reliably (no
      oopses, no hangs, 300KB/s throughput).
      Signed-off-by: default avatarMauro Andreolini <andreoli@weblab.ing.unimo.it>
      Signed-off-by: default avatarMatthias Urlichs <matthias@urlichs.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4c7d3137
    • andreoli@samba.ing.unimo.it's avatar
      USB: Support for the ET502HS HDSPA modem · dddcb8b7
      andreoli@samba.ing.unimo.it authored
      The attached patch allows to bypass the ZeroCD mechanism for the ET502HS
      HDSPA modem, so that it can be mounted as a network device.
      Signed-off-by: default avatarMauro Andreolini <andreoli@weblab.ing.unimo.it>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dddcb8b7
    • Harvey Harrison's avatar
      usb: fix integer as NULL pointer warnings found by sparse · af3d305c
      Harvey Harrison authored
      drivers/usb/host/ohci-sm501.c:93:24: warning: Using plain integer as NULL pointer
      drivers/usb/gadget/amd5536udc.c:3254:9: warning: Using plain integer as NULL pointer
      drivers/usb/gadget/amd5536udc.c:3267:9: warning: Using plain integer as NULL pointer
      drivers/usb/gadget/amd5536udc.c:3277:9: warning: Using plain integer as NULL pointer
      drivers/usb/gadget/amd5536udc.c:3285:9: warning: Using plain integer as NULL pointer
      drivers/usb/gadget/amd5536udc.c:3293:9: warning: Using plain integer as NULL pointer
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      af3d305c
    • Randy Dunlap's avatar
      USB: isp1760: fix printk format · 22026473
      Randy Dunlap authored
      Fix printk format warnings in isp1760 (in linux-next):
      
      next-20080430/drivers/usb/host/isp1760-hcd.c:994: warning: format '%d' expects type 'int', but argument 6 has type 'size_t'
      next-20080430/drivers/usb/host/isp1760-hcd.c:1092: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      22026473
    • Greg Kroah-Hartman's avatar
      USB: add Telstra NextG CDMA id to option driver · 23cacd65
      Greg Kroah-Hartman authored
      As reported by Magnus Boman <captain.magnus@opensuse.org>
      
      Cc: Magnus Boman <captain.magnus@opensuse.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      23cacd65
    • Greg Kroah-Hartman's avatar
      USB: add association.h · d23039ee
      Greg Kroah-Hartman authored
      This will be used by the wireless usb code, as well as potentially other
      USB code.
      
      Originally based on some .c code written by Inaky Perez-Gonzalez
      <inaky.perez-gonzalez@intel.com>
      
      Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d23039ee
    • Alan Stern's avatar
      USB: create attributes before sending uevent · 2e5f10e4
      Alan Stern authored
      This patch (as1087d) fixes a long-standing problem in usbcore: Device,
      interface, and endpoint attributes aren't added until _after_ the
      creation uevent has already been broadcast.
      
      Unfortunately there are a few attributes which cannot be created that
      early.  The "descriptors" attribute is binary and so must be created
      separately.  The power-management attributes can't be created until
      the dev/power/ group exists.  And the interface string can vary from
      one altsetting to another, so it has to be created dynamically.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2e5f10e4
    • Greg Kroah-Hartman's avatar
      USB: add new moto_modem driver for some Morotola phones · 6986a978
      Greg Kroah-Hartman authored
      This should work on a KRZR K1m, and some other Motorola phones that do
      not use the "standard" cdc ACM protocol to talk to USB hosts.
      Tested-by: default avatarJeff Garzik <jeff@garzik.org>
      Cc: Jiang Dejun <a5652c@motorola.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6986a978
  2. 13 May, 2008 20 commits