Bug 14796 - yealink kernel module put errors tens times a second to sys messages but works fine
Summary: yealink kernel module put errors tens times a second to sys messages but work...
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-13 12:25 UTC by Serg Krasnikov
Modified: 2013-12-10 17:18 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.31.5
Tree: Mainline
Regression: No


Attachments

Description Serg Krasnikov 2009-12-13 12:25:01 UTC
Have usb voip phone - Skypemate W1DL, that discovers by yealink module and works very well(keys and voice over system and skype). Only annoying thing that while it remain connected to usb to I have unstoppable system messages:

yealink: unexpected response fd

tens(may be hundreds) times a second. 

In source /usr/src/linux/drivers/input/misc/yealink.c line 434 found:

	switch (yld->irq_data->cmd) {
	case CMD_KEYPRESS:

		yld->master.s.keynum = yld->irq_data->data[0];
		break;

	case CMD_SCANCODE:
		dbg("get scancode %x", yld->irq_data->data[0]);

		report_key(yld, map_p1k_to_key(yld->irq_data->data[0]));
		break;

	default:
		err("unexpected response %x", yld->irq_data->cmd);
	}

and replaced this by:

	switch (yld->irq_data->cmd) {
	case CMD_KEYPRESS:

		yld->master.s.keynum = yld->irq_data->data[0];
		break;

	case CMD_SCANCODE:
		dbg("get scancode %x", yld->irq_data->data[0]);

		report_key(yld, map_p1k_to_key(yld->irq_data->data[0]));
		break;

	default:
		break;//err("unexpected response %x", yld->irq_data->cmd);
	}

And all now works fine. May be patch mainline like this?
Comment 1 Greg Kroah-Hartman 2009-12-13 17:06:10 UTC
On Sun, Dec 13, 2009 at 12:25:02PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> In source /usr/src/linux/drivers/input/misc/yealink.c line 434 found:

Care to send a patch to the input subsystem maintainer for this?
Comment 2 Serg Krasnikov 2009-12-13 17:39:05 UTC
> Care to send a patch to the input subsystem maintainer for this?

I'd with pleasure, but to who exactly? 

 * drivers/usb/input/yealink.c
 *
 * Copyright (c) 2005 Henk Vergonet <Henk.Vergonet(c)gmail.com>

To that man?

Googled that people tried send him mail and received no answer from him (maybe that e-mail has changed). Driver hasn't changed since 2005 year..
Comment 3 Dmitry Torokhov 2009-12-13 22:41:58 UTC
I'll just change in from err to dbg.
Comment 4 Chuck Ebbert 2010-08-21 07:39:25 UTC
(In reply to comment #3)
> I'll just change in from err to dbg.

Apparently not done yet?
Comment 5 Dmitry Torokhov 2010-08-23 16:02:57 UTC
No, not done. I looked more into the issue and realized that simply changing from err() to dbg() is wrong. The device apparently requires that we throttle sending URB requests at 10ms intervals.
Comment 6 Pavel Alexeev aka Pahan-Hubbitus 2010-08-24 08:25:58 UTC
I have similar problem with this driver - https://bugzilla.redhat.com/show_bug.cgi?id=625751 but phone also does not work at all.
Comment 7 Thomas Reitmayr 2010-12-31 00:30:30 UTC
@Dmitry Torokhov / @Serg Krasnikov
My extended version of the driver performs scan requests at 100 ms intervals, which is perfectly sufficient for properly detecting key presses. This avoids the observed response 0xfd and significantly reduces the IRQ load from USB traffic.

You could try it, however the W1DL might report a model number which is not known to the driver, as it does not blindly assume that any connected Yealink handset talks the P1K's protocol. So you might have to adjust the macro YLD_IS_P1K(v) in yealink.h
Link: http://devbase.homelinux.org:5071/viewvc/voip/yealink-module
(sorry for the slow server...)

Still you will miss support for the dot matrix display. The protocol might be the same as implemented here:
http://lekernel.net/blog/?p=91

Note You need to log in before you can comment on or make changes to this bug.