[zaptel-commits] tzafrir: trunk r1732 - in /trunk/xpp: ./ xpp_usb.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Mon Dec 18 07:05:57 MST 2006
Author: tzafrir
Date: Mon Dec 18 08:05:56 2006
New Revision: 1732
URL: http://svn.digium.com/view/zaptel?view=rev&rev=1732
Log:
r1728 at boole: tzafrir | 2006-12-18 15:59:36 +0200
r1723 at 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
Modified:
trunk/xpp/ (props changed)
trunk/xpp/xpp_usb.c
Propchange: trunk/xpp/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Dec 18 08:05:56 2006
@@ -1,5 +1,5 @@
283159da-0705-0410-b60c-f2062b4bb6ad:/components/xpp-zaptel/branches/RELEASE-1.2.0/xpp:2933
283159da-0705-0410-b60c-f2062b4bb6ad:/components/xpp-zaptel/trunk/xpp:2830
-f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.2/xpp:1722
-f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.4/xpp:1727
+f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.2/xpp:1723
+f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.4/xpp:1728
f558416c-6c06-0410-9f27-dde2687782d0:/team/tzafrir/xpp_1.2/xpp:1554
Modified: trunk/xpp/xpp_usb.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/xpp_usb.c?view=diff&rev=1732&r1=1731&r2=1732
==============================================================================
--- trunk/xpp/xpp_usb.c (original)
+++ trunk/xpp/xpp_usb.c Mon Dec 18 08:05:56 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