Commit 21aa212c authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: clean up s_nsBulkOutIoCompleteWrite.

Remove commented out, white space and camel case.

Camel case changes
pContext -> context
pDevice -> priv
ContextType -> context_type
ulBufLen -> buf_len
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e8152bfb
...@@ -607,11 +607,11 @@ int PIPEnsSendBulkOut(struct vnt_private *pDevice, ...@@ -607,11 +607,11 @@ int PIPEnsSendBulkOut(struct vnt_private *pDevice,
static void s_nsBulkOutIoCompleteWrite(struct urb *urb) static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
{ {
struct vnt_usb_send_context *pContext = struct vnt_usb_send_context *context =
(struct vnt_usb_send_context *)urb->context; (struct vnt_usb_send_context *)urb->context;
struct vnt_private *pDevice = pContext->pDevice; struct vnt_private *priv = context->pDevice;
CONTEXT_TYPE ContextType = pContext->Type; CONTEXT_TYPE context_type = context->Type;
unsigned long ulBufLen = pContext->uBufLen; unsigned long buf_len = context->uBufLen;
int status; int status;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n");
...@@ -623,58 +623,56 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) ...@@ -623,58 +623,56 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
case -ECONNRESET: case -ECONNRESET:
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
pContext->bBoolInUse = false; context->bBoolInUse = false;
return; return;
default: default:
break; break;
} }
if (!netif_device_present(pDevice->dev)) if (!netif_device_present(priv->dev))
return; return;
//
// Perform various IRP, URB, and buffer 'sanity checks'
//
status = urb->status; status = urb->status;
if(status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Write %d bytes\n",(int)ulBufLen); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
pDevice->ulBulkOutBytesWrite += ulBufLen; "Write %d bytes\n", (int)buf_len);
pDevice->ulBulkOutContCRCError = 0; priv->ulBulkOutBytesWrite += buf_len;
priv->ulBulkOutContCRCError = 0;
} else { } else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BULK Out failed %d\n", status); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
pDevice->ulBulkOutError++; "BULK Out failed %d\n", status);
priv->ulBulkOutError++;
} }
// pDevice->ulCheckForHangCount = 0;
// pDevice->pPendingBulkOutContext = NULL;
if ( CONTEXT_DATA_PACKET == ContextType ) { if (CONTEXT_DATA_PACKET == context_type) {
// Indicate to the protocol the status of the sent packet and return if (context->pPacket != NULL) {
// ownership of the packet. dev_kfree_skb_irq(context->pPacket);
if (pContext->pPacket != NULL) { context->pPacket = NULL;
dev_kfree_skb_irq(pContext->pPacket); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
pContext->pPacket = NULL; "tx %d bytes\n", (int)buf_len);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"tx %d bytes\n",(int)ulBufLen);
} }
pDevice->dev->trans_start = jiffies; priv->dev->trans_start = jiffies;
if (status == STATUS_SUCCESS) { if (status == STATUS_SUCCESS) {
pDevice->packetsSent++; priv->packetsSent++;
} } else {
else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send USB error! [%08xh]\n", status); "Send USB error! [%08xh]\n", status);
pDevice->packetsSentDropped++; priv->packetsSentDropped++;
} }
} }
if (pDevice->bLinkPass == true) {
if (netif_queue_stopped(pDevice->dev)) if (priv->bLinkPass == true) {
netif_wake_queue(pDevice->dev); if (netif_queue_stopped(priv->dev))
netif_wake_queue(priv->dev);
} }
pContext->bBoolInUse = false;
context->bBoolInUse = false;
return; return;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment