summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-12-18 14:05:56 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-12-18 14:05:56 +0000
commitb0244954cffdf11c7a7b11a7cfbfc236eeffc9c8 (patch)
tree5bd5f54f482915542628b3f9cdc7668894c9bc05
parentf302d5cc5daa3f105d904ac56ca7deec83365b17 (diff)
r1728@boole: tzafrir | 2006-12-18 15:59:36 +0200
r1723@boole: tzafrir | 2006-12-18 15:54:04 +0200 Use the internal version (without locking) of usb_reset_device. Intended for kernel 2.6.9 and earlier. Finally full support of 2.6.8 and 2.6.9. r2937: diego | 2006-12-17 14:20:36 +0200 r2940: tzafrir | 2006-12-17 16:32:51 +0200 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1732 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--xpp/xpp_usb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xpp/xpp_usb.c b/xpp/xpp_usb.c
index bc8af46..1d4b20e 100644
--- a/xpp/xpp_usb.c
+++ b/xpp/xpp_usb.c
@@ -558,7 +558,14 @@ static int xusb_probe(struct usb_interface *interface, const struct usb_device_i
INFO("New XUSB device MODEL=%s bus_type=%d\n", model_info->desc, model_info->bus_type);
- if((retval = usb_reset_device(udev)) < 0) {
+ /* The USB stack before 2.6.10 seems to be a bit shoddy. It seems that when being called
+ * from the probe we may already have the lock to udev (the Usb DEVice). Thus we call
+ * the internal __usb_reset_device instead. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+ if((retval = __usb_reset_device(udev)) < 0) {
+#else
+ if((retval = usb_reset_device(udev)) < 0) {
+#endif
ERR("usb_reset_device failed: %d\n", retval);
goto probe_failed;
}