Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61954
b: refs/heads/master
c: 22bea33
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jul 20, 2007
1 parent 4829042 commit ee7d3b6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 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: 13f9782d8e2e6a20e5fc44dd758d5747fdfd76ab
refs/heads/master: 22bea334c941bcece2ddcc79201de4437803e3a5
25 changes: 15 additions & 10 deletions trunk/drivers/usb/misc/auerswald.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,14 +862,16 @@ static void auerswald_ctrlread_wretcomplete (struct urb * urb)
pauerbuf_t bp = (pauerbuf_t) urb->context;
pauerswald_t cp;
int ret;
int status = urb->status;

dbg ("auerswald_ctrlread_wretcomplete called");
dbg ("complete with status: %d", urb->status);
dbg ("complete with status: %d", status);
cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl)));

/* check if it is possible to advance */
if (!auerswald_status_retry (urb->status) || !cp->usbdev) {
if (!auerswald_status_retry(status) || !cp->usbdev) {
/* reuse the buffer */
err ("control dummy: transmission error %d, can not retry", urb->status);
err ("control dummy: transmission error %d, can not retry", status);
auerbuf_releasebuf (bp);
/* Wake up all processes waiting for a buffer */
wake_up (&cp->bufferwait);
Expand Down Expand Up @@ -902,21 +904,23 @@ static void auerswald_ctrlread_complete (struct urb * urb)
pauerswald_t cp;
pauerscon_t scp;
pauerbuf_t bp = (pauerbuf_t) urb->context;
int status = urb->status;
int ret;

dbg ("auerswald_ctrlread_complete called");

cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl)));

/* check if there is valid data in this urb */
if (urb->status) {
dbg ("complete with non-zero status: %d", urb->status);
if (status) {
dbg ("complete with non-zero status: %d", status);
/* should we do a retry? */
if (!auerswald_status_retry (urb->status)
if (!auerswald_status_retry(status)
|| !cp->usbdev
|| (cp->version < AUV_RETRY)
|| (bp->retries >= AU_RETRIES)) {
/* reuse the buffer */
err ("control read: transmission error %d, can not retry", urb->status);
err ("control read: transmission error %d, can not retry", status);
auerbuf_releasebuf (bp);
/* Wake up all processes waiting for a buffer */
wake_up (&cp->bufferwait);
Expand Down Expand Up @@ -974,23 +978,24 @@ static void auerswald_int_complete (struct urb * urb)
unsigned int channelid;
unsigned int bytecount;
int ret;
int status = urb->status;
pauerbuf_t bp = NULL;
pauerswald_t cp = (pauerswald_t) urb->context;

dbg ("%s called", __FUNCTION__);

switch (urb->status) {
switch (status) {
case 0:
/* success */
break;
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
dbg("%s - urb shutting down with status: %d", __FUNCTION__, status);
return;
default:
dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
dbg("%s - nonzero urb status received: %d", __FUNCTION__, status);
goto exit;
}

Expand Down

0 comments on commit ee7d3b6

Please sign in to comment.