Greg KH | 30 Apr 18:36 2010
Picon

[GIT PATCH] USB fixes for 2.6.34-git

Here are a number of USB bugfixes and new device ids for your 2.6.34-git
tree.

The majority are musb bugfixes, and a variety of other fixes for
problems reported by people, and a few new device ids.

I also added a wrapper for an api call that we are renaming, so as to
make the merge with linux-next easier (the other kernel trees can now
take those patches.)  The bigger rename will happen in .35, but this is
here now to make everyone's lives easier.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/

All of these patches have been in the linux-next and mm trees.

The full patches will be sent to the linux-usb mailing list, if anyone
wants to see them.

thanks,

greg k-h

------------

 arch/arm/plat-omap/include/plat/usb.h |    2 +-
 drivers/usb/class/cdc-acm.c           |    3 +
 drivers/usb/core/Kconfig              |    2 +-
 drivers/usb/core/generic.c            |    2 +-
 drivers/usb/core/inode.c              |    4 +-
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 01/29] musb: fix power field to hold all possible values

From: Ajay Kumar Gupta <ajay.gupta@...>

MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus
the 'power' field has to hold values above 255.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 arch/arm/plat-omap/include/plat/usb.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 568578d..876ca8d 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
 <at>  <at>  -46,7 +46,7  <at>  <at>  struct ehci_hcd_omap_platform_data {
 struct omap_musb_board_data {
 	u8	interface_type;
 	u8	mode;
-	u8	power;
+	u16	power;
 };

 enum musb_interface    {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
--

-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 08/29] MUSB: OMAP: don't call clk_put()

From: Sergei Shtylyov <sshtylyov@...>

Remove duplicate/unbalanced call to clk_put() from musb_platform_exit() --
clk_put() gets called from musb_core.c anyway...

Signed-off-by: Sergei Shtylyov <sshtylyov@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/omap2430.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 490cdf1..8259263 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
 <at>  <at>  -331,8 +331,5  <at>  <at>  int musb_platform_exit(struct musb *musb)

 	musb_platform_suspend(musb);

-	clk_put(musb->clock);
-	musb->clock = NULL;
Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 10/29] MUSB: fix DaVinci glue layer dependency

From: Sergei Shtylyov <sshtylyov@...>

CONFIG_ARCH_DAVINCI now embraces both the "real" DaVinci and DA8xx/OMAP-L1x --
on which the DaVinci glue layer won't work. Change the Makefile dependency to
CONFIG_ARCH_DAVINCI_DMx which corresponds to "real" DaVinci.

Signed-off-by: Sergei Shtylyov <sshtylyov@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/Kconfig  |    2 +-
 drivers/usb/musb/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index b4c783c..07fe490 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
 <at>  <at>  -42,7 +42,7  <at>  <at>  config USB_MUSB_SOC
 	default y if (BF52x && !BF522 && !BF523)

 comment "DaVinci 35x and 644x USB support"
-	depends on USB_MUSB_HDRC && ARCH_DAVINCI
+	depends on USB_MUSB_HDRC && ARCH_DAVINCI_DMx

 comment "OMAP 243x high speed USB support"
 	depends on USB_MUSB_HDRC && ARCH_OMAP2430
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index 85710cc..3a485da 100644
--- a/drivers/usb/musb/Makefile
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 24/29] USB: fix build on OMAPs if CONFIG_PM_RUNTIME is not set

From: Anand Gadiyar <gadiyar@...>

With patch as1329 (USB: convert to the runtime PM framework),
we make USB_SUSPEND depend on PM_RUNTIME instead of CONFIG_PM.

Also, CONFIG_USB_OTG selects CONFIG_USB_SUSPEND.

If PM_RUNTIME is not enabled, and we try to enable USB_OTG,
we will end up with CONFIG_USB_SUSPEND selected. This is
due to a known bug with the select statement.

This makes the build break on various OMAP configs (which
have CONFIG_USB_OTG set by default, but do not yet have
CONFIG_PM_RUNTIME enabled).

Avoid this by changing the logic for CONFIG_USB_OTG from
"select USB_SUSPEND" to "depends on USB_SUSPEND"

