Re: [PATCH 0/3] ACPI / bind: Use struct acpi_device pointers instead of ACPI handles

2013-11-28 Thread Lan Tianyu
as the second argument. [3/3] ACPI / bind: Move acpi_get_child() to ide-acpi.c which is the only remaining user of that function. Test usb/ACPI bind part, it works normally. Tested-by: Lan Tianyu tianyu@intel.com The patches are on top of linux-pm.git/linux-next. Please let me

Re: [RFC Patch] USB: Add check for portnum in the usb_acpi_find_device()

2013-06-02 Thread Lan Tianyu
On 2013/5/31 19:18 Greg KH wrote the following: On Fri, May 31, 2013 at 02:18:06PM +0800, Lan Tianyu wrote: This patch is to add a check of portnum which from the usb port dev's name. Why do we need this now? The portnum will be used as array index for struct usb_hub-ports

[RFC Patch] USB: Add check for portnum in the usb_acpi_find_device()

2013-05-31 Thread Lan Tianyu
This patch is to add a check of portnum which from the usb port dev's name. The portnum will be used as array index for struct usb_hub-ports in the usb_set_hub_port_connect_type(). Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/usb-acpi.c |3 +++ 1 file changed, 3

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-04-08 Thread Lan Tianyu
On 2013/3/30 4:24, Alan Stern wrote: On Fri, 29 Mar 2013, Sarah Sharp wrote: Also, bear in mind that the proposed patch does not give userspace a way to power off ports via usbfs. What the new code does is a power-off reset -- it turns off power to the port, waits a short time, and then turns

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-04-08 Thread Lan Tianyu
On 2013/4/1 23:12, Alan Stern wrote: On Mon, 1 Apr 2013, Lan Tianyu wrote: On 2013年03月30日 01:23, Alan Stern wrote: On Fri, 29 Mar 2013, Sarah Sharp wrote: However, what happens if you echo 0 to pm_qos_no_power_off, the power/control is set to auto, and there's a suspended USB device attached

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-04-01 Thread Lan Tianyu
On 2013年03月29日 22:11, Alan Stern wrote: On Fri, 29 Mar 2013, Lan Tianyu wrote: Actually, I exposed pm qos flags for usb port via dev_pm_qos_expose_flags(). It creates power/pm_qos_no_power_off under usb port sysfs directory. User can echo 0 pm_qos_no_power_off to power off the empty port

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-04-01 Thread Lan Tianyu
On 2013年03月30日 01:23, Alan Stern wrote: On Fri, 29 Mar 2013, Sarah Sharp wrote: However, what happens if you echo 0 to pm_qos_no_power_off, the power/control is set to auto, and there's a suspended USB device attached to the port with remote wakeup enabled? Will the port be powered off? I

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-03-29 Thread Lan Tianyu
On 2013/3/29 6:43, Sarah Sharp wrote: On Thu, Mar 28, 2013 at 05:00:23PM -0400, Alan Stern wrote: On Thu, 28 Mar 2013, Sarah Sharp wrote: On Thu, Mar 28, 2013 at 01:11:02AM +0800, Lan Tianyu wrote: Some devices' firmware will be broken at some points. Power down and power on device can help

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-03-28 Thread Lan Tianyu
On 2013/3/28 2:45, Alan Stern wrote: +int usb_hub_port_power_reset(struct usb_device *hdev, int port1) +{ + struct usb_hub *hub = usb_hub_to_struct_hub(hdev); + struct usb_interface *intf = to_usb_interface(hub-intfdev); + int ret; + + usb_autopm_get_interface(intf);

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-03-28 Thread Lan Tianyu
On 2013/3/28 22:46, Alan Stern wrote: On Thu, 28 Mar 2013, Lan Tianyu wrote: How long do you think the power should remain turned off? This code will leave it off for only a few milliseconds at most. That may not even be long enough for the voltage to drop all the way to 0. The delay

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-03-28 Thread Lan Tianyu
On 2013/3/29 0:50, Alan Stern wrote: On Fri, 29 Mar 2013, Lan Tianyu wrote: About the path usb: Add usb port system pm support, do you think it's ok? Generally yes. But why doesn't usb_port_system_suspend check for any PM_QOS constraints? Either on the port itself or on the child device

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-03-28 Thread Lan Tianyu
On 2013/3/29 1:49, Alan Stern wrote: On Fri, 29 Mar 2013, Lan Tianyu wrote: On 2013/3/29 0:50, Alan Stern wrote: On Fri, 29 Mar 2013, Lan Tianyu wrote: About the path usb: Add usb port system pm support, do you think it's ok? Generally yes. But why doesn't usb_port_system_suspend check

Re: [PATCH 4/4] usb: register usb port to usb_bus_type

2013-03-28 Thread Lan Tianyu
On 2013/3/29 2:21, Greg KH wrote: What does it look like if you reverse the naming scheme (hub dev name + port)? Doesn't that show the devices in a bit more logical way? Hi Greg: Do you mean e.g port1.2-1, originally it's port2-1.1. 2-1 is hub dev name? No, I mean 2-1.port1 as these

Re: [PATCH 4/4] usb: register usb port to usb_bus_type

2013-03-28 Thread Lan Tianyu
On 2013/3/29 2:44, Alan Stern wrote: On Thu, 28 Mar 2013, Greg KH wrote: ls /sys/bus/usb/devices 1-0:1.02-0:1.0 port1-1 port1-1.3 port2-1.2 port2-2 port4-3 1-12-1 port1-1.1port1-1.4 port2-1.3 port3-1 port4-4 1-1.1 2-1:1.0 port1-1.2port1-1.5 port2-1.4

Re: [PATCH 4/4] usb: register usb port to usb_bus_type

2013-03-28 Thread Lan Tianyu
On 2013/3/29 2:53, Greg KH wrote: On Thu, Mar 28, 2013 at 02:44:01PM -0400, Alan Stern wrote: On Thu, 28 Mar 2013, Greg KH wrote: ls /sys/bus/usb/devices 1-0:1.02-0:1.0 port1-1 port1-1.3 port2-1.2 port2-2 port4-3 1-12-1 port1-1.1port1-1.4 port2-1.3 port3-1

Re: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-03-28 Thread Lan Tianyu
On 2013/3/29 3:38, Alan Stern wrote: On Fri, 29 Mar 2013, Lan Tianyu wrote: Ok. I just refresh patch usb: introduce usb force power off mechanism Please have a look. From 16f5c7c6dd00830530a9ac758af25b575e0b8731 Mon Sep 17 00:00:00 2001 From: Lan Tianyu tianyu@intel.com Date: Tue, 26

Re: [PATCH 3/4] usb: Add usb port system pm support

2013-03-28 Thread Lan Tianyu
On 2013/3/29 4:47, Sarah Sharp wrote: On Thu, Mar 28, 2013 at 07:58:47AM +0800, Lan Tianyu wrote: On 2013/3/28 2:47, Alan Stern wrote: On Thu, 28 Mar 2013, Lan Tianyu wrote What happens if there's no device plugged in to the port, but the hub is enabled for remote wakeup? How will the hub

[PATCH 0/4] usb: remote_wakeup code clean up and usb port related feature

2013-03-27 Thread Lan Tianyu
PATCH 1 is for code clean up. PATCH 2~3 is to introduce usb port power off new feature PATCH 4 is to fix usb port doesn't register to any bus_type usb: add usb_enable/disable_remote_wakeup() usb: introduce usb force power off mechanism usb: Add usb port system pm support usb: register usb port

[PATCH 1/4] usb: add usb_enable/disable_remote_wakeup()

2013-03-27 Thread Lan Tianyu
be convienient to use and more readable. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 136 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 7815462

[PATCH 3/4] usb: Add usb port system pm support

2013-03-27 Thread Lan Tianyu
-power_is_on being false, usb_port_system_suspend() returns directly. If usb port was not powered off during system suspend with port_dev-power_is_on being true, usb_port_system_resume() returns directly. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c |4 drivers

[PATCH 4/4] usb: register usb port to usb_bus_type

2013-03-27 Thread Lan Tianyu
port3-4 usb3 1-1.2 3-1:1.0 port1-1.2.3 port2-1port2-1.7 port4-1 usb4 1-1.2:1.0 4-0:1.0 port1-1.2.4 port2-1.1 port2-1.8 port4-2 Signed-off-by: Lan Tianyu tianyu@intel.com --- Documentation/ABI/testing/sysfs-bus-usb |6 +++--- drivers/usb/core/port.c | 10

[PATCH 2/4] usb: introduce usb force power off mechanism

2013-03-27 Thread Lan Tianyu
and up usb port. This patch is also helpful fo some QAs who want to do hcd's memleak test(Plug and unplug device thousand times.) Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/devio.c | 13 + drivers/usb/core/hub.c| 16

RE: [PATCH 2/4] usb: introduce usb force power off mechanism

2013-03-27 Thread Lan, Tianyu
Regards Tianyu Lan -Original Message- From: Lan, Tianyu Sent: Thursday, March 28, 2013 1:11 AM To: gre...@linuxfoundation.org; sarah.a.sh...@linux.intel.com; st...@rowland.harvard.edu Cc: linux-usb@vger.kernel.org; Lan, Tianyu Subject: [PATCH 2/4] usb: introduce usb force power off mechanism

Re: [PATCH 3/4] usb: Add usb port system pm support

2013-03-27 Thread Lan Tianyu
On 2013/3/28 2:47, Alan Stern wrote: On Thu, 28 Mar 2013, Lan Tianyu wrote What happens if there's no device plugged in to the port, but the hub is enabled for remote wakeup? How will the hub be able to detect a plug-in event if the port isn't powered? Alan Stern Hi Alan: Great

RE: USB port power-off and system suspend

2013-03-23 Thread Lan, Tianyu
have a patch that can work and it still needs to add some condition checks in the usb_port_system_suspend(). Dev's system wakeup disable and persist enable. From c3abd373707910672d6fd2e96da78879b3e22417 Mon Sep 17 00:00:00 2001 From: Lan Tianyu tianyu@intel.com Date: Tue, 26 Feb 2013 11:12:09

[RFC PATCH] usb: register usb port to usb_bus_type

2013-03-21 Thread Lan Tianyu
port3-4 usb3 1-1.2 3-1:1.0 port1-1.2.3 port2-1port2-1.7 port4-1 usb4 1-1.2:1.0 4-0:1.0 port1-1.2.4 port2-1.1 port2-1.8 port4-2 Signed-off-by: Lan Tianyu tianyu@intel.com --- Documentation/ABI/testing/sysfs-bus-usb |6 +++--- drivers/usb/core/port.c | 10

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

2013-03-20 Thread Lan Tianyu
On 2013年03月21日 02:28, Sarah Sharp wrote: On Wed, Mar 20, 2013 at 10:18:03AM +0800, Lan Tianyu wrote: On 2013年03月20日 03:06, Sarah Sharp wrote: Ok, this looks sane, and our Intel testers report it doesn't oops like v2. The patch description on the first patch is better as well. Tianyu, I know

[Resend PATCH V2] usb: add usb_enable/disable_remote_wakeup()

2013-03-20 Thread Lan Tianyu
be convienient to use and more readable. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 136 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 5480352

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

2013-03-19 Thread Lan Tianyu
. Signed-off-by: Lan Tianyu tianyu@intel.com --- This patchset is based on usb-next tree commit 3f3b55bf usb: ehci-s5p: Use devm for requesting ehci_vbus_gpio. Change since v1: Don't export usb_hcd_find_raw_port_number() symbol since there is no its user outside of usb core. Change since v2

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

2013-03-19 Thread Lan Tianyu
extended capabilities table before binding. Signed-off-by: Lan Tianyu tianyu@intel.com --- Change since v3: add a temprorary variable to recard raw port num and get ACPI handle rahter than overwrite port num with raw port num. This is to avoid passing raw port num as port num

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

2013-03-19 Thread Lan Tianyu
binding with USB-3.0 hub. I'd like to take the job if I could do. BTW, the sysfs files to turn on and off ports has been reverted by Greg in v3.7. Sarah Sharp On Tue, Mar 19, 2013 at 04:48:13PM +0800, Lan Tianyu wrote: This patch is to bind xhci root hub usb port with its acpi node. The port

Re: Testing for hardware bug in EHCI controllers

2013-03-04 Thread Lan Tianyu
2013/2/26 Alan Stern st...@rowland.harvard.edu: Sarah (and anyone else who's interested): A while ago I wrote about a hardware bug in my Intel ICH5 and ICH8 EHCI controllers. You pointed out that these are rather old components, not being used in current systems, which is quite true. Now I

Re: [PATCH 4/5] usb: call pm_runtime_put_sync in pm_runtime_get_sync failed case

2013-02-28 Thread Lan Tianyu
On 2013年02月28日 15:57, Li Fei wrote: Even in failed case of pm_runtime_get_sync, the usage_count is incremented. In order to keep the usage_count with correct value and runtime power management to behave correctly, call pm_runtime_put(_sync) in such case. Hi Fei: It's not necessary.

Re: [Resend][PATCH] ACPI / glue: Drop .find_bridge() callback from struct acpi_bus_type

2013-02-27 Thread Lan Tianyu
have the original creator of that code (someone else from Intel, I can't remember at the moment), fix that up properly and send me patches? [Add To: Lan Tianyu tianyu@intel.com] Ok. I will fix it later. Please let me know if there are any objections. I still prefer to ask USB to add

Re: [GIT PATCH] USB patches for 3.9-rc1

2013-02-22 Thread Lan Tianyu
, which I think is pretty major. I suspect it has something to do with this ? Lan Tianyu (12): usb: add runtime pm support for usb port device usb: add usb port auto power off mechanism It looks like every port on my laptop is powered down, as I can't even charge devices

Re: [GIT PATCH] USB patches for 3.9-rc1

2013-02-22 Thread Lan Tianyu
On 2013/2/23 0:43, Dave Jones wrote: On Fri, Feb 22, 2013 at 05:51:10PM +0800, Lan Tianyu wrote: Nothing major, lots of gadget fixes, and of course, xhci stuff. I get no USB devices recognised when I insert them any more, which I think is pretty major. I suspect it has

Re: [GIT PATCH] USB patches for 3.9-rc1

2013-02-22 Thread Lan Tianyu
On 2013/2/23 1:14, Dave Jones wrote: On Sat, Feb 23, 2013 at 01:02:11AM +0800, Lan Tianyu wrote: What can I do to debug this ? Can you attach the output of dmesg with CONFIG_USB_DEBUG? http://paste.fedoraproject.org/3620 How aboutsudo lsusb -s 1:1 -v or 2:1? (12

Re: Not enough resource for old configuration after USB bus reset

2013-02-20 Thread Lan Tianyu
i686 i386 GNU/Linux. I try the same operation to produce the issue, and it also fails. Please attach the output of dmesg with CONFIG_USB_DEBUG and XHCI_DEBUG. Thanks, Soar -Original Message- From: Lan Tianyu [mailto:lantianyu1...@gmail.com] Sent: Friday, February 08, 2013 12:57 AM

Re: Not enough resource for old configuration after USB bus reset

2013-02-07 Thread Lan Tianyu
2013/2/4 Soar Hung soarh...@realtek.com: Hi Alan, Sarah, Thank you for your kindly help. Can I do something to provide some help? You found the issue on the 3.0.30+ kernel. Can you test it on the usb-next branch of usb tree? Sarah has fixed a lot of bugs since v3.0. Best regards, Soar

Re: Not enough resource for old configuration after USB bus reset

2013-02-07 Thread Lan Tianyu
, and test again? I think you can git clone git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git and git checkout usb-next. Compile kernel and test it. Best regards, Soar -Original Message- From: Lan Tianyu [mailto:lantianyu1...@gmail.com] Sent: Thursday, February 07, 2013 4:18 PM

[PATCH] Revert usb: Register usb port's acpi power resources

2013-01-28 Thread Lan Tianyu
. Will send a new patch with new routines after 3.9 merge window. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |6 -- drivers/usb/core/usb-acpi.c | 18 -- drivers/usb/core/usb.h |6 -- 3 files changed, 30 deletions(-) diff --git

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

2013-01-24 Thread Lan Tianyu
On 2013年01月25日 08:52, Sarah Sharp wrote: Please combine this patch with patch three, so that I can clearly see what is being replaced in xhci-mem.c:xhci_find_real_port_number. Ok, I will refresh it soon. Sarah Sharp On Sat, Jan 19, 2013 at 12:43:32AM +0800, Lan Tianyu wrote: xhci driver

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

2013-01-24 Thread Lan Tianyu
of scanning through the xHCI roothub port array in the xhci_find_real_port_number(). Signed-off-by: Lan Tianyu tianyu@intel.com --- Change since v1: Don't export usb_hcd_find_raw_port_number() symbol since there is no its user outside of usb core. Change since v2: combine patch usb

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

2013-01-24 Thread Lan Tianyu
extended capabilities table before binding. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/usb-acpi.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c index cef4252..40f5a6a 100644 --- a/drivers/usb/core/usb

[PATCH v2 1/2] usb: Using correct way to clear usb3.0 device's remote wakeup feature.

2013-01-23 Thread Lan Tianyu
by the SetFeature() requests using the FUNCTION_SUSPEND feature selector. This patch is to use correct way to disable usb3.0 device's function remote wakeup after suspend error and resuming. Signed-off-by: Lan Tianyu tianyu@intel.com --- This patchset is based on the usb-next tree commit d2123fd: USB: Set

[PATCH v2 2/2] usb: add usb_enable/disable_remote_wakeup()

2013-01-23 Thread Lan Tianyu
be convienient to use and more readable. Signed-off-by: Lan Tianyu tianyu@intel.com --- Change since v1: remove usb_disable_function_remotewakeup() and call usb_control_msg() directly in the usb_disable_remote_wakeup() drivers/usb/core/hub.c | 136

Re: [PATCH v6 6/8] usb: expose usb port's pm qos flags to user space

2013-01-22 Thread Lan Tianyu
On 2013/1/22 5:31, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:05PM +0800, 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. How

Re: [PATCH v6 7/8] usb: add usb_device_allow_power_off() and usb_device_prevent_power_off() function.

2013-01-22 Thread Lan Tianyu
On 2013/1/22 5:33, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:06PM +0800, Lan Tianyu wrote: 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

Re: [PATCH v6 7/8] usb: add usb_device_allow_power_off() and usb_device_prevent_power_off() function.

2013-01-22 Thread Lan Tianyu
On 2013/1/22 5:33, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:06PM +0800, Lan Tianyu wrote: 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

Re: [PATCH v6 8/8] usb: enable usb port device's async suspend.

2013-01-22 Thread Lan Tianyu
On 2013/1/22 5:34, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:07PM +0800, Lan Tianyu wrote: Signed-off-by: Lan Tianyu tianyu@intel.com Why are you doing this? Why is it now ok? We need a much better changelog entry here. Ok. I will add later. thanks, greg k-h -- Best Regards

Re: [PATCH v6 5/8] usb: add usb port auto power off mechanism

2013-01-22 Thread Lan Tianyu
On 2013/1/22 5:30, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:04PM +0800, 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

Re: [PATCH v6 7/8] usb: add usb_device_allow_power_off() and usb_device_prevent_power_off() function.

2013-01-22 Thread Lan Tianyu
On 2013/1/22 23:05, Greg KH wrote: On Tue, Jan 22, 2013 at 10:23:12PM +0800, Lan Tianyu wrote: On 2013/1/22 5:33, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:06PM +0800, Lan Tianyu wrote: Some usb devices can't be resumed correctly after power off. This patch is to add

Re: [PATCH v6 5/8] usb: add usb port auto power off mechanism

2013-01-22 Thread Lan Tianyu
On 2013/1/23 0:02, Greg KH wrote: On Tue, Jan 22, 2013 at 11:32:13PM +0800, Lan Tianyu wrote: On 2013/1/22 5:30, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:04PM +0800, Lan Tianyu wrote: @@ -127,7 +128,7 @@ static inline char *portspeed(struct usb_hub *hub, int portstatus) } /* Note

Re: [PATCH v6 5/8] usb: add usb port auto power off mechanism

2013-01-22 Thread Lan Tianyu
On 2013/1/23 1:18, Greg KH wrote: On Wed, Jan 23, 2013 at 12:58:09AM +0800, Lan Tianyu wrote The above line, as written is under 80 characters, so I don't understand the issue. If I do following, scripts/checkpatch.pl will complain over 80 characters. @@ -3767,7 +3814,9

[PATCH V7 0/6] usb: usb port power off mechanism

2013-01-22 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

[PATCH v7 1/6] usb: Register usb port's acpi power resources

2013-01-22 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. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |5 + drivers/usb/core/usb-acpi.c

[PATCH v7 2/6] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-22 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 export it. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/base/power/qos.c |1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v7 3/6] usb: add runtime pm support for usb port device

2013-01-22 Thread Lan Tianyu
it is active. Acked-by: Alan Stern st...@rowland.harvard.edu Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 27 +++ drivers/usb/core/hub.h |4 drivers/usb/core/port.c | 46

[PATCH v7 5/6] usb: expose usb port's pm qos flags to user space

2013-01-22 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. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers

[PATCH v7 6/6] usb: enable usb port device's async suspend.

2013-01-22 Thread Lan Tianyu
suspend/resume thread wait for their asynchronous children (during suspend) or parents (during resume), effectively negating the possible gains from executing these devices' suspend and resume callbacks asynchronously. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |1

[PATCH v7 4/6] usb: add usb port auto power off mechanism

2013-01-22 Thread Lan Tianyu
off and powered on. Acked-by: Alan Stern st...@rowland.harvard.edu Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 161 ++- drivers/usb/core/hub.h | 21

[PATCH V6 0/8] usb: usb port power off mechanism and expose usb port connect type

2013-01-21 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

[PATCH v6 1/8] USB: Set usb port's DeviceRemovable according acpi information

2013-01-21 Thread Lan Tianyu
ACPI information and this also works for non-root hub. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hcd.c |4 drivers/usb/core/hub.c | 43 +++ drivers/usb/core/usb.h |3

[PATCH v6 2/8] usb: Register usb port's acpi power resources

2013-01-21 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. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |3 +++ drivers/usb/core/usb-acpi.c | 20

[PATCH v6 3/8] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-21 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 export it. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/base/power/qos.c |1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v6 4/8] usb: add runtime pm support for usb port device

2013-01-21 Thread Lan Tianyu
it is active. Acked-by: Alan Stern st...@rowland.harvard.edu Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 18 ++ drivers/usb/core/hub.h |4 drivers/usb/core/port.c | 45

[PATCH v6 6/8] usb: expose usb port's pm qos flags to user space

2013-01-21 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. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers

[PATCH v6 8/8] usb: enable usb port device's async suspend.

2013-01-21 Thread Lan Tianyu
Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 0334d91..50b646e 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -215,7

Re: [PATCH v6 2/8] usb: Register usb port's acpi power resources

2013-01-21 Thread Lan Tianyu
Hi Greg: Great thanks for your review. I learn a lot from your comments which I have not noticed before. On 2013年01月22日 05:20, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:01PM +0800, Lan Tianyu wrote: This patch is to register usb port's acpi power resources. Create link between usb

Re: [PATCH v6 4/8] usb: add runtime pm support for usb port device

2013-01-21 Thread Lan Tianyu
On 2013年01月22日 05:24, Greg KH wrote: On Mon, Jan 21, 2013 at 10:18:03PM +0800, Lan Tianyu wrote: 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

Re: [PATCH V5 0/10] usb: usb port power off mechanism and expose usb port connect type

2013-01-20 Thread Lan Tianyu
2013/1/21 Greg KH gre...@linuxfoundation.org On Sun, Jan 20, 2013 at 01:53:29AM +0800, Lan Tianyu wrote: Change since v5: use EXPORT_SYMBOL_GPL to export dev_pm_qos_flags(). correct some unnecessary link breaks. Add CONFIG_USB_SUSPEND check around

[PATCH] usb: fix compilation error and warning of driver/usb/core/port.c on arm and blackfin

2013-01-19 Thread Lan Tianyu
treated as errors Reported-by: Fengguang Wu w...@linux.intel.com Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 2bc1cef..3734850 100644 --- a/drivers/usb/core

[PATCH V5 0/10] usb: usb port power off mechanism and expose usb port connect type

2013-01-19 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

[PATCH v5 01/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-19 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 export it. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/base/power/qos.c |1 + 1 file changed, 1 insertion(+) diff --git

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

2013-01-19 Thread Lan Tianyu
ACPI information and this also works for non-root hub. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hcd.c |4 drivers/usb/core/hub.c | 43 +++ drivers/usb/core/usb.h |3

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

2013-01-19 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. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- Documentation/ABI/testing/sysfs-bus-usb |9

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

2013-01-19 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. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com

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

2013-01-19 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. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |3 +++ drivers/usb/core/usb-acpi.c | 20

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

2013-01-19 Thread Lan Tianyu
-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 67 --- drivers/usb/core/hub.h |9 +++ drivers/usb/core/port.c | 40 ++-- 3 files changed, 105 insertions(+), 11 deletions(-) diff --git a/drivers

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

2013-01-19 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. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers

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

2013-01-19 Thread Lan Tianyu
will not be powered off. Acked-by: Alan Stern st...@rowland.harvard.edu Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 0c51d24..0334d91 100644

[PATCH v5 10/10] usb: enable usb port device's async suspend.

2013-01-19 Thread Lan Tianyu
Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 0334d91..50b646e 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -215,7

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

2013-01-18 Thread Lan Tianyu
On 2013年01月16日 23:45, Alan Stern wrote: On Tue, 15 Jan 2013, Lan Tianyu wrote: Hi GregAlan: Do you have some more comments about this patchset? Thanks. I don't have any more comments at this point. It looks okay to me. Acked-by: Alan Stern st...@rowland.harvard.edu By the way

[Rebase PATCH] usb: Using correct way to clear usb3.0 device's remote wakeup feature.

2013-01-18 Thread Lan Tianyu
by the SetFeature() requests using the FUNCTION_SUSPEND feature selector. This patch is to use correct way to disable usb3.0 device's function remote wakeup after suspend error and resuming. Signed-off-by: Lan Tianyu tianyu@intel.com --- This patch is rebased on the usb-linus branch commit 1ee0a224bc9aa USB

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

2013-01-18 Thread Lan Tianyu
port number which is reflected in the xhci extended capabilities table. This patch is to add find_raw_port_number callback to struct hc_driver() and fill it with xhci_find_raw_port_number(). Signed-off-by: Lan Tianyu tianyu@intel.com --- Change since v1: Don't export

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

2013-01-18 Thread Lan Tianyu
extended capabilities table before binding. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/usb-acpi.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c index cef4252..40f5a6a 100644 --- a/drivers/usb/core/usb

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

2013-01-18 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 tianyu@intel.com --- drivers/usb/host/xhci-mem.c | 36

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

2013-01-18 Thread Lan, Tianyu
. Best Regards Tianyu Lan -Original Message- From: Alan Stern [mailto:st...@rowland.harvard.edu] Sent: Saturday, January 19, 2013 12:21 AM To: Lan, Tianyu Cc: r...@sisk.pl; gre...@linuxfoundation.org; sarah.a.sh...@linux.intel.com; oneu...@suse.de; linux-usb@vger.kernel.org Subject: Re

[PATCH] usb: Using correct way to clear usb3.0 device's remote wakeup feature.

2013-01-16 Thread Lan Tianyu
by the SetFeature() requests using the FUNCTION_SUSPEND feature selector. This patch is to use correct way to disable usb3.0 device's function remote wakeup after suspend error and resuming. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 71

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

2013-01-14 Thread Lan Tianyu
On 2013年01月11日 20:10, Lan Tianyu wrote: 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

Re: USB device cannot be reconnected and khubd blocked for more than 120 seconds

2013-01-12 Thread Lan Tianyu
On 2013年1月12日 15:48:59, Alex Riesen wrote: On Fri, Jan 11, 2013 at 10:04 PM, Alex Riesen raa.l...@gmail.com wrote: Hi, the USB stick (an Cruzer Titanium 2GB) was not recognized at any of the USB ports of this system (an System76 lemu4 laptop, XHCI device) after it was removed. If I attempt to

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

2013-01-11 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

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

2013-01-11 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 export it. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/base/power/qos.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/base/power/qos.c b/drivers/base/power

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

2013-01-11 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 tianyu@intel.com --- drivers/usb/core/Makefile |1 + drivers/usb/core/hub.c| 107 + drivers/usb/core/hub.h

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

2013-01-11 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 tianyu@intel.com --- Documentation/ABI/testing/sysfs-bus-usb |9 +++ drivers/usb/core/port.c | 43

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

2013-01-11 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 tianyu@intel.com --- drivers/usb/core/hub.c | 26

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

2013-01-11 Thread Lan Tianyu
ACPI information and this also works for non-root hub. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hcd.c |4 drivers/usb/core/hub.c | 48 drivers/usb/core/usb.h |3 +++ 3 files changed, 55 insertions(+) diff

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

2013-01-11 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 tianyu@intel.com --- drivers/usb/core/port.c |3 +++ drivers/usb/core/usb-acpi.c | 20 drivers/usb/core/usb.h

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

2013-01-11 Thread Lan Tianyu
it is active. Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 18 ++ drivers/usb/core/hub.h |4 drivers/usb/core/port.c | 43 +++ 3 files changed, 65

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

2013-01-11 Thread Lan Tianyu
clear and persist enable. When it resumes, power on port again. Add did_runtime_put in the struct usb_port in order to call pm_runtime_get/put(portdev) paired during suspending and resuming. Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Signed-off-by: Lan Tianyu tianyu@intel.com

  1   2   3   >