pTxContext = pDevice->apTD[ii];
//de-allocate URBs
if (pTxContext->pUrb) {
- vntwusb_unlink_urb(pTxContext->pUrb);
+ usb_kill_urb(pTxContext->pUrb);
usb_free_urb(pTxContext->pUrb);
}
if (pTxContext)
pRCB = pDevice->apRCB[ii];
//de-allocate URBs
if (pRCB->pUrb) {
- vntwusb_unlink_urb(pRCB->pUrb);
+ usb_kill_urb(pRCB->pUrb);
usb_free_urb(pRCB->pUrb);
}
//de-allocate skb
pDevice->apTD[ii] = pTxContext;
pTxContext->pDevice = (PVOID) pDevice;
//allocate URBs
- pTxContext->pUrb = vntwusb_alloc_urb(0);;
+ pTxContext->pUrb = usb_alloc_urb(0, GFP_ATOMIC);
if (pTxContext->pUrb == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "alloc tx urb failed\n");
goto free_tx;
pDevice->apRCB[ii] = pRCB;
pRCB->pDevice = (PVOID) pDevice;
//allocate URBs
- pRCB->pUrb = vntwusb_alloc_urb(0);
+ pRCB->pUrb = usb_alloc_urb(0, GFP_ATOMIC);
if (pRCB->pUrb == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR" Failed to alloc rx urb\n");
}
- pDevice->pControlURB = vntwusb_alloc_urb(0);
+ pDevice->pControlURB = usb_alloc_urb(0, GFP_ATOMIC);
if (pDevice->pControlURB == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR"Failed to alloc control urb\n");
goto free_rx_tx;
}
- pDevice->pInterruptURB = vntwusb_alloc_urb(0);
+ pDevice->pInterruptURB = usb_alloc_urb(0, GFP_ATOMIC);
if (pDevice->pInterruptURB == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR"Failed to alloc int urb\n");
- vntwusb_unlink_urb(pDevice->pControlURB);
+ usb_kill_urb(pDevice->pControlURB);
usb_free_urb(pDevice->pControlURB);
goto free_rx_tx;
}
pDevice->intBuf.pDataBuf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL);
if (pDevice->intBuf.pDataBuf == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR"Failed to alloc int buf\n");
- vntwusb_unlink_urb(pDevice->pControlURB);
- vntwusb_unlink_urb(pDevice->pInterruptURB);
+ usb_kill_urb(pDevice->pControlURB);
+ usb_kill_urb(pDevice->pInterruptURB);
usb_free_urb(pDevice->pControlURB);
usb_free_urb(pDevice->pInterruptURB);
goto free_rx_tx;
device_free_rx_bufs(pDevice);
device_free_tx_bufs(pDevice);
device_free_int_bufs(pDevice);
- vntwusb_unlink_urb(pDevice->pControlURB);
- vntwusb_unlink_urb(pDevice->pInterruptURB);
+ usb_kill_urb(pDevice->pControlURB);
+ usb_kill_urb(pDevice->pInterruptURB);
usb_free_urb(pDevice->pControlURB);
usb_free_urb(pDevice->pInterruptURB);
device_free_int_bufs(pDevice);
device_free_frag_bufs(pDevice);
- vntwusb_unlink_urb(pDevice->pControlURB);
- vntwusb_unlink_urb(pDevice->pInterruptURB);
+ usb_kill_urb(pDevice->pControlURB);
+ usb_kill_urb(pDevice->pInterruptURB);
usb_free_urb(pDevice->pControlURB);
usb_free_urb(pDevice->pInterruptURB);
usb_sndctrlpipe(pDevice->usb , 0), (char *) &pDevice->sUsbCtlRequest,
pbyBuffer, wLength, s_nsControlInUsbIoCompleteWrite, pDevice);
- if ((ntStatus = vntwusb_submit_urb(pDevice->pControlURB) != 0)) {
+ if ((ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC)) != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control send request submission failed: %d\n", ntStatus);
return STATUS_FAILURE;
}
usb_rcvctrlpipe(pDevice->usb , 0), (char *) &pDevice->sUsbCtlRequest,
pbyBuffer, wLength, s_nsControlInUsbIoCompleteRead, pDevice);
- if ((ntStatus = vntwusb_submit_urb(pDevice->pControlURB) != 0)) {
+ if ((ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC)) != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control request submission failed: %d\n", ntStatus);
}else {
MP_SET_FLAG(pDevice, fMP_CONTROL_READS);
#endif
#endif
- if ((ntStatus = vntwusb_submit_urb(pDevice->pInterruptURB)) != 0) {
+ if ((ntStatus = usb_submit_urb(pDevice->pInterruptURB, GFP_ATOMIC)) != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit int URB failed %d\n", ntStatus);
}
if (pDevice->fKillEventPollingThread != TRUE) {
#if 0 //reserve int URB submit
- if ((ntStatus = vntwusb_submit_urb(urb)) != 0) {
+ if ((ntStatus = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Re-Submit int URB failed %d\n", ntStatus);
}
#else //replace int URB submit by bulk transfer
s_nsInterruptUsbIoCompleteRead,
pDevice);
- if ((ntStatus = vntwusb_submit_urb(pDevice->pInterruptURB)) != 0) {
+ if ((ntStatus = usb_submit_urb(pDevice->pInterruptURB, GFP_ATOMIC)) != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit int URB failed %d\n", ntStatus);
}
s_nsBulkInUsbIoCompleteRead,
pRCB);
- if((ntStatus = vntwusb_submit_urb(pUrb)!=0)){
+ if((ntStatus = usb_submit_urb(pUrb, GFP_ATOMIC)) != 0){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit Rx URB failed %d\n", ntStatus);
return STATUS_FAILURE ;
}
s_nsBulkOutIoCompleteWrite,
pContext);
- if((status = vntwusb_submit_urb(pUrb))!=0)
+ if((status = usb_submit_urb(pUrb, GFP_ATOMIC))!=0)
{
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit Tx URB failed %d\n", status);
return STATUS_FAILURE;