Signed-off-by: Anand Gadiyar <gadiyar@...>
CC: Michal Marek <mmarek@...>
CC: Tony Lindgren <tony@...>
CC: Alan Stern <stern@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/core/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig
index 97a819c..7e59444 100644
--- a/drivers/usb/core/Kconfig
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 07/29] MUSB: DaVinci: fix musb_platform_init() error cleanup path

From: Sergei Shtylyov <sshtylyov@...>

This function forgets to call clk_disable() iff reading the USB module version
register returns 0.

Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/davinci.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 29bce5c..ce2e16f 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
 <at>  <at>  -444,6 +444,8  <at>  <at>  int __init musb_platform_init(struct musb *musb)
 	return 0;

 fail:
+	clk_disable(musb->clock);
+
 	usb_nop_xceiv_unregister();
 	return -ENODEV;
 }
--

-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 22/29] USB: serial: option: add cinterion device id

This adds a device id for a Cinterion device.

Reported-by: John Race <John.Race@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/serial/option.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 99e116c..84d0eda 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
 <at>  <at>  -378,6 +378,8  <at>  <at>  static int  option_resume(struct usb_serial *serial);
 #define HAIER_VENDOR_ID				0x201e
 #define HAIER_PRODUCT_CE100			0x2009

+#define CINTERION_VENDOR_ID			0x0681
+
 /* some devices interfaces need special handling due to a number of reasons */
 enum option_blacklist_reason {
 		OPTION_BLACKLIST_NONE = 0,
 <at>  <at>  -723,6 +725,7  <at>  <at>  static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)},
 	{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)},

+	{ USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) },
 	{ } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
--

-- 
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 18/29] USB: xhci: properly set endpoint context fields for periodic eps.

From: Sarah Sharp <sarah.a.sharp@...>

For periodic endpoints, we must let the xHCI hardware know the maximum
payload an endpoint can transfer in one service interval.  The xHCI
specification refers to this as the Maximum Endpoint Service Interval Time
Payload (Max ESIT Payload).  This is used by the hardware for bandwidth
management and scheduling of packets.

For SuperSpeed endpoints, the maximum is calculated by multiplying the max
packet size by the number of bursts and the number of opportunities to
transfer within a service interval (the Mult field of the SuperSpeed
Endpoint companion descriptor).  Devices advertise this in the
wBytesPerInterval field of their SuperSpeed Endpoint Companion Descriptor.

For high speed devices, this is taken by multiplying the max packet size by the
"number of additional transaction opportunities per microframe" (the high
bits of the wMaxPacketSize field in the endpoint descriptor).

For FS/LS devices, this is just the max packet size.

The other thing we must set in the endpoint context is the Average TRB
Length.  This is supposed to be the average of the total bytes in the
transfer descriptor (TD), divided by the number of transfer request blocks
(TRBs) it takes to describe the TD.  This gives the host controller an
indication of whether the driver will be enqueuing a scatter gather list
with many entries comprised of small buffers, or one contiguous buffer.

It also takes into account the number of extra TRBs you need for every TD.
This includes No-op TRBs and Link TRBs used to link ring segments
together.  Some drivers may choose to chain an Event Data TRB on the end
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 21/29] USB: serial: option: ZTEAC8710 Support with Device ID 0xffff

From: Mahesh Kuruganti <maheshkuruganti@...>

PATCH TO EXTEND SUPPORT TO AC8710 WITH 0xFFFF Product ID.

Signed-off-by: Mahesh Kuruganti <maheshkuruganti@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/serial/option.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index a7f24f2..99e116c 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
 <at>  <at>  -305,6 +305,7  <at>  <at>  static int  option_resume(struct usb_serial *serial);
 #define ZTE_PRODUCT_CDMA_TECH			0xfffe
 #define ZTE_PRODUCT_AC8710			0xfff1
 #define ZTE_PRODUCT_AC2726			0xfff5
