I have a problem when trying to submit a ctrl_urb. The submit_urb
function returns zero (for success?) and the status flag in the urb is
set to -115 (IO in progress). This looks fine, but the callback
function is never called.
The situation is: I'm trying to develop a bluetooth driver for a Motorola
usb card based on the skeleton driver in the kernel tree (2.4.19). There
are a couple of reasons not to use the hci_usb.c or bluetooth.c, though
they serve as inspiration. The main reason not to use any of these two
are, that it's part of a university project and I need a speciel interface
to the driver.
The probe and disconnect functions work fine, so the next step is to send
a simple HCI command to the card, and read the respons. As an intial step,
I want to get the bdaddress from the card, when the associated device file
gets opened.
Sample code:
static int motorola_open (struct inode *inode, struct file *file)
{
.
. /* The stuff from skeleton.c */
.
unsigned char * buff; /* buffer for the hci command */
.
. /* The stuff from skeleton.c */
.
/* HCI command for getting the bd_addr */
buff = kmalloc(3, GFP_KERNEL);
buff[0]=0x09;
buff[1]=0x10;
buff[2]=0;
dev->ctrl_urb = usb_alloc_urb(0);
dev->dr.requesttype = 0x20;
dev->dr.request =0;
dev->dr.value = 0;
dev->dr.index = 0;
dev->dr.length = 3;
if(dev->ctrl_urb!=NULL){
FILL_CONTROL_URB(dev->ctrl_urb,
dev->udev,
usb_sndctrlpipe(dev->udev,0),
(unsigned char*)&dev->dr,
buff,
3,
ctrl_callback,
NULL);
success = usb_submit_urb(dev->ctrl_urb);
}
.
. /* The stuff from skeleton.c */
.
}
The problem is that ctrl_callback is never called. In the motorola_release
function the urb status value is checked, and it's still -115. I'm
running out of ideas of what can be wrong; hardware, the setup packet, the
HCI command or ???
I hope someone can give a clue, so I can continue the work.
Best regards
Jan Jakob Jessen
Aalborg University - Denmark
-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel