1. 04 8月, 2009 7 次提交
  2. 15 7月, 2009 9 次提交
  3. 14 7月, 2009 3 次提交
  4. 13 7月, 2009 21 次提交
    • R
      NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines. · adeab1af
      Ralf Baechle 提交于
      Guido Trentalancia reports:
      
      I am trying to use the kiss driver in the Linux kernel that is being
      shipped with Fedora 10 but unfortunately I get the following oops:
      
      mkiss: AX.25 Multikiss, Hans Albas PE1AYX
      mkiss: ax0: crc mode is auto.
      ADDRCONF(NETDEV_CHANGE): ax0: link becomes ready
      ------------[ cut here ]------------
      WARNING: at kernel/softirq.c:77 __local_bh_disable+0x2f/0x83() (Not
      tainted)
      [...]
      unloaded: microcode]
      Pid: 0, comm: swapper Not tainted 2.6.27.25-170.2.72.fc10.i686 #1
       [<c042ddfb>] warn_on_slowpath+0x65/0x8b
       [<c06ab62b>] ? _spin_unlock_irqrestore+0x22/0x38
       [<c04228b4>] ? __enqueue_entity+0xe3/0xeb
       [<c042431e>] ? enqueue_entity+0x203/0x20b
       [<c0424361>] ? enqueue_task_fair+0x3b/0x3f
       [<c041f88c>] ? resched_task+0x3a/0x6e
       [<c06ab62b>] ? _spin_unlock_irqrestore+0x22/0x38
       [<c06ab4e2>] ? _spin_lock_bh+0xb/0x16
       [<c043255b>] __local_bh_disable+0x2f/0x83
       [<c04325ba>] local_bh_disable+0xb/0xd
       [<c06ab4e2>] _spin_lock_bh+0xb/0x16
       [<f8b6f600>] mkiss_receive_buf+0x2fb/0x3a6 [mkiss]
       [<c0572a30>] flush_to_ldisc+0xf7/0x198
       [<c0572b12>] tty_flip_buffer_push+0x41/0x51
       [<f89477f2>] ftdi_process_read+0x375/0x4ad [ftdi_sio]
       [<f8947a5a>] ftdi_read_bulk_callback+0x130/0x138 [ftdi_sio]
       [<c05d4bec>] usb_hcd_giveback_urb+0x63/0x93
       [<c05ea290>] uhci_giveback_urb+0xe5/0x15f
       [<c05eaabf>] uhci_scan_schedule+0x52e/0x767
       [<c05f6288>] ? psmouse_handle_byte+0xc/0xe5
       [<c054df78>] ? acpi_ev_gpe_detect+0xd6/0xe1
       [<c05ec5b0>] uhci_irq+0x110/0x125
       [<c05d4834>] usb_hcd_irq+0x40/0xa3
       [<c0465313>] handle_IRQ_event+0x2f/0x64
       [<c046642b>] handle_level_irq+0x74/0xbe
       [<c04663b7>] ? handle_level_irq+0x0/0xbe
       [<c0406e6e>] do_IRQ+0xc7/0xfe
       [<c0405668>] common_interrupt+0x28/0x30
       [<c056821a>] ? acpi_idle_enter_simple+0x162/0x19d
       [<c0617f52>] cpuidle_idle_call+0x60/0x92
       [<c0403c61>] cpu_idle+0x101/0x134
       [<c069b1ba>] rest_init+0x4e/0x50
       =======================
      ---[ end trace b7cc8076093467ad ]---
      ------------[ cut here ]------------
      WARNING: at kernel/softirq.c:136 _local_bh_enable_ip+0x3d/0xc4()
      [...]
      Pid: 0, comm: swapper Tainted: G        W 2.6.27.25-170.2.72.fc10.i686
       [<c042ddfb>] warn_on_slowpath+0x65/0x8b
       [<c06ab62b>] ? _spin_unlock_irqrestore+0x22/0x38
       [<c04228b4>] ? __enqueue_entity+0xe3/0xeb
       [<c042431e>] ? enqueue_entity+0x203/0x20b
       [<c0424361>] ? enqueue_task_fair+0x3b/0x3f
       [<c041f88c>] ? resched_task+0x3a/0x6e
       [<c06ab62b>] ? _spin_unlock_irqrestore+0x22/0x38
       [<c06ab4e2>] ? _spin_lock_bh+0xb/0x16
       [<f8b6f642>] ? mkiss_receive_buf+0x33d/0x3a6 [mkiss]
       [<c04325f9>] _local_bh_enable_ip+0x3d/0xc4
       [<c0432688>] local_bh_enable_ip+0x8/0xa
       [<c06ab54d>] _spin_unlock_bh+0x11/0x13
       [<f8b6f642>] mkiss_receive_buf+0x33d/0x3a6 [mkiss]
       [<c0572a30>] flush_to_ldisc+0xf7/0x198
       [<c0572b12>] tty_flip_buffer_push+0x41/0x51
       [<f89477f2>] ftdi_process_read+0x375/0x4ad [ftdi_sio]
       [<f8947a5a>] ftdi_read_bulk_callback+0x130/0x138 [ftdi_sio]
       [<c05d4bec>] usb_hcd_giveback_urb+0x63/0x93
       [<c05ea290>] uhci_giveback_urb+0xe5/0x15f
       [<c05eaabf>] uhci_scan_schedule+0x52e/0x767
       [<c05f6288>] ? psmouse_handle_byte+0xc/0xe5
       [<c054df78>] ? acpi_ev_gpe_detect+0xd6/0xe1
       [<c05ec5b0>] uhci_irq+0x110/0x125
       [<c05d4834>] usb_hcd_irq+0x40/0xa3
       [<c0465313>] handle_IRQ_event+0x2f/0x64
       [<c046642b>] handle_level_irq+0x74/0xbe
       [<c04663b7>] ? handle_level_irq+0x0/0xbe
       [<c0406e6e>] do_IRQ+0xc7/0xfe
       [<c0405668>] common_interrupt+0x28/0x30
       [<c056821a>] ? acpi_idle_enter_simple+0x162/0x19d
       [<c0617f52>] cpuidle_idle_call+0x60/0x92
       [<c0403c61>] cpu_idle+0x101/0x134
       [<c069b1ba>] rest_init+0x4e/0x50
       =======================
      ---[ end trace b7cc8076093467ad ]---
      mkiss: ax0: Trying crc-smack
      mkiss: ax0: Trying crc-flexnet
      
      The issue was, that the locking code in mkiss was assuming it was only
      ever being called in process or bh context.  Fixed by converting the
      involved locking code to use irq-safe locks.
      
      Review of other networking line disciplines shows that 6pack, both sync
      and async PPP and STRIP have similar issues.  The ppp_async one is the
      most interesting one as it sorts out half of the issue as far back as
      2004 in commit http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=2996d8deaeddd01820691a872550dc0cfba0c37dSigned-off-by: NRalf Baechle <ralf@linux-mips.org>
      Reported-by: NGuido Trentalancia <guido@trentalancia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      adeab1af
    • A
      USB: otg: fix module reinsert issue · dc7520c1
      Ajay Kumar Gupta 提交于
      Platform_device instance (pd) is not set to NULL in
      usb_nop_xceiv_unregister() causing usb_nop_xceiv_register()
      to fail during module reinsert.
      
      From: Ajay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NBabu Ravi <ravibabu@ti.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      dc7520c1
    • A
      USB: handle zero-length usbfs submissions correctly · 9180135b
      Alan Stern 提交于
      This patch (as1262) fixes a bug in usbfs: It refuses to accept
      zero-length transfers, and it insists that the buffer pointer be valid
      even if there is no data being transferred.
      
      The patch also consolidates a bunch of repetitive access_ok() checks
      into a single check, which incidentally fixes the lack of such a check
      for Isochronous URBs.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9180135b
    • A
      USB: EHCI: report actual_length for iso transfers · ec6d67e3
      Alan Stern 提交于
      This patch (as1259b) makes ehci-hcd return the total number of bytes
      transferred in urb->actual_length for Isochronous transfers.
      Until now, the actual_length value was unaccountably left at 0.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ec6d67e3
    • A
      USB: option: remove unnecessary and erroneous code · f092c240
      Alan Stern 提交于
      This patch (as1264) removes a bunch of unnecessary and erroneous stuff
      from the option USB-serial driver.  Clearly there's no need to verify
      that the device pointer stored in the URBs is right or to store the
      same pointer over again.  After all, the pointer can't change once it
      has been set up.
      
      There's also no need to call usb_clear_halt for the IN endpoint
      multiple times -- in fact, doing so is an error since every time after
      the first there will be active URBs queued for that endpoint.  Since
      the Clear-Halts don't appear to be needed at all, the patch simply
      removes them.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f092c240
    • A
      USB: cypress_m8: remove invalid Clear-Halt · 4d2fae8b
      Alan Stern 提交于
      This patch (as1265) removes an erroneous call to usb_clear_halt from
      the cypress_m8 driver.  The call isn't valid because it is made from
      interrupt context whereas usb_clear_halt is a blocking routine.
      
      Presumably the code has never been executed; if it did it would cause
      an oops.  So instead treat -EPIPE like any other sort of unexplained
      error.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4d2fae8b
    • S
      USB: musb_host: undo incorrect change in musb_advance_schedule() · 1fe975f9
      Sergei Shtylyov 提交于
      Commit c9cd06b3 (musb_host: refactor
      URB giveback) included due to my overlook the change incorrect in the
      context of the current kernel -- undo it.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1fe975f9
    • D
      USB: fix LANGID=0 regression · 0cce2eda
      Daniel Mack 提交于
      commit b7af0bb2 ("USB: allow malformed LANGID descriptors") broke support
      for devices without string descriptor support.
      
      Reporting string descriptors is optional to USB devices, and a device
      lets us know it can't deal with strings by responding to the LANGID
      request with a STALL token.
      
      The kernel handled that correctly before b7af0bb2 came in, but failed
      hard if the LANGID was reported but broken. More than that, if a device
      was not able to provide string descriptors, the LANGID was retrieved
      over and over again at each string read request.
      
      This patch changes the behaviour so that
      
       a) the LANGID is only queried once
       b) devices which can't handle string requests are not asked again
       c) devices with malformed LANGID values have a sane fallback to 0x0409
      Signed-off-by: NDaniel Mack <daniel@caiaq.de>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0cce2eda
    • E
      USB: serial: sierra driver id_table additions · c5f3d87d
      Elina Pasheva 提交于
      - Updated the id_table with all devices that Sierra Wireless currently
         support
       - Re-ordered the contents of the id_table for better readability
      Signed-off-by: NElina Pasheva <epasheva@sierrawireless.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c5f3d87d
    • K
      USB serial: Add ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter. · 14511412
      Krzysztof Halasa 提交于
      Adds USB ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter.
      Signed-off-by: NKrzysztof Ha³asa <khc@pm.waw.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      14511412
    • O
      USB: fix race leading to a write after kfree in usbfs · 516a1a07
      Oliver Neukum 提交于
      this fixes a race between async_completed() and proc_reapurbnonblock().
      
      CPU A                   CPU B
      
      spin_lock(&ps->lock);
      list_move_tail(&as->asynclist, &ps->async_completed);
      spin_unlock(&ps->lock);
      
                                      if (!(as = async_getcompleted(ps)))
                                              return -EAGAIN;
                                      return processcompl(as, (void __user * __user *)arg);
      
      processcompl() calls free_async() which calls kfree(as)
      
      as->status = urb->status;
      if (as->signr) {
              sinfo.si_signo = as->signr;
              sinfo.si_errno = as->status;
              sinfo.si_code = SI_ASYNCIO;
              sinfo.si_addr = as->userurb;
              kill_pid_info_as_uid(as->signr, &sinfo, as->pid, as->uid,
                                    as->euid, as->secid);
      }
      snoop(&urb->dev->dev, "urb complete\n");
      snoop_urb(urb, as->userurb);
      
      write after kfree
      Signed-off-by: NOliver Neukum <oliver@neukum.org>
      516a1a07
    • A
      USB: Sierra: fix oops upon device close · 7bae0a07
      Alan Stern 提交于
      This patch (as1263) fixes a mixup that occurred when conflicting
      patches for the sierra driver were merged incorrectly.  The former
      sierra_shutdown routine should have been become sierra_release, not
      sierra_disconnect.
      
      The symptom this fixes is an oops when the device file is closed after
      a Sierra device has been unplugged (Bugzilla #13675).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NPeter Naulls <peter@mushroomnetworks.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7bae0a07
    • A
      USB: option.c: add A-Link 3GU device id · c3325eb1
      Anssi Hannula 提交于
      Add A-Link 3GU device id 1e0e:9200 into option driver. The device
      has 4 interfaces, of which 1 is handled by storage and the other 3
      by option driver.
      
      The device appears first as CD-only 1e0e:f000 device and must be
      switched to 1e0e:9200 mode either by using "eject CD" or
      usb_modeswitch.
      
      For the record, the device does not work with generic usbserial
      driver (usb disconnect when sending the ATDT command).
      Signed-off-by: NAnssi Hannula <anssi.hannula@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      c3325eb1
    • A
      USB: Serial: Add support for Arkham Technology adapters · 0601e116
      Amit Kucheria 提交于
      As reported by David Potts from Arkham Technology, the current driver
      works with their hardware on addition of the device ids.
      Signed-off-by: NAmit Kucheria <amit.kucheria@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0601e116
    • J
      USB: Fix option_ms regression in 2.6.31-rc2 · 2ab2178c
      Jonathan McDowell 提交于
      Commit 32ebbe7b which filters the
      SCSI REZERO command in option_ms based on a SCSI INQUIRY with a vendor
      of Option breaks my Option Icon 225 (0af0:6971). This device returns a
      vendor of ZCOPTION for the ZeroCD device. The following trivial patch
      fixes things for me.
      Signed-Off-By: NJonathan McDowell <noodles@earth.li>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2ab2178c
    • R
      USB: gadget audio: select SND_PCM · 04950737
      Randy Dunlap 提交于
      Fix USB gadget audio: select SND_PCM, like many other sound
      drivers do, to fix build errors:
      
      drivers/built-in.o: In function `f_audio_playback_work':
      audio.c:(.text+0x15a3e7): undefined reference to `snd_pcm_kernel_ioctl'
      audio.c:(.text+0x15a471): undefined reference to `snd_pcm_lib_write'
      drivers/built-in.o: In function `_snd_pcm_hw_param_set':
      audio.c:(.text+0x15aca7): undefined reference to `snd_interval_refine'
      drivers/built-in.o: In function `gaudio_setup':
      (.init.text+0x12adf): undefined reference to `_snd_pcm_hw_params_any'
      drivers/built-in.o: In function `gaudio_setup':
      (.init.text+0x12b43): undefined reference to `snd_pcm_kernel_ioctl'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      04950737
    • M
      USB: ftdi: support NDI devices · b760dac2
      Martin Geleynse 提交于
      It enhances the driver for FTDI-based USB serial adapters to recognize and
      support Northern Digital Inc (NDI) measurement equipment. NDI has been
      providing this patch for various kernel flavors for several years and we would
      like to see these changes built in to the driver so that our equipement works
      without the need for customers to patch the kernel themselves.
      
      The patch makes small modifications to 2 files: ./drivers/usb/serial/ftdi_sio.c
      and ./drivers/usb/serial/ftdi_sio.h. It accomplishes 3 things:
      
      1. Define the VID and PIDs to allow the driver to recognize the NDI devices.
      2. Map the 19200 baud rate setting to our higher baud rate of 1.2Mb
         We would have chosen to map 38400 to the higher rate, similar to what
         several other vendors have done, but some of our legacy customers actually
         use 38400, therefore we remap 19200 to the higher rate.
      3. We set the default transmit latency in the FTDI chip to 1ms for our devices.
         Our devices are typically polled at 60Hz and the default ftdi latency
         seriously affects turn-around time and results in missed data frames. We
         have created a modprobe option that allows this setting to be increased.
         This has proven necessary particularly in some virtualized environments.
      Signed-off-by: NMartin P. Geleynse <mgeleyns@ndigital.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      b760dac2
    • G
      Revert USB: usbfs: deprecate and hide option for !embedded · e12df02a
      Greg Kroah-Hartman 提交于
      This reverts commit cc71329b, so that
      Red Hat machines can boot properly.  It seems that the Red Hat initrd
      code tries to watch the /proc/bus/usb/devices file to monitor usb
      devices showing up.  While this task is prone to lots of races and does
      not show the true state of the system, they seem to like it.
      
      So for now, don't move this option under the EMBEDDED config option.
      
      
      Cc: Scott James Remnant <scott@canonical.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Peter Jones <pjones@redhat.com>
      Cc: Jeff Chua <jeff.chua.linux@gmail.com>
      Cc: Dave Jones <davej@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e12df02a
    • D
      USB: RNDIS gadget, fix issues talking from PXA · 4e19f220
      David Brownell 提交于
      The reworked Ethernet gadget has an RNDIS interop problem when used
      with the CDC subset driver ... e.g. on PXA 2xx and 3xx hardware,
      which currently has a hard time talking to MS-Windows hosts.
      
      The issue is that Microsoft requires USB_CLASS_COMM.  Fix by tweaking
      the CDC subset driver to not switch to USB_CLASS_VENDOR_SPEC if RNDIS
      is used in some other device configuration.
      
      [ UPDATED:  some "statements" were comma-terminated; fix that. ]
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Aric Blumer <aric@sdgsystems.net>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4e19f220
    • F
      USB: serial: FTDI with product code FB80 and vendor id 0403 · b34efeea
      Folkert van Heusden 提交于
      It seems an USB device with vendor id 0403 and product code FB80 has an
      FTDI serial io chip as well: http://ftdichip.com/Drivers/D2XX.htm
      This device in fact is a true random generantor by comsci:
      http://comscire.com/Products/R2000KU/
      So the following patch should add support for this device if I am
      correct. Not tested as I do not own this device (I would like support in
      the kernel so that my entropybroker application (which distributes
      entrop data (random values) between servers and clients)).
      
      
      From: Folkert van Heusden <folkert@vanheusden.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b34efeea
    • J
      USB: console: Fix regression in usb console on kernel boot · 6e406121
      Jason Wessel 提交于
      The commit 335f8514 introduced a
      regression which stopped usb consoles from working correctly as a
      kernel boot console as well as interactive login device.
      
      The addition of the serial_close() which in turn calls
      tty_port_close_start() will change the reference count of port.count
      and warn about it.  The usb console code had previously incremented
      the port.count to indicate it was making use of the device as a
      console and the forced change causes a double open on the usb device
      which leads to a non obvious kernel oops later on when the tty is
      freed.
      
      To fix the problem instead make use of port->console to track if the
      port is in fact an active console port to avoid double initialization
      of the usb serial device.  The port.count is incremented and
      decremented only with in the scope of usb_console_setup() for the
      purpose of the low level driver initialization.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6e406121