[zaptel-commits] tzafrir: branch 1.4 r1728 - in /branches/1.4/xpp: ./ xpp_usb.c

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Mon Dec 18 06:59:36 MST 2006


Author: tzafrir
Date: Mon Dec 18 07:59:36 2006
New Revision: 1728

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1728
Log:
 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:
    branches/1.4/xpp/   (props changed)
    branches/1.4/xpp/xpp_usb.c

Propchange: branches/1.4/xpp/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Dec 18 07:59:36 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.2/xpp:1723
 f558416c-6c06-0410-9f27-dde2687782d0:/team/tzafrir/xpp_1.2/xpp:1554
 f558416c-6c06-0410-9f27-dde2687782d0:/trunk/xpp:1453

Modified: branches/1.4/xpp/xpp_usb.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/xpp/xpp_usb.c?view=diff&rev=1728&r1=1727&r2=1728
==============================================================================
--- branches/1.4/xpp/xpp_usb.c (original)
+++ branches/1.4/xpp/xpp_usb.c Mon Dec 18 07:59:36 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