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

Re: [bluetooth-dev] USB Driver



On Thu, Aug 31, 2000 at 04:23:22PM +0200, Frank Meyering wrote:
> Hello,
> 
> has someone tried to use the Axis Stack with the USB driver from Greg Kroah
> (integrated in the 2.4.0-test7-kernel)? Using this driver with the Ericsson
> Starter Kit (ROK 101 007/21 P3D, Firmware P9A) is causing an error after
> sending the first HCI-Command. After that error ACL-packets are not
> received. Sending is no problem. Has somebody a solution?
> 

Frank,

Could you please try the attached patch out?  It doesn't solve the
problem of why the device is making the STALL, but it should allow the
driver to continue to try to read from the device.  From the other
message just posted to the bluetooth-dev list, it looks like the Axis
stack is not initializing something in the Ericsson device properly.

Please let me know if this patch works (or doesn't work) for you.

thanks,

greg k-h

-- 
greg@xxxxxxx.com
diff -Naur -X /home/greg/linux/dontdiff linux-2.4.0-test8-pre1/drivers/usb/bluetooth.c linux-2.4.0-test8-pre1-greg/drivers/usb/bluetooth.c
--- linux-2.4.0-test8-pre1/drivers/usb/bluetooth.c	Fri Aug 25 11:55:19 2000
+++ linux-2.4.0-test8-pre1-greg/drivers/usb/bluetooth.c	Thu Aug 31 10:18:07 2000
@@ -796,17 +796,17 @@
 
 	if (!bluetooth) {
 		dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
-		return;
+		goto exit;
 	}
 
 	if (urb->status) {
 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
-		return;
+		goto exit;
 	}
 
 	if (!count) {
 		dbg(__FUNCTION__ " - zero length read bulk");
-		return;
+		goto exit;
 	}
 
 #ifdef DEBUG
@@ -832,9 +832,7 @@
 	if (bluetooth->bulk_packet_pos + count > ACL_BUFFER_SIZE) {
 		err(__FUNCTION__ " - exceeded ACL_BUFFER_SIZE");
 		bluetooth->bulk_packet_pos = 0;
-		if (usb_submit_urb(urb))
-			dbg(__FUNCTION__ " - failed resubmitting read urb");
-		return;
+		goto exit;
 	}
 
 	memcpy (&bluetooth->bulk_buffer[bluetooth->bulk_packet_pos],
@@ -845,17 +843,13 @@
 	if (bluetooth->bulk_packet_pos >= ACL_HDR_SIZE) {
 		packet_size = CHAR2INT16(bluetooth->bulk_buffer[4],bluetooth->bulk_buffer[3]);
 	} else {
-		if (usb_submit_urb(urb))
-			dbg(__FUNCTION__ " - failed resubmitting read urb");
-		return;
+		goto exit;
 	}
 
 	if (packet_size + ACL_HDR_SIZE < bluetooth->bulk_packet_pos) {
 		err(__FUNCTION__ " - packet was too long");
 		bluetooth->bulk_packet_pos = 0;
-		if (usb_submit_urb(urb))
-			dbg(__FUNCTION__ " - failed resubmitting read urb");
-		return;
+		goto exit;
 	}
 
 	if (packet_size + ACL_HDR_SIZE == bluetooth->bulk_packet_pos) {
@@ -865,6 +859,7 @@
 		bluetooth->bulk_packet_pos = 0;
 	}	
 
+exit:
 	if (usb_submit_urb(urb))
 		dbg(__FUNCTION__ " - failed resubmitting read urb");