[PATCH 3/3] usb/xhci: refactor xhci_find_real_port_number()

2013-01-09 Thread Lan Tianyu
This patch is to optimize xhci_find_realport_number(). Call xhci_find_raw_port_number() to get real index in the HW port status registers instead of scanning through the xHCI roothub port array. Signed-off-by: Lan Tianyu --- drivers/usb/host/xhci-mem.c | 36

[PATCH 2/3] usb/acpi: binding xhci root hub usb port with ACPI

2013-01-09 Thread Lan Tianyu
This patch is to bind xhci root hub usb port with its acpi node. The port num in the acpi table matches with the sequence in the xhci extended capabilities table. So call usb_hcd_find_raw_port_number() to transfer hub port num into raw port number which associates with the sequence in the xhci exte

[PATCH 1/3] usb: add find_raw_port_number callback to struct hc_driver()

2013-01-09 Thread Lan Tianyu
xhci driver divides the root hub into two logical hubs which work respectively for usb 2.0 and usb 3.0 devices. They are independent devices in the usb core. But in the ACPI table, it's one device node and all usb2.0 and usb3.0 ports are under it. Binding usb port with its acpi node needs the raw p

Re: [PATCH v3 0/3] ARM: dts: omap: add dt data for MUSB

2013-01-09 Thread kishon
On Friday 28 December 2012 12:05 AM, Aaro Koskinen wrote: Hi, On Thu, Sep 20, 2012 at 05:21:15AM +0200, Benoit Cousson wrote: On 09/19/2012 11:32 AM, Kishon Vijay Abraham I wrote: This patch series adds dt data to get MUSB working in omap4 and omap3 Changes from v2: * Changes the subject of a

Re: USB autosuspend vs. URB submission

2013-01-09 Thread Ming Lei
On Thu, Jan 10, 2013 at 7:05 AM, Laurent Pinchart wrote: > > I've never heard of such problems with the uvcvideo driver, and I don't see > anything wrong with the code at first sight. The driver only submits URBs when IMO, there is a minor fault in the error handling path of uvc_status_start() in

Re: [PATCH v4 0/7] Add fully tested id switch and vbus connect detect support for Chipidea

2013-01-09 Thread Peter Chen
On Wed, Jan 09, 2013 at 12:43:38PM +0100, Maxime Ripard wrote: > Hi Peter, > > Thanks for your answer. > > > > Please always enable both device and host mode for chipidea driver. > > Current code still not consider all things for different mode config, > > like device-only, host-only, otg. In f

