Commit e015268d authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

USB: remove traces of urb->status from usbcore

This patch (as981) removes the remaining nontrivial usages of
urb->status from usbcore.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1431d2a4
...@@ -71,6 +71,7 @@ struct async { ...@@ -71,6 +71,7 @@ struct async {
void __user *userbuffer; void __user *userbuffer;
void __user *userurb; void __user *userurb;
struct urb *urb; struct urb *urb;
int status;
u32 secid; u32 secid;
}; };
...@@ -310,9 +311,10 @@ static void async_completed(struct urb *urb) ...@@ -310,9 +311,10 @@ static void async_completed(struct urb *urb)
spin_lock(&ps->lock); spin_lock(&ps->lock);
list_move_tail(&as->asynclist, &ps->async_completed); list_move_tail(&as->asynclist, &ps->async_completed);
spin_unlock(&ps->lock); spin_unlock(&ps->lock);
as->status = urb->status;
if (as->signr) { if (as->signr) {
sinfo.si_signo = as->signr; sinfo.si_signo = as->signr;
sinfo.si_errno = as->urb->status; sinfo.si_errno = as->status;
sinfo.si_code = SI_ASYNCIO; sinfo.si_code = SI_ASYNCIO;
sinfo.si_addr = as->userurb; sinfo.si_addr = as->userurb;
kill_pid_info_as_uid(as->signr, &sinfo, as->pid, as->uid, kill_pid_info_as_uid(as->signr, &sinfo, as->pid, as->uid,
...@@ -1132,7 +1134,7 @@ static int processcompl(struct async *as, void __user * __user *arg) ...@@ -1132,7 +1134,7 @@ static int processcompl(struct async *as, void __user * __user *arg)
if (as->userbuffer) if (as->userbuffer)
if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length)) if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length))
return -EFAULT; return -EFAULT;
if (put_user(urb->status, &userurb->status)) if (put_user(as->status, &userurb->status))
return -EFAULT; return -EFAULT;
if (put_user(urb->actual_length, &userurb->actual_length)) if (put_user(urb->actual_length, &userurb->actual_length))
return -EFAULT; return -EFAULT;
...@@ -1246,7 +1248,7 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) ...@@ -1246,7 +1248,7 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
if (as->userbuffer) if (as->userbuffer)
if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length)) if (copy_to_user(as->userbuffer, urb->transfer_buffer, urb->transfer_buffer_length))
return -EFAULT; return -EFAULT;
if (put_user(urb->status, &userurb->status)) if (put_user(as->status, &userurb->status))
return -EFAULT; return -EFAULT;
if (put_user(urb->actual_length, &userurb->actual_length)) if (put_user(urb->actual_length, &userurb->actual_length))
return -EFAULT; return -EFAULT;
......
...@@ -347,11 +347,11 @@ void usb_kick_khubd(struct usb_device *hdev) ...@@ -347,11 +347,11 @@ void usb_kick_khubd(struct usb_device *hdev)
static void hub_irq(struct urb *urb) static void hub_irq(struct urb *urb)
{ {
struct usb_hub *hub = urb->context; struct usb_hub *hub = urb->context;
int status; int status = urb->status;
int i; int i;
unsigned long bits; unsigned long bits;
switch (urb->status) { switch (status) {
case -ENOENT: /* synchronous unlink */ case -ENOENT: /* synchronous unlink */
case -ECONNRESET: /* async unlink */ case -ECONNRESET: /* async unlink */
case -ESHUTDOWN: /* hardware going away */ case -ESHUTDOWN: /* hardware going away */
...@@ -359,10 +359,10 @@ static void hub_irq(struct urb *urb) ...@@ -359,10 +359,10 @@ static void hub_irq(struct urb *urb)
default: /* presumably an error */ default: /* presumably an error */
/* Cause a hub reset after 10 consecutive errors */ /* Cause a hub reset after 10 consecutive errors */
dev_dbg (hub->intfdev, "transfer --> %d\n", urb->status); dev_dbg (hub->intfdev, "transfer --> %d\n", status);
if ((++hub->nerrors < 10) || hub->error) if ((++hub->nerrors < 10) || hub->error)
goto resubmit; goto resubmit;
hub->error = urb->status; hub->error = status;
/* FALL THROUGH */ /* FALL THROUGH */
/* let khubd handle things */ /* let khubd handle things */
......
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