On Wed, Sep 26, 2001 at 12:17:31PM +0530, Praveen wrote:
> Does Ericsson bluetooth ROK 101008 supports usb interface or not..
>
> Problem is, This bluetooth kit is not at all detected as usb slave when
> i connect it to USB host.
>
> Please let me know, if any one aware of this device ?
I have two early engineering samples (ROK101007/2), they need the attached
patch to usb.c to be recognised. But I can't tell about the Bluetooth
funcionality itself...
BTW: Are there any objections to include the patch into the kernel?
--
Georg Acher, [EMAIL PROTECTED]
http://www.in.tum.de/~acher/
"Oh no, not again !" The bowl of petunias
diff -u linux/drivers/usb/usb.c linux.afs/drivers/usb/usb.c
--- linux/drivers/usb/usb.c Tue Aug 7 10:48:27 2001
+++ linux.afs/drivers/usb/usb.c Wed Aug 29 16:55:26 2001
@@ -2169,6 +2169,7 @@
int usb_new_device(struct usb_device *dev)
{
int err;
+ int n,m;
/* USB v1.1 5.5.3 */
/* We read the first 8 bytes from the device descriptor to get to */
@@ -2177,18 +2178,31 @@
dev->epmaxpacketin [0] = 8;
dev->epmaxpacketout[0] = 8;
- err = usb_set_address(dev);
- if (err < 0) {
- err("USB device not accepting new address=%d (error=%d)",
- dev->devnum, err);
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
- dev->devnum = -1;
- return 1;
- }
+ for(m=0;m<2;m++) {
+
+ for(n=0;n<2;n++) {
+ err = usb_set_address(dev);
+ if (err>=0)
+ break;
+ wait_ms(200);
+ }
+
+ if (err < 0) {
+ err("USB device not accepting new address=%d (error=%d)",
+ dev->devnum, err);
+ clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ dev->devnum = -1;
+ return 1;
+ }
- wait_ms(10); /* Let the SET_ADDRESS settle */
+ wait_ms(10); /* Let the SET_ADDRESS settle */
- err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, 8);
+ err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, 8);
+ if (err >= 8)
+ break;
+ wait_ms(100);
+ }
+
if (err < 8) {
if (err < 0)
err("USB device not responding, giving up (error=%d)", err);
@@ -2198,6 +2212,7 @@
dev->devnum = -1;
return 1;
}
+
dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0;
dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0;