Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 303029

Summary: app-misc/lirc-0.8.5 lirc_igorplugusb freeze, too long timeout
Product: Gentoo Linux Reporter: Paul <pebek2>
Component: New packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED TEST-REQUEST    
Severity: normal Keywords: PMASKED
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch change timeout from 1250000 msec to 5000 msec
Patch fix timeout in usb_control_msg function

Description Paul 2010-01-31 21:15:11 UTC
Driver lirc_igorplugusb freeze randomly.
Timeout in usb_control_msg function is: HZ * USB_CTRL_GET_TIMEOUT:

#define USB_CTRL_GET_TIMEOUT    5
...
...
		ret = usb_control_msg(
		      ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0),
		      SET_INFRABUFFER_EMPTY, USB_TYPE_VENDOR|USB_DIR_IN,
		      /*unused*/0, /*unused*/0,
		      /*dummy*/ir->buf_in, /*dummy*/ir->len_in,
		      /*timeout*/HZ * USB_CTRL_GET_TIMEOUT);

In my system HZ * USB_CTRL_GET_TIMEOUT = 1250000 msec = 1250 sec.
When I change HZ to 1000 then timeout = 5000 msec = 5 sec.

Reproducible: Always

Steps to Reproduce:
1. Run lirc and connect igorplugusb device
2. Press random buttons on remote control
Comment 1 Paul 2010-01-31 21:16:49 UTC
Created attachment 218032 [details, diff]
Patch change timeout from 1250000 msec to 5000 msec
Comment 2 Paul 2010-02-01 08:50:45 UTC
Created attachment 218059 [details, diff]
Patch fix timeout in usb_control_msg function

Patch change timeout in kerlnel > 2.5.x from 1250000 to USB_CTRL_GET_TIMEOUT defined in include/linux/usb.h:

#define USB_CTRL_GET_TIMEOUT    5000
Comment 3 Pacho Ramos gentoo-dev 2012-04-29 13:00:41 UTC
Still valid with 0.9.0?