[zaptel-commits] tzafrir: branch 1.2 r1723 -
/branches/1.2/xpp/xpp_usb.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Mon Dec 18 06:54:05 MST 2006
Author: tzafrir
Date: Mon Dec 18 07:54:04 2006
New Revision: 1723
URL: http://svn.digium.com/view/zaptel?view=rev&rev=1723
Log:
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
Modified:
branches/1.2/xpp/xpp_usb.c
Modified: branches/1.2/xpp/xpp_usb.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xpp_usb.c?view=diff&rev=1723&r1=1722&r2=1723
==============================================================================
--- branches/1.2/xpp/xpp_usb.c (original)
+++ branches/1.2/xpp/xpp_usb.c Mon Dec 18 07:54:04 2006
@@ -558,7 +558,14 @@
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;
}
More information about the zaptel-commits
mailing list