1. 11 12月, 2009 1 次提交
    • A
      usbdevfs: move compat_ioctl handling to devio.c · 637e8a60
      Arnd Bergmann 提交于
      Half the compat_ioctl handling is in devio.c, the other
      half is in fs/compat_ioctl.c. This moves everything into
      one place for consistency.
      
      As a positive side-effect, push down the BKL into the
      ioctl methods.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Alon Bar-Lev <alon.barlev@gmail.com>
      Cc: David Vrabel <david.vrabel@csr.com>
      Cc: linux-usb@vger.kernel.org
      637e8a60
  2. 04 12月, 2009 2 次提交
  3. 01 12月, 2009 10 次提交
  4. 29 11月, 2009 2 次提交
    • D
      pcmcia: rework the irq_req_t typedef · 5fa9167a
      Dominik Brodowski 提交于
      Most of the irq_req_t typedef'd struct can be re-worked quite
      easily:
      
      (1) IRQInfo2 was unused in any case, so drop it.
      
      (2) IRQInfo1 was used write-only, so drop it.
      
      (3) Instance (private data to be passed to the IRQ handler):
      	Most PCMCIA drivers using pcmcia_request_irq() to actually
      	register an IRQ handler set the "dev_id" to the same pointer
      	as the "priv" pointer in struct pcmcia_device. Modify the two
      	exceptions (ipwireless, ibmtr_cs) to also work this waym and
      	set the IRQ handler's "dev_id" to p_dev->priv unconditionally.
      
      (4) Handler is to be of type irq_handler_t.
      
      (5) Handler != NULL already tells whether an IRQ handler is present.
      	Therefore, we do not need the IRQ_HANDLER_PRESENT flag in
      	irq_req_t.Attributes.
      
      CC: netdev@vger.kernel.org
      CC: linux-bluetooth@vger.kernel.org
      CC: linux-ide@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-scsi@vger.kernel.org
      CC: alsa-devel@alsa-project.org
      CC: Jaroslav Kysela <perex@perex.cz>
      CC: Jiri Kosina <jkosina@suse.cz>
      CC: Karsten Keil <isdn@linux-pingi.de>
      for the Bluetooth parts: Acked-by: Marcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      5fa9167a
    • D
      pcmcia: remove deprecated handle_to_dev() macro · dd2e5a15
      Dominik Brodowski 提交于
      Update remaining users and remove deprecated handle_to_dev() macro
      
      CC: Harald Welte <laforge@gnumonks.org>
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-serial@vger.kernel.org
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      dd2e5a15
  5. 23 11月, 2009 1 次提交
    • C
      omap1: omap_udc: Add clocking and disable vbus sense for omap7xx · 45f780a0
      Cory Maccarrone 提交于
      The l3_ocpi_ck clock is needed on omap7xx processors for USB.
      Additionally, bit 8 of the SOFT_REQ_REG needs to be enabled for
      the usb_dc_ck on omap7xx, which is a different bit than that
      of the omap16xx-defined clock of the same name.
      
      I added a provision for the usb_dc_ck and l3_ocpi_ck clocks as
      dc_clk and hhc_clk, respectively, for omap7xx CPUs.  Additionally,
      I added a check in machine_without_vbus_sense for all omap7xx
      devices, as presently I know of no omap7xx-based devices that
      have vbus sense, and it made more sense to me to use a cpu check
      here than to spell out each machine one at a time.  Finally, DMA
      is disabled for omap7xx, as it causes problems with these chips.
      
      Cc: linux-usb@vger.kernel.org
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NCory Maccarrone <darkstar6262@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      45f780a0
  6. 18 11月, 2009 9 次提交
    • Z
      USB: option.c: add support for D-Link DWM-162-U5 · ff854ce0
      Zhang Le 提交于
      Add D-Link DWM-162-U5 device id 1e0e:ce16 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 05c6:2100 device and must be
      switched to 1e0e:ce16 mode either by using "eject CD" or usb_modeswitch.
      
      The MessageContent for usb_modeswitch.conf is:
      "55534243e0c26a85000000000000061b000000020000000000000000000000"
      Signed-off-by: NZhang Le <r0bertz@gentoo.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ff854ce0
    • A
      USB: usbmon: fix bug in mon_buff_area_shrink · fca94748
      Alan Stern 提交于
      This patch (as1299b) fixes a bug in an error-handling path of usbmon's
      binary interface.  The storage area for URB data is divided into
      fixed-size blocks.  If an URB's data can't be copied, the area
      reserved for it should be decreased to the size of the truncated
      information (rounded up to a block boundary).  Rounding up the amount
      to be removed and subtracting it from the reserved size is definitely
      the wrong thing to do.
      
      Also, when the data for an isochronous URB can't be copied, we can
      still copy the isoc packet descriptors.  In fact the current code does
      copy the descriptors, but then sets the capture length to 0 so they
      remain inaccessible.  The capture length should be reduced to the
      length of the descriptors, not set to 0.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NPete Zaitcev <zaitcev@redhat.com>
      CC: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fca94748
    • S
      USB: xhci: Fix scratchpad deallocation. · 5294bea4
      Sarah Sharp 提交于
      The scratchpad_free() function uses xhci->page_size to free some memory
      with pci_free_consistent().  However, the page_size is set to zero before
      the call, causing kernel oopses on driver unload.  Call scratchpad_free()
      before setting xhci->page_size to zero.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: NJohn Youn <John.Youn@synopsys.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5294bea4
    • S
      USB: xhci: Fix TRB physical to virtual address translation. · 2fa88daa
      Sarah Sharp 提交于
      The trb_in_td() function in the xHCI driver is supposed to translate a
      physical transfer buffer request (TRB) into a virtual pointer to the ring
      segment that TRB is in.
      
      Unfortunately, a mistake in this function may cause endless loops as the
      driver searches through the linked list of ring segments over and over
      again.  Fix a couple bugs that may lead to loops or bad output:
      
      1. Bail out if we get a NULL pointer when translating the segment's
      private structure and the starting DMA address of the segment chunk.  If
      this happens, we've been handed a starting TRB pointer from a different
      ring.
      
      2. Make sure the function works when there's multiple segments in the
      ring.  In the while loop to search through the ring segments, use the
      current segment variable (cur_seg), rather than the starting segment
      variable (start_seg) that is passed in.
      
      3. Stop searching the ring if we've run through all the segments in the
      ring.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2fa88daa
    • S
      USB: xhci: Fix bug memory free after failed initialization. · d94c05e3
      Sarah Sharp 提交于
      If the xHCI driver fails during the memory initialization, xhci->ir_set
      may not be a valid pointer.  Check that it points to valid DMA'able memory
      before writing to that address during the memory freeing process.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d94c05e3
    • 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
    • L
      USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer · a1f17a87
      Libin Yang 提交于
      The following patch in the driver is required to avoid USB 1.1 device
      failures that may occur due to requests from USB OHCI controllers may
      be overwritten if the latency for any pending request by the USB
      controller is very long (in the range of milliseconds).
      Signed-off-by: NLibin Yang <libin.yang@amd.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a1f17a87
    • A
      tty: cp210x: Fix carrier handling · d94c7bd4
      Alan Cox 提交于
      Original discussion:
      http://thread.gmane.org/gmane.linux.usb.general/23217/focus=23248
      or
      http://marc.info/?l=linux-usb&m=125553790714133&w=2
      
      9a68e39d broke carrier handling so that a
      cp210x setup which needed the carrier lines set up (non CLOCAL) which did
      not make a call which set the termios bits left the lines down even if
      CLOCAL was not asserted.
      
      Fix this not by reverting but by adding the proper dtr_rts and
      carrier_raised methods. This both sets the modem lines properly and also
      implements the correct blocking semantics for the port as required by
      POSIX.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Reported-by: NKarl Hiramoto <karl@hiramoto.org>
      Tested-by: NKarl Hiramoto <karl@hiramoto.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d94c7bd4
  7. 09 11月, 2009 1 次提交
  8. 31 10月, 2009 5 次提交
  9. 21 10月, 2009 2 次提交
    • R
      ARM: Fix lubbock defconfig build · 09963911
      Russell King 提交于
      drivers/built-in.o: In function `pxa25x_udc_probe':
      drivers/usb/gadget/pxa25x_udc.c:2195: undefined reference to `otg_get_transceiver'
      drivers/usb/gadget/pxa25x_udc.c:2300: undefined reference to `otg_put_transceiver'
      
      pxa25x_udc.c unconditionally uses these two functions, so we need to
      ensure that the object providing them is also built.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      09963911
    • T
      omap: headers: Move remaining headers from include/mach to include/plat · ce491cf8
      Tony Lindgren 提交于
      Move the remaining headers under plat-omap/include/mach
      to plat-omap/include/plat. Also search and replace the
      files using these headers to include using the right path.
      
      This was done with:
      
      #!/bin/bash
      mach_dir_old="arch/arm/plat-omap/include/mach"
      plat_dir_new="arch/arm/plat-omap/include/plat"
      headers=$(cd $mach_dir_old && ls *.h)
      omap_dirs="arch/arm/*omap*/ \
      drivers/video/omap \
      sound/soc/omap"
      other_files="drivers/leds/leds-ams-delta.c \
      drivers/mfd/menelaus.c \
      drivers/mfd/twl4030-core.c \
      drivers/mtd/nand/ams-delta.c"
      
      for header in $headers; do
      	old="#include <mach\/$header"
      	new="#include <plat\/$header"
      	for dir in $omap_dirs; do
      		find $dir -type f -name \*.[chS] | \
      			xargs sed -i "s/$old/$new/"
      	done
      	find drivers/ -type f -name \*omap*.[chS] | \
      		xargs sed -i "s/$old/$new/"
      	for file in $other_files; do
      		sed -i "s/$old/$new/" $file
      	done
      done
      
      for header in $(ls $mach_dir_old/*.h); do
      	git mv $header $plat_dir_new/
      done
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ce491cf8
  10. 15 10月, 2009 7 次提交