1. 15 5月, 2008 40 次提交
    • E
      9p: fix error path during early mount · 887b3ece
      Eric Van Hensbergen 提交于
      There was some cleanup issues during early mount which would trigger
      a kernel bug for certain types of failure.  This patch reorganizes the
      cleanup to get rid of the bad behavior.
      
      This also merges the 9pnet and 9pnet_fd modules for the purpose of
      configuration and initialization.  Keeping the fd transport separate
      from the core 9pnet code seemed like a good idea at the time, but in
      practice has caused more harm and confusion than good.
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      887b3ece
    • E
      9p: make cryptic unknown error from server less scary · 332c421e
      Eric Van Hensbergen 提交于
      Right now when we get an error string from the server that we can't
      map we report a cryptic error that actually makes it look like we are
      reporting a problem with the client.  This changes the text of the log
      message to clarify where the error is coming from.
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      332c421e
    • S
      9p: fix flags length in net · d0c44718
      Steven Rostedt 提交于
      Some files in the net/9p directory uses "int" for flags. This can
      cause hard to find bugs on some architectures. This patch converts the
      flags to use "long" instead.
      
      This bug was discovered by doing an allyesconfig make on the -rt kernel
      where checks are done to ensure all flags are of size sizeof(long).
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Acked-by: NEric Van Hensbergen <ericvh@gmail.com>
      d0c44718
    • J
      9p: Correct fidpool creation failure in p9_client_create · 728fc4ef
      Josef 'Jeff' Sipek 提交于
      On error, p9_idpool_create returns an ERR_PTR-encoded errno.
      Signed-off-by: NJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
      Acked-by: NEric Van Hensbergen <ericvh@gmail.com>
      728fc4ef
    • J
      9p: use struct mutex instead of struct semaphore · c1549497
      Josef 'Jeff' Sipek 提交于
      Replace semaphores protecting use flags with a mutex.
      Signed-off-by: NJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
      Acked-by: NEric Van Hensbergen <ericvh@gmail.com>
      c1549497
    • E
      9p: propagate parse_option changes to client and transports · bb8ffdfc
      Eric Van Hensbergen 提交于
      Propagate changes that were made to the parse_options code to the
      other parse options pieces present in the other modules.  Looks like
      the client parse options was probably corrupting the parse string
      and causing problems for others.
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      bb8ffdfc
    • J
      fs/9p/v9fs.c (v9fs_parse_options): Handle kstrdup and match_strdup failure.... · ab31267d
      Jim Meyering 提交于
      fs/9p/v9fs.c (v9fs_parse_options): Handle kstrdup and match_strdup failure. Now that this function can fail, return an int, diagnose other option-parsing failures, and adjust the sole caller: (v9fs_session_init): Handle kstrdup failure. Propagate any new v9fs_parse_options failure "up".
      Signed-off-by: NJim Meyering <meyering@redhat.com>
      Cc: Ron Minnich <rminnich@sandia.gov>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Acked-by: NEric Van Hensbergen <ericvh@gmail.com>
      ab31267d
    • E
      9p: Documentation updates · ee443996
      Eric Van Hensbergen 提交于
      The kernel-doc comments of much of the 9p system have been in disarray since
      reorganization.  This patch fixes those problems, adds additional documentation
      and a template book which collects the 9p information.
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      ee443996
    • M
      add match_strlcpy() us it to make v9fs make uname and remotename parsing more robust · b32a09db
      Markus Armbruster 提交于
      match_strcpy() is a somewhat creepy function: the caller needs to make sure
      that the destination buffer is big enough, and when he screws up or
      forgets, match_strcpy() happily overruns the buffer.
      
      There's exactly one customer: v9fs_parse_options().  I believe it currently
      can't overflow its buffer, but that's not exactly obvious.
      
      The source string is a substing of the mount options.  The kernel silently
      truncates those to PAGE_SIZE bytes, including the terminating zero.  See
      compat_sys_mount() and do_mount().
      
      The destination buffer is obtained from __getname(), which allocates from
      name_cachep, which is initialized by vfs_caches_init() for size PATH_MAX.
      
      We're safe as long as PATH_MAX <= PAGE_SIZE.  PATH_MAX is 4096.  As far as
      I know, the smallest PAGE_SIZE is also 4096.
      
      Here's a patch that makes the code a bit more obviously correct.  It
      doesn't depend on PATH_MAX <= PAGE_SIZE.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Cc: Jim Meyering <meyering@redhat.com>
      Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      b32a09db
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · dd286422
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        RDMA/cxgb3: Wrap the software send queue pointer as needed on flush
        IB/ipath: Change ipath_devdata.ipath_sdma_status to be unsigned long
        IB/ipath: Make ipath_portdata work with struct pid * not pid_t
        IB/ipath: Fix RDMA read response sequence checking
        IB/ipath: Fix many locking issues when switching to error state
        IB/ipath: Fix RC and UC error handling
        RDMA/nes: Fix up nes_lro_max_aggr module parameter
      dd286422
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb · 4717df58
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (70 commits)
        V4L/DVB (7900): pvrusb: Fix Kconfig if DVB=m V4L_core=y
        V4L/DVB (7899): Fixes a few remaining Kbuild issues at common/tuners
        V4L/DVB (7898): Fix VIDEO_MEDIA Kconfig logic
        V4L/DVB (7895): tveeprom: update Hauppauge analog audio and video decoders
        V4L/DVB (7893): xc5000: bug-fix: allow multiple devices in a single system
        V4L/DVB (7891): cx18/ivtv: fix open() kernel oops
        V4L/DVB (7890): cx18: removed bogus and confusing conditional
        V4L/DVB (7889): cx18: improve HVR-1600 detection.
        V4L/DVB (7888): cx18: minor card definition updates.
        V4L/DVB (7887): cx18: fix Compro H900 analog support.
        V4L/DVB (7881): saa7134: fixed a compile warning in saa7134-core.c
        V4L/DVB (7880): saa7134: remove explicit GPIO initialization
        V4L/DVB(7879): Adding cx18 Support for mxl5005s
        V4L/DVB(7878): mxl55005s: Makefile and Kconfig additions
        V4L/DVB(7877): mxl5005s: Ensure debug is off
        V4L/DVB(7876): mxl5005s: Remove incorrect copyright holders
        V4L/DVB(7875): mxl5005s: Remove redundant functions
        V4L/DVB(7874): mxl5005s: Fix function statics
        V4L/DVB(7873): mxl5005s: Fix header includes.
        V4L/DVB(7872): mxl5005s: checkpatch.pl compliance
        ...
      4717df58
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 · fc99824c
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
        Driver core: struct class remove children list
        block: do_mounts - accept root=<non-existant partition>
      fc99824c
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · e90a4e47
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (22 commits)
        USB: atmel_usba_udc fixes, mostly disconnect()
        USB: pxa27x_udc: minor fixes
        usbtest: comment on why this code "expects" negative and positive errnos
        USB: remove PICDEM FS USB demo (04d8:000c) device from ldusb
        USB: option: add new Dell 5520 HSDPA variant
        USB: unusual_devs: Add support for GI 0401 SD-Card interface
        USB: serial gadget: descriptor cleanup
        USB: serial gadget: simplify endpoint handling
        USB: serial gadget: remove needless data structure
        USB: serial gadget: cleanup/reorg
        usb: fix compile warning in isp1760
        USB: do not handle device 1410:5010 in 'option' driver
        USB: Fix unusual_devs.h ordering
        USB: add Zoom Telephonics Model 3095F V.92 USB Mini External modem to cdc-acm
        USB: Support for the ET502HS HDSPA modem in option driver
        USB: Support for the ET502HS HDSPA modem
        usb: fix integer as NULL pointer warnings found by sparse
        USB: isp1760: fix printk format
        USB: add Telstra NextG CDMA id to option driver
        USB: add association.h
        ...
      e90a4e47
    • D
      Driver core: struct class remove children list · 0a3ad00c
      Dave Young 提交于
      because of the class_device was removed, now do the children list removing
      Signed-off-by: NDave Young <hidave.darkstar@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      0a3ad00c
    • K
      block: do_mounts - accept root=<non-existant partition> · 30f2f0eb
      Kay Sievers 提交于
      Some devices, like md, may create partitions only at first access,
      so allow root= to be set to a valid non-existant partition of an
      existing disk. This applies only to non-initramfs root mounting.
      
      This fixes a regression from 2.6.24 which did allow this to happen and
      broke some users machines :(
      Acked-by: NNeil Brown <neilb@suse.de>
      Tested-by: NJoao Luis Meloni Assirati <assirati@nonada.if.usp.br>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      30f2f0eb
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 6aa5fc43
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (73 commits)
        net: Fix typo in net/core/sock.c.
        ppp: Do not free not yet unregistered net device.
        netfilter: xt_iprange: module aliases for xt_iprange
        netfilter: ctnetlink: dump conntrack ID in event messages
        irda: Fix a misalign access issue. (v2)
        sctp: Fix use of uninitialized pointer
        cipso: Relax too much careful cipso hash function.
        tcp FRTO: work-around inorder receivers
        tcp FRTO: Fix fallback to conventional recovery
        New maintainer for Intel ethernet adapters
        DM9000: Use delayed work to update MII PHY state
        DM9000: Update and fix driver debugging messages
        DM9000: Add __devinit and __devexit attributes to probe and remove
        sky2: fix simple define thinko
        [netdrvr] sfc: sfc: Add self-test support
        [netdrvr] sfc: Increment rx_reset when reported as driver event
        [netdrvr] sfc: Remove unused macro EFX_XAUI_RETRAIN_MAX
        [netdrvr] sfc: Fix code formatting
        [netdrvr] sfc: Remove kernel-doc comments for removed members of struct efx_nic
        [netdrvr] sfc: Remove garbage from comment
        ...
      6aa5fc43
    • N
      fix SMP data race in pagetable setup vs walking · 362a61ad
      Nick Piggin 提交于
      There is a possible data race in the page table walking code. After the split
      ptlock patches, it actually seems to have been introduced to the core code, but
      even before that I think it would have impacted some architectures (powerpc
      and sparc64, at least, walk the page tables without taking locks eg. see
      find_linux_pte()).
      
      The race is as follows:
      The pte page is allocated, zeroed, and its struct page gets its spinlock
      initialized. The mm-wide ptl is then taken, and then the pte page is inserted
      into the pagetables.
      
      At this point, the spinlock is not guaranteed to have ordered the previous
      stores to initialize the pte page with the subsequent store to put it in the
      page tables. So another Linux page table walker might be walking down (without
      any locks, because we have split-leaf-ptls), and find that new pte we've
      inserted. It might try to take the spinlock before the store from the other
      CPU initializes it. And subsequently it might read a pte_t out before stores
      from the other CPU have cleared the memory.
      
      There are also similar races in higher levels of the page tables. They
      obviously don't involve the spinlock, but could see uninitialized memory.
      
      Arch code and hardware pagetable walkers that walk the pagetables without
      locks could see similar uninitialized memory problems, regardless of whether
      split ptes are enabled or not.
      
      I prefer to put the barriers in core code, because that's where the higher
      level logic happens, but the page table accessors are per-arch, and open-coding
      them everywhere I don't think is an option. I'll put the read-side barriers
      in alpha arch code for now (other architectures perform data-dependent loads
      in order).
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      362a61ad
    • N
      read_barrier_depends arch fixlets · 73f10281
      Nick Piggin 提交于
      read_barrie_depends has always been a noop (not a compiler barrier) on all
      architectures except SMP alpha. This brings UP alpha and frv into line with all
      other architectures, and fixes incorrect documentation.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      73f10281
    • D
      USB: atmel_usba_udc fixes, mostly disconnect() · 40517707
      David Brownell 提交于
      Various fixes to Atmel's high speed UDC driver.
      
        * Issue some missing disconnect() calls.  Currently they are only made
          when VBUS power goes away (on boards where the driver can sense such
          changes), but that's not enough for gadget drivers to clean out all
          the state that's needed.  Missing calls were:
      
            - After USB reset, before starting enumeration.
            - When unregistering a gadget driver, before unbind().
      
        * Don't assume gadget drivers provide disconnect callbacks; make sure
          to not call through a null pointer!
      
        * When the driver doesn't provide an unbind() callback, refuse to
          unregister it.
      
      Also remove two bogus "error" messages:
      
        * Related to mis-handling of disconnect() ... don't emit error messages
          for disconnect() handlers that disable endpoints.  All of them should
          be doing that; the problem is (unfixed) oddness in atmel_usba_udc.
      
        * Don't emit a diagnostic for a curious and transient nonfatal error
          that shows up sometimes with EP0.
      
      Those messages spammed syslog, for no good reason.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      40517707
    • R
      USB: pxa27x_udc: minor fixes · 5a59bc54
      Robert Jarzmik 提交于
      Minor fixes to pxa27x udc driver :
       - don't clobber driver model bus_id field
       - wrong endianess fix (no functional change; cpu is little-endian)
       - double udc disable fix
       - resume/suspend fix (OTG hold bit)
       - make driver pxa27x dependant (check cpu at runtime)
      Signed-off-by: NRobert Jarzmik <rjarzmik@free.fr>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5a59bc54
    • M
      usbtest: comment on why this code "expects" negative and positive errnos · 6def7553
      Marcin Slusarz 提交于
      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: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6def7553
    • X
      USB: remove PICDEM FS USB demo (04d8:000c) device from ldusb · 5fc89390
      Xiaofan Chen 提交于
      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: NXiaofan Chen <xiaofanc@gmail.com>
      Cc: Michael Hund <MHund@LD-Didactic.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5fc89390
    • D
      USB: option: add new Dell 5520 HSDPA variant · 96cb15cf
      Dan Williams 提交于
      New variant of the 5520 found by Luke Sheldrick.
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      96cb15cf
    • F
      USB: unusual_devs: Add support for GI 0401 SD-Card interface · e7c6f80f
      Filip Aben 提交于
      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: NFilip Aben <f.aben@option.com>
      Signed-off-by: NPhil Dibowitz <phil@ipom.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e7c6f80f
    • D
      USB: serial gadget: descriptor cleanup · b9370332
      David Brownell 提交于
      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: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b9370332
    • D
      USB: serial gadget: simplify endpoint handling · 734d37c6
      David Brownell 提交于
      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: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      734d37c6
    • D
      USB: serial gadget: remove needless data structure · 2c2d28a0
      David Brownell 提交于
      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: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2c2d28a0
    • D
      USB: serial gadget: cleanup/reorg · 9079e91b
      David Brownell 提交于
      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: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Al Borchers <alborchers@steinerpoint.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      9079e91b
    • S
      usb: fix compile warning in isp1760 · fe312e77
      Sebastian Siewior 提交于
      drivers/usb/host/isp1760-if.c:275: warning: 'ret' is used uninitialized in this function
      Signed-off-by: NSebastian Siewior <bigeasy@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fe312e77
    • E
      USB: do not handle device 1410:5010 in 'option' driver · cdafc37a
      Eugeniy Meshcheryakov 提交于
      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: NEugeniy Meshcheryakov <eugen@debian.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cdafc37a
    • P
      USB: Fix unusual_devs.h ordering · ed3e8fca
      Phil Dibowitz 提交于
      This patch fixes ordering problems with entries in unusual_devs.h.
      Signed-off-by: NPhil Dibowitz <phil@ipom.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ed3e8fca
    • I
      USB: add Zoom Telephonics Model 3095F V.92 USB Mini External modem to cdc-acm · 6149ed5e
      Iain McFarlane 提交于
      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: NIain McFarlane <iain@imcfarla.homelinux.net>
      Acked-by: NOliver Neukum <oneukum@suse.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6149ed5e
    • A
      USB: Support for the ET502HS HDSPA modem in option driver · 4c7d3137
      andreoli@samba.ing.unimo.it 提交于
      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: NMauro Andreolini <andreoli@weblab.ing.unimo.it>
      Signed-off-by: NMatthias Urlichs <matthias@urlichs.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4c7d3137
    • A
      USB: Support for the ET502HS HDSPA modem · dddcb8b7
      andreoli@samba.ing.unimo.it 提交于
      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: NMauro Andreolini <andreoli@weblab.ing.unimo.it>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dddcb8b7
    • H
      usb: fix integer as NULL pointer warnings found by sparse · af3d305c
      Harvey Harrison 提交于
      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: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      af3d305c
    • R
      USB: isp1760: fix printk format · 22026473
      Randy Dunlap 提交于
      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: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      22026473
    • G
      USB: add Telstra NextG CDMA id to option driver · 23cacd65
      Greg Kroah-Hartman 提交于
      As reported by Magnus Boman <captain.magnus@opensuse.org>
      
      Cc: Magnus Boman <captain.magnus@opensuse.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      23cacd65
    • G
      USB: add association.h · d23039ee
      Greg Kroah-Hartman 提交于
      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: NGreg Kroah-Hartman <gregkh@suse.de>
      d23039ee
    • A
      USB: create attributes before sending uevent · 2e5f10e4
      Alan Stern 提交于
      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: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2e5f10e4
    • G
      USB: add new moto_modem driver for some Morotola phones · 6986a978
      Greg Kroah-Hartman 提交于
      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: NJeff Garzik <jeff@garzik.org>
      Cc: Jiang Dejun <a5652c@motorola.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6986a978