Re: [linux-usb-devel] [PATCH] another usb.tmpl change

2006-08-31 Thread Franck Bui-Huu
Sam Bishop wrote: > On Wednesday 30 August 2006 3:40 am, Franck Bui-Huu wrote: >> This patch also fixes a bug in usb_device_poll() at the same time. >> Previous code always raised POLLIN bit although no event happened >> on the bus. > > I believe this is expected behav

Re: [linux-usb-devel] [PATCH] another usb.tmpl change

2006-08-30 Thread Franck Bui-Huu
ething I'm missing here but polling on /proc/bus/usb/devices don't work for me...I attached the prog I used to test that. You can simply do in order to test it: $ gcc poll.c $ ./a.out /prob/bus/usb/devices > /dev/null If no event occurs within 5 seconds, it will timeout. I took a loo

Re: [linux-usb-devel] [PATCH 2/3] USB: utilize dma_supported() API

2006-08-17 Thread Franck Bui-Huu
e a bit field instead as defined below ? > unsigned is_b_host:1; /* true during some HNP roleswitches */ > unsigned b_hnp_enable:1;/* OTG: did A-Host enable HNP? */ > Franck -

Re: [linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb()

2006-07-25 Thread Franck Bui-Huu
Greg, Anything wrong with this patch ? thanks Franck Franck Bui-Huu wrote: > This patch uses completion timeout instead of a timer to implement > a timeout when submitting an URB in usb_start_wait_urb(). > > It also fixes a small issue. With the previous code, i

[linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb()

2006-07-12 Thread Franck Bui-Huu
t had occured. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/core/message.c | 73 +--- 1 files changed, 29 insertions(+), 44 deletions(-) diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 08fb20f..6213c6d 1

[linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb()

2006-06-30 Thread Franck Bui-Huu
cured. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/core/message.c | 73 +--- 1 files changed, 29 insertions(+), 44 deletions(-) diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 08fb20f..6213c6d 100644 --

Re: [linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb()

2006-06-29 Thread Franck Bui-Huu
Alan Stern wrote: > On Thu, 29 Jun 2006, Franck Bui-Huu wrote: > >> BTW, I updated the patch and I think it fixes a small issue. With the >> previous code, if no timeout happened and the HCD set the URB's status >> to ECONNRESET value, the code assumed that a timeo

Re: [linux-usb-devel] [RFC] USB subsystem and the BKL

2006-06-29 Thread Franck Bui-Huu
node is opened, so by taking the lock in the > disconnect routine we avoid the problem of people opening a device file > as it is being unregistered. > can we just use the device's lock for that purpose ? Franck Using Tomcat but need to do more? Need to support

Re: [linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb()

2006-06-29 Thread Franck Bui-Huu
he code assumed that a timeout had occured. Franck -- >8 -- [PATCH] usbcore get rid of the timer in usb_start_wait_urb() This patch uses completion timeout instead of a timer to implement a timeout when submitting an URB in usb_start_wait_urb(). Signed-off-by: Franck Bui-Huu <[EM

[linux-usb-devel] [RFC] USB subsystem and the BKL

2006-06-28 Thread Franck Bui-Huu
structure. Can't we use a simple mutex here ? usb_device_lseek(): can we use the inode's mutex instead ? In devio.c, it's used by usbdev_open() and usbdev_lseek() functions. In both function can't we also use the inode's mutex instead ? Thanks Franc

Re: [linux-usb-devel] [RFC] USB subsystem and the BKL

2006-06-28 Thread Franck Bui-Huu
Franck Bui-Huu wrote: > > In devices.c, it's used by usb_device_poll() and usb_device_lseek() > functions. > > usb_device_poll(): > > It seems to use it only to protect usb_device_status > structure. Can't we use a simple mutex here ? actually I don&

[linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb()

2006-06-28 Thread Franck Bui-Huu
This patch uses completion timeout instead of a timer to implement a timeout when submitting an URB in usb_start_wait_urb(). Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/core/message.c | 73 ++-- 1 files changed, 30 insertions(

[linux-usb-devel] [RFC] USB subsystem and the BKL

2006-06-28 Thread Franck Bui-Huu
i dunno why it has still not reached the list...I sent it 6 hours ago. Original Message Subject: [RFC] USB subsystem and the BKL Date: Wed, 28 Jun 2006 10:49:43 +0200 Reply-To: Franck <[EMAIL PROTECTED]> To: USB development list Hi, I noticed that the BKL is used a cou

Re: [linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb ()

2006-06-28 Thread Franck Bui-Huu
David Brownell wrote: > By the way, re the $SUBJECT patch ... is there a bugfix in there, > or is this just trying to be some kind of cleanup? > no there's no fix, only cleanup. > > On Wednesday 28 June 2006 12:47 am, Franck Bui-Huu wrote: > >> It seems that a cal

Re: [linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb ()

2006-06-28 Thread Franck Bui-Huu
letion(). > Or maybe we can call usb_kill_urb() instead of usb_unlink_urb() ? thanks Franck Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Applic

Re: [linux-usb-devel] [RFC] usb-core get rid of the timer during URB submission in usb_start_wait_urb()

2006-06-27 Thread Franck Bui-Huu
2006/6/27, Alan Stern <[EMAIL PROTECTED]>: > On Tue, 27 Jun 2006, Franck Bui-Huu wrote: > > > Franck Bui-Huu wrote: > > > + > > > + if (wait_for_completion_interruptible_timeout( > > > + &done, timeout ? : MAX_SCHEDULE_TIMEOUT) <

Re: [linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb ()

2006-06-27 Thread Franck Bui-Huu
Oliver Neukum wrote: > Am Dienstag, 27. Juni 2006 16:09 schrieb Franck Bui-Huu: >> Oliver Neukum wrote: >>> Am Dienstag, 27. Juni 2006 09:52 schrieb Franck Bui-Huu: >>>> + expire = timeout ? msecs_to_jiffies(timeout) : >>>> MAX_SCHEDULE_TIMEOUT; >

Re: [linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb()

2006-06-27 Thread Franck Bui-Huu
Oliver Neukum wrote: > Am Dienstag, 27. Juni 2006 09:52 schrieb Franck Bui-Huu: >> + expire = timeout ? msecs_to_jiffies(timeout) : MAX_SCHEDULE_TIMEOUT; >> + if (!wait_for_completion_timeout(&done, expire)) { >> + usb_unlink_urb(urb); >>

[linux-usb-devel] [PATCH] usbcore get rid of the timer in usb_start_wait_urb()

2006-06-27 Thread Franck Bui-Huu
This patch uses completion timeout instead of a timer to implement a timeout when submitting an URB in usb_start_wait_urb(). Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- ok, this function is still uninterruptible and I updated its comment. It also converts timeout from m

Re: [linux-usb-devel] [RFC] usb-core get rid of the timer during URB submission in usb_start_wait_urb()

2006-06-27 Thread Franck Bui-Huu
David Brownell wrote: > On Monday 26 June 2006 9:15 am, Franck Bui-Huu wrote: >> So what does this comment try to say ? >> >> /* >> * Starts urb and waits for completion or timeout note that this call >> * is NOT interruptible, while many device driver i/o reque

Re: [linux-usb-devel] [RFC] usb-core get rid of the timer during URB submission in usb_start_wait_urb()

2006-06-27 Thread Franck Bui-Huu
Franck Bui-Huu wrote: > + > + if (wait_for_completion_interruptible_timeout( > + &done, timeout ? : MAX_SCHEDULE_TIMEOUT) <= 0) { oops, timeout is in ms, and should be converted in jiffies...BTW why not simply always using jiffies ? timeout value are usua

Re: [linux-usb-devel] [RFC] usb-core get rid of the timer during URB submission in usb_start_wait_urb()

2006-06-26 Thread Franck Bui-Huu
Oliver Neukum wrote: > Am Montag, 26. Juni 2006 17:34 schrieb Franck Bui-Huu: >> It also put the task in interruptible state instead of an >> uninterruptible one while waiting for the completion. I'm not >> sure about this part though and the comment is not clear. >

Re: [linux-usb-devel] [RFC] usb-core get rid of the timer during URB submission in usb_start_wait_urb()

2006-06-26 Thread Franck Bui-Huu
Alan Stern wrote: > On Mon, 26 Jun 2006, Oliver Neukum wrote: > >> Am Montag, 26. Juni 2006 17:34 schrieb Franck Bui-Huu: >>> It also put the task in interruptible state instead of an >>> uninterruptible one while waiting for the completion. I'm not >>>

[linux-usb-devel] [RFC] usb-core get rid of the timer during URB submission in usb_start_wait_urb()

2006-06-26 Thread Franck Bui-Huu
This patch uses completion timeout instead of a timer to implement a timeout when submitting an URB in usb_start_wait_urb() It also put the task in interruptible state instead of an uninterruptible one while waiting for the completion. I'm not sure about this part though and the comment is not cle

[linux-usb-devel] [PATCH 2/2] gadget-serial: do not save/restore IRQ flags in gs_close()

2006-06-14 Thread Franck Bui-Huu
As pointed out by David Brownell, we know that IRQs are never blocked when calling gs_close function. So the save/restore IRQ flags are pointless. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/gadget/serial.c | 18 -- 1 files changed, 8 insertions(

[linux-usb-devel] [PATCH 1/2] gadget-serial: fix a deadlock when closing the serial device

2006-06-14 Thread Franck Bui-Huu
When closing the device, the driver acquires/release twice the port lock before/after waiting for the data to be completely sent. Therefore it will dead lock. This patch fixes it and also uses the generic scheduler services for waiting for an event. Signed-off-by: Franck Bui-Huu <[EM

Re: [linux-usb-devel] [PATCH] gadget-serial: fix a deadlock when closing the serial device

2006-06-14 Thread Franck Bui-Huu
Hi David, 2006/6/14, David Brownell <[EMAIL PROTECTED]>: > On Wednesday 07 June 2006 6:11 am, Franck Bui-Huu wrote: > > When closing the device, the driver acquires/release twice the > > port lock before/after waiting for the data to be completely > > sent.

Re: [linux-usb-devel] [PATCH] gadget-serial: fix a deadlock when closing the serial device

2006-06-08 Thread Franck Bui-Huu
ping Franck Bui-Huu wrote: > When closing the device, the driver acquires/release twice the > port lock before/after waiting for the data to be completely > sent. > It also uses the generic scheduler function for waiting for an > event. > > Signed-off-by: Franck Bui-

Re: [linux-usb-devel] [PATCH] gadget-serial: fix a deadlock when closing the serial device

2006-06-07 Thread Franck Bui-Huu
Greg KH wrote: > On Tue, Jun 06, 2006 at 10:31:51AM +0200, Franck Bui-Huu wrote: >> ping > > I was waiting for an ack from the original author of this code. Al, any > comments? > well, thinking more about it, I think the original author wrote its own wait_event_xxx mac

[linux-usb-devel] [PATCH] gadget-serial: fix a deadlock when closing the serial device

2006-06-07 Thread Franck Bui-Huu
When closing the device, the driver acquires/release twice the port lock before/after waiting for the data to be completely sent. Therefore it will dead lock. This patch fixes it and also uses the generic scheduler services for waiting for an event. Signed-off-by: Franck Bui-Huu <[EM

[linux-usb-devel] [PATCH] usb-storage: get rid of the timer during URB submission

2006-05-24 Thread Franck Bui-Huu
This patch uses completion timeout instead of a timer to implement a timeout when submitting an URB. It also put the task in interruptible state instead of an uninterruptible one while waiting for the completion. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/s

Re: [linux-usb-devel] Re: [PATCH] usb-storage: get rid of the timer during URB submission

2006-05-24 Thread Franck Bui-Huu
Alan Stern wrote: > On Wed, 24 May 2006, Franck Bui-Huu wrote: > >> and use completion timeout instead. It also put the task >> in interruptible state instead of an uninterruptible one >> while waiting for the completion. > > Don't make the email content a cont

[linux-usb-devel] [PATCH] usb-storage: get rid of the timer during URB submission

2006-05-24 Thread Franck Bui-Huu
and use completion timeout instead. It also put the task in interruptible state instead of an uninterruptible one while waiting for the completion. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/storage/transport.c | 38 ++ 1

Re: [linux-usb-devel] [PATCH] usb-storage: get rid of the timer during URB submission

2006-05-23 Thread Franck Bui-Huu
2006/5/23, Alan Stern <[EMAIL PROTECTED]>: On Tue, 23 May 2006, Franck Bui-Huu wrote: > ok but my point is if the US_FLIDX_URB_ACTIVE bit is still set after waiting, > doesn't that mean that the URB doesn't complete normally ? If so we should > call usb_unlink_urb whate

Re: [linux-usb-devel] [PATCH] usb-storage: get rid of the timer during URB submission

2006-05-23 Thread Franck Bui-Huu
Alan Stern wrote: > On Tue, 23 May 2006, Franck Bui-Huu wrote: > >> Franck Bui-Huu wrote: >>> /* wait for the completion of the URB */ >>> - wait_for_completion(&urb_done); >>> - clear_bit(US_FLIDX_URB_ACTIVE, &us->flags); >>&

[linux-usb-devel] [PATCH] gadget-serial: fix a deadlock when closing the serial device

2006-05-23 Thread Franck Bui-Huu
When closing the device, the driver acquires/release twice the port lock before/after waiting for the data to be completely sent. It also uses the generic scheduler function for waiting for an event. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- well I'm proba

Re: [linux-usb-devel] [PATCH] usb-storage: get rid of the timer during URB submission

2006-05-23 Thread Franck Bui-Huu
Franck Bui-Huu wrote: > /* wait for the completion of the URB */ > - wait_for_completion(&urb_done); > - clear_bit(US_FLIDX_URB_ACTIVE, &us->flags); > + timeout = wait_for_completion_interruptible_timeout( > + &urb_done, ti

[linux-usb-devel] [PATCH] usb-storage: get rid of the timer during URB submission

2006-05-23 Thread Franck Bui-Huu
and use completion timeout instead of. It also put the task in interruptible state instead of uninterruptible one while waiting for the completion. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/storage/transport.c | 35 +++ 1

[linux-usb-devel] [PATCH] usb-storage: get rid of the timer during URB submission

2006-05-22 Thread Franck Bui-Huu
and use completion timeout instead. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/storage/transport.c | 34 ++ 1 files changed, 6 insertions(+), 28 deletions(-) c35738d918f56fbb725b29c8098cee819e33a83d drivers/usb/storage/trans

Re: [linux-usb-devel] [PATCH] Fix dead lock in usbtest

2006-05-16 Thread Franck Bui-Huu
orry for that. I wasn't resending this patch 3 times to make it reviewed sooner. I'm having some troubles with gmail, and was thinking that this patch had never reached the mailing list until now. Moreover the first try was sent yesterday, and the patch just reached the list now... sorry for t

[linux-usb-devel] [USBTEST] possible lock issue

2006-05-16 Thread Franck Bui-Huu
dy hold, it's going to sleep. Since no urbs are unlinked, "usbtest" driver will never wake up since it's waiting for completion of all urbs. Do you think that's possible ? Thanks -- Franck --- Using

[linux-usb-devel] [PATCH] Fix a deadlock in usbtest

2006-05-16 Thread Franck Bui-Huu
e same function. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/misc/usbtest.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 32748d5417e7f290dd211db9857c61a65010cc31 diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index ccc5e82..b42ae6b

[linux-usb-devel] [PATCH] Fix dead lock in usbtest

2006-05-16 Thread Franck Bui-Huu
e same function. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/misc/usbtest.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 86d3649d27a40ad182ea2f1e0f0edc0177d0ef10 diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index ccc5e82..b42ae6b

[linux-usb-devel] [PATCH] Fix dead lock in usbtest

2006-05-16 Thread Franck Bui-Huu
e same function. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/misc/usbtest.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 86d3649d27a40ad182ea2f1e0f0edc0177d0ef10 diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index ccc5e82..b42ae6b

[linux-usb-devel] [PATCH] Fix dead lock in usbtest

2006-05-15 Thread Franck Bui-Huu
e same function. Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/misc/usbtest.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 86d3649d27a40ad182ea2f1e0f0edc0177d0ef10 diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index ccc5e82..b42ae6b

Re: [linux-usb-devel] [UDC] testusb - test10

2006-03-26 Thread Franck Bui-Huu
2006/3/26, Alan Stern <[EMAIL PROTECTED]>: > On Sun, 26 Mar 2006, Franck Bui-Huu wrote: > > > I got 2 more questions, hope you don't mind. > > > > Can I assert that the ep0's request queue has always one request queued ? > > No, of course not. Most

Re: [linux-usb-devel] [UDC] testusb - test10

2006-03-26 Thread Franck Bui-Huu
(request); driver->complete(request, status = -ERROR); } I mean, am I sure that the driver won't queue another request to the queue ? Thanks -- Franck --- This SF.Net email is sponsored by xPML,

Re: [linux-usb-devel] [UDC] testusb - test10

2006-03-24 Thread Franck Bui-Huu
2006/3/24, Alan Stern <[EMAIL PROTECTED]>: > On Fri, 24 Mar 2006, Franck Bui-Huu wrote: > This output is very meager. sorry I forgot to mention that it was snipped. Here is a more complete one: d5161c80 2492837178 S Co:014:00 -115 0 d5161c80 2492892431 C Co:014:00 0 0 d7aa5180 249

[linux-usb-devel] [UDC] testusb - test10

2006-03-24 Thread Franck Bui-Huu
04 0 My host is a fedora 2.6.12-1.1381_FC3, with a uhci HC. The request was terminated with a "EOVERFLOW" instead of "EREMOTEIO" status, and I don't understand why...can someone bring some light here ? Thanks -- Franck -

Re: [linux-usb-devel] [UDC] question about endpoints release.

2006-03-24 Thread Franck Bui-Huu
2006/3/23, David Brownell <[EMAIL PROTECTED]>: > On Monday 20 March 2006 1:50 am, Franck Bui-Huu wrote: > > > Same question for usb->pullup. Who is supposed to call this method ? > > The gadget driver, if it wants to support a mode where it's not always > act

Re: [linux-usb-devel] [UDC] question about endpoints release.

2006-03-21 Thread Franck Bui-Huu
-Configuration or > Set-Interface request is received. IMHO, sometimes it's pretty hard to know how things should be done that is what should be part of the gadget driver or part of the UDC driver. Thanks -- Franck --- This SF

Re: [linux-usb-devel] [UDC] question about endpoints release.

2006-03-20 Thread Franck Bui-Huu
Hi Alan 2006/3/20, Alan Stern <[EMAIL PROTECTED]>: > On Mon, 20 Mar 2006, Franck Bui-Huu wrote: > > > I'm wondering who is supposed to release/disable the endpoints which > > have been enabled while the usb driver was running. I took a look to 2 > > diffe

[linux-usb-devel] [UDC] question about endpoints release.

2006-03-20 Thread Franck Bui-Huu
ously allocated endpoints whereas the futher call udc->ep_disable, except for ep0... What's the rigth thing to do here ? BTW why file_storage driver do not disable ep0 ? Same question for usb->pullup. Who is supposed to call this method ? Thanks --

[linux-usb-devel] Re: [UDC] file storage driver problems

2006-03-17 Thread Franck Bui-Huu
2006/3/17, Pete Zaitcev <[EMAIL PROTECTED]>: > On Fri, 17 Mar 2006 10:54:25 +0100, "Franck Bui-Huu" <[EMAIL PROTECTED]> > wrote: > > >[...] > > I'm suprised to see that for the first IN token asking for 36 data > > bytes, the host actually r

[linux-usb-devel] Re: [UDC] file storage driver problems

2006-03-17 Thread Franck Bui-Huu
t; zero length, it will retry. And I again, I do not care spec or no spec. > It's the only thing which works. I used to have ub without it, and > it turned out unrealistic not to retry IN 13. > These lengths are the lengths actually _received_ by the host... Thanks --

[linux-usb-devel] [UDC] file storage driver problems

2006-03-16 Thread Franck Bui-Huu
oing wrong ? Thanks -- Franck --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new co

[linux-usb-devel] [PATCH] lh7a40x gadget driver: Fixed a dead lock

2006-02-23 Thread Franck Bui-Huu
There is a dead lock in lh7a40x udc driver. When the driver receive a SET_FEATURE HALT request, the dev lock is taken by the interrupt handler lh7a40x_udc_irq then the handler will call lh7a40x_set_halt function which in its turn will try to acquire the dev lock. Signed-off-by: Franck Bui-Huu

[linux-usb-devel] lh7a40x udc driver: lock issue

2006-02-22 Thread Franck Bui-Huu
k. Thanks -- Franck --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! htt

[linux-usb-devel] [PATCH] Zero driver: Removed duplicated code (try 2)

2006-02-07 Thread Franck Bui-Huu
Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/gadget/zero.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) 7206a58953a25e6a41d217d8a4e374f15f8dc0db diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index ae7a1c0..5e9fe8a 100644

[linux-usb-devel] [PATCH] Zero driver: Removed duplicated code

2006-02-03 Thread Franck Bui-Huu
Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]> --- drivers/usb/gadget/zero.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) 7206a58953a25e6a41d217d8a4e374f15f8dc0db diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index ae7a1c0..5e9fe8a 100644

Re: [linux-usb-devel] [QUESTION] HCD and remote wake-up

2006-01-06 Thread Franck
nger exists; the > current gregkh-all patch is for 2.6.15-git1). 2.6.15 > Anyway, if you still can't figure out what's going on, add some printk > statements to finish_device_resume in core/hub.c. You should see where > udev->dev.power.p

Re: [linux-usb-devel] [QUESTION] HCD and remote wake-up

2006-01-06 Thread Franck
e question is, should the state get set by the > device driver or by usbcore? > I would say usbcore since the bus should know the state of a device after it was resumed. Thanks -- Franck --- This SF.net email is spon

Re: [linux-usb-devel] [QUESTION] HCD and remote wake-up

2006-01-06 Thread Franck
mouse is suspended. I push on one of its buttons to remote wakeup the device. The device is woken up but if I look at the state in sysfs, it's still suspended: $ cat /sys/bus/usb/devices/.../power/state 3 Am I missing something ? Thanks -- Franck -

Re: [linux-usb-devel] [QUESTION] HCD and remote wake-up

2006-01-03 Thread Franck
l if hcd->state does not behave properly that means something is broken in the core layer, isn't it ? Thanks, -- Franck --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop!

Re: [linux-usb-devel] [QUESTION] HCD and remote wake-up

2006-01-03 Thread Franck
NDED) usb_hcd_resume_root_hub(hcd); Is that correct ? Thanks -- Franck --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching you

Re: [linux-usb-devel] [QUESTION] HCD and remote wake-up

2006-01-02 Thread Franck
ne, khubd will see the C_PORT_SUSPEND bit and proceed as > described above. > Let say that my hcd has only one port. In both cases you described, can the hcd call usb_hcd_resume_root_hub() and raise C_PORT_SUSPEND flag when getting the remote wakeup interrupt ? Thanks -- Franc

[linux-usb-devel] [QUESTION] HCD and remote wake-up

2005-12-30 Thread Franck
thing interesting on the bus...where am I wrong in this interpretation ? Happy new year, -- Franck --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-21 Thread Franck
2005/12/19, Alan Stern <[EMAIL PROTECTED]>: > On Mon, 19 Dec 2005, Franck wrote: > > > BTW, the hcd suspend method do: > > > > dev->dev.power.power_state = state; > > > > I think this work should be part of the driver model, shouldn't it

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-21 Thread Franck
2005/12/19, Alan Stern <[EMAIL PROTECTED]>: > On Mon, 19 Dec 2005, Franck wrote: > > > > The new code is supposed to work okay, even with values between 0 and 500. > > > If it doesn't, maybe Franck has found a real problem with it. > > > > > > &

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-19 Thread Franck
method should check and prevent it > from happening. > It's still true on 2.6.15-rc5. BTW, the hcd suspend method do: dev->dev.power.power_state = state; I think this work should be part of the driver model, shouldn't it ? Thanks -- Franck -

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-19 Thread Franck
ever > > OK), but not for other cases. > I'm not sure to understand that. > The new code is supposed to work okay, even with values between 0 and 500. > If it doesn't, maybe Franck has found a real problem with it. > setting hcd->power_budget to 0 (meaning

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-18 Thread Franck
2005/12/17, Olav Kongas <[EMAIL PROTECTED]>: > > > On Fri, 16 Dec 2005, Franck wrote: > > > 2005/12/16, Alan Stern <[EMAIL PROTECTED]>: > > > By definition every host controller, including yours, has a root hub. > > > That one port is the root hub&#

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-18 Thread Franck
2005/12/17, Alan Stern <[EMAIL PROTECTED]>: > On Fri, 16 Dec 2005, Franck wrote: > > > > No, that's not what it means. Suspending all the devices attached to a > > > bus is different from suspending the bus itself. > > > > > > > Well s

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-18 Thread Franck
Hi Olav 2005/12/17, Olav Kongas <[EMAIL PROTECTED]>: > > > On Fri, 16 Dec 2005, Alan Stern wrote: > > > On Fri, 16 Dec 2005, Franck wrote: > > > > > Hi Alan, > > > > > > 2005/12/15, Alan Stern <[EMAIL PROTECTED]>: > > > >

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-16 Thread Franck
2005/12/16, Alan Stern <[EMAIL PROTECTED]>: > On Fri, 16 Dec 2005, Franck wrote: > > OK, I think I get the main idea of suspend/resume process for usb. But > > now, I don't see the purpose of hcd->bus_suspend method. What is it > > supposed to do since al

Re: [linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-16 Thread Franck
12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=067b ProdID=2517 Rev= 1.00 S: Manufacturer=Prolific Technology Inc. S: Product=USB Mass Storage Device C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor

[linux-usb-devel] [QUESTION] HCD's suspend implementation

2005-12-15 Thread Franck
asking these questions because the way sl811 and isp116 implement suspend are different... Thanks -- Franck --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new

Re: [linux-usb-devel] [Question] isp116x suspend procedure

2005-11-26 Thread Franck
nished. But if the _suspended_ hardware can still deal with INT, that's OK. Though you "freeze" your system during 7ms. Why not sleeping instead with INT enable ? Thanks -- Franck --- This SF.net email is s

[linux-usb-devel] [Question] isp116x suspend procedure

2005-11-25 Thread Franck
Hi, I'm looking at suspend/resume code and I run into "isp116x_bus_suspend" function. It seems buggy because if the hcd is transfering URB the function wait for it to finish. But it waits with IT disabled...is that correct ? Thanks --

[linux-usb-devel] Re: [RFC] hcd, usbcore and the ep queues.

2005-10-26 Thread Franck
2005/10/25, Alan Stern <[EMAIL PROTECTED]>: > On Tue, 25 Oct 2005, Franck wrote: > > > I noticed in hcd_submit_urb that we increments the reference count of > > the usb device structure through usb_get_dev. This refence count seems > > to be handle by usbcore, is th

[linux-usb-devel] Re: [RFC] hcd, usbcore and the ep queues.

2005-10-25 Thread Franck
2005/10/24, Alan Stern <[EMAIL PROTECTED]>: > On Fri, 21 Oct 2005, Franck wrote: > > > But the HCD can decide to not add the urb into the ep's queue if > > something is going wrong...In that case it refuses to own the urb. > > What I was thinking of is: the usbc

[linux-usb-devel] Re: [RFC] hcd, usbcore and the ep queues.

2005-10-21 Thread Franck
2005/10/21, Alan Stern <[EMAIL PROTECTED]>: > On Fri, 21 Oct 2005, Franck wrote: > > > Alan, David > > > > Sorry for responding so late but I was off until now. We recenlty > > discussed about 2 issues that I encoutered when developping an HCD. > > Here is

[linux-usb-devel] kernel is overwhelmed by usb hcd's interrupts

2005-10-21 Thread Franck
ee how the kernel can lost so many ticks. Could anyone give me some advices for that ? Thanks -- Franck --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and

[linux-usb-devel] [RFC] hcd, usbcore and the ep queues.

2005-10-21 Thread Franck
can check against a urb->status value (maybe -EINPROGRESS). The second point is that hcd can't easily parse ep's queue because this queue is protected by a private usbcore's lock. fix: we can export usbcore lock. What do you think ? Thanks -- Franck -

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-14 Thread Franck
nage to share a single queue without > interference. That what I'm thinking as well. But only one should manage the queue and the other should only parse it with lock held. It should be simpler...For now only usbcore manages and can parse the queue since the queue's lock is private

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-14 Thread Franck
2005/10/13, Alan Stern <[EMAIL PROTECTED]>: > On Thu, 13 Oct 2005, Franck wrote: > > obviously endpoint queues are usbcore's data but used by hcd. hcd > > seems to know when an urb is active. Therefore we could export a new > > usbcore's function which would b

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-14 Thread Franck
quot;. If I well understand this function parse the ep's queue and free each of them by (a) calling hcd->urb_dequeue method (b) kfreeing urbDon't we need to remove the urb from ep's queue somewhere before the queue is rescaned from the start ? Thanks -- Franck

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-13 Thread Franck
s active. Therefore we could export a new usbcore's function which would be called by hcd to make an urb active: void usb_make_active(struct usb_hos_endpoint *ep, struct *urb) { spin_lock(&hcd_data_lock); usb_get_urb(urb); atomic_inc(&urb->use_

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-13 Thread Franck
2005/10/12, Alan Stern <[EMAIL PROTECTED]>: > On Wed, 12 Oct 2005, Franck wrote: > > Does a patch that do this have any chance to be accepted ? > > I think we should decide on the _correct_ solution first. Then acceptance > will be obvious. > ok, but my question was m

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-12 Thread Franck
2005/10/12, Alan Stern <[EMAIL PROTECTED]>: > On Wed, 12 Oct 2005, Franck wrote: > > > > > A simple fix is to link urb right after > > > > calling hcd->urb_enqueue. What do you think about this ? > > > > > > Not good. The URB must be l

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-12 Thread Franck
2005/10/12, Alan Stern <[EMAIL PROTECTED]>: > On Wed, 12 Oct 2005, Franck wrote: > > > > Remember that the only data protected by urb->lock is urb->status, > > > urb->urb_list, and urb->reject. Your HCD should change nothing but the > >

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-12 Thread Franck
n that case it can't happen. Allocation happens only when scheduling > > an ep the first time. At this time this ep in not in my list of active > > ep so it's not a candidate for transfering URB. > > So your urb_enqueue method can never fail, except on the first UR

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-11 Thread Franck
2005/10/11, Alan Stern <[EMAIL PROTECTED]>: > On Tue, 11 Oct 2005, Franck wrote: > > > 2005/10/11, Alan Stern <[EMAIL PROTECTED]>: > > > Be more careful here. It doesn't hold urb->lock while _reading_ > > > urb->status; there's no po

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-11 Thread Franck
it. Do you think it can be an issue ? I'm asking this question because I get sometime a warning on the console saying: "Badness in kref_get at lib/kref.c:32". Thanks -- Franck --- This SF.Net email is spons

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-11 Thread Franck
ese 2 points are correct ? Can I do the same in my hcd ? Thanks -- Franck --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solu

Re: [linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-10 Thread Franck
Hi Alan. 2005/10/10, Alan Stern <[EMAIL PROTECTED]>: > On Mon, 10 Oct 2005, Franck wrote: > > But sometime this field is NULL when starting an URB transfer ! That's > > normally impossible since _all_ URBs submitted to an HCD use > > "hcd->urb_enqueue&q

[linux-usb-devel] Question on usage of urb->hcpriv field.

2005-10-10 Thread Franck
eue", isn't it ? Could someone help me on this point ? Thanks -- Franck --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, disc

Re: [linux-usb-devel] HCD and IRQ initialisation

2005-09-20 Thread Franck
hanks. -- Franck 2005/9/20, Alan Stern <[EMAIL PROTECTED]>: > On Tue, 20 Sep 2005, Franck wrote: > > > Hi, > > > > I'm still debuging this [EMAIL PROTECTED] HCD. Hardware causes me a lot of > > troubles. Anyways, I have noticed that if I plug a us

[linux-usb-devel] HCD and IRQ initialisation

2005-09-20 Thread Franck
r) or should usb_add_hcd be fixed ? Thanks. -- Franck --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv o

Re: [linux-usb-devel] How to mount a usb stick without hotplug config

2005-09-16 Thread Franck
r succesfully finishes ! Eventually a new transfer is issued and the same scenario is occuring. I attached the log corresponding to one buggy sequence. Another weird point. When I disable debug log, the device configuration fails ! Still because of data error. The only difference is that the hcd

  1   2   >