Re: [linux-pm] s2ram slow (radeon) / failing (usb)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux