lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 5 May 2010 14:58:40 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Bruno Prémont <bonbons@...ux-vserver.org>
Cc:	Oliver Neukum <oneukum@...e.de>,
	linux-pm@...ts.linux-foundation.org,
	USB@...p1.linux-foundation.org, list <linux-usb@...r.kernel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>
Subject: Re: [linux-pm] s2ram slow (radeon) / failing (usb)

On Tue, 4 May 2010, Bruno Prémont wrote:

> > Bruno, could you, for testing purposes, check, whether the patch below 
> > changes the behavior you are seeing (and also check what the actual return 
> > value from device_add() was, see the added printk()).
> 
> Well, it's said to return 0:
> 
> [  286.872739] generic-usb 0003:058F:9462.0003: input: USB HID v1.10 Keyboard [Multimedia USB Keyboard Multimedia USB Keyboard] on usb-0000:00:13.0-2.1/input0
> [  286.890136] HID: device_add() returned 0
> 
> [  286.919698] generic-usb: probe of 0003:058F:9462.0004 failed with error -22
> [  286.929363] HID: device_add() returned 0
> 
> or with debug=1 for HID:
> [  559.982958] /usr/src/linux-2.6-git/drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 1
> [  560.011698] /usr/src/linux-2.6-git/drivers/hid/hid-core.c: usage index exceeded
> [  560.011704] /usr/src/linux-2.6-git/drivers/hid/hid-core.c: hid_add_usage failed
> [  560.011710] /usr/src/linux-2.6-git/drivers/hid/hid-core.c: item 0 2 2 2 parsing failed
> [  560.011732] /usr/src/linux-2.6-git/drivers/hid/usbhid/hid-core.c: parsing report descriptor failed
> [  560.011747] generic-usb: probe of 0003:058F:9462.0006 failed with error -22
> [  560.021718] HID: device_add() returned 0

Could you please verify with this patch? Thanks.



 drivers/hid/hid-core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 2e2aa75..8df19d3 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1486,8 +1486,10 @@ static int hid_device_probe(struct device *dev)
 			if (!ret)
 				ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
 		}
-		if (ret)
+		if (ret) {
 			hdev->driver = NULL;
+			ret = -ENODEV;
+		}
 	}
 	return ret;
 }

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