public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [trivial PATCH] "drivers/usb/media/stv680.h": fix jiffies timeout
@ 2006-02-14 15:33 Paolo Ornati
  2006-02-14 16:15 ` Nishanth Aravamudan
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Ornati @ 2006-02-14 15:33 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: trivial

From: Paolo Ornati <ornati@fastwebnet.it>

stv680.c driver calls "usb_control_msg" passing PENCAM_TIMEOUT as
jiffies timout. However PENCAM_TIMEOUT is defined to the fixed value of
1000, this leads to different timeouts with different HZ settings.

Since stv680.c is there since 2.4.18 I don't know if 1000 means 10s or
1s... I've picked the bigger.

---

diff --git a/drivers/usb/media/stv680.h b/drivers/usb/media/stv680.h
index b0551cd..b1a4bf5 100644
--- a/drivers/usb/media/stv680.h
+++ b/drivers/usb/media/stv680.h
@@ -45,7 +45,7 @@
 #define USB_CREATIVEGOMINI_VENDOR_ID	0x041e
 #define USB_CREATIVEGOMINI_PRODUCT_ID	0x4007
 
-#define PENCAM_TIMEOUT          1000
+#define PENCAM_TIMEOUT		(10*HZ)
 /* fmt 4 */
 #define STV_VIDEO_PALETTE       VIDEO_PALETTE_RGB24
 

-- 
	Paolo Ornati
	Linux 2.6.15.4-suspend2 on x86_64

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [trivial PATCH] "drivers/usb/media/stv680.h": fix jiffies timeout
  2006-02-14 15:33 [trivial PATCH] "drivers/usb/media/stv680.h": fix jiffies timeout Paolo Ornati
@ 2006-02-14 16:15 ` Nishanth Aravamudan
  2006-02-14 17:38   ` [trivial PATCH] "drivers/usb/media/stv680.h": fix jiffies timeout -- Paolo Ornati
  0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Aravamudan @ 2006-02-14 16:15 UTC (permalink / raw)
  To: Paolo Ornati; +Cc: Linux Kernel Mailing List, trivial

On 14.02.2006 [16:33:12 +0100], Paolo Ornati wrote:
> From: Paolo Ornati <ornati@fastwebnet.it>
> 
> stv680.c driver calls "usb_control_msg" passing PENCAM_TIMEOUT as
> jiffies timout. However PENCAM_TIMEOUT is defined to the fixed value of
> 1000, this leads to different timeouts with different HZ settings.
> 
> Since stv680.c is there since 2.4.18 I don't know if 1000 means 10s or
> 1s... I've picked the bigger.

NACK. PENCAM_TIMEOUT is a *milliseconds* timeout value.

>From the comment for usb_control_msg:

 *      @timeout: time in msecs to wait for the message to complete before
 *              timing out (if 0 the wait is forever)

Milliseconds do not depend on HZ in anyway.

Thanks,
Nish

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [trivial PATCH] "drivers/usb/media/stv680.h": fix jiffies timeout --
  2006-02-14 16:15 ` Nishanth Aravamudan
@ 2006-02-14 17:38   ` Paolo Ornati
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Ornati @ 2006-02-14 17:38 UTC (permalink / raw)
  To: Nishanth Aravamudan; +Cc: Linux Kernel Mailing List, trivial

On Tue, 14 Feb 2006 08:15:35 -0800
Nishanth Aravamudan <nacc@us.ibm.com> wrote:

> 
> NACK. PENCAM_TIMEOUT is a *milliseconds* timeout value.
> 
> From the comment for usb_control_msg:
> 
>  *      @timeout: time in msecs to wait for the message to complete before
>  *              timing out (if 0 the wait is forever)
> 
> Milliseconds do not depend on HZ in anyway.
> 
> Thanks,
> Nish

Opsss... I was using a source browser ;)

http://lxr.linux.no/source/drivers/usb/core/message.c#L118

It's a bit outdated... (2.6.11)

-- 
	Paolo Ornati
	Linux 2.6.15.4-suspend2 on x86_64


-- 
	Paolo Ornati
	Linux 2.6.15.4-suspend2 on x86_64

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-14 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-14 15:33 [trivial PATCH] "drivers/usb/media/stv680.h": fix jiffies timeout Paolo Ornati
2006-02-14 16:15 ` Nishanth Aravamudan
2006-02-14 17:38   ` [trivial PATCH] "drivers/usb/media/stv680.h": fix jiffies timeout -- Paolo Ornati

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox