Re: [PATCH v4] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Wolfgang Grandegger
Hi Bernd, still a few issues with error handling. > +/* Send open command to device */ > +static int usb_8dev_cmd_open(struct usb_8dev *dev) > +{ > +struct can_bittiming *bt = &dev->can.bittiming; > +struct usb_8dev_cmd_msg outmsg; > +struct usb_8dev_cmd_msg inmsg; > +u32 flags =

[RFC v4] usb/gadget: the start of the configfs interface

2012-12-05 Thread Sebastian Andrzej Siewior
|# modprobe dummy_hcd num=2 |# find /sys/kernel/config/ -ls | 5570 drwxr-xr-x 3 root root0 Nov 29 17:26 /sys/kernel/config/ | 5580 drwxr-xr-x 5 root root0 Nov 29 17:26 /sys/kernel/config/usb_gadget | 5610 drwxr-xr-x 4 root root

Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure

2012-12-05 Thread Sergei Shtylyov
Hello. On 04-12-2012 18:31, Roger Quadros wrote: clk_set_parent is expected to fail on OMAP3 platforms. We don't consider that as fatal so don't spam console. Signed-off-by: Roger Quadros --- drivers/mfd/omap-usb-host.c | 18 +- 1 files changed, 9 insertions(+), 9 delet

Re: [PATCH v3 04/23] mfd: omap-usb-tll: Use devm_kzalloc/ioremap and clean up error path

2012-12-05 Thread Sergei Shtylyov
Hello. On 04-12-2012 18:12, Roger Quadros wrote: Use devm_ variants of kzalloc() and ioremap(). Simplify the error path. Signed-off-by: Roger Quadros --- drivers/mfd/omap-usb-tll.c | 37 +++-- 1 files changed, 11 insertions(+), 26 deletions(-) diff --

Re: [RFC PATCH 1/5] drivers : introduce device_path api

2012-12-05 Thread Roger Quadros
Hi Jassi, On 12/01/2012 09:49 AM, Jassi Brar wrote: > On Tue, Nov 27, 2012 at 10:32 PM, Greg KH wrote: >> On Tue, Nov 27, 2012 at 11:30:11AM -0500, Alan Stern wrote: >>> >>> We should have a more generic solution in a more central location, like >>> the device core. >>> >>> For example, each stru

Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure

2012-12-05 Thread Roger Quadros
On 12/05/2012 03:42 PM, Sergei Shtylyov wrote: > Hello. > > On 04-12-2012 18:31, Roger Quadros wrote: > >> clk_set_parent is expected to fail on OMAP3 platforms. We don't >> consider that as fatal so don't spam console. > >> Signed-off-by: Roger Quadros >> --- >> drivers/mfd/omap-usb-host.c |

Re: [PATCH v3 04/23] mfd: omap-usb-tll: Use devm_kzalloc/ioremap and clean up error path

2012-12-05 Thread Roger Quadros
On 12/05/2012 04:08 PM, Sergei Shtylyov wrote: > Hello. > > On 04-12-2012 18:12, Roger Quadros wrote: > >> Use devm_ variants of kzalloc() and ioremap(). Simplify the error path. > >> Signed-off-by: Roger Quadros >> --- >> drivers/mfd/omap-usb-tll.c | 37 +++-

[PATCH] USB: Add device quirk for Microsoft VX700 webcam

2012-12-05 Thread Andreas Fleig
Add device quirk for Microsoft Lifecam VX700 v2.0 webcams. Fixes squeaking noise of the microphone. Signed-off-by: Andreas Fleig --- diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index fdefd9c..3113c1d 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@

Re: Correlating SOF with host system time

2012-12-05 Thread Alan Stern
On Wed, 5 Dec 2012, Stefan Tauner wrote: > > Running NTP over a USB-based network link would certainly be the > > easiest solution, if your device can support it. Over the long run, it > > might even be more accurate on average than using SOF packets. > > We are talking about microcontrollers

Re: [PATCH v4] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Oliver Hartkopp
On 05.12.2012 11:13, Wolfgang Grandegger wrote: +outmsg.command = USB_8DEV_OPEN; +outmsg.opt1 = USB_8DEV_BAUD_MANUAL; +outmsg.data[0] = (bt->prop_seg + bt->phase_seg1); Minor issue. Brackets not needed. +outmsg.data[1] = bt->phase_seg2; +outmsg.data[2] = bt->sjw; + That

Re: [PATCH 01/10] USB: Set usb port's DeviceRemovable according acpi information in EHCI

2012-12-05 Thread Alan Stern
On Wed, 5 Dec 2012, Lan Tianyu wrote: > Hi Alan: > how about following patch? > > Index: usb/drivers/usb/core/hub.c > === > --- usb.orig/drivers/usb/core/hub.c > +++ usb/drivers/usb/core/hub.c > +void usb_hub_adjust_DeviceRemo

Re: [PATCH v4] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Marc Kleine-Budde
On 12/05/2012 04:49 PM, Oliver Hartkopp wrote: > On 05.12.2012 11:13, Wolfgang Grandegger wrote: > >>> +outmsg.command = USB_8DEV_OPEN; >>> +outmsg.opt1 = USB_8DEV_BAUD_MANUAL; >>> +outmsg.data[0] = (bt->prop_seg + bt->phase_seg1); >> >> Minor issue. Brackets not needed. >> >>> +ou

Re: [PATCH RESEND] tty: don't dead lock while flushing workqueue

2012-12-05 Thread Sebastian Andrzej Siewior
On 12/03/2012 06:41 PM, Peter Hurley wrote: The lock logic for tty_set_ldisc() is wrong. Despite existing code in tty_set_ldisc() and tty_ldisc_hangup(), the ldisc_mutex does **not** (and should not) play a role in acquiring or releasing ldisc references. The only thing that needs to happen here

Re: [PATCH v4] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Wolfgang Grandegger
On 12/05/2012 05:00 PM, Marc Kleine-Budde wrote: > On 12/05/2012 04:49 PM, Oliver Hartkopp wrote: >> On 05.12.2012 11:13, Wolfgang Grandegger wrote: >> +outmsg.command = USB_8DEV_OPEN; +outmsg.opt1 = USB_8DEV_BAUD_MANUAL; +outmsg.data[0] = (bt->prop_seg + bt->phase_seg1);

Re: [RFC PATCH 4/5] arm: omap2: support port power on lan95xx devices

2012-12-05 Thread Alan Stern
On Wed, 5 Dec 2012, Andy Green wrote: > > The details of this aren't clear yet. For instance, should the device > > core try to match the port with the asset info, or should this be done > > by the USB code when the port is created? > > Currently what I have (this is before changing it to pm dom

Re: [RFC PATCH 1/5] Device Power: introduce power controller

2012-12-05 Thread Roger Quadros
On 12/03/2012 05:00 AM, Ming Lei wrote: > On Mon, Dec 3, 2012 at 12:02 AM, Andy Green wrote: >> On 02/12/12 23:01, the mail apparently from Ming Lei included: >> >>> Power controller is an abstract on simple power on/off switch. >>> >>> One power controller can bind to more than one device, which

Re: [RFC v2 03/11] USB: Allow USB 3.0 ports to be disabled.

2012-12-05 Thread Alan Stern
On Tue, 4 Dec 2012, Sarah Sharp wrote: > If hot and warm reset fails, or a port remains in the Compliance Mode, > the USB core needs to be able to disable a USB 3.0 port. Unlike USB 2.0 > ports, once the port is placed into the Disabled link state, it will not > report any new device connects. T

Re: [PATCH RESEND] tty: don't dead lock while flushing workqueue

2012-12-05 Thread Alan Cox
On Wed, 05 Dec 2012 17:15:40 +0100 Sebastian Andrzej Siewior wrote: > On 12/03/2012 06:41 PM, Peter Hurley wrote: > > The lock logic for tty_set_ldisc() is wrong. Despite existing code in > > tty_set_ldisc() and tty_ldisc_hangup(), the ldisc_mutex does **not** > > (and should not) play a role in

Re: [RFC v2 06/11] USB: Handle warm reset failure on empty port.

2012-12-05 Thread Alan Stern
On Tue, 4 Dec 2012, Sarah Sharp wrote: > An empty port can transition to either Inactive or Compliance Mode if a > newly connected USB 3.0 device fails to link train. In that case, we > issue a warm reset. Some devices, such as John's Roseweil eusb3 > enclosure, slip back into Compliance Mode af

Re: [RFC PATCH 4/5] arm: omap2: support port power on lan95xx devices

2012-12-05 Thread Tony Lindgren
Hi, * Ming Lei [121202 07:05]: > --- a/arch/arm/mach-omap2/board-omap4panda.c > +++ b/arch/arm/mach-omap2/board-omap4panda.c ... > + > +static struct notifier_block usb_port_nb = { > + .notifier_call = device_notify, > +}; > + We'll be flipping omap4 over to be device tree only soon. So le

Re: [RFC v2 05/11] USB: Ignore port state until reset completes.

2012-12-05 Thread Alan Stern
On Tue, 4 Dec 2012, Sarah Sharp wrote: > The port reset code bails out early if the current connect status is > cleared (device disconnected). If we're issuing a hot reset, it may > also look at the link state before the reset is finished. > > Section 10.14.2.6 of the USB 3.0 spec says that when

Re: xhci problem

2012-12-05 Thread Sarah Sharp
On Tue, Dec 04, 2012 at 08:28:30PM -0500, Allan Dennis wrote: > I hope you won't be annoyed by my question... here goes: It's my job to answer questions, so fire away. :) > I have 2TB and 3TB SATA drives, both connected to my Intense PC (Ivy > Bridge tiny PC) on separate external drive enclosure

