Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354297
b: refs/heads/master
c: ae5943d
h: refs/heads/master
i:
  354295: 104248e
v: v3
  • Loading branch information
Malcolm Priestley authored and Greg Kroah-Hartman committed Jan 31, 2013
1 parent cfbe29c commit 9994aeb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d13b0b6d51e78b0107c76d79cf0ef06d9e07650b
refs/heads/master: ae5943de8c8c4438cbac5cda599ff0b88c224468
28 changes: 20 additions & 8 deletions trunk/drivers/staging/vt6656/usbpipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ int PIPEnsControlOut(struct vnt_private *pDevice, u8 byRequest, u16 wValue,
if (pDevice->Flags & fMP_CONTROL_WRITES)
return STATUS_FAILURE;

if (pDevice->Flags & fMP_CONTROL_READS)
return STATUS_FAILURE;

MP_SET_FLAG(pDevice, fMP_CONTROL_WRITES);

pDevice->sUsbCtlRequest.bRequestType = 0x40;
pDevice->sUsbCtlRequest.bRequest = byRequest;
pDevice->sUsbCtlRequest.wValue = cpu_to_le16p(&wValue);
Expand All @@ -140,12 +145,13 @@ int PIPEnsControlOut(struct vnt_private *pDevice, u8 byRequest, u16 wValue,

ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC);
if (ntStatus != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control send request submission failed: %d\n", ntStatus);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"control send request submission failed: %d\n",
ntStatus);
MP_CLEAR_FLAG(pDevice, fMP_CONTROL_WRITES);
return STATUS_FAILURE;
}
else {
MP_SET_FLAG(pDevice, fMP_CONTROL_WRITES);
}

spin_unlock_irq(&pDevice->lock);
for (ii = 0; ii <= USB_CTL_WAIT; ii ++) {

Expand Down Expand Up @@ -179,6 +185,11 @@ int PIPEnsControlIn(struct vnt_private *pDevice, u8 byRequest, u16 wValue,
if (pDevice->Flags & fMP_CONTROL_READS)
return STATUS_FAILURE;

if (pDevice->Flags & fMP_CONTROL_WRITES)
return STATUS_FAILURE;

MP_SET_FLAG(pDevice, fMP_CONTROL_READS);

pDevice->sUsbCtlRequest.bRequestType = 0xC0;
pDevice->sUsbCtlRequest.bRequest = byRequest;
pDevice->sUsbCtlRequest.wValue = cpu_to_le16p(&wValue);
Expand All @@ -192,10 +203,11 @@ int PIPEnsControlIn(struct vnt_private *pDevice, u8 byRequest, u16 wValue,

ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC);
if (ntStatus != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control request submission failed: %d\n", ntStatus);
}else {
MP_SET_FLAG(pDevice, fMP_CONTROL_READS);
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"control request submission failed: %d\n", ntStatus);
MP_CLEAR_FLAG(pDevice, fMP_CONTROL_READS);
return STATUS_FAILURE;
}

spin_unlock_irq(&pDevice->lock);
for (ii = 0; ii <= USB_CTL_WAIT; ii ++) {
Expand Down

0 comments on commit 9994aeb

Please sign in to comment.