i expect that the bulk data read on the wire would be the same data in
"buf".  i see different data on the wire than that returned by "buf" 50% of
the time.  

isoc reads seem to be consistent.  and both isoc/bulk writes are correct.  i
only have one "buf".  i've tried making "buf" a static pointer:  static WORD
* buf;  and when ever user wants to do transfers i have to read the "size"
they pass in and do a "kmalloc" for "buf".  after each transaction "buf" is
freed.  but definitely not until transaction is done.  

i even have a print statement right after transaction completes (see below)
and it proves that "buf" is bad.

anyone have any ideas?  snippet of my code is below.

thanks,
-charyll angderson

int usbx_submit_trans(struct usbxDevice *usbxPtr, struct usb_device *dev, 
                        struct _Transaction *trans, WORD *buf)
{
        int i,j,k;
        usbx_show_trans(trans);

        switch(trans->type) {
        case USBX_R_BULK:
                FILL_BULK_URB(usbxPtr->usbx_urb, dev, usb_rcvbulkpipe(dev,
trans->endpoint),
                        buf, trans->size, usbx_urb_complete, usbxPtr);
                break;
        default:
                dbg("invaid trans type!");
                break;
        }
        
        usbx_submit_urb(usbxPtr->usbx_urb);
        interruptible_sleep_on_timeout(&(usbxPtr->wait), trans->timeout);

        if (usbxPtr->usbx_urb->status!=0) {
                err("TIMEOUT awoken %i (%s)
status=0x%x",current->pid,current->comm,usbxPtr->usbx_urb->status); //ca
debug
                usbx_unlink_urb(usbxPtr->usbx_urb);  // remove urb safely
        }

        switch (trans->type) {
        case USBX_R_BULK:
                dbg("usbx_submit_trans:  print buffer read ..
address=0x%lx", (DWORD)&buf);
                for (i=0; i<(trans->size/2); i++) {
                        dbg(" %x ",(WORD)buf[i]);
                }
                break;
        default:
                break;
        }
        
        return usbxPtr->usbx_urb->status;
}

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to