Re: [PATCH v3] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Bernd Krumboeck
Hi Marc! +default: +netdev_info(netdev, "Rx URB aborted (%d)\n", + urb->status); +goto resubmit_urb; +} + +while (pos < urb->actual_length) { +struct usb_8dev_rx_msg *msg; + +if (pos + sizeof(struct usb_8dev_rx_msg) > urb->actual_length) {

Re: [RFC v2 05/11] USB: Ignore port state until reset completes.

2012-12-05 Thread Sarah Sharp
On Wed, Dec 05, 2012 at 12:19:34PM -0500, Alan Stern wrote: > On Tue, 4 Dec 2012, Sarah Sharp wrote: > > @@ -2534,6 +2534,10 @@ static int hub_port_wait_reset(struct usb_hub *hub, > > int port1, > > if (ret < 0) > > return ret; > > > > + /* The port stat

Re: [PATCH v3 01/23] mfd: omap-usb-host: get rid of cpu_is_omap..() macros

2012-12-05 Thread Tony Lindgren
* Roger Quadros [121204 06:15]: > Instead of using cpu_is_omap..() macros in the device driver we > rely on information provided in the platform data. > > The only information we need is whether the USB Host module has > a single ULPI bypass control bit for all ports or individual bypass > contro

Re: [RFC v2 07/11] xhci: Avoid "dead ports", add roothub port polling.

2012-12-05 Thread Alan Stern
On Tue, 4 Dec 2012, Sarah Sharp wrote: > The USB core hub thread (khubd) is designed with external USB hubs in > mind. It expects that if a port status change bit is set, the hub will > continue to send a notification through the hub status data transfer. > Basically, it expects hub notifications

Re: [PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-05 Thread Sebastian Andrzej Siewior
On Mon, Dec 03, 2012 at 04:28:38PM -0500, Alan Stern wrote: > On Mon, 3 Dec 2012, Sarah Sharp wrote: > > This code in hcd.c:usb_add_hcd needs to change: > > > > /* starting here, usbcore will pay attention to this root hub */ > > rhdev->bus_mA = min(500u, hcd->power_budget); > > I

[PATCH 1/2 v2] usb/core: consider link speed while looking at bMaxPower

2012-12-05 Thread Sebastian Andrzej Siewior
The USB 2.0 specification says that bMaxPower is the maximum power consumption expressed in 2 mA units and the USB 3.0 specification says that it is expressed in 8 mA units. This patch adds a helper function usb_get_max_power() which computes the value based on config & usb_device's speed value. Th

[PATCH 2/2] usb/core: update power budget for SuperSpeed

2012-12-05 Thread Sebastian Andrzej Siewior
Sarah pointed out that the USB3.0 spec also updates the amount of power that may be consumed by the device and quoted 9.2.5.1: |"The amount of current draw for SuperSpeed devices are increased to 150 |mA for low-power devices and 900 mA for high-power" This patch tries to update all users to use

Re: [RFC v2 10/11] USB: Rip out recursive call on warm port reset.

2012-12-05 Thread Alan Stern
On Tue, 4 Dec 2012, Sarah Sharp wrote: > When a hot reset fails on a USB 3.0 port, the current port reset code > recursively calls hub_port_reset inside hub_port_wait_reset. This isn't > ideal, since we should avoid recursive calls in the kernel, and it also > doesn't allow us to issue multiple w

Re: [RFC v2 11/11] USB: Fix connected device switch to Inactive state.

2012-12-05 Thread Alan Stern
On Tue, 4 Dec 2012, Sarah Sharp wrote: > A USB 3.0 device can transition to the Inactive state if a U1 or U2 exit > transition fails. The current code in hub_events simply issues a warm > reset, but does not call any pre-reset or post-reset driver methods (or > unbind/rebind drivers without them)

Re: [PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-05 Thread Alan Stern
On Wed, 5 Dec 2012, Sebastian Andrzej Siewior wrote: > On Mon, Dec 03, 2012 at 04:28:38PM -0500, Alan Stern wrote: > > On Mon, 3 Dec 2012, Sarah Sharp wrote: > > > This code in hcd.c:usb_add_hcd needs to change: > > > > > > /* starting here, usbcore will pay attention to this root hub */

Re: [PATCH 1/2 v2] usb/core: consider link speed while looking at bMaxPower

2012-12-05 Thread Alan Stern
On Wed, 5 Dec 2012, Sebastian Andrzej Siewior wrote: > The USB 2.0 specification says that bMaxPower is the maximum power > consumption expressed in 2 mA units and the USB 3.0 specification says > that it is expressed in 8 mA units. > This patch adds a helper function usb_get_max_power() which com

Re: [PATCH 2/2] usb/core: update power budget for SuperSpeed

2012-12-05 Thread Alan Stern
On Wed, 5 Dec 2012, Sebastian Andrzej Siewior wrote: > Sarah pointed out that the USB3.0 spec also updates the amount of power > that may be consumed by the device and quoted 9.2.5.1: > > |"The amount of current draw for SuperSpeed devices are increased to 150 > |mA for low-power devices and 900

Re: [PATCH v4] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Marc Kleine-Budde
On 12/04/2012 11:43 PM, Bernd Krumboeck wrote: > Add device driver for USB2CAN interface from "8 devices" > (http://www.8devices.com). [...] > +/* Send data to device */ > +static netdev_tx_t usb_8dev_start_xmit(struct sk_buff *skb, > + struct net_device *netdev) > +{ > +

Re: [PATCH v3] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Marc Kleine-Budde
On 12/05/2012 06:36 PM, Bernd Krumboeck wrote: > Hi Marc! > > >>> +default: >>> +netdev_info(netdev, "Rx URB aborted (%d)\n", >>> + urb->status); >>> +goto resubmit_urb; >>> +} >>> + >>> +while (pos < urb->actual_length) { >>> +struct usb_8dev_rx_ms

Re: [RFC PATCH 4/5] arm: omap2: support port power on lan95xx devices

2012-12-05 Thread Andy Green
On 06/12/12 00:42, the mail apparently from Alan Stern included: On Wed, 5 Dec 2012, Andy Green wrote: The details of this aren't clear yet. For instance, should the device core try to match the port with the asset info, or should this be done by the USB code when the port is created? Curren

Re: Correlating SOF with host system time

2012-12-05 Thread Xiaofan Chen
On Wed, Dec 5, 2012 at 8:58 AM, Stefan Tauner wrote: > On Tue, 4 Dec 2012 16:27:00 -0500 (EST) > Alan Stern wrote: > >> I don't think referencing times to SOF packets is the best approach, >> although it probably is the approach that would yield the most >> precision. How precise do you want you

Re: [llvmlinux] [PATCH V2 2/3] Remove VLAIS usage from gadget code

2012-12-05 Thread Bryce Lelbach
On 2012.12.04 23.24, Sebastian Andrzej Siewior wrote: > > VLAIS is not something they are willing to accept (for various > > reasons). There are other patches to LLVM that are still working > Is this not described in C99 6.7.2.1p16? No, this is not the case - flexible array members are a very diff

Re: Unreliable USB3 with NEC uPD720200 and Delock Cardreader

2012-12-05 Thread Sarah Sharp
On Wed, Nov 28, 2012 at 02:54:06PM -0800, Sarah Sharp wrote: > On Mon, Nov 26, 2012 at 10:48:03PM +0100, Bjørn Mork wrote: > > Sarah Sharp writes: > > > > > It looks like both Ulrich and Andrew have the same issue. I also have a > > > Lenovo x220, and I confirmed that when I turn on PCI runtime

Re: Unreliable USB3 with NEC uPD720200 and Delock Cardreader

2012-12-05 Thread Rafael J. Wysocki
On Wednesday, December 05, 2012 04:33:44 PM Sarah Sharp wrote: > On Wed, Nov 28, 2012 at 02:54:06PM -0800, Sarah Sharp wrote: > > On Mon, Nov 26, 2012 at 10:48:03PM +0100, Bjørn Mork wrote: > > > Sarah Sharp writes: > > > > > > > It looks like both Ulrich and Andrew have the same issue. I also h

Re: [RFC PATCH 4/5] arm: omap2: support port power on lan95xx devices

2012-12-05 Thread Rafael J. Wysocki
Hi, Well, I'm not any less busy than yesterday, as it turns out, but I'm expecting that to continue tomorrow, so I may as well have a look at it now. :-) On Tuesday, December 04, 2012 12:10:32 PM Alan Stern wrote: > [CC: list trimmed; the people who were on it should be subscribed to at > least

Re: Correlating SOF with host system time

2012-12-05 Thread Stefan Tauner
On Thu, 6 Dec 2012 08:16:26 +0800 Xiaofan Chen wrote: > Interestingly you mentioned this article. Back in 2008, we have > some discussions about this topic in Microchip forum. > http://www.microchip.com/forums/tm.aspx?m=329799 My favorite search engine told me about it of course while i did my r

Re: [RFC PATCH 1/5] Device Power: introduce power controller

2012-12-05 Thread Ming Lei
On Thu, Dec 6, 2012 at 12:49 AM, Roger Quadros wrote: > On 12/03/2012 05:00 AM, Ming Lei wrote: >> On Mon, Dec 3, 2012 at 12:02 AM, Andy Green wrote: >>> On 02/12/12 23:01, the mail apparently from Ming Lei included: >>> Power controller is an abstract on simple power on/off switch. >>>

Re: Correlating SOF with host system time

2012-12-05 Thread Stefan Tauner
On Wed, 5 Dec 2012 10:35:31 -0500 (EST) Alan Stern wrote: > On Wed, 5 Dec 2012, Stefan Tauner wrote: > > > > Running NTP over a USB-based network link would certainly be the > > > easiest solution, if your device can support it. Over the long run, it > > > might even be more accurate on avera

Re: [RFC PATCH 1/5] Device Power: introduce power controller

2012-12-05 Thread Jassi Brar
On 6 December 2012 06:57, Ming Lei wrote: > On Thu, Dec 6, 2012 at 12:49 AM, Roger Quadros wrote: >> On 12/03/2012 05:00 AM, Ming Lei wrote: >>> On Mon, Dec 3, 2012 at 12:02 AM, Andy Green wrote: On 02/12/12 23:01, the mail apparently from Ming Lei included: > Power controller is a

Re: [PATCH v3] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Bernd Krumboeck
Hi Mark! Am 2012-12-05 22:40, schrieb Marc Kleine-Budde: On 12/05/2012 06:36 PM, Bernd Krumboeck wrote: Hi Marc! +default: +netdev_info(netdev, "Rx URB aborted (%d)\n", + urb->status); +goto resubmit_urb; +} + +while (pos < urb->actual_length) { +

Re: [PATCH v3] usb_8dev: Add support for USB2CAN interface from 8 devices

2012-12-05 Thread Bernd Krumboeck
Hi Marc! Am 2012-12-04 22:45, schrieb Marc Kleine-Budde: + +/* create a URB, and a buffer for it */ +urb = usb_alloc_urb(0, GFP_KERNEL); +if (!urb) { +netdev_err(netdev, "No memory left for URBs\n"); +return -ENOMEM; who will free the already al

[PATCH] usb: musb: set TXMAXP and AUTOSET for full speed bulk in device mode

2012-12-05 Thread Supriya Karanth
From: supriya karanth The TXMAXP register is not set correctly for full speed bulk case when the can_bulk_split() is used. Without this PIO transfers will not take place correctly The "mult" factor needs to be updated correctly for the can_bulk_split() case The AUTOSET bit in the TXCSR is not b

[PATCH] usb: musb: set AUTOSET for full speed bulk DMA transfer in host mode

2012-12-05 Thread Supriya Karanth
From: supriya karanth The "mult" factor is not updated properly for the can_bulk_split() case. The AUTOSET bit in the TXCSR is not being set if the "mult" factor is greater than 1 for the High Bandwidth ISO case. But the "mult" factor is also greater than 1 in case of Full speed bulk transfers w

Max Service Opportunity Packet Count value

2012-12-05 Thread Nikunj Sanghani
Hi, As per the XHC Spec, Max Service Opportunity Packet Count (MSOPC) value for an endpoint is set by the number of packets defined by the Endpoint Context Max Burst Size field times the Mult field. But Max Burst Size and Mult of Endpoint Context May be zero. So for that MSOPC value should be zer

Re: Unreliable USB3 with NEC uPD720200 and Delock Cardreader

2012-12-05 Thread Huang Ying
On Wed, 2012-12-05 at 16:33 -0800, Sarah Sharp wrote: > On Wed, Nov 28, 2012 at 02:54:06PM -0800, Sarah Sharp wrote: > > On Mon, Nov 26, 2012 at 10:48:03PM +0100, Bjørn Mork wrote: > > > Sarah Sharp writes: > > > > > > > It looks like both Ulrich and Andrew have the same issue. I also have a > >

Re: [PATCH 08/10] usb: add usb port auto power off mechanism

2012-12-05 Thread Lan Tianyu
On 2012年11月29日 03:37, Alan Stern wrote: > On Sat, 17 Nov 2012, Lan Tianyu wrote: > >> This patch is to add usb port auto power off mechanism. >> When usb device is suspending, usb core will suspend usb port and >> usb port runtime pm callback will clear PORT_POWER feature to >> power off port if a

Re: [PATCH 01/10] USB: Set usb port's DeviceRemovable according acpi information in EHCI

2012-12-05 Thread Lan Tianyu
On 2012年12月05日 23:58, Alan Stern wrote: > On Wed, 5 Dec 2012, Lan Tianyu wrote: > >> Hi Alan: >> how about following patch? >> >> Index: usb/drivers/usb/core/hub.c >> === >> --- usb.orig/drivers/usb/core/hub.c >> +++ usb/drivers/