Skip to content

Commit fb478da

Browse files
committed
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: (23 commits) USB: revert recovery from transient errors usb: unusual devs patch for Nokia 5310 Music Xpress usb: ftdi_sio: add support for Domintell devices USB: drivers/usb/musb/: disable it on SuperH USB Serial: Sierra: Add MC8785 VID/PID USB: serial: add ZTE CDMA Tech id to option driver USB: ftdi_sio: Add 0x5050/0x0900 USB IDs (Papouch Quido USB 4/4) usb serial: ti_usb_3410_5052 obviously broken by firmware changes USB: fsl_usb2_udc: fix VDBG() format string USB: unusual_devs addition for RockChip MP3 player USB: SERIAL CP2101 add device IDs usb-serial: Add Siemens EF81 to PL-2303 hack triggers USB: fix EHCI periodic transfers usb: musb: fix include path USB: Fixing Nokia 3310c in storage mode usb gadget: fix omap_udc DMA regression USB: update of Documentation/usb/anchors.txt USB: fix hcd interrupt disabling USB: Correct Sierra Wireless USB EVDO Modem Device ID USB: Fix the Nokia 6300 storage-mode. ...
2 parents 8553f32 + 5257d97 commit fb478da

File tree

22 files changed

+124
-85
lines changed

22 files changed

+124
-85
lines changed

Documentation/usb/anchors.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,21 @@ This function kills all URBs associated with an anchor. The URBs
4242
are called in the reverse temporal order they were submitted.
4343
This way no data can be reordered.
4444

45+
usb_unlink_anchored_urbs()
46+
--------------------------
47+
48+
This function unlinks all URBs associated with an anchor. The URBs
49+
are processed in the reverse temporal order they were submitted.
50+
This is similar to usb_kill_anchored_urbs(), but it will not sleep.
51+
Therefore no guarantee is made that the URBs have been unlinked when
52+
the call returns. They may be unlinked later but will be unlinked in
53+
finite time.
54+
4555
usb_wait_anchor_empty_timeout()
4656
-------------------------------
4757

4858
This function waits for all URBs associated with an anchor to finish
4959
or a timeout, whichever comes first. Its return value will tell you
5060
whether the timeout was reached.
61+
62+

drivers/usb/core/hcd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,8 @@ int usb_add_hcd(struct usb_hcd *hcd,
18761876
* with IRQF_SHARED. As usb_hcd_irq() will always disable
18771877
* interrupts we can remove it here.
18781878
*/
1879-
irqflags &= ~IRQF_DISABLED;
1879+
if (irqflags & IRQF_SHARED)
1880+
irqflags &= ~IRQF_DISABLED;
18801881

18811882
snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
18821883
hcd->driver->description, hcd->self.busnum);

drivers/usb/core/hub.c

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,35 +2683,17 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
26832683
USB_PORT_STAT_C_ENABLE);
26842684
#endif
26852685

