59 #define USB_CTL_WAIT 500 //ms
61 #ifndef URB_ASYNC_UNLINK
62 #define URB_ASYNC_UNLINK 0
72 s_nsInterruptUsbIoCompleteRead(
79 s_nsBulkInUsbIoCompleteRead(
86 s_nsBulkOutIoCompleteWrite(
93 s_nsControlInUsbIoCompleteRead(
99 s_nsControlInUsbIoCompleteWrite(
131 usb_sndctrlpipe(pDevice->
usb , 0),
178 pbyBuffer, wLength, s_nsControlInUsbIoCompleteWrite, pDevice);
188 spin_unlock_irq(&pDevice->
lock);
198 KERN_INFO "control send request submission timeout\n");
199 spin_lock_irq(&pDevice->
lock);
204 spin_lock_irq(&pDevice->
lock);
236 pbyBuffer, wLength, s_nsControlInUsbIoCompleteRead, pDevice);
245 spin_unlock_irq(&pDevice->
lock);
255 KERN_INFO "control rcv request submission timeout\n");
256 spin_lock_irq(&pDevice->
lock);
261 spin_lock_irq(&pDevice->
lock);
268 s_nsControlInUsbIoCompleteWrite(
274 pDevice = urb->context;
275 switch (urb->status) {
309 s_nsControlInUsbIoCompleteRead(
315 pDevice = urb->context;
316 switch (urb->status) {
369 usb_rcvbulkpipe(pDevice->
usb, 1),
372 s_nsInterruptUsbIoCompleteRead,
401 s_nsInterruptUsbIoCompleteRead(
423 ntStatus = urb->status;
455 usb_rcvbulkpipe(pDevice->
usb, 1),
458 s_nsInterruptUsbIoCompleteRead,
510 usb_fill_bulk_urb(pUrb,
512 usb_rcvbulkpipe(pDevice->
usb, 2),
513 (
void *) (pRCB->
skb->data),
515 s_nsBulkInUsbIoCompleteRead,
548 s_nsBulkInUsbIoCompleteRead(
555 unsigned long bytesRead;
561 status = urb->status;
562 bytesRead = urb->actual_length;
578 bIndicateReceive =
TRUE;
588 if (bIndicateReceive) {
589 spin_lock(&pDevice->
lock);
592 spin_unlock(&pDevice->
lock);
598 spin_lock(&pDevice->
lock);
600 spin_unlock(&pDevice->
lock);
647 pUrb = pContext->
pUrb;
653 usb_sndbulkpipe(pDevice->
usb, 3),
654 (
void *) &(pContext->
Data[0]),
656 s_nsBulkOutIoCompleteWrite,
702 s_nsBulkOutIoCompleteWrite(
709 unsigned long ulBufLen;
721 ContextType = pContext->
Type;
724 if (!netif_device_present(pDevice->
dev))
731 status = urb->status;
771 if (netif_queue_stopped(pDevice->
dev))
772 netif_wake_queue(pDevice->
dev);