+#define ZTE_PRODUCT_AC8710T			0xffff

 /* ZTE PRODUCTS -- alternate vendor ID */
 #define ZTE_VENDOR_ID2				0x1d6b
 <at>  <at>  -683,6 +684,7  <at>  <at>  static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) },
 	{ USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
 	{ USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 14/29] USB: cdc-acm: add another device quirk

From: Russ Nelson <nelson@...>

The Maretron USB100 needs this quirk in order to work properly.

Signed-off-by: Russ Nelson <nelson@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/class/cdc-acm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index be6331e..5e1a253 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
 <at>  <at>  -1542,6 +1542,9  <at>  <at>  static const struct usb_device_id acm_ids[] = {
 	{ USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */
 	.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
 	},
+	{ USB_DEVICE(0x1576, 0x03b1), /* Maretron USB100 */
+	.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
+	},

 	/* Nokia S60 phones expose two ACM channels. The first is
 	 * a modem and is picked up by the standard AT-command
--

-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
(Continue reading)

Russ Nelson | 2 May 07:16 2010

Re: [PATCH 14/29] USB: cdc-acm: add another device quirk

I'm happy to report that this driver is running on the BIRE.org
floating instrumentation platform ("B1") like a champ.  We also need
to get the Medusa Research Power Analyzer Pro working as well, but I
didn't have it working in time for this patch.  Should be ready in
about two weeks.

Greg Kroah-Hartman writes:
 > From: Russ Nelson <nelson@...>
 > 
 > The Maretron USB100 needs this quirk in order to work properly.
 > 
 > Signed-off-by: Russ Nelson <nelson@...>
 > Signed-off-by: Greg Kroah-Hartman <gregkh@...>
 > ---
 >  drivers/usb/class/cdc-acm.c |    3 +++
 >  1 files changed, 3 insertions(+), 0 deletions(-)
 > 
 > diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
 > index be6331e..5e1a253 100644
 > --- a/drivers/usb/class/cdc-acm.c
 > +++ b/drivers/usb/class/cdc-acm.c
 >  <at>  <at>  -1542,6 +1542,9  <at>  <at>  static const struct usb_device_id acm_ids[] = {
 >  	{ USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */
 >  	.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
 >  	},
 > +	{ USB_DEVICE(0x1576, 0x03b1), /* Maretron USB100 */
 > +	.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
 > +	},
 >  
 >  	/* Nokia S60 phones expose two ACM channels. The first is
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 20/29] USB: serial: pl2303: Hybrid reader Uniform HCR331

From: Simone Contini <s.contini@...>

I tried a magnetic stripe reader
(http://www.kimaldi.com/kimaldi_eng/productos/lectores_de_tarjetas/lectores_tarjeta_chip_y_dni/lector_hibrido_uniform_hcr_331)
and I see that it is interfaced with a PL2303. I wrote a patch to use
your driver which simply adds the product ID for the device and it
seems working fine.

From: Simone Contini <s.contini@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/serial/pl2303.c |    1 +
 drivers/usb/serial/pl2303.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index c97a0bb..c28b160 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
 <at>  <at>  -59,6 +59,7  <at>  <at>  static const struct usb_device_id id_table[] = {
 	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) },
 	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) },
 	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) },
+	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) },
 	{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
 	{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
 	{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index a352d5f..23c09b3 100644
--- a/drivers/usb/serial/pl2303.h
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 15/29] USB: don't choose configs with no interfaces

From: Alan Stern <stern@...>

This patch (as1372) fixes a bug in the routine that chooses the
default configuration to install when a new USB device is detected.
The algorithm is supposed to look for a config whose first interface
is for a non-vendor-specific class.  But the way it's currently
written, it will also accept a config with no interfaces at all, which
is not very useful.  (Believe it or not, such things do exist.)

Signed-off-by: Alan Stern <stern@...>
Tested-by: Andrew Victor <avictor.za@...>
Cc: stable <stable@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/core/generic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index bdf87a8..2c95153 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
 <at>  <at>  -120,7 +120,7  <at>  <at>  int usb_choose_configuration(struct usb_device *udev)
 		 * than a vendor-specific driver. */
 		else if (udev->descriptor.bDeviceClass !=
 						USB_CLASS_VENDOR_SPEC &&
-				(!desc || desc->bInterfaceClass !=
+				(desc && desc->bInterfaceClass !=
 						USB_CLASS_VENDOR_SPEC)) {
 			best = c;
 			break;
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 16/29] USB: OHCI: don't look at the root hub to get the number of ports

From: Alan Stern <stern@...>

This patch (as1371) fixes a small bug in ohci-hcd.  The HCD already
knows how many ports the controller has; there's no need to go looking
at the root hub's usb_device structure to find out.  Especially since
the root hub's maxchild value is set correctly only while the root hub
is bound to the hub driver.

Signed-off-by: Alan Stern <stern@...>
Cc: stable <stable@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/host/ohci-hub.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 32bbce9..65cac8c 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
 <at>  <at>  -697,7 +697,7  <at>  <at>  static int ohci_hub_control (
 	u16		wLength
 ) {
 	struct ohci_hcd	*ohci = hcd_to_ohci (hcd);
-	int		ports = hcd_to_bus (hcd)->root_hub->maxchild;
+	int		ports = ohci->num_ports;
 	u32		temp;
 	int		retval = 0;

--

-- 
1.7.0.4
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:38 2010
Picon

[PATCH 28/29] USB: ohci-at91: fix power management hanging

From: Patrice Vilchez <patrice.vilchez@...>

A hanging has been detected in ohci-at91 while going in suspend to ram. This is
due to asynchronous operations between ohci reset and ohci clocks shutdown.
This patch adds the reading of the control register between the reset of the
ohci and clocks stop. This "flush the writes" idea was taken from ohci-hcd.c
file (ohci_shutdown() function).

Signed-off-by: Patrice Vilchez <patrice.vilchez@...>
Signed-off-by: Nicolas Ferre <nicolas.ferre@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/host/ohci-at91.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 68b83ab..944291e 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
 <at>  <at>  -331,6 +331,8  <at>  <at>  ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg)
 	 */
 	if (at91_suspend_entering_slow_clock()) {
 		ohci_usb_reset (ohci);
+		/* flush the writes */
+		(void) ohci_readl (ohci, &ohci->regs->control);
 		at91_stop_clock();
 	}

--

-- 
1.7.0.4
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 06/29] musb_core: don't prevent disabling clock on driver unload

From: Sergei Shtylyov <sshtylyov@...>

Resetting 'musb->clock' to NULL in musb_shutdown() prevents musb_platform_exit()
from properly disabling the clock when unloading the driver -- don't do it.

Signed-off-by: Sergei Shtylyov <sshtylyov@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/musb_core.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 03544de..8b68f21 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
 <at>  <at>  -965,10 +965,8  <at>  <at>  static void musb_shutdown(struct platform_device *pdev)
 	spin_lock_irqsave(&musb->lock, flags);
 	musb_platform_disable(musb);
 	musb_generic_disable(musb);
-	if (musb->clock) {
+	if (musb->clock)
 		clk_put(musb->clock);
-		musb->clock = NULL;
-	}
 	spin_unlock_irqrestore(&musb->lock, flags);

 	/* FIXME power down */
--

-- 
1.7.0.4
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 19/29] USB: option: add ID for ZTE MF 330

