Commit Graph

4452 Commits

Author SHA1 Message Date
Linus Torvalds 4ef58d4e2a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
  tree-wide: fix misspelling of "definition" in comments
  reiserfs: fix misspelling of "journaled"
  doc: Fix a typo in slub.txt.
  inotify: remove superfluous return code check
  hdlc: spelling fix in find_pvc() comment
  doc: fix regulator docs cut-and-pasteism
  mtd: Fix comment in Kconfig
  doc: Fix IRQ chip docs
  tree-wide: fix assorted typos all over the place
  drivers/ata/libata-sff.c: comment spelling fixes
  fix typos/grammos in Documentation/edac.txt
  sysctl: add missing comments
  fs/debugfs/inode.c: fix comment typos
  sgivwfb: Make use of ARRAY_SIZE.
  sky2: fix sky2_link_down copy/paste comment error
  tree-wide: fix typos "couter" -> "counter"
  tree-wide: fix typos "offest" -> "offset"
  fix kerneldoc for set_irq_msi()
  spidev: fix double "of of" in comment
  comment typo fix: sybsystem -> subsystem
  ...
2009-12-09 19:43:33 -08:00
Linus Torvalds 1c496784a0 Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (149 commits)
  arm: omap: Add omap3_defconfig
  AM35xx: Defconfig for AM3517 EVM board
  AM35xx: Add support for AM3517 EVM board
  omap: 3630sdp: defconfig creation
  omap: 3630sdp: introduce 3630 sdp board support
  omap3: Add defconfig for IGEP v2 board
  omap3: Add minimal IGEP v2 support
  omap3: Add CompuLab CM-T35 defconfig
  omap3: Add CompuLab CM-T35 board support
  omap3: rx51: Add wl1251 wlan driver support
  omap3: rx51: Add SDRAM init
  omap1: Add default kernel configuration for Herald
  omap1: Add board support and LCD for HTC Herald
  omap: zoom2: update defconfig for LL_DEBUG_NONE
  omap: zoom3: defconfig creation
  omap3: zoom: Introduce zoom3 board support
  omap3: zoom: Drop i2c-1 speed to 2400
  omap3: zoom: rename zoom2 name to generic zoom
  omap3: zoom: split board file for software reuse
  omap3evm: MIgrate to smsc911x ethernet driver
  ...

Fix trivial conflict (two unrelated config options added next to each
other) in arch/arm/mach-omap2/Makefile
2009-12-08 08:15:29 -08:00
Jiri Kosina d014d04386 Merge branch 'for-next' into for-linus
Conflicts:

	kernel/irq/chip.c
2009-12-07 18:36:35 +01:00
Linus Torvalds d9b2c4d0b0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (50 commits)
  pcmcia: rework the irq_req_t typedef
  pcmcia: remove deprecated handle_to_dev() macro
  pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer
  pcmcia: remove unused "window_t" typedef
  pcmcia: move some window-related code to pcmcia_ioctl.c
  pcmcia: Change window_handle_t logic to unsigned long
  pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()
  pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()
  pcmcia: Pass struct pcmcia_device to pcmcia_release_window()
  drivers/pcmcia: remove unnecessary kzalloc
  pcmcia: correct handling for Zoomed Video registers in topic.h
  pcmcia: fix printk formats
  pcmcia: autoload module pcmcia
  pcmcia/staging: update comedi drivers
  PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket
  PCMCIA: ss: allow PCI IRQs > 255
  PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket
  PCMCIA: soc_common: constify soc_pcmcia_socket ops member
  PCMCIA: sa1111: remove duplicated initializers
  PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data
  ...
2009-12-05 09:42:59 -08:00
André Goddard Rosa af901ca181 tree-wide: fix assorted typos all over the place
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 15:39:55 +01:00
Ozan Çağlayan 65cb76baa1 ehci-hcd: Fix typo in an error message
The correct word is handshake.

Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 15:39:46 +01:00
Gernot Hillier 0ec8648379 USB: Add support for Mobilcom Debitel USB UMTS Surf-Stick to option driver
This patch adds the vendor and device id for the Mobilcom Debitel UMTS surf
stick (a.k.a. 4G Systems XSStick W14, MobiData MBD-200HU, ...).

To see these ids, you need to switch the stick to modem operation first
with the help of usb_modeswitch. This makes it switch from 1c9e:f000 to
1c9e:9603 and thus be recognized by the option driver.

Signed-off-by: Gernot Hillier <gernot@hillier.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:17 -08:00
Oliver Neukum ee4ecb8ac6 USB: work around for EHCI with quirky periodic schedules
a quirky chipset needs periodic schedules to run for a minimum
time before they can be disabled again. This enforces the requirement
with a time stamp and a calculated delay

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:16 -08:00
Daniel Glöckner 8d6499e5bd USB: musb: Fix CPPI IRQs not being signaled
On tx channel abort a cppi interrupt is generated for a short time by
setting the lowest bit of the TCPPICOMPPTR register. It is then reset
immediately by clearing the bit. When the interrupt handler is run,
it does not detect an interrupt in the TCPPIMSKSR or RCPPIMSKSR
registers and thus exits early without writing the TCPPIEOIR register.
It appears that this inhibits further cppi interrupts until the handler
is called by chance, f.ex. from davinci_interrupt().

By moving the unmasking of the interrupt below the writes to
TCPPICOMPPTR, no interrupt is generated and no write to TCPPIEOIR is
necessary.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:16 -08:00
Daniel Glöckner 5542bc2ac7 USB: musb: respect usb_request->zero in control requests
In gadget mode the answer to a control request should be followed by
a zero-length packet if the amount transferred is an exact multiple of
the endpoint's packet size and the requests has its "zero" flag set.

This patch prevents the request from being immediately removed from the
queue when a control IN transfer ends on a full packet and "zero" is set.
The next time ep0_txstate is entered, a zero-length packet is queued and
the request is removed as fifo_count is 0.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:16 -08:00
Ajay Kumar Gupta dfeffa531c USB: musb: fix ISOC Tx programming for CPPI DMAs
Isochronous Tx DMA is getting programmed but never getting started
for CPPI and TUSB DMAs and thus Isochronous Tx doesn't work.

Fixing it by starting DMAs using musb_h_tx_dma_start().

Signed-off-by: Swaminathan S <swami.iyer@ti.com>
Signed-off-by: Babu Ravi <ravibabu@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:16 -08:00
Ajay Kumar Gupta 1230435c25 USB: musb: Remove unwanted message in boot log
Removes below unnecessary log of almost 28 lines during boot.

musb_hdrc: hw_ep 0shared, max 64
musb_hdrc: hw_ep 1tx, max 512
musb_hdrc: hw_ep 1rx, max 512
...
...
musb_hdrc: hw_ep 13shared, max 4096
musb_hdrc: hw_ep 14shared, max 1024
musb_hdrc: hw_ep 15shared, max 1024

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:16 -08:00
Thomas Dahlmann c5deb832d7 usb: amd5536udc: fixed shared interrupt bug and warning oops
- fixed shared interrupt bug reported by Vadim Lobanov
 - fixed possible warning oops on driver unload when connected
 - prevent interrupt flood in PIO mode ("modprobe amd5536udc use_dma=0")
   when using gadget ether

Signed-off-by: Thomas Dahlmann <dahlmann.thomas@arcor.de>
Cc: Robert Richter <robert.richter@amd.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:15 -08:00
Eric W. Biederman 0de6ab8b91 USB: ftdi_sio: Keep going when write errors are encountered.
The use of urb->actual_length to update tx_outstanding_bytes
implicitly assumes that the number of bytes actually written is the
same as the number of bytes we tried to write.  On error that
assumption is violated so just use transfer_buffer_length the number
of bytes we intended to write to the device.

If an error occurs we need to fall through and call
usb_serial_port_softint to wake up processes waiting in
tty_wait_until_sent.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:15 -08:00
Sergei Shtylyov cea83241b3 USB: musb_gadget: fix STALL handling
The driver incorrectly cancels the mass-storage device CSW request
(which leads to device reset) due to giving back URB at the head of
endpoint's queue after sending each STALL handshake; stop doing that
and start checking for the queue being non-empty before stalling an
endpoint and disallowing stall in such case in musb_gadget_set_halt()
like the other gadget drivers do.

Moreover, the driver starts Rx request despite of the endpoint being
halted -- fix this by moving the SendStall bit check from musb_g_rx()
to rxstate().  And we also sometimes get into rxstate() with DMA still
active after clearing an endpoint's halt (not clear why), so bail out
in this case, similarly to what txstate() does...

