Re: some question about ehci-sched.c

2018-09-24 Thread yoma sophian
hi Alan: > We don't _have_ to do it. It is a small optimization; an attempt to > avoid schedule collisions between interrupt transactions and > isochronous transactions. The effect of the "-" is that the code tries > frames in backward order when it is scheduling isochronous URBs -- as > opposed

some question about ehci-sched.c

2018-09-20 Thread yoma sophian
hi all: in iso_stream_schedule of ehci-sched.c, why we have to add the "-" in (-(++ehci->random_frame)) to calculate the start uframe? thanks for ur help in advance. if (stream->ps.phase == NO_FRAME) { int done = 0; struc

Re: some questions about PM enable with usb driver

2016-03-23 Thread yoma sophian
hi Alan: 2016-03-04 23:25 GMT+08:00 Alan Stern : > On Fri, 4 Mar 2016, yoma sophian wrote: > >> BTW, when I disable BH support in hcd driver. >> I get below recursion of spin lock sometimes. >> Did I missing anything once disable BH? > > Yes, you missed a very impor

Re: some questions about PM enable with usb driver

2016-03-04 Thread yoma sophian
hi Alan and Peter: >> >> Backtrace: >> [] (ehci_handle_start_intr_unlinks [ehci_hcd]) from >> [] (ehci_bus_suspend+0x388/0x464 [ehci_hcd]) > > Since there aren't any devices registered on the USB bus yet, > ehci_handle_start_intr_unlink() should do nothing. It iterates over > ehci->intr_unlink, bu

some questions about PM enable with usb driver

2016-03-03 Thread yoma sophian
hi all: When I porting my platform ehci driver on kernel v4.1, I get back trace like below without plug in any device and just insert usb-common.ko, usbcore.ko and ehci-hcd.ko. (and detail is show in the attachment) It seems caused by the PM related thread that is wakened up, even there is no devi

Re: possible race condition for usb_stor_port_reset and usb_reset_and_verify_device

2015-07-10 Thread yoma sophian
hi Alan: 2015-05-27 22:40 GMT+08:00 Alan Stern : > On Wed, 27 May 2015, yoma sophian wrote: > >> After reading the kernel power document, freezing-of-tasks.txt , can I >> get the below conclusion: >> if I put my thread in freezable, it will get frozen automatically >&g

Re: possible race condition for usb_stor_port_reset and usb_reset_and_verify_device

2015-05-27 Thread yoma sophian
Hi alan: 2015-05-07 2:16 GMT+08:00 Alan Stern : > On Thu, 7 May 2015, yoma sophian wrote: > >> > Besides, the kernel already contains a thread that calls >> > sd_check_events periodically. Why do you need to write a new one? >> I create the thread since some buggy

possible race condition for usb_stor_port_reset and usb_reset_and_verify_device

2015-05-05 Thread yoma sophian
hi all: I am writing a thread and it will call sd_check_events per 1 second. 1. before system goes to hibernate, the thread works fine 2. system hibernate and restore back. 3. udev->state will keep USB_STATE_SUSPENDED before finish_port_resume 4. during above 2) and 3) sd_check_events keep poll

Re: Driver initial sequence of usb drivers

2015-04-17 Thread yoma sophian
hi Greg: 2015-04-17 16:22 GMT+08:00 Greg KH : > On Fri, Apr 17, 2015 at 03:51:09PM +0800, yoma sophian wrote: >> hi Greg: >> >> > The linker order determines the order of the init functions. >> >> Would you mind to let us know where and how it do so? >&

Re: Driver initial sequence of usb drivers

2015-04-17 Thread yoma sophian
hi Greg: >> > The linker order determines the order of the init functions. >> Would you mind to let us know where and how it do so? > > I don't understand, what is the problem with the existing code? What > are you trying to solve here? Is the linking order somehow not working > properly? No. the

Re: Driver initial sequence of usb drivers

2015-04-17 Thread yoma sophian
hi Greg: 2015-04-17 14:45 GMT+08:00 Greg KH : > On Fri, Apr 17, 2015 at 09:22:02AM +0800, yoma sophian wrote: >> hi all: >> if we build usb driver as module, the dependence is like below: >> usb-common.ko >> usbcore.ko >> ehci-hcd.ko >> ... >> etc. >

Driver initial sequence of usb drivers

2015-04-16 Thread yoma sophian
hi all: if we build usb driver as module, the dependence is like below: usb-common.ko usbcore.ko ehci-hcd.ko ... etc. if we choose build-in instead of modules, how could we make sure the initial sequence is indeed followed what we expected? appreciate your kind help in advance, -- To unsubscribe f

Re: [RFT] usb: Disable Link PM if setting device-initiated timeout fails.

2014-02-11 Thread yoma sophian
hi all: 2014-02-04 2:04 GMT+08:00 Sarah Sharp : > On Fri, Jan 31, 2014 at 04:56:36PM +, David Laight wrote: >> From: Sarah Sharp >> > Yoma, can you apply this patch and see if it helps your issue? >> >> Helped a lot on my amd system with the ASMedia controller. > > Your ASMedia host controller

Re: segate external USB3.0 HD cannot work