2686-
/* Try to use the debounce delay for protection against
2687-
* port-enable changes caused, for example, by EMI.
2688-
*/
2689-
if (portchange & (USB_PORT_STAT_C_CONNECTION |
2690-
USB_PORT_STAT_C_ENABLE)) {
2691-
status = hub_port_debounce(hub, port1);
2692-
if (status < 0) {
2693-
if (printk_ratelimit())
2694-
dev_err (hub_dev, "connect-debounce failed, "
2695-
"port %d disabled\n", port1);
2696-
portstatus &= ~USB_PORT_STAT_CONNECTION;
2697-
} else {
2698-
portstatus = status;
2699-
}
2700-
}
2701-
27022686
/* Try to resuscitate an existing device */
27032687
udev = hdev->children[port1-1];
27042688
if ((portstatus & USB_PORT_STAT_CONNECTION) && udev &&
27052689
udev->state != USB_STATE_NOTATTACHED) {
2706-
27072690
usb_lock_device(udev);
27082691
if (portstatus & USB_PORT_STAT_ENABLE) {
27092692
status = 0; /* Nothing to do */
2710-
} else if (!udev->persist_enabled) {
2711-
status = -ENODEV; /* Mustn't resuscitate */
27122693

27132694
#ifdef CONFIG_USB_SUSPEND
2714-
} else if (udev->state == USB_STATE_SUSPENDED) {
2695+
} else if (udev->state == USB_STATE_SUSPENDED &&
2696+
udev->persist_enabled) {
27152697
/* For a suspended device, treat this as a
27162698
* remote wakeup event.
27172699
*/
@@ -2726,7 +2708,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
27262708
#endif
27272709

27282710
} else {
2729-
status = usb_reset_device(udev);
2711+
status = -ENODEV; /* Don't resuscitate */
27302712
}
27312713
usb_unlock_device(udev);
27322714

@@ -2741,14 +2723,27 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
27412723
usb_disconnect(&hdev->children[port1-1]);
27422724
clear_bit(port1, hub->change_bits);
27432725

2726+
if (portchange & (USB_PORT_STAT_C_CONNECTION |
2727+
USB_PORT_STAT_C_ENABLE)) {
2728+
status = hub_port_debounce(hub, port1);
2729+
if (status < 0) {
2730+
if (printk_ratelimit())
2731+
dev_err(hub_dev, "connect-debounce failed, "
2732+
"port %d disabled\n", port1);
2733+
portstatus &= ~USB_PORT_STAT_CONNECTION;
2734+
} else {
2735+
portstatus = status;
2736+
}
2737+
}
2738+
27442739
/* Return now if debouncing failed or nothing is connected */
27452740
if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
27462741

27472742
/* maybe switch power back on (e.g. root hub was reset) */
27482743
if ((wHubCharacteristics & HUB_CHAR_LPSM) < 2
27492744
&& !(portstatus & (1 << USB_PORT_FEAT_POWER)))
27502745
set_port_feature(hdev, port1, USB_PORT_FEAT_POWER);
2751-
2746+
27522747
if (portstatus & USB_PORT_STAT_ENABLE)
27532748
goto done;
27542749
return;

drivers/usb/gadget/fsl_usb2_udc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static int dr_controller_setup(struct fsl_udc *udc)
223223
fsl_writel(tmp, &dr_regs->endpointlistaddr);
224224

225225
VDBG("vir[qh_base] is %p phy[qh_base] is 0x%8x reg is 0x%8x",
226-
(int)udc->ep_qh, (int)tmp,
226+
udc->ep_qh, (int)tmp,
227227
fsl_readl(&dr_regs->endpointlistaddr));
228228

229229
/* Config PHY interface */

drivers/usb/gadget/omap_udc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ static void dma_channel_claim(struct omap_ep *ep, unsigned channel)
787787
omap_set_dma_dest_params(ep->lch,
788788
OMAP_DMA_PORT_TIPB,
789789
OMAP_DMA_AMODE_CONSTANT,
790-
(unsigned long) io_v2p(UDC_DATA_DMA),
790+
UDC_DATA_DMA,
791791
0, 0);
792792
}
793793
} else {
@@ -804,7 +804,7 @@ static void dma_channel_claim(struct omap_ep *ep, unsigned channel)
804804
omap_set_dma_src_params(ep->lch,
805805
OMAP_DMA_PORT_TIPB,
806806
OMAP_DMA_AMODE_CONSTANT,
807-
(unsigned long) io_v2p(UDC_DATA_DMA),
807+
UDC_DATA_DMA,
808808
0, 0);
809809
/* EMIFF or SDRC */
810810
omap_set_dma_dest_burst_mode(ep->lch,

drivers/usb/host/ehci-hcd.c

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,6 @@ static int handshake (struct ehci_hcd *ehci, void __iomem *ptr,
145145
return -ETIMEDOUT;
146146
}
147147

148-
static int handshake_on_error_set_halt(struct ehci_hcd *ehci, void __iomem *ptr,
149-
u32 mask, u32 done, int usec)
150-
{
151-
int error = handshake(ehci, ptr, mask, done, usec);
152-
if (error)
153-
ehci_to_hcd(ehci)->state = HC_STATE_HALT;
154-
155-
return error;
156-
}
157-
158148
/* force HC to halt state from unknown (EHCI spec section 2.3) */
159149
static int ehci_halt (struct ehci_hcd *ehci)
160150
{
@@ -173,6 +163,22 @@ static int ehci_halt (struct ehci_hcd *ehci)
173163
STS_HALT, STS_HALT, 16 * 125);
174164
}
175165

166+
static int handshake_on_error_set_halt(struct ehci_hcd *ehci, void __iomem *ptr,
167+
u32 mask, u32 done, int usec)
168+
{
169+
int error;
170+
171+
error = handshake(ehci, ptr, mask, done, usec);
172+
if (error) {
173+
ehci_halt(ehci);
174+
ehci_to_hcd(ehci)->state = HC_STATE_HALT;
175+
ehci_err(ehci, "force halt; handhake %p %08x %08x -> %d\n",
176+
ptr, mask, done, error);
177+
}
178+
179+
return error;
180+
}
181+
176182
/* put TDI/ARC silicon into EHCI mode */
177183
static void tdi_reset (struct ehci_hcd *ehci)
178184
{

drivers/usb/host/ehci-sched.c

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,9 @@ static int enable_periodic (struct ehci_hcd *ehci)
437437
u32 cmd;
438438
int status;
439439

440+
if (ehci->periodic_sched++)
441+
return 0;
442+
440443
/* did clearing PSE did take effect yet?
441444
* takes effect only at frame boundaries...
442445
*/
@@ -461,6 +464,9 @@ static int disable_periodic (struct ehci_hcd *ehci)
461464
u32 cmd;
462465
int status;
463466

467+
if (--ehci->periodic_sched)
468+
return 0;
469+
464470
/* did setting PSE not take effect yet?
465471
* takes effect only at frame boundaries...
466472
*/
@@ -544,13 +550,10 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
544550
: (qh->usecs * 8);
545551

546552
/* maybe enable periodic schedule processing */
547-
if (!ehci->periodic_sched++)
548-
return enable_periodic (ehci);
549-
550-
return 0;
553+
return enable_periodic(ehci);
551554
}
552555

553-
static void qh_unlink_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
556+
static int qh_unlink_periodic(struct ehci_hcd *ehci, struct ehci_qh *qh)
554557
{
555558
unsigned i;
556559
unsigned period;
@@ -586,9 +589,7 @@ static void qh_unlink_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
586589
qh_put (qh);
587590

588591
/* maybe turn off periodic schedule */
589-
ehci->periodic_sched--;
590-
if (!ehci->periodic_sched)
591-
(void) disable_periodic (ehci);
592+
return disable_periodic(ehci);
592593
}
593594

594595
static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
@@ -1562,9 +1563,7 @@ itd_link_urb (
15621563
urb->hcpriv = NULL;
15631564

15641565
timer_action (ehci, TIMER_IO_WATCHDOG);
1565-
if (unlikely (!ehci->periodic_sched++))
1566-
return enable_periodic (ehci);
1567-
return 0;
1566+
return enable_periodic(ehci);
15681567
}
15691568

15701569
#define ISO_ERRS (EHCI_ISOC_BUF_ERR | EHCI_ISOC_BABBLE | EHCI_ISOC_XACTERR)
@@ -1642,7 +1641,7 @@ itd_complete (
16421641
ehci_urb_done(ehci, urb, 0);
16431642
retval = true;
16441643
urb = NULL;
1645-
ehci->periodic_sched--;
1644+
(void) disable_periodic(ehci);
16461645
ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;
16471646

16481647
if (unlikely (list_empty (&stream->td_list))) {
@@ -1951,9 +1950,7 @@ sitd_link_urb (
19511950
urb->hcpriv = NULL;
19521951

19531952
timer_action (ehci, TIMER_IO_WATCHDOG);
1954-
if (!ehci->periodic_sched++)
1955-
return enable_periodic (ehci);
1956-
return 0;
1953+
return enable_periodic(ehci);
19571954
}
19581955

19591956
/*-------------------------------------------------------------------------*/
@@ -2019,7 +2016,7 @@ sitd_complete (
20192016
ehci_urb_done(ehci, urb, 0);
20202017
retval = true;
20212018
urb = NULL;
2022-
ehci->periodic_sched--;
2019+
(void) disable_periodic(ehci);
20232020
ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;
20242021

20252022
if (list_empty (&stream->td_list)) {
@@ -2243,8 +2240,7 @@ scan_periodic (struct ehci_hcd *ehci)
22432240
if (unlikely (modified)) {
22442241
if (likely(ehci->periodic_sched > 0))
22452242
goto restart;
2246-
/* maybe we can short-circuit this scan! */
2247-
disable_periodic(ehci);
2243+
/* short-circuit this scan */
22482244
now_uframe = clock;
22492245
break;
22502246
}

drivers/usb/musb/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ comment "Enable Host or Gadget support to see Inventra options"
99
# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
1010
config USB_MUSB_HDRC
1111
depends on (USB || USB_GADGET) && HAVE_CLK
12+
depends on !SUPERH
1213
select TWL4030_USB if MACH_OMAP_3430SDP
1314
tristate 'Inventra Highspeed Dual Role Controller (TI, ...)'
1415
help

drivers/usb/musb/musb_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100
#include <linux/io.h>
101101

102102
#ifdef CONFIG_ARM
103-
#include <asm/arch/hardware.h>
104-
#include <asm/arch/memory.h>
103+
#include <mach/hardware.h>
104+
#include <mach/memory.h>
105105
#include <asm/mach-types.h>
106106
#endif
107107

drivers/usb/musb/omap2430.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#include <linux/io.h>
3636

3737
#include <asm/mach-types.h>
38-
#include <asm/arch/hardware.h>
39-
#include <asm/arch/mux.h>
38+
#include <mach/hardware.h>
39+
#include <mach/mux.h>
4040

4141
#include "musb_core.h"
4242
#include "omap2430.h"

drivers/usb/musb/omap2430.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#define __MUSB_OMAP243X_H__
1212

1313
#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
14-
#include <asm/arch/hardware.h>
15-
#include <asm/arch/usb.h>
14+
#include <mach/hardware.h>
15+
#include <mach/usb.h>
1616

1717
/*
1818
* OMAP2430-specific definitions

drivers/usb/serial/cp2101.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ static struct usb_device_id id_table [] = {
7272
{ USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */
7373
{ USB_DEVICE(0x10C4, 0x80DD) }, /* Tracient RFID */
7474
{ USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */
75+
{ USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */
7576
{ USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */
7677
{ USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */
7778
{ USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */
@@ -83,6 +84,7 @@ static struct usb_device_id id_table [] = {
8384
{ USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */
8485
{ USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
8586
{ USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */
87+
{ USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
8688
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
8789
{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
8890
{ USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */
@@ -93,6 +95,7 @@ static struct usb_device_id id_table [] = {
9395
{ USB_DEVICE(0x13AD, 0x9999) }, /* Baltech card reader */
9496
{ USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
9597
{ USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
98+
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
9699
{ } /* Terminating Entry */
97100
};
98101

drivers/usb/serial/ftdi_sio.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,9 @@ static struct usb_device_id id_table_combined [] = {
654654
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
655655
{ USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) },
656656
{ USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) },
657+
{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) },
658+
{ USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) },
659+
{ USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) },
657660
{ }, /* Optional parameter entry */
658661
{ } /* Terminating entry */
659662
};

drivers/usb/serial/ftdi_sio.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,7 @@
750750

751751
#define PAPOUCH_VID 0x5050 /* Vendor ID */
752752
#define PAPOUCH_TMU_PID 0x0400 /* TMU USB Thermometer */
753+
#define PAPOUCH_QUIDO4x4_PID 0x0900 /* Quido 4/4 Module */
753754

754755
/*
755756
* ACG Identification Technologies GmbH products (http://www.acg.de/).
@@ -838,6 +839,10 @@
838839
/* Rig Expert Ukraine devices */
839840
#define FTDI_REU_TINY_PID 0xED22 /* RigExpert Tiny */
840841

842+
/* Domintell products http://www.domintell.com */
843+
#define FTDI_DOMINTELL_DGQG_PID 0xEF50 /* Master */
844+
#define FTDI_DOMINTELL_DUSB_PID 0xEF51 /* DUSB01 module */
845+
841846
/* Commands */
842847
#define FTDI_SIO_RESET 0 /* Reset the port */
843848
#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */

drivers/usb/serial/option.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po
218218
/* ZTE PRODUCTS */
219219
#define ZTE_VENDOR_ID 0x19d2
220220
#define ZTE_PRODUCT_MF628 0x0015
221+
#define ZTE_PRODUCT_CDMA_TECH 0xfffe
221222

222223
static struct usb_device_id option_ids[] = {
223224
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
@@ -347,6 +348,7 @@ static struct usb_device_id option_ids[] = {
347348
{ USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
348349
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
349350
{ USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) },
351+
{ USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) },
350352
{ } /* Terminating entry */
351353
};
352354
MODULE_DEVICE_TABLE(usb, option_ids);

0 commit comments

Comments
 (0)