Re: [PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Lan Tianyu
On 2013年01月09日 23:02, Alan Stern wrote: > On Wed, 9 Jan 2013, Lan Tianyu wrote: > >> The dev_pm_qos_flags() will be used in the usb core which could be >> compiled as a module. This patch is to epose it. >> >> Signed-off-by: Lan Tianyu >> --- >> drivers/base/power/qos.c |1 + >> 1 file chang

Re: [PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Lan Tianyu
On 2013年01月09日 20:52, Sergei Shtylyov wrote: > Hello. > > On 09-01-2013 12:45, Lan Tianyu wrote: > >> The dev_pm_qos_flags() will be used in the usb core which could be >> compiled as a module. This patch is to epose it. > ^ >Either "expose" or "ex

Re: USB autosuspend vs. URB submission

2013-01-09 Thread Laurent Pinchart
Hi Josh, On Tuesday 08 January 2013 11:03:22 Josh Boyer wrote: > On Tue, Jan 08, 2013 at 10:51:20AM -0500, Alan Stern wrote: > > On Mon, 7 Jan 2013, Josh Boyer wrote: > > > Hi, > > > > > > We've had a few reports in Fedora of users hitting the WARN_ONCE in > > > drivers/usb/core/urb.c that prints

Re: [PATCH v5] usb: phy: samsung: Add support to set pmu isolation

2013-01-09 Thread Sylwester Nawrocki
Hi, On 12/28/2012 10:13 AM, Vivek Gautam wrote: Adding support to parse device node data in order to get required properties to set pmu isolation for usb-phy. Signed-off-by: Vivek Gautam ... --- a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt +++ b/Documentation/devicetree/bindings

Re: [PATCH 1/1]linux-usb:optimize to match the Huawei USB storage devices and support new switch command

2013-01-09 Thread Sebastian Andrzej Siewior
keep the CC list please. On Wed, Jan 09, 2013 at 07:28:43AM +, Fangxiaozhi (Franko) wrote: > > > +/* This function will send > > > + * a scsi switch command called rewind' to huawei dongle. > > > + * When the dongle receives this command at the first time, > > > + * it will reboot immediately,

Re: TP-LINK HSUPA Modem

2013-01-09 Thread Dan Williams
On Wed, 2013-01-09 at 16:54 +0800, hockseng leow wrote: > I got the dmesg after having the parameters, usbserial.vendor=0x2357 > usbserial.product=0x0200" in the linux start-up. > > I already got the modem working under usb_modeswitch. > > No further work need to be done in the kernel. Are you a

[PATCH] usb/isp1760: Fix sparse warnings (local functions not declared static).

2013-01-09 Thread Arvid Brodin
Fix two problems detected by the sparse code analyser: drivers/usb/host/isp1760-hcd.c:935:6: warning: symbol 'schedule_ptds' was not declared. Should it be static? drivers/usb/host/isp1760-hcd.c:1288:6: warning: symbol 'errata2_function' was not declared. Should it be static? Signed-off-by: A

usb device removed from sysfs before input children devices

2013-01-09 Thread Karl Relton
On coming out of suspend my usb bluetooth adaptor is being reset by the system. In linux 3.7 the usb devices are being removed from the sysfs tree first, and then the various 'child' devices (like my bluetooth mouse & keyboard related devices) afterwards. This is causing the udev events for the in

Re: [PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Alan Stern
On Wed, 9 Jan 2013, Lan Tianyu wrote: > The dev_pm_qos_flags() will be used in the usb core which could be > compiled as a module. This patch is to epose it. > > Signed-off-by: Lan Tianyu > --- > drivers/base/power/qos.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/base/

Re: [PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Sergei Shtylyov
Hello. On 09-01-2013 12:45, Lan Tianyu wrote: The dev_pm_qos_flags() will be used in the usb core which could be compiled as a module. This patch is to epose it. ^ Either "expose" or "export". Signed-off-by: Lan Tianyu WBR, Sergei -- To uns

Re: [PATCH v4 08/10] usb: expose usb port's pm qos flags to user space

2013-01-09 Thread Sergei Shtylyov
Hello. On 09-01-2013 12:45, Lan Tianyu wrote: This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off flag to prohibit the port from being powered off. Signed-off-by: Lan Tianyu --- drivers/usb/core/port.c

Re: [PATCH v4 0/7] Add fully tested id switch and vbus connect detect support for Chipidea

2013-01-09 Thread Maxime Ripard
Hi Peter, Thanks for your answer. On 09/01/2013 04:23, Peter Chen wrote: > On Tue, Jan 08, 2013 at 04:27:21PM +0100, Maxime Ripard wrote: >> Hi Peter, >> >> On 27/12/2012 07:59, Peter Chen wrote: >>> (Sorry for update slowly due to long time business trip) >>> >>> Changes for v4 mainly for 2/7, 3

[PATCH 2/3] watchdog: convert drivers/watchdog/* to use module_platform_driver_probe

2013-01-09 Thread Fabio Porcedda
This makes the code a bit smaller by getting rid of some boilerplate code. Signed-off-by: Fabio Porcedda Cc: linux-watch...@vger.kernel.org Cc: Wim Van Sebroeck Cc: Linus Walleij --- drivers/watchdog/at32ap700x_wdt.c | 12 +--- drivers/watchdog/at91sam9_wdt.c | 13 + driv

[PATCH 3/3] usb: converto drivers/usb/* to use module_platform_driver_probe()

2013-01-09 Thread Fabio Porcedda
This patch converts the drivers in drivers/usb/* to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda Cc: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Felipe Balbi Cc: Nicolas Ferre Cc: Eric Miao Cc: Russell King

[PATCH 1/3] driver core: add helper macro for platform_driver_probe() boilerplate

2013-01-09 Thread Fabio Porcedda
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver_probe(), which replaces the module_init()/module_exit() registrations with template functions. This

[PATCH 0/3] Add and use new macro module_platform_driver_probe()

2013-01-09 Thread Fabio Porcedda
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver_probe(), which replaces the module_init()/module_exit() registrations with template functions. T

Re: TP-LINK HSUPA Modem

2013-01-09 Thread hockseng leow
It just works with the latest Fedora 17 updates. The latest usb_modeswitch update includes the device vendor and product. On Wed, Jan 9, 2013 at 5:14 PM, Thomas Schäfer wrote: > Am 09.01.2013 09:54, schrieb hockseng leow: > >> I got the dmesg after having the parameters, usbserial.vendor=0x2357

[PATCH 2/2] usb: gadget: FunctionFS: Refactor option parsing

2013-01-09 Thread Michal Nazarewicz
From: Michal Nazarewicz The use of memcmp() is clever and all and maybe even it makes parsing a bit faster (since only options with given length need to be checked) but option parsing is hardly a critical path and the additional code complexity is not worth it. Signed-off-by: Michal Nazarewicz

[PATCH 1/2] usb: gadget: FunctionFS: Use kstrtoul()

2013-01-09 Thread Michal Nazarewicz
From: Michal Nazarewicz kstrtoul() checks for overflow which simple_strtoul() does not pluss it has “*end == 0” check in it as well. As a side effect, a new line character is now accepted, but this should not be an issue. Signed-off-by: Michal Nazarewicz --- Patch on top of v3.5 with Benoit G

Re: TP-LINK HSUPA Modem

2013-01-09 Thread Thomas Schäfer
Am 09.01.2013 09:54, schrieb hockseng leow: I got the dmesg after having the parameters, usbserial.vendor=0x2357 > usbserial.product=0x0200" in the linux start-up. That looks not very nice. > I already got the modem working under usb_modeswitch. What about other people with the same devi

Re: TP-LINK HSUPA Modem

2013-01-09 Thread hockseng leow
I got the dmesg after having the parameters, usbserial.vendor=0x2357 usbserial.product=0x0200" in the linux start-up. I already got the modem working under usb_modeswitch. No further work need to be done in the kernel. Thanks. On Wed, Jan 9, 2013 at 12:46 AM, Greg KH wrote: > On Tue, Jan 08, 2

[PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Lan Tianyu
The dev_pm_qos_flags() will be used in the usb core which could be compiled as a module. This patch is to epose it. Signed-off-by: Lan Tianyu --- drivers/base/power/qos.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c index ff46387..e26

[PATCH v4 07/10] usb: add usb port auto power off mechanism

2013-01-09 Thread Lan Tianyu
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 all conditions were met. These conditions are remote wakeup disable, pm qos NO_POWER_OFF flag cle

[PATCH v4 02/10] USB: Set usb port's DeviceRemovable according acpi information

2013-01-09 Thread Lan Tianyu
ACPI provide "_PLD" and "_UPC" aml methods to describe usb port visibility and connectability. This patch is to add usb_hub_adjust_DeviceRemovable() to adjust usb hub port's DeviceRemovable according ACPI information and invoke it in the rh_call_control(). When hub descriptor request is issued at

[PATCH v4 09/10] usb: add usb_device_allow_power_off() and usb_device_prevent_power_off() function.

2013-01-09 Thread Lan Tianyu
Some usb devices can't be resumed correctly after power off. This patch is to add usb_device_allow_power_off() and usb_device_prevent_power_off() for device's driver. Call pm_runtime_get_sync(portdev) to increase port's usage count and then port will not be suspended. The device will not be powered

[PATCH v4 06/10] usb: add runtime pm support for usb port device

2013-01-09 Thread Lan Tianyu
This patch is to add runtime pm callback for usb port device. Set/clear PORT_POWER feature in the resume/suspend callbak. Add portnum for struct usb_port to record port number. Do pm_rumtime_get_sync/put(portdev) when a device is plugged/unplugged to prevent it from being powered off when it is act

[PATCH v4 08/10] usb: expose usb port's pm qos flags to user space

2013-01-09 Thread Lan Tianyu
This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off flag to prohibit the port from being powered off. Signed-off-by: Lan Tianyu --- drivers/usb/core/port.c | 11 ++- 1 file changed, 10 insertions(+),

[PATCH v4 05/10] usb: Register usb port's acpi power resources

2013-01-09 Thread Lan Tianyu
This patch is to register usb port's acpi power resources. Create link between usb port device and its acpi power resource. Signed-off-by: Lan Tianyu --- drivers/usb/core/port.c |3 +++ drivers/usb/core/usb-acpi.c | 20 drivers/usb/core/usb.h |6 ++ 3

[PATCH V4 0/10] usb: usb port power off mechanism anc expose usb port connect type

2013-01-09 Thread Lan Tianyu
Change since v1: optimize the export connect type patch and adjust the DeviceRemovalbe flag in the rh_call_control() after GetHubDescriptor request being processed. move all debounce operation to usb port's runtime resume callback(). Add did_runtime_put in the struct usb_port to call

[PATCH v4 04/10] usb: Create link files between child device and usb port device.

2013-01-09 Thread Lan Tianyu
To show the relationship between usb port and child device, add link file "port" under usb device's sysfs directoy and "device" under usb port device's sysfs directory. They are linked to each other. Signed-off-by: Lan Tianyu --- drivers/usb/core/hub.c | 26 ++ 1 file c

[PATCH v4 03/10] usb: Add "portX/connect_type" attribute to expose usb port's connect type

2013-01-09 Thread Lan Tianyu
Some platforms provide usb port connect types through ACPI. This patch is to add this new attribute to expose these information to user space. Signed-off-by: Lan Tianyu --- Documentation/ABI/testing/sysfs-bus-usb |9 +++ drivers/usb/core/port.c | 43

[PATCH v4 01/10] usb: Add driver/usb/core/(port.c,hub.h) files

2013-01-09 Thread Lan Tianyu
This patch is to create driver/usb/core/(port.c,hub.h) files and move usb port related code into port.c. Signed-off-by: Lan Tianyu --- drivers/usb/core/Makefile |1 + drivers/usb/core/hub.c| 107 + drivers/usb/core/hub.h| 97

Re: [PATCH] usb: gadget: FunctionFS: Fix missing braces in parse_opts

2013-01-09 Thread Michal Nazarewicz
On Wed, Jan 09 2013, Benoit Goby wrote: > Add missing braces around an if block in ffs_fs_parse_opts. This broke > parsing the uid/gid mount options and causes mount to fail when using > uid/gid. This has been introduced by commit b9b73f7c (userns: Convert usb > functionfs to use kuid/kgid where a