From: Dominik Brodowski <linux@...>

Based on the information provided for by Paweł Drobek, add
a second vendor ID and the correct product ID for ZTE MF 330.

Reported-by: Paweł Drobek <pawel.drobek@...>
Signed-off: Dominik Brodowski <linux@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/serial/option.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index ca9d866..a7f24f2 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
 <at>  <at>  -306,6 +306,10  <at>  <at>  static int  option_resume(struct usb_serial *serial);
 #define ZTE_PRODUCT_AC8710			0xfff1
 #define ZTE_PRODUCT_AC2726			0xfff5

+/* ZTE PRODUCTS -- alternate vendor ID */
+#define ZTE_VENDOR_ID2				0x1d6b
+#define ZTE_PRODUCT_MF_330			0x0002
+
 #define BENQ_VENDOR_ID				0x04a5
 #define BENQ_PRODUCT_H10			0x4068

 <at>  <at>  -679,6 +683,7  <at>  <at>  static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 25/29] USB: gadget: s3c-hsotg: Add missing unlock

From: Julia Lawall <julia@...>

In an error handling case the lock is not unlocked.  The return is
converted to a goto, to share the unlock at the end of the function.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
 <at> r exists <at> 
expression E1;
identifier f;
 <at>  <at> 

f (...) { <+...
* spin_lock_irqsave (E1,...);
... when != E1
* return ...;
...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/gadget/s3c-hsotg.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index 124a8cc..1f73b48 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 05/29] musb_core: don't touch 'musb->clock' in musb_free()

From: Sergei Shtylyov <sshtylyov@...>

