From owner-freebsd-current Sun Jun 9 12:34:21 2002 Delivered-To: freebsd-current@freebsd.org Received: from web13302.mail.yahoo.com (web13302.mail.yahoo.com [216.136.175.38]) by hub.freebsd.org (Postfix) with SMTP id 10A6E37B406 for ; Sun, 9 Jun 2002 12:34:14 -0700 (PDT) Message-ID: <20020609193410.63290.qmail@web13302.mail.yahoo.com> Received: from [207.175.241.198] by web13302.mail.yahoo.com via HTTP; Sun, 09 Jun 2002 12:34:10 PDT Date: Sun, 9 Jun 2002 12:34:10 -0700 (PDT) From: Maksim Yevmenkin Subject: -current (DP1) and USB transfers To: current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1531940720-1023651250=:62906" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --0-1531940720-1023651250=:62906 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hackers, I'm a USB newbie and have a couple stupid questions about USB transfers. System: -current DP1 Laptop: Toshiba Tecra 8100 (docked/undocked) Device: 3COM Bluetooth USB dongle (see attached dump) Device presents three interfaces: Interface 0 - Control, bulk and interrupt transfers Interface 1 - Isochronous transfers Interface 2 - Frimware upgrade Interface 1 has 5 different configurations (they all the same, except wMaxPacketSize). Now, everything is working just fine i can talk to the device send/receive data - no problem. The problem is that as soon as i open isochronous pipe and start incoming isochronous transfer, the isochronous callback gets called over and over again. Both isoc. pipe and isoc. transfer have USBD_NO_SHORT_XFER flag set. I also set configuration #5 for interface 1. The funny part that device says that it got zero bytes from the pipe. It does not affect (or so it seems) the other transfers and everything still works. I also tried ugen driver with the same results. What is up with that? Also, is it safe to assume that USB transfers callbacks are not re-enterable? Here is what i mean: 1) USB transfer callback is called 2) driver starts processing (but does not complete yet) 3) usbd_abort_pipe() called which triggers call to callback again I can only see splusb() calls in the code. Also is it safe to replace interrupt transfers with bulk transfers, given the fact that spec requires 1ms interrupt polling period. thanks, max __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com --0-1531940720-1023651250=:62906 Content-Type: text/plain; name="dump.txt" Content-Description: dump.txt Content-Disposition: inline; filename="dump.txt" uhci0: ---------------------------------------------------------------------------- /dev/ugen0 Opened Product: product 0x00a0 Vendor: 3Com address 3 Dumping all descriptors DEVICE descriptor: bLength=18 bDescriptorType=1 bcdUSB=1.10 bDeviceClass=224 bDeviceSubClass=1 bDeviceProtocol=1 bMaxPacketSize=64 idVendor=0x0506 idProduct=0x00a0 bcdDevice=115 iManufacturer=0 iProduct=0 iSerialNumber=0 bNumConfigurations=1 Current configuration is number 1 CONFIGURATION descriptor index 0: bLength=9 bDescriptorType=2 wTotalLength=193 bNumInterface=3 bConfigurationValue=1 iConfiguration=0 bmAttributes=80 bMaxPower=120 mA INTERFACE descriptor index 0, alt index 0: bLength=9 bDescriptorType=4 bInterfaceNumber=0 bAlternateSetting=0 bNumEndpoints=3 bInterfaceClass=224 bInterfaceSubClass=1 bInterfaceProtocol=1 iInterface=0 ENDPOINT descriptor index 0: bLength=7 bDescriptorType=5 bEndpointAddress=1-in bmAttributes=3 wMaxPacketSize=16 bInterval=1 ENDPOINT descriptor index 1: bLength=7 bDescriptorType=5 bEndpointAddress=2-out bmAttributes=2 wMaxPacketSize=64 bInterval=1 ENDPOINT descriptor index 2: bLength=7 bDescriptorType=5 bEndpointAddress=2-in bmAttributes=2 wMaxPacketSize=64 bInterval=1 INTERFACE descriptor index 1, alt index 0: bLength=9 bDescriptorType=4 bInterfaceNumber=1 bAlternateSetting=0 bNumEndpoints=2 bInterfaceClass=224 bInterfaceSubClass=1 bInterfaceProtocol=1 iInterface=0 ENDPOINT descriptor index 0: bLength=7 bDescriptorType=5 bEndpointAddress=3-out bmAttributes=1 wMaxPacketSize=0 bInterval=1 ENDPOINT descriptor index 1: bLength=7 bDescriptorType=5 bEndpointAddress=3-in bmAttributes=1 wMaxPacketSize=0 bInterval=1 INTERFACE descriptor index 1, alt index 1: bLength=9 bDescriptorType=4 bInterfaceNumber=1 bAlternateSetting=1 bNumEndpoints=2 bInterfaceClass=224 bInterfaceSubClass=1 bInterfaceProtocol=1 iInterface=0 ENDPOINT descriptor index 0: bLength=7 bDescriptorType=5 bEndpointAddress=3-out bmAttributes=1 wMaxPacketSize=9 bInterval=1 ENDPOINT descriptor index 1: bLength=7 bDescriptorType=5 bEndpointAddress=3-in bmAttributes=1 wMaxPacketSize=9 bInterval=1 INTERFACE descriptor index 1, alt index 2: bLength=9 bDescriptorType=4 bInterfaceNumber=1 bAlternateSetting=2 bNumEndpoints=2 bInterfaceClass=224 bInterfaceSubClass=1 bInterfaceProtocol=1 iInterface=0 ENDPOINT descriptor index 0: bLength=7 bDescriptorType=5 bEndpointAddress=3-out bmAttributes=1 wMaxPacketSize=17 bInterval=1 ENDPOINT descriptor index 1: bLength=7 bDescriptorType=5 bEndpointAddress=3-in bmAttributes=1 wMaxPacketSize=17 bInterval=1 INTERFACE descriptor index 1, alt index 3: bLength=9 bDescriptorType=4 bInterfaceNumber=1 bAlternateSetting=3 bNumEndpoints=2 bInterfaceClass=224 bInterfaceSubClass=1 bInterfaceProtocol=1 iInterface=0 ENDPOINT descriptor index 0: bLength=7 bDescriptorType=5 bEndpointAddress=3-out bmAttributes=1 wMaxPacketSize=25 bInterval=1 ENDPOINT descriptor index 1: bLength=7 bDescriptorType=5 bEndpointAddress=3-in bmAttributes=1 wMaxPacketSize=25 bInterval=1 INTERFACE descriptor index 1, alt index 4: bLength=9 bDescriptorType=4 bInterfaceNumber=1 bAlternateSetting=4 bNumEndpoints=2 bInterfaceClass=224 bInterfaceSubClass=1 bInterfaceProtocol=1 iInterface=0 ENDPOINT descriptor index 0: bLength=7 bDescriptorType=5 bEndpointAddress=3-out bmAttributes=1 wMaxPacketSize=33 bInterval=1 ENDPOINT descriptor index 1: bLength=7 bDescriptorType=5 bEndpointAddress=3-in bmAttributes=1 wMaxPacketSize=33 bInterval=1 INTERFACE descriptor index 1, alt index 5: bLength=9 bDescriptorType=4 bInterfaceNumber=1 bAlternateSetting=5 bNumEndpoints=2 bInterfaceClass=224 bInterfaceSubClass=1 bInterfaceProtocol=1 iInterface=0 ENDPOINT descriptor index 0: bLength=7 bDescriptorType=5 bEndpointAddress=3-out bmAttributes=1 wMaxPacketSize=49 bInterval=1 ENDPOINT descriptor index 1: bLength=7 bDescriptorType=5 bEndpointAddress=3-in bmAttributes=1 wMaxPacketSize=49 bInterval=1 INTERFACE descriptor index 2, alt index 0: bLength=9 bDescriptorType=4 bInterfaceNumber=2 bAlternateSetting=0 bNumEndpoints=0 bInterfaceClass=254 bInterfaceSubClass=1 bInterfaceProtocol=0 iInterface=0 --0-1531940720-1023651250=:62906-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message