2014-01-12 Thread yoma sophian
hi: 2014/1/12 yoma sophian : > hi Oliver > > 2014/1/12 Oliver Neukum : >> On Sat, 2014-01-11 at 18:17 +0800, yoma sophian wrote: >>> hi all: >>> I got one segate external usb3.0 HD. >>> When I plug in that device, I will get below error message repeatedl

Re: segate external USB3.0 HD cannot work

2014-01-11 Thread yoma sophian
hi Oliver 2014/1/12 Oliver Neukum : > On Sat, 2014-01-11 at 18:17 +0800, yoma sophian wrote: >> hi all: >> I got one segate external usb3.0 HD. >> When I plug in that device, I will get below error message repeatedly: >> >> [ 432.191560] usb 4-1: Set SEL for d

segate external USB3.0 HD cannot work

2014-01-11 Thread yoma sophian
hi all: I got one segate external usb3.0 HD. When I plug in that device, I will get below error message repeatedly: [ 432.191560] usb 4-1: Set SEL for device-initiated U2 failed. [ 432.191664] usb 4-1: USB disconnect, device number 12 [ 469.061694] xhci_hcd :00:14.0: Timeout while waiting f

Re: some question about EXDEV status in period schedule

2013-12-02 Thread yoma sophian
2013/12/2 Alan Stern : > On Sun, 1 Dec 2013, yoma sophian wrote: > >> >> Suppose itds are submitted then ehci_work is triggered by bulk >> >> interrupt and ehci->isoc_count >0. >> >> >> >> The race condition may happen if hardware has

Re: some question about EXDEV status in period schedule

2013-11-24 Thread yoma sophian
2013/11/19 Alan Stern : > Please use Reply-To-All so that your message gets sent to the mailing > list as well as to me. Sorry for forgetting that :) > > On Sat, 16 Nov 2013, yoma sophian wrote: > > hi alan: > >> My questions are: >> 1. in usb driver, >&

Re: some question about EXDEV status in period schedule

2013-11-22 Thread yoma sophian
SORRY for send the wrong mail :) 2013/11/23 yoma sophian : > 2013/11/19 Alan Stern : >> Please use Reply-To-All so that your message gets sent to the mailing >> list as well as to me. >> >> On Sat, 16 Nov 2013, yoma sophian wrote: >> >>> hi alan: >

Re: how to trigger function in usb_device_pm_ops

2013-10-13 Thread yoma sophian
hi alan: 2013/10/7 Alan Stern : > On Mon, 7 Oct 2013, yoma sophian wrote: > >> >> 1. When will platform register dev_pm_ops be called? Is it called >> >> before or after usb_device_pm_ops ? >> > >> > The platform suspend routine is called after t

Re: how to trigger function in usb_device_pm_ops

2013-10-07 Thread yoma sophian
hi alan: 2013/10/2 Alan Stern : > On Wed, 2 Oct 2013, yoma sophian wrote: > >> hi alan: >> >> 2013/10/2 Alan Stern : >> > On Wed, 2 Oct 2013, yoma sophian wrote: >> > >> >> 1. in susped, we will gate our ehci clk >> >> in resumt,

Re: how to trigger function in usb_device_pm_ops

2013-10-01 Thread yoma sophian
hi alan: 2013/10/2 Alan Stern : > On Wed, 2 Oct 2013, yoma sophian wrote: > >> 1. in susped, we will gate our ehci clk >> in resumt, we need to release clk gating to let ehci control work. >> and above are platform specific behavior need to do >> there seems no s

Re: how to trigger function in usb_device_pm_ops

2013-10-01 Thread yoma sophian
hi alan: 2013/10/1 Alan Stern : > On Tue, 1 Oct 2013, yoma sophian wrote: > >> hi all: >> >> >> >>> >> When we use "echo mem > /sys/power/state" , we didn't see any function >> >>> > >> >>> > "

Re: how to trigger function in usb_device_pm_ops

2013-10-01 Thread yoma sophian
hi all: >> >>> >> When we use "echo mem > /sys/power/state" , we didn't see any function >>> > >>> > "mem" is a kind of sleep, not a kind of hibernation. >>> But I don't see any usb sleep funciton called from log >> >> What messages do you expect to see? > When I try the command yesterday, I didn't

Re: how to trigger function in usb_device_pm_ops

2013-10-01 Thread yoma sophian
2013/10/1 Alan Stern : > On Tue, 1 Oct 2013, yoma sophian wrote: > >> 2013/9/30 Alan Stern : >> > On Mon, 30 Sep 2013, yoma sophian wrote: >> > >> >> hi all: >> >> We are trying to make usb hibernate work on our embedded system. >>

Re: how to trigger function in usb_device_pm_ops

2013-09-30 Thread yoma sophian
2013/9/30 Alan Stern : > On Mon, 30 Sep 2013, yoma sophian wrote: > >> hi all: >> We are trying to make usb hibernate work on our embedded system. >> below are configs we enable for system power management: > > Do you mean "hibernate" or "sleep"?

how to trigger function in usb_device_pm_ops

2013-09-30 Thread yoma sophian
hi all: We are trying to make usb hibernate work on our embedded system. below are configs we enable for system power management: # # Power management options # CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y # CONFIG_HIBERNATION is not set CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y # CONFIG_PM_AUTOSLEEP is