Remove duplicate/unbalanced calls to clk_disable()/clk_put() in musb_free():

- clk_disable() is called by musb_platform_exit() just prior to this call;
- clk_put() is called by the callers of musb_free() prior to calling it...

Signed-off-by: Sergei Shtylyov <sshtylyov@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/musb_core.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 3342b82..03544de 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
 <at>  <at>  -1857,11 +1857,6  <at>  <at>  static void musb_free(struct musb *musb)
 	musb_platform_exit(musb);
 	musb_writeb(musb->mregs, MUSB_DEVCTL, 0);

-	if (musb->clock) {
-		clk_disable(musb->clock);
-		clk_put(musb->clock);
-	}
Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 17/29] USB: xhci: properly set the "Mult" field of the endpoint context.

From: Sarah Sharp <sarah.a.sharp@...>

A SuperSpeed interrupt or isochronous endpoint can define the number of
"burst transactions" it can handle in a service interval.  This is
indicated by the "Mult" bits in the bmAttributes of the SuperSpeed
Endpoint Companion Descriptor.  For example, if it has a max packet size
of 1024, a max burst of 11, and a mult of 3, the host may send 33
1024-byte packets in one service interval.

We must tell the xHCI host controller the number of multiple service
opportunities (mults) the device can handle when the endpoint is
installed.  We do that by setting the Mult field of the Endpoint Context
before a configure endpoint command is sent down.  The Mult field is
invalid for control or bulk SuperSpeed endpoints.

Signed-off-by: Sarah Sharp <sarah.a.sharp@...>
Cc: stable <stable@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/host/xhci-mem.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index c09539b..4ed9f5f 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
 <at>  <at>  -582,6 +582,19  <at>  <at>  static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
 	return EP_INTERVAL(interval);
 }

(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 02/29] MUSB: Blackfin: don't fake blackfin_interrupt() result

From: Sergei Shtylyov <sshtylyov@...>

Commit a5073b52833e4df8e16c93dc4cbb7e0c558c74a2 (musb_gadget: fix unhandled
endpoint 0 IRQs) misses this change to blackfin.c: stop faking successful
result of blackfin_interrupt() and emitting a debug message on an unhandled
interrupt.

Signed-off-by: Sergei Shtylyov <sshtylyov@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/blackfin.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 719a22d..ec8d324 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
 <at>  <at>  -172,13 +172,7  <at>  <at>  static irqreturn_t blackfin_interrupt(int irq, void *__hci)

 	spin_unlock_irqrestore(&musb->lock, flags);

-	/* REVISIT we sometimes get spurious IRQs on g_ep0
-	 * not clear why... fall in BF54x too.
-	 */
-	if (retval != IRQ_HANDLED)
-		DBG(5, "spurious?\n");
Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 11/29] musb_core: fix musb_init_controller() error cleanup path

From: Sergei Shtylyov <sshtylyov@...>

This function forgets to call usb_remove_hcd() or musb_gadget_cleanup() iff
sysfs_create_group() fails.

[ felipe.balbi@... : review the entire error path
	not only when we fail hcd or gadget ]

Signed-off-by: Sergei Shtylyov <sshtylyov@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/musb_core.c |   51 ++++++++++++++++++++++++++++--------------
 1 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 508fd58..705cc4a 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
 <at>  <at>  -1878,8 +1878,10  <at>  <at>  musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
 	 */
 	if (!plat) {
 		dev_dbg(dev, "no platform_data?\n");
-		return -ENODEV;
+		status = -ENODEV;
+		goto fail0;
 	}