While at it, also do the following changes :

- in musb_gadget_set_halt(), remove pointless Tx FIFO flushing (the
  driver does not allow stalling with non-empty Tx FIFO anyway);

- in rxstate(), stop pointlessly zeroing the 'csr' variable;

- in musb_gadget_set_halt(), move the 'done' label to a more proper
  place;

- in musb_g_rx(), eliminate the 'done' label completely...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:15 -08:00
Alan Stern c2f6595fbd USB: EHCI: don't send Clear-TT-Buffer following a STALL
This patch (as1304) fixes a regression in ehci-hcd.  Evidently some
hubs don't handle Clear-TT-Buffer requests correctly, so we should
avoid sending them when they don't appear to be absolutely necessary.
The reported symptom is that output on a downstream audio device cuts
out because the hub stops relaying isochronous packets.

The patch prevents Clear-TT-Buffer requests from being sent following
a STALL handshake.  In theory a STALL indicates either that the
downstream device sent a STALL or that no matching TT buffer could be
found.  In either case, the transfer is completed and the TT buffer
does not remain busy, so it doesn't need to be cleared.

Also, the patch fixes a minor flaw in the code that actually sends the
Clear-TT-Buffer requests.  Although the pipe direction isn't really
used for control transfers, it should be a Send rather than a Receive.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Javier Kohen <jkohen@users.sourceforge.net>
CC: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:43:15 -08:00
Dominik Brodowski 5fa9167a1b pcmcia: rework the irq_req_t typedef
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: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:03:14 +01:00
Dominik Brodowski dd2e5a1565 pcmcia: remove deprecated handle_to_dev() macro
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: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-28 18:03:10 +01:00
Cory Maccarrone 45f780a061 omap1: omap_udc: Add clocking and disable vbus sense for omap7xx
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: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:32 -08:00
Tony Lindgren a76df42a67 Merge 7xx-iosplit-plat-merge with omap-fixes
Merge branch '7xx-iosplit-plat-merge' into omap-for-linus
2009-11-22 10:08:43 -08:00
Linus Torvalds 2d5bc23b32 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: option.c: add support for D-Link DWM-162-U5
  USB: usbmon: fix bug in mon_buff_area_shrink
  USB: xhci: Fix scratchpad deallocation.
  USB: xhci: Fix TRB physical to virtual address translation.
  USB: xhci: Fix bug memory free after failed initialization.
  USB: cdc_acm: Fix memory leak after hangup
  USB: cdc_acm: Fix race condition when opening tty
  USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer
2009-11-18 07:37:51 -08:00
Zhang Le ff854ce0b1 USB: option.c: add support for D-Link DWM-162-U5
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: Zhang Le <r0bertz@gentoo.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:35 -08:00
Alan Stern fca94748c5 USB: usbmon: fix bug in mon_buff_area_shrink
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: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:34 -08:00
Sarah Sharp 5294bea406 USB: xhci: Fix scratchpad deallocation.
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: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: John Youn <John.Youn@synopsys.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:34 -08:00
Sarah Sharp 2fa88daa6f USB: xhci: Fix TRB physical to virtual address translation.
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: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:34 -08:00
Sarah Sharp d94c05e33d USB: xhci: Fix bug memory free after failed initialization.
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: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:34 -08:00
Francesco Lavra 051522bb47 USB: cdc_acm: Fix memory leak after hangup
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
> 10077d4a66 (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: Francesco Lavra <francescolavra@interfree.it>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:33 -08:00
Henry Gebhardt 18a77b5d23 USB: cdc_acm: Fix race condition when opening tty
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: Henry Gebhardt <gebhardt@astro.uni-tuebingen.de>
Acked-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:33 -08:00
Libin Yang a1f17a872b USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer
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: Libin 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: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:33 -08:00
Alan Cox d94c7bd4c1 tty: cp210x: Fix carrier handling
Original discussion:
http://thread.gmane.org/gmane.linux.usb.general/23217/focus=23248
or
http://marc.info/?l=linux-usb&m=125553790714133&w=2

9a68e39d4a 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: Alan Cox <alan@linux.intel.com>
Reported-by: Karl Hiramoto <karl@hiramoto.org>
Tested-by:  Karl Hiramoto <karl@hiramoto.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:42:43 -08:00
Tony Lindgren 774facda20 Merge branch '7xx-iosplit-plat' with omap-fixes 2009-11-10 18:10:34 -08:00
Dominik Brodowski 9b44de2015 pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.

Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.

CC: linux-mtd@lists.infradead.org
CC: linux-usb@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-09 08:30:05 +01:00
Anton Vorontsov 37c4fd8c75 USB: fsl_udc_core: Fix kernel oops on module removal
fsl_udc_release() calls dma_free_coherent() with an inappropriate
device passed to it, and since the device has no dma_ops, the following
oops pops up:

  Kernel BUG at d103ce9c [verbose debug info unavailable]
  Oops: Exception in kernel mode, sig: 5 [#1]
  ...
  NIP [d103ce9c] fsl_udc_release+0x50/0x80 [fsl_usb2_udc]
  LR [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc]
  Call Trace:
  [cfbc7dc0] [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc]
  [cfbc7dd0] [c01a35c4] device_release+0x2c/0x90
  [cfbc7de0] [c016b480] kobject_cleanup+0x58/0x98
  [cfbc7e00] [c016c52c] kref_put+0x54/0x6c
  [cfbc7e10] [c016b360] kobject_put+0x34/0x64
  [cfbc7e20] [c01a1d0c] put_device+0x1c/0x2c
  [cfbc7e30] [d103dbfc] fsl_udc_remove+0xc0/0x1e4 [fsl_usb2_udc]
  ...

This patch fixes the issue by passing dev->parent, which points to
a correct device.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Li Yang <leoli@freescale.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-30 14:57:33 -07:00
Bryan Wu fead2ab6cf USB: option: TLAYTECH TUE800 support
Add ID for Tlaytech TUE800 CDMA modem to the option driver.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-By: Matthias Urlichs <matthias@urlichs.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-30 14:57:33 -07:00
Yoshihiro Shimoda 1e6159f858 USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-30 14:57:33 -07:00
Elina Pasheva b64dc0a597 USB: serial: sierra driver autopm fixes
This patch presents fixes for the autosuspend feature implementation in
sierra usb serial driver in  functions sierra_open(), sierra_close() and
stop_read_write_urbs().

The patch "sierra_close() must resume the device before it notifies it
of a closure" submitted by Oliver Neukum on Wed, October 14 has been
merged as fix in sierra_close() function.

The bug fix  in sierra_open() function restores the autopm interface
state on error condition.

The bug fix in in stop_read_write_urbs() function assures that both
receive and interrupt urbs are recycled.

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-30 14:57:33 -07:00
Elina Pasheva 3c77d5137d USB: serial: sierra driver send_setup() autopm fix
This patch presents a fix for the autosuspend feature implementation in
sierra usb serial driver for function sierra_send_setup().  Because it
is possible to call sierra_send_setup() before sierra_open() or after
sierra_close() we added a get/put interface activity to assure that the
usb control can happen even when the device is autosuspended.

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Tested-by: Matthew Safar <msafar@sierrawireless.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-30 14:57:33 -07:00
Russell King 0996391139 ARM: Fix lubbock defconfig build
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: Russell King <rmk+kernel@arm.linux.org.uk>
2009-10-21 13:20:32 +01:00
Tony Lindgren ce491cf854 omap: headers: Move remaining headers from include/mach to include/plat
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: Tony Lindgren <tony@atomide.com>
2009-10-20 09:40:47 -07:00
Brian Niebuhr 4238ef5469 USB: gadget: Fix EEM driver comments and VID/PID
Remove expository comments and fix USB VID and PID

Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:54:44 -07:00
Benjamin Herrenschmidt b8430e1b82 usb-storage: Workaround devices with bogus sense size
usb-storage: Workaround devices with bogus sense size

Some devices, such as Huawei E169, advertise more than the standard
amount of sense data, causing us to set US_FL_SANE_SENSE, assuming
they support it. However, they subsequently fail the request sense
with that size.

This works around it generically. When a sense request fails due to
a device returning an error, US_FL_SANE_SENSE was set, and that sense
request used a larger sense size, we retry with a smaller size before
giving up.

Based on an original patch by Ben Efros <ben@pc-doctor.com>

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:54:44 -07:00
Sarah Sharp 36f21329d2 USB: ehci: Fix IST boundary checking interval math.
When the EHCI driver falls behind in its scheduling, the active stream's
first empty microframe may be in the past with respect to the current
microframe.  The code attempts to move the starting microframe ("start") N
number of microframes forward, where N is the interval of endpoint.
However, stream->interval is a copy of the endpoint's bInterval, which is
designated in frames for FS devices, and microframes for HS devices.
Convert stream->interval to microframes before using it to move the
starting microframe forward.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:54:43 -07:00
Huzaifa Sidhpurwala 12148da672 USB: option: Support for AIRPLUS MCD650 Datacard
Here is a patch for Airplus MCD 650 card

Note: This device is with Victor V Kudlak, and he confirmed that this
device works with the patch.

Signed-off-by: Huzaifa Sidhpurwala <sidhpurwala.huzaifa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:54:43 -07:00
David Vrabel 1f01ca4e0c USB: whci-hcd: always do an update after processing a halted qTD
A halted qTD always triggers a hardware list update because the qset was
either removed or reactivated.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:54:43 -07:00
David Vrabel 171b37ee95 USB: whci-hcd: handle early deletion of endpoints
If an endpoint is deleted before it's been fully added to the hardware
list, the associated qset will not be fully initialized and an oops will
occur when complete(&qset->remove_complete) is called.  This can happen
if a queued URB is cancelled.

Fix this by only removing the qset from the hardware list if the
cancelled URB had qTDs.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:54:42 -07:00
Stefano Panella b41ecf9a80 USB: wusb: don't use the stack to read security descriptor
An urb's transfer buffer must be kmalloc'd memory and not point to the
stack or a DMA API warning results.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14 14:54:42 -07:00
Mike Frysinger e3c6f15fec USB: musb: invert arch depend string
The MUSB code relies on platform implementations that currently only
exists for Arm and Blackfin processors, so have the MUSB Kconfig depend
upon those arches.

This should prevent other arches from building MUSB via randconfig.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-12 14:36:28 -07:00
Linus Torvalds d93a8f829f Revert "USB: Work around BIOS bugs by quiescing USB controllers earlier"
This reverts commit db8be50c43, as per

	http://bugzilla.kernel.org/show_bug.cgi?id=14374
	http://marc.info/?l=linux-kernel&m=125446885705223&w=4

We simply can't do the USB handoff at FIXUP_HEADER time, since it will
often require us to have valid IO mappings etc.  But that in turn
requires a whole different approach, not this trivial one-liner.

Maybe we could teach all the USB quirk handoff handlers to only do the
quirk if the device has all its registers set up (since if it isn't
initialized, it's unlikely to be active), but regardless that will need
a whole lot more code than just saying "let's do it really early".

The proper fix is almost certainly to just leave the legacy IOMMU
mappings active until after all devices have been initialized.

Reported-by: Nick Piggin <npiggin@suse.de>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-11 15:57:57 -07:00
Linus Torvalds c6c5992723 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (32 commits)
  USB: serial: no unnecessary GFP_ATOMIC in oti6858
  USB: serial: fix race between unthrottle and completion handler in visor
  USB: serial: fix assumption that throttle/unthrottle cannot sleep
  USB: serial: fix race between unthrottle and completion handler in symbolserial
  USB: serial: fix race between unthrottle and completion handler in opticon
  USB: ehci: Fix isoc scheduling boundary checking.
  USB: storage: When a device returns no sense data, call it a Hardware Error
  USB: small fix in error case of suspend in generic usbserial code
  USB: visor: fix trivial accounting bug in visor driver
  USB: Fix throttling in generic usbserial driver
  USB: cp210x: Add support for the DW700 UART
  USB: ipaq: fix oops when device is plugged in
  USB: isp1362: fix build warnings on 64-bit systems
  USB: gadget: imx_udc: Use resource size
  USB: storage: iRiver P7 UNUSUAL_DEV patch
  USB: musb: make HAVE_CLK support optional
  USB: xhci: Fix dropping endpoints from the xHC schedule.
  USB: xhci: Don't wait for a disable slot cmd when HC dies.
  USB: xhci: Handle canceled URBs when HC dies.
  USB: xhci: Stop debugging polling loop when HC dies.
  ...
2009-10-11 11:24:25 -07:00
Oliver Neukum 40d2858231 USB: serial: no unnecessary GFP_ATOMIC in oti6858
GFP_ATOMIC without good cause is evil.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09 13:52:09 -07:00