+
 	switch (plat->mode) {
 	case MUSB_HOST:
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:38 2010
Picon

[PATCH 27/29] USB: rename usb_buffer_alloc() and usb_buffer_free()

From: Daniel Mack <daniel@...>

For more clearance what the functions actually do,

  usb_buffer_alloc() is renamed to usb_alloc_coherent()
  usb_buffer_free()  is renamed to usb_free_coherent()

They should only be used in code which really needs DMA coherency.

[added compatibility macros so we can convert things easier - gregkh]

Signed-off-by: Daniel Mack <daniel@...>
Cc: Alan Stern <stern@...>
Cc: Pedro Ribeiro <pedrib@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/core/usb.c |   20 ++++++++++----------
 include/linux/usb.h    |   18 +++++++++++++++---
 2 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 1297e9b..0561430 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
 <at>  <at>  -718,7 +718,7  <at>  <at>  int __usb_get_extra_descriptor(char *buffer, unsigned size,
 EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor);

 /**
- * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP
+ * usb_alloc_coherent - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 04/29] musb: potential use after free

From: Dan Carpenter <error27@...>

We assign "urb->hcpriv = qh;" a few lines down.  I'm pretty sure we
want it "urb->hcpriv" to be NULL not a freed value.

Signed-off-by: Dan Carpenter <error27@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/musb_host.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index dec896e..877d20b 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
 <at>  <at>  -2042,6 +2042,7  <at>  <at>  static int musb_urb_enqueue(
 		 * odd, rare, error prone, but legal.
 		 */
 		kfree(qh);
+		qh = NULL;
 		ret = 0;
 	} else
 		ret = musb_schedule(musb, qh,
--

-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 13/29] USB: fix testing the wrong variable in fs_create_by_name()

From: Dan Carpenter <error27@...>

There is a typo here.  We should be testing "*dentry" which was just
assigned instead of "dentry".  This could result in dereferencing an
ERR_PTR inside either usbfs_mkdir() or usbfs_create().

Signed-off-by: Dan Carpenter <error27@...>
Cc: stable <stable@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/core/inode.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index 97b40ce..4a6366a 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
 <at>  <at>  -515,13 +515,13  <at>  <at>  static int fs_create_by_name (const char *name, mode_t mode,
 	*dentry = NULL;
 	mutex_lock(&parent->d_inode->i_mutex);
 	*dentry = lookup_one_len(name, parent, strlen(name));
-	if (!IS_ERR(dentry)) {
+	if (!IS_ERR(*dentry)) {
 		if ((mode & S_IFMT) == S_IFDIR)
 			error = usbfs_mkdir (parent->d_inode, *dentry, mode);
 		else 
 			error = usbfs_create (parent->d_inode, *dentry, mode);
 	} else
-		error = PTR_ERR(dentry);
+		error = PTR_ERR(*dentry);
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 23/29] USB: oxu210hp: release spinlock on error path

From: Dan Carpenter <error27@...>

Smatch complained about this missing spinlock.

Signed-off-by: Dan Carpenter <error27@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/host/oxu210hp-hcd.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 50f57f4..e62b30b 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
 <at>  <at>  -660,13 +660,13  <at>  <at>  static struct ehci_qh *oxu_qh_alloc(struct oxu_hcd *oxu)
 		if (qh->dummy == NULL) {
 			oxu_dbg(oxu, "no dummy td\n");
 			oxu->qh_used[i] = 0;
-
-			return NULL;
+			qh = NULL;
+			goto unlock;
 		}

 		oxu->qh_used[i] = 1;
 	}
Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 09/29] musb_core: don't call musb_platform_exit() twice

From: Sergei Shtylyov <sshtylyov@...>

musb_platform_exit() is called twice from musb_init_controller() iff controller
initialization fails. Move the call (and the DevCtl register writes surrounding
it) from musb_free() to musb_remove().

Fix mispalced and now incorrect 'goto's in musb_init_controller().

Signed-off-by: Sergei Shtylyov <sshtylyov@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/musb_core.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 8b68f21..508fd58 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
 <at>  <at>  -1851,10 +1851,6  <at>  <at>  static void musb_free(struct musb *musb)
 	put_device(musb->xceiv->dev);
 #endif

-	musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
-	musb_platform_exit(musb);
-	musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
-
 #ifdef CONFIG_USB_MUSB_HDRC_HCD
 	usb_put_hcd(musb_to_hcd(musb));
 #else
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 12/29] usb: Fix tusb6010 for DMA API

From: Tony Lindgren <tony@...>

Commit 18eabe2347ae7a11b3db768695913724166dfb0e introduced
DMA buffer ownership. Fix tusb6010 accordingly. To compile,
also dummy musb_platform_save and restore functions need to
be added.

Also change the order of musb_read_fifo() to happen after
dma_cache_maint to have the DMA operations completed before
moving the remaining unaligned bytes with PIO. The DMA
access and PIO touch different areas of the FIFO, so this
change only makes the code a bit easier to follow.

Tested on n810 and g_ether with variable size ping test.
The test seems to fail for some ping sizes, but that seems to
be a different problem.

Signed-off-by: Tony Lindgren <tony@...>
Acked-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/tusb6010.c      |   13 +++++++++++++
 drivers/usb/musb/tusb6010_omap.c |   22 ++++++++++++++--------
 2 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index ab776a8..60d3938 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
 <at>  <at>  -29,6 +29,19  <at>  <at>  static void tusb_source_power(struct musb *musb, int is_on);
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:38 2010
Picon

[PATCH 29/29] USB: sl811-hcd: Fix device disconnect

From: Michael Hennerich <michael.hennerich@...>

A while ago I provided a patch that fixed device detection after device
removal (USB: sl811-hcd: Fix device disconnect).
Chris Brissette pointed out that the detection/removal counter method
to distinguish insert or remove my fail under certain conditions.
Latest SL811HS datasheet (Document 38-08008 Rev. *D) indicates that
bit 6 (SL11H_INTMASK_RD) of the Interrupt Status Register together with
bit 5 (SL11H_INTMASK_INSRMV) can be used to determine whether a device
has been inserted or removed.

Signed-off-by: Michael Hennerich <michael.hennerich@...>
Signed-off-by: Mike Frysinger <vapier@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/host/sl811-hcd.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index e11cc3a..3b867a8 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
 <at>  <at>  -720,10 +720,10  <at>  <at>  retry:
 		/* port status seems weird until after reset, so
 		 * force the reset and make khubd clean up later.
 		 */
-		if (sl811->stat_insrmv & 1)
-			sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION;
-		else
+		if (irqstat & SL11H_INTMASK_RD)
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 26/29] USB: ti_usb: fix printk format warning

From: Randy Dunlap <randy.dunlap@...>

Fix printk format warning in usbserial/ti_usb:

drivers/usb/serial/ti_usb_3410_5052.c:1738: warning: format '%d' expects type 'int', but argument 5
has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/serial/ti_usb_3410_5052.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 880e990..e1bfda3 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
 <at>  <at>  -1735,7 +1735,7  <at>  <at>  static int ti_download_firmware(struct ti_device *tdev)
 		return -ENOENT;
 	}
 	if (fw_p->size > TI_FIRMWARE_BUF_SIZE) {
-		dev_err(&dev->dev, "%s - firmware too large %d \n", __func__, fw_p->size);
+		dev_err(&dev->dev, "%s - firmware too large %zu\n", __func__, fw_p->size);
 		return -ENOENT;
 	}

--

-- 
1.7.0.4

--
(Continue reading)

Greg Kroah-Hartman | 30 Apr 18:37 2010
Picon

[PATCH 03/29] musb: save and restore missing bus control register

From: Ajay Kumar Gupta <ajay.gupta@...>

Added the missing BUS_CONTROL register in musb
save/restore routines.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@...>
Signed-off-by: Felipe Balbi <felipe.balbi@...>
Signed-off-by: Greg Kroah-Hartman <gregkh@...>
---
 drivers/usb/musb/musb_core.c |    2 ++
 drivers/usb/musb/musb_core.h |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 0e8b8ab..3342b82 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
 <at>  <at>  -2176,6 +2176,7  <at>  <at>  void musb_save_context(struct musb *musb)
 	if (is_host_enabled(musb)) {
 		musb_context.frame = musb_readw(musb_base, MUSB_FRAME);
 		musb_context.testmode = musb_readb(musb_base, MUSB_TESTMODE);
+		musb_context.busctl = musb_read_ulpi_buscontrol(musb->mregs);
 	}
 	musb_context.power = musb_readb(musb_base, MUSB_POWER);
 	musb_context.intrtxe = musb_readw(musb_base, MUSB_INTRTXE);
 <at>  <at>  -2247,6 +2248,7  <at>  <at>  void musb_restore_context(struct musb *musb)
 	if (is_host_enabled(musb)) {
 		musb_writew(musb_base, MUSB_FRAME, musb_context.frame);
 		musb_writeb(musb_base, MUSB_TESTMODE, musb_context.testmode);
+		musb_write_ulpi_buscontrol(musb->mregs, musb_context.busctl);
(Continue reading)


Gmane