ChangeSet 1.797.147.1, 2002/12/02 22:54:03-08:00, davem@redhat.com [PATCH] kbd_pt_regs Hey guys, I really want to kill this thing. The only way to do that is to actually pass the pt_regs all the way down from the interrupt source. It would be a three step process: 1) Add pt_regs arg to serio_interrupt and serio->dev->interrupt() Update all serio->dev drivers and serio_interrupt() invokers. I've done this in the patch below. We must handle pt_regs being NULL, f.e. when the event is via a tty ldisc or a timer for which there is no "pt_regs" context to obtain. 2) At the input layer, push 'regs' down via input_event() into the handlers. Patch below does this as well. 3) Final step to complete this, convert USB to pass the pt_regs that the host controller interrupt receives down to the URB callbacks. This itself was also a multistep process: a) pass regs down from generic host controller layer to hcd driver b) pass regs from hcd driver into urb handler EHCI is problematic here, as it does the URB work in a tasklet :( we need to decide whether we can move the normal URB completion back into the hw interrupt handler or not I think it should be done, I'd basically have my thumbs up my butt if I didn't have Alt-SYSRQ-p register dumps available and that is what EHCI+usbkbd is currently. UHCI and OHCI both complete urbs in hw IRQ context so they are just fine. c) update urb handlers to take the regs arg, make hcd drivers pass it on in I was really bored, so this was also done in the patch below :) We get a USB cleanup for free because of this, a lot of people were defining their own ugly typedefs for what should be usb_complete_t so I fixed that up :-) I also caught a lot of usb_fill_*() call sites casting the completion function pointer to usb_complete_t so the compiler wouldn't help us find necessary fixup if we changed the args again :-( I think I got them all, someone bored should grep the tree for usb_complete_t and fixup any remaining spots where it is used in a cast. I tried to enable as many drivers as possible in a test build but it is possible I did miss a few obscure USB configs. So why do I want to kill kbd_pt_regs so badly? Well, first of all I have to walk through all kinds of hoops on sparc64 to update kbd_pt_regs properly on the USB controller interrupt and I've had a few cases where I had trouble tracking down some kernel bug because kbd_pt_regs could easily be inaccurate if another interrupt came in right after the keyboard USB one. Right now, kbd_pt_regs is not updated at all for USB keyboards on x86 rendering SYSRQ register dumps non-existent in such configurations. This forces it to happen, and because the regs are passed in the context in which the URB completes, it will always be accurate (it will even work properly if I have 5 USB keyboards :-) While doing this, I also noticed a bunch of ancient keyboard drivers in 2.5.x under drivers/char that need to be converted or deleted. They were still calling handle_scancode() !!! :-) drivers/tc has few as well. There is also a stray handle_scancode() reference in a include/asm-parisc/keyboard.h comment I tested this on sparc64 with an OHCI attached USB keyboard, and register dumping works fine etc. Here is just the USB bits. diff -Nru a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c --- a/drivers/isdn/hisax/st5481_usb.c Thu Dec 5 15:27:48 2002 +++ b/drivers/isdn/hisax/st5481_usb.c Thu Dec 5 15:27:48 2002 @@ -123,7 +123,7 @@ * Call the user provided completion routine and try * to send the next request. */ -static void usb_ctrl_complete(struct urb *urb) +static void usb_ctrl_complete(struct urb *urb, struct pt_regs *regs) { struct st5481_adapter *adapter = urb->context; struct st5481_ctrl *ctrl = &adapter->ctrl; @@ -176,7 +176,7 @@ * Decode the register values and schedule a private event. * Called at interrupt. */ -static void usb_int_complete(struct urb *urb) +static void usb_int_complete(struct urb *urb, struct pt_regs *regs) { u_char *data = urb->transfer_buffer; u_char irqbyte; diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c --- a/drivers/net/irda/irda-usb.c Thu Dec 5 15:27:48 2002 +++ b/drivers/net/irda/irda-usb.c Thu Dec 5 15:27:48 2002 @@ -107,9 +107,9 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *dev); static int irda_usb_open(struct irda_usb_cb *self); static int irda_usb_close(struct irda_usb_cb *self); -static void speed_bulk_callback(struct urb *urb); -static void write_bulk_callback(struct urb *urb); -static void irda_usb_receive(struct urb *urb); +static void speed_bulk_callback(struct urb *urb, struct pt_regs *regs); +static void write_bulk_callback(struct urb *urb, struct pt_regs *regs); +static void irda_usb_receive(struct urb *urb, struct pt_regs *regs); static int irda_usb_net_init(struct net_device *dev); static int irda_usb_net_open(struct net_device *dev); static int irda_usb_net_close(struct net_device *dev); @@ -284,7 +284,7 @@ * Speed URB callback * Now, we can only get called for the speed URB. */ -static void speed_bulk_callback(struct urb *urb) +static void speed_bulk_callback(struct urb *urb, struct pt_regs *regs) { struct irda_usb_cb *self = urb->context; @@ -486,7 +486,7 @@ /* * Note : this function will be called only for tx_urb... */ -static void write_bulk_callback(struct urb *urb) +static void write_bulk_callback(struct urb *urb, struct pt_regs *regs) { unsigned long flags; struct sk_buff *skb = urb->context; @@ -753,7 +753,7 @@ * Called by the USB subsystem when a frame has been received * */ -static void irda_usb_receive(struct urb *urb) +static void irda_usb_receive(struct urb *urb, struct pt_regs *regs) { struct sk_buff *skb = (struct sk_buff *) urb->context; struct irda_usb_cb *self; diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c --- a/drivers/usb/class/bluetty.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/class/bluetty.c Thu Dec 5 15:27:49 2002 @@ -216,10 +216,10 @@ static int bluetooth_ioctl (struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); static void bluetooth_set_termios (struct tty_struct *tty, struct termios *old); -static void bluetooth_int_callback (struct urb *urb); -static void bluetooth_ctrl_callback (struct urb *urb); -static void bluetooth_read_bulk_callback (struct urb *urb); -static void bluetooth_write_bulk_callback (struct urb *urb); +static void bluetooth_int_callback (struct urb *urb, struct pt_regs *regs); +static void bluetooth_ctrl_callback (struct urb *urb, struct pt_regs *regs); +static void bluetooth_read_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void bluetooth_write_bulk_callback (struct urb *urb, struct pt_regs *regs); static int usb_bluetooth_probe (struct usb_interface *intf, const struct usb_device_id *id); @@ -760,7 +760,7 @@ *****************************************************************************/ -static void bluetooth_int_callback (struct urb *urb) +static void bluetooth_int_callback (struct urb *urb, struct pt_regs *regs) { struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__); unsigned char *data = urb->transfer_buffer; @@ -871,7 +871,7 @@ } -static void bluetooth_ctrl_callback (struct urb *urb) +static void bluetooth_ctrl_callback (struct urb *urb, struct pt_regs *regs) { struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__); @@ -889,7 +889,7 @@ } -static void bluetooth_read_bulk_callback (struct urb *urb) +static void bluetooth_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__); unsigned char *data = urb->transfer_buffer; @@ -1006,7 +1006,7 @@ } -static void bluetooth_write_bulk_callback (struct urb *urb) +static void bluetooth_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__); diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/class/cdc-acm.c Thu Dec 5 15:27:48 2002 @@ -181,7 +181,7 @@ * Interrupt handler for various ACM control events */ -static void acm_ctrl_irq(struct urb *urb) +static void acm_ctrl_irq(struct urb *urb, struct pt_regs *regs) { struct acm *acm = urb->context; struct usb_ctrlrequest *dr = urb->transfer_buffer; @@ -245,7 +245,7 @@ __FUNCTION__, status); } -static void acm_read_bulk(struct urb *urb) +static void acm_read_bulk(struct urb *urb, struct pt_regs *regs) { struct acm *acm = urb->context; struct tty_struct *tty = acm->tty; @@ -282,7 +282,7 @@ dbg("failed resubmitting read urb"); } -static void acm_write_bulk(struct urb *urb) +static void acm_write_bulk(struct urb *urb, struct pt_regs *regs) { struct acm *acm = (struct acm *)urb->context; @@ -424,7 +424,7 @@ if (!ACM_READY(acm)) return; acm->throttle = 0; if (acm->readurb->status != -EINPROGRESS) - acm_read_bulk(acm->readurb); + acm_read_bulk(acm->readurb, NULL); } static void acm_tty_break_ctl(struct tty_struct *tty, int state) diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c --- a/drivers/usb/class/usb-midi.c Thu Dec 5 15:27:47 2002 +++ b/drivers/usb/class/usb-midi.c Thu Dec 5 15:27:48 2002 @@ -308,7 +308,7 @@ /* ------------------------------------------------------------------------- */ -static void usb_write_callback(struct urb *urb) +static void usb_write_callback(struct urb *urb, struct pt_regs *regs) { struct midi_out_endpoint *ep = (struct midi_out_endpoint *)urb->context; @@ -331,7 +331,7 @@ d = ep->usbdev; pipe = usb_sndbulkpipe(d, ep->endpoint); usb_fill_bulk_urb( ep->urb, d, pipe, (unsigned char*)buf, len, - (usb_complete_t)usb_write_callback, ep ); + usb_write_callback, ep ); status = usb_submit_urb(ep->urb, GFP_KERNEL); @@ -364,7 +364,7 @@ * **/ -static void usb_bulk_read(struct urb *urb) +static void usb_bulk_read(struct urb *urb, struct pt_regs *regs) { struct midi_in_endpoint *ep = (struct midi_in_endpoint *)(urb->context); unsigned char *data = urb->transfer_buffer; @@ -1048,7 +1048,7 @@ usb_fill_bulk_urb( ep->urb, d, usb_rcvbulkpipe(d, endPoint), (unsigned char *)ep->recvBuf, bufSize, - (usb_complete_t)usb_bulk_read, ep ); + usb_bulk_read, ep ); /* ep->bufRdPtr = 0; */ /* ep->bufWrPtr = 0; */ diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/class/usblp.c Thu Dec 5 15:27:48 2002 @@ -260,7 +260,7 @@ * URB callback. */ -static void usblp_bulk_read(struct urb *urb) +static void usblp_bulk_read(struct urb *urb, struct pt_regs *regs) { struct usblp *usblp = urb->context; @@ -274,7 +274,7 @@ wake_up_interruptible(&usblp->wait); } -static void usblp_bulk_write(struct urb *urb) +static void usblp_bulk_write(struct urb *urb, struct pt_regs *regs) { struct usblp *usblp = urb->context; diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c --- a/drivers/usb/core/devio.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/core/devio.c Thu Dec 5 15:27:48 2002 @@ -255,7 +255,7 @@ return NULL; } -static void async_completed(struct urb *urb) +static void async_completed(struct urb *urb, struct pt_regs *regs) { struct async *as = (struct async *)urb->context; struct dev_state *ps = as->ps; diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/core/hcd.c Thu Dec 5 15:27:48 2002 @@ -433,7 +433,7 @@ } /* any errors get returned through the urb completion */ - usb_hcd_giveback_urb (hcd, urb); + usb_hcd_giveback_urb (hcd, urb, NULL); return 0; } @@ -494,7 +494,7 @@ urb->actual_length = length; urb->status = 0; urb->hcpriv = 0; - urb->complete (urb); + urb->complete (urb, NULL); return; } } else @@ -509,7 +509,7 @@ urb->hcpriv = 0; spin_unlock_irqrestore (&urb->lock, flags); - usb_hcd_giveback_urb (hcd, urb); + usb_hcd_giveback_urb (hcd, urb, NULL); } } @@ -544,7 +544,7 @@ spin_unlock_irqrestore (&hcd_data_lock, flags); /* we rely on RH callback code not unlinking its URB! */ - usb_hcd_giveback_urb (hcd, urb); + usb_hcd_giveback_urb (hcd, urb, NULL); } /*-------------------------------------------------------------------------*/ @@ -1059,11 +1059,11 @@ struct completion done; /* original urb data */ - void (*complete)(struct urb *); + usb_complete_t complete; void *context; }; -static void unlink_complete (struct urb *urb) +static void unlink_complete (struct urb *urb, struct pt_regs *regs) { struct completion_splice *splice; @@ -1072,7 +1072,7 @@ /* issue original completion call */ urb->complete = splice->complete; urb->context = splice->context; - urb->complete (urb); + urb->complete (urb, regs); /* then let the synchronous unlink call complete */ complete (&splice->done); @@ -1272,6 +1272,7 @@ * usb_hcd_giveback_urb - return URB from HCD to device driver * @hcd: host controller returning the URB * @urb: urb being returned to the USB device driver. + * @regs: pt_regs, passed down to the URB completion handler * Context: in_interrupt() * * This hands the URB from HCD to its USB device driver, using its @@ -1280,7 +1281,7 @@ * the device driver won't cause problems if it frees, modifies, * or resubmits this URB. */ -void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb) +void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs) { urb_unlink (urb); @@ -1309,7 +1310,7 @@ } /* pass ownership to the completion handler */ - urb->complete (urb); + urb->complete (urb, regs); usb_put_urb (urb); } EXPORT_SYMBOL (usb_hcd_giveback_urb); @@ -1320,7 +1321,7 @@ * usb_hcd_irq - hook IRQs to HCD framework (bus glue) * @irq: the IRQ being raised * @__hcd: pointer to the HCD whose IRQ is beinng signaled - * @r: saved hardware registers (not passed to HCD) + * @r: saved hardware registers * * When registering a USB bus through the HCD framework code, use this * to handle interrupts. The PCI glue layer does so automatically; only @@ -1334,7 +1335,7 @@ if (unlikely (hcd->state == USB_STATE_HALT)) /* irq sharing? */ return; - hcd->driver->irq (hcd); + hcd->driver->irq (hcd, r); if (hcd->state != start && hcd->state == USB_STATE_HALT) usb_hc_died (hcd); } diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h --- a/drivers/usb/core/hcd.h Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/core/hcd.h Thu Dec 5 15:27:48 2002 @@ -169,11 +169,13 @@ /* each driver provides one of these, and hardware init support */ +struct pt_regs; + struct hc_driver { const char *description; /* "ehci-hcd" etc */ /* irq handler */ - void (*irq) (struct usb_hcd *hcd); + void (*irq) (struct usb_hcd *hcd, struct pt_regs *regs); int flags; #define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ @@ -216,7 +218,7 @@ char *buf, u16 wLength); }; -extern void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb); +extern void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs); extern void usb_bus_init (struct usb_bus *bus); extern void usb_rh_status_dequeue (struct usb_hcd *hcd, struct urb *urb); diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/core/hub.c Thu Dec 5 15:27:48 2002 @@ -115,7 +115,7 @@ } /* completion function, fires on port status changes and various faults */ -static void hub_irq(struct urb *urb) +static void hub_irq(struct urb *urb, struct pt_regs *regs) { struct usb_hub *hub = (struct usb_hub *)urb->context; unsigned long flags; diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c --- a/drivers/usb/core/message.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/core/message.c Thu Dec 5 15:27:48 2002 @@ -16,7 +16,7 @@ int done; }; -static void usb_api_blocking_completion(struct urb *urb) +static void usb_api_blocking_completion(struct urb *urb, struct pt_regs *regs) { struct usb_api_data *awd = (struct usb_api_data *)urb->context; @@ -210,7 +210,7 @@ io->dev = 0; } -static void sg_complete (struct urb *urb) +static void sg_complete (struct urb *urb, struct pt_regs *regs) { struct usb_sg_request *io = (struct usb_sg_request *) urb->context; unsigned long flags; diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c --- a/drivers/usb/host/ehci-hcd.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/host/ehci-hcd.c Thu Dec 5 15:27:48 2002 @@ -250,7 +250,7 @@ static void ehci_tasklet (unsigned long param); -static void ehci_irq (struct usb_hcd *hcd); +static void ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs); static void ehci_watchdog (unsigned long param) { @@ -259,7 +259,7 @@ spin_lock_irqsave (&ehci->lock, flags); /* guard against lost IAA, which wedges everything */ - ehci_irq (&ehci->hcd); + ehci_irq (&ehci->hcd, NULL); /* unlink the last qh after it's idled a while */ if (ehci->async_idle) { start_unlink_async (ehci, ehci->async); @@ -616,7 +616,7 @@ /*-------------------------------------------------------------------------*/ -static void ehci_irq (struct usb_hcd *hcd) +static void ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs) { struct ehci_hcd *ehci = hcd_to_ehci (hcd); u32 status = readl (&ehci->regs->status); diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c --- a/drivers/usb/host/ehci-q.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/host/ehci-q.c Thu Dec 5 15:27:49 2002 @@ -190,7 +190,7 @@ /* complete() can reenter this HCD */ spin_unlock (&ehci->lock); - usb_hcd_giveback_urb (&ehci->hcd, urb); + usb_hcd_giveback_urb (&ehci->hcd, urb, NULL); spin_lock (&ehci->lock); } diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c --- a/drivers/usb/host/ehci-sched.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/host/ehci-sched.c Thu Dec 5 15:27:48 2002 @@ -922,7 +922,7 @@ /* complete() can reenter this HCD */ spin_unlock (&ehci->lock); - usb_hcd_giveback_urb (&ehci->hcd, urb); + usb_hcd_giveback_urb (&ehci->hcd, urb, NULL); spin_lock (&ehci->lock); /* defer stopping schedule; completion can submit */ diff -Nru a/drivers/usb/host/hc_simple.c b/drivers/usb/host/hc_simple.c --- a/drivers/usb/host/hc_simple.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/host/hc_simple.c Thu Dec 5 15:27:49 2002 @@ -106,7 +106,7 @@ urb->dev = urb->hcpriv = NULL; if (urb->complete) { - urb->complete (urb); /* call complete */ + urb->complete (urb, NULL); /* call complete */ } if (resubmit) { @@ -254,7 +254,7 @@ if (urb->complete && (urb->transfer_flags & URB_ASYNC_UNLINK)) { urb->status = -ENOENT; urb->actual_length = 0; - urb->complete (urb); + urb->complete (urb, NULL); urb->status = 0; } else { urb->status = -ENOENT; diff -Nru a/drivers/usb/host/hc_sl811_rh.c b/drivers/usb/host/hc_sl811_rh.c --- a/drivers/usb/host/hc_sl811_rh.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/host/hc_sl811_rh.c Thu Dec 5 15:27:48 2002 @@ -193,7 +193,7 @@ usb_pipeout (urb->pipe)); if (urb->complete) { - urb->complete (urb); + urb->complete (urb, NULL); } } } @@ -506,7 +506,7 @@ urb->hcpriv = NULL; urb->dev = NULL; if (urb->complete) { - urb->complete (urb); + urb->complete (urb, NULL); } return 0; @@ -537,7 +537,7 @@ if (urb->transfer_flags & URB_ASYNC_UNLINK) { urb->status = -ECONNRESET; if (urb->complete) { - urb->complete (urb); + urb->complete (urb, NULL); } } else urb->status = -ENOENT; diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/host/ohci-hcd.c Thu Dec 5 15:27:48 2002 @@ -295,7 +295,7 @@ * with HC dead, we won't respect hc queue pointers * any more ... just clean up every urb's memory. */ - finish_urb (ohci, urb); + finish_urb (ohci, urb, NULL); } return 0; } @@ -531,7 +531,7 @@ /* an interrupt happens */ -static void ohci_irq (struct usb_hcd *hcd) +static void ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); struct ohci_regs *regs = ohci->regs; @@ -570,7 +570,7 @@ if (ints & OHCI_INTR_WDH) { writel (OHCI_INTR_WDH, ®s->intrdisable); - dl_done_list (ohci, dl_reverse_done_list (ohci)); + dl_done_list (ohci, dl_reverse_done_list (ohci), ptregs); writel (OHCI_INTR_WDH, ®s->intrenable); } @@ -581,7 +581,7 @@ */ spin_lock (&ohci->lock); if (ohci->ed_rm_list) - finish_unlinks (ohci, le16_to_cpu (ohci->hcca->frame_no)); + finish_unlinks (ohci, le16_to_cpu (ohci->hcca->frame_no), ptregs); if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list) writel (OHCI_INTR_SF, ®s->intrdisable); spin_unlock (&ohci->lock); diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c --- a/drivers/usb/host/ohci-pci.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/host/ohci-pci.c Thu Dec 5 15:27:48 2002 @@ -271,7 +271,7 @@ enable_irq (hcd->pdev->irq); #endif if (ohci->hcca->done_head) - dl_done_list (ohci, dl_reverse_done_list (ohci)); + dl_done_list (ohci, dl_reverse_done_list (ohci), NULL); writel (OHCI_INTR_WDH, &ohci->regs->intrenable); /* assume there are TDs on the bulk and control lists */ diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c --- a/drivers/usb/host/ohci-q.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/host/ohci-q.c Thu Dec 5 15:27:49 2002 @@ -32,7 +32,7 @@ * It's completely gone from HC data structures. * PRECONDITION: no locks held (Giveback can call into HCD.) */ -static void finish_urb (struct ohci_hcd *ohci, struct urb *urb) +static void finish_urb (struct ohci_hcd *ohci, struct urb *urb, struct pt_regs *regs) { unsigned long flags; @@ -59,7 +59,7 @@ #ifdef OHCI_VERBOSE_DEBUG urb_print (urb, "RET", usb_pipeout (urb->pipe)); #endif - usb_hcd_giveback_urb (&ohci->hcd, urb); + usb_hcd_giveback_urb (&ohci->hcd, urb, regs); } @@ -848,7 +848,7 @@ #define tick_before(t1,t2) ((((s16)(t1))-((s16)(t2))) < 0) /* there are some urbs/eds to unlink; called in_irq(), with HCD locked */ -static void finish_unlinks (struct ohci_hcd *ohci, u16 tick) +static void finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs) { struct ed *ed, **last; @@ -913,7 +913,7 @@ if (urb_priv->td_cnt == urb_priv->length) { modified = completed = 1; spin_unlock (&ohci->lock); - finish_urb (ohci, urb); + finish_urb (ohci, urb, regs); spin_lock (&ohci->lock); } } @@ -976,7 +976,7 @@ * path is finish_unlinks(), which unlinks URBs using ed_rm_list, instead of * scanning the (re-reversed) donelist as this does. */ -static void dl_done_list (struct ohci_hcd *ohci, struct td *td) +static void dl_done_list (struct ohci_hcd *ohci, struct td *td, struct pt_regs *regs) { unsigned long flags; @@ -994,7 +994,7 @@ /* If all this urb's TDs are done, call complete() */ if (urb_priv->td_cnt == urb_priv->length) { spin_unlock_irqrestore (&ohci->lock, flags); - finish_urb (ohci, urb); + finish_urb (ohci, urb, regs); spin_lock_irqsave (&ohci->lock, flags); } diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/host/uhci-hcd.c Thu Dec 5 15:27:49 2002 @@ -90,7 +90,6 @@ static int uhci_get_current_frame_number(struct uhci_hcd *uhci); static int uhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb); static void uhci_unlink_generic(struct uhci_hcd *uhci, struct urb *urb); -static void uhci_finish_urb(struct usb_hcd *hcd, struct urb *urb); static int ports_active(struct uhci_hcd *uhci); static void suspend_hc(struct uhci_hcd *uhci); @@ -1802,7 +1801,7 @@ spin_unlock_irqrestore(&uhci->qh_remove_list_lock, flags); } -static void uhci_finish_urb(struct usb_hcd *hcd, struct urb *urb) +static void uhci_finish_urb(struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs) { struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv; struct uhci_hcd *uhci = hcd_to_uhci(hcd); @@ -1817,10 +1816,10 @@ urb->status = status; spin_unlock_irqrestore(&urb->lock, flags); - usb_hcd_giveback_urb(hcd, urb); + usb_hcd_giveback_urb(hcd, urb, regs); } -static void uhci_finish_completion(struct usb_hcd *hcd) +static void uhci_finish_completion(struct usb_hcd *hcd, struct pt_regs *regs) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); struct list_head *tmp, *head; @@ -1836,7 +1835,7 @@ list_del_init(&urbp->complete_list); spin_unlock_irqrestore(&uhci->complete_list_lock, flags); - uhci_finish_urb(hcd, urb); + uhci_finish_urb(hcd, urb, regs); spin_lock_irqsave(&uhci->complete_list_lock, flags); head = &uhci->complete_list; @@ -1868,7 +1867,7 @@ spin_unlock_irqrestore(&uhci->urb_remove_list_lock, flags); } -static void uhci_irq(struct usb_hcd *hcd) +static void uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); unsigned int io_addr = uhci->io_addr; @@ -1919,7 +1918,7 @@ } spin_unlock(&uhci->urb_list_lock); - uhci_finish_completion(hcd); + uhci_finish_completion(hcd, regs); } static void reset_hc(struct uhci_hcd *uhci) diff -Nru a/drivers/usb/image/hpusbscsi.c b/drivers/usb/image/hpusbscsi.c --- a/drivers/usb/image/hpusbscsi.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/image/hpusbscsi.c Thu Dec 5 15:27:49 2002 @@ -275,7 +275,7 @@ static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback) { struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]); - usb_urb_callback usb_callback; + usb_complete_t usb_callback; int res; /* we don't answer for anything but our single device on any faked host controller */ @@ -382,7 +382,7 @@ hpusbscsi->state = HP_STATE_FREE; } -static void control_interrupt_callback (struct urb *u) +static void control_interrupt_callback (struct urb *u, struct pt_regs *regs) { struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; u8 scsi_state; @@ -435,7 +435,7 @@ } } -static void simple_command_callback(struct urb *u) +static void simple_command_callback(struct urb *u, struct pt_regs *regs) { struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; if (unlikely(u->status<0)) { @@ -454,11 +454,11 @@ } } -static void scatter_gather_callback(struct urb *u) +static void scatter_gather_callback(struct urb *u, struct pt_regs *regs) { struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; struct scatterlist *sg = hpusbscsi->srb->buffer; - usb_urb_callback callback; + usb_complete_t callback; int res; DEBUG("Going through scatter/gather\n"); @@ -494,7 +494,7 @@ TRACE_STATE; } -static void simple_done (struct urb *u) +static void simple_done (struct urb *u, struct pt_regs *regs) { struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; @@ -521,7 +521,7 @@ } } -static void simple_payload_callback (struct urb *u) +static void simple_payload_callback (struct urb *u, struct pt_regs *regs) { struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; int res; @@ -553,7 +553,7 @@ } } -static void request_sense_callback (struct urb *u) +static void request_sense_callback (struct urb *u, struct pt_regs *regs) { struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; diff -Nru a/drivers/usb/image/hpusbscsi.h b/drivers/usb/image/hpusbscsi.h --- a/drivers/usb/image/hpusbscsi.h Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/image/hpusbscsi.h Thu Dec 5 15:27:48 2002 @@ -6,7 +6,6 @@ /* A big thanks to Jose for untiring testing */ -typedef void (*usb_urb_callback) (struct urb *); typedef void (*scsi_callback)(Scsi_Cmnd *); #define SENSE_COMMAND_SIZE 6 @@ -54,12 +53,12 @@ #define DIRECTION_IS_IN(x) ((scsi_command_direction[x>>3] >> (x & 7)) & 1) static int hpusbscsi_scsi_detect (struct SHT * sht); -static void simple_command_callback(struct urb *u); -static void scatter_gather_callback(struct urb *u); -static void simple_payload_callback (struct urb *u); -static void request_sense_callback (struct urb *u); -static void control_interrupt_callback (struct urb *u); -static void simple_done (struct urb *u); +static void simple_command_callback(struct urb *u, struct pt_regs *regs); +static void scatter_gather_callback(struct urb *u, struct pt_regs *regs); +static void simple_payload_callback (struct urb *u, struct pt_regs *regs); +static void request_sense_callback (struct urb *u, struct pt_regs *regs); +static void control_interrupt_callback (struct urb *u, struct pt_regs *regs); +static void simple_done (struct urb *u, struct pt_regs *regs); static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback); static int hpusbscsi_scsi_host_reset (Scsi_Cmnd *srb); static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb); diff -Nru a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c --- a/drivers/usb/image/mdc800.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/image/mdc800.c Thu Dec 5 15:27:48 2002 @@ -248,7 +248,7 @@ /* * USB IRQ Handler for InputLine */ -static void mdc800_usb_irq (struct urb *urb) +static void mdc800_usb_irq (struct urb *urb, struct pt_regs *res) { int data_received=0, wake_up; unsigned char* b=urb->transfer_buffer; @@ -351,7 +351,7 @@ /* * The write_urb callback function */ -static void mdc800_usb_write_notify (struct urb *urb) +static void mdc800_usb_write_notify (struct urb *urb, struct pt_regs *res) { struct mdc800_data* mdc800=urb->context; @@ -371,7 +371,7 @@ /* * The download_urb callback function */ -static void mdc800_usb_download_notify (struct urb *urb) +static void mdc800_usb_download_notify (struct urb *urb, struct pt_regs *res) { struct mdc800_data* mdc800=urb->context; diff -Nru a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c --- a/drivers/usb/image/microtek.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/image/microtek.c Thu Dec 5 15:27:49 2002 @@ -470,7 +470,7 @@ int mts_scsi_queuecommand (Scsi_Cmnd *srb, mts_scsi_cmnd_callback callback ); static void mts_transfer_cleanup( struct urb *transfer ); -static void mts_do_sg(struct urb * transfer); +static void mts_do_sg(struct urb * transfer, struct pt_regs *regs); inline static @@ -478,7 +478,7 @@ int pipe, void* data, unsigned length, - mts_usb_urb_callback callback ) + usb_complete_t callback ) /* Interrupt context! */ /* Holding transfer->context->lock! */ @@ -518,7 +518,7 @@ } -static void mts_transfer_done( struct urb *transfer ) +static void mts_transfer_done( struct urb *transfer, struct pt_regs *regs ) { MTS_INT_INIT(); @@ -544,7 +544,7 @@ mts_transfer_done ); } -static void mts_data_done( struct urb* transfer ) +static void mts_data_done( struct urb* transfer, struct pt_regs *regs ) /* Interrupt context! */ { MTS_INT_INIT(); @@ -561,7 +561,7 @@ } -static void mts_command_done( struct urb *transfer ) +static void mts_command_done( struct urb *transfer, struct pt_regs *regs ) /* Interrupt context! */ { MTS_INT_INIT(); @@ -602,7 +602,7 @@ return; } -static void mts_do_sg (struct urb* transfer) +static void mts_do_sg (struct urb* transfer, struct pt_regs *regs) { struct scatterlist * sg; MTS_INT_INIT(); diff -Nru a/drivers/usb/image/microtek.h b/drivers/usb/image/microtek.h --- a/drivers/usb/image/microtek.h Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/image/microtek.h Thu Dec 5 15:27:48 2002 @@ -9,7 +9,6 @@ */ typedef void (*mts_scsi_cmnd_callback)(Scsi_Cmnd *); -typedef void (*mts_usb_urb_callback) (struct urb *); struct mts_transfer_context diff -Nru a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c --- a/drivers/usb/image/scanner.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/image/scanner.c Thu Dec 5 15:27:48 2002 @@ -354,7 +354,7 @@ #include "scanner.h" static void -irq_scanner(struct urb *urb) +irq_scanner(struct urb *urb, struct pt_regs *regs) { /* diff -Nru a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c --- a/drivers/usb/input/aiptek.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/input/aiptek.c Thu Dec 5 15:27:49 2002 @@ -104,7 +104,7 @@ int y_max; int pressure_min; int pressure_max; - void (*irq) (struct urb * urb); + usb_complete_t irq; unsigned long evbit; unsigned long absbit; unsigned long relbit; @@ -125,7 +125,7 @@ }; static void -aiptek_irq(struct urb *urb) +aiptek_irq(struct urb *urb, struct pt_regs *regs) { struct aiptek *aiptek = urb->context; unsigned char *data = aiptek->data; diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c --- a/drivers/usb/input/hid-core.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/input/hid-core.c Thu Dec 5 15:27:48 2002 @@ -898,7 +898,7 @@ * Input interrupt completion handler. */ -static void hid_irq_in(struct urb *urb) +static void hid_irq_in(struct urb *urb, struct pt_regs *regs) { struct hid_device *hid = urb->context; int status; @@ -1090,7 +1090,7 @@ * Output interrupt completion handler. */ -static void hid_irq_out(struct urb *urb) +static void hid_irq_out(struct urb *urb, struct pt_regs *regs) { struct hid_device *hid = urb->context; unsigned long flags; @@ -1119,7 +1119,7 @@ * Control pipe completion handler. */ -static void hid_ctrl(struct urb *urb) +static void hid_ctrl(struct urb *urb, struct pt_regs *regs) { struct hid_device *hid = urb->context; unsigned long flags; diff -Nru a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c --- a/drivers/usb/input/pid.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/input/pid.c Thu Dec 5 15:27:49 2002 @@ -46,7 +46,7 @@ (hid_pid)->effects[(i)].owner == current->pid)) /* Called when a transfer is completed */ -static void hid_pid_ctrl_out(struct urb *u) +static void hid_pid_ctrl_out(struct urb *u, struct pt_regs *regs) { #ifdef DEBUG printk("hid_pid_ctrl_out - Transfer Completed\n"); diff -Nru a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c --- a/drivers/usb/input/powermate.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/input/powermate.c Thu Dec 5 15:27:48 2002 @@ -72,10 +72,10 @@ static char pm_name_powermate[] = "Griffin PowerMate"; static char pm_name_soundknob[] = "Griffin SoundKnob"; -static void powermate_config_complete(struct urb *urb); /* forward declararation of callback */ +static void powermate_config_complete(struct urb *urb, struct pt_regs *regs); /* Callback for data arriving from the PowerMate over the USB interrupt pipe */ -static void powermate_irq(struct urb *urb) +static void powermate_irq(struct urb *urb, struct pt_regs *regs) { struct powermate_device *pm = urb->context; int retval; @@ -182,7 +182,7 @@ } /* Called when our asynchronous control message completes. We may need to issue another immediately */ -static void powermate_config_complete(struct urb *urb) +static void powermate_config_complete(struct urb *urb, struct pt_regs *regs) { struct powermate_device *pm = urb->context; diff -Nru a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c --- a/drivers/usb/input/usbkbd.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/input/usbkbd.c Thu Dec 5 15:27:49 2002 @@ -82,7 +82,7 @@ dma_addr_t leds_dma; }; -static void usb_kbd_irq(struct urb *urb) +static void usb_kbd_irq(struct urb *urb, struct pt_regs *regs) { struct usb_kbd *kbd = urb->context; int i; @@ -156,7 +156,7 @@ return 0; } -static void usb_kbd_led(struct urb *urb) +static void usb_kbd_led(struct urb *urb, struct pt_regs *regs) { struct usb_kbd *kbd = urb->context; diff -Nru a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c --- a/drivers/usb/input/usbmouse.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/input/usbmouse.c Thu Dec 5 15:27:49 2002 @@ -57,7 +57,7 @@ dma_addr_t data_dma; }; -static void usb_mouse_irq(struct urb *urb) +static void usb_mouse_irq(struct urb *urb, struct pt_regs *regs) { struct usb_mouse *mouse = urb->context; signed char *data = mouse->data; diff -Nru a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c --- a/drivers/usb/input/wacom.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/input/wacom.c Thu Dec 5 15:27:48 2002 @@ -86,7 +86,7 @@ int pressure_max; int distance_max; int type; - void (*irq)(struct urb *urb); + usb_complete_t irq; }; struct wacom { @@ -102,7 +102,7 @@ char phys[32]; }; -static void wacom_pl_irq(struct urb *urb) +static void wacom_pl_irq(struct urb *urb, struct pt_regs *regs) { struct wacom *wacom = urb->context; unsigned char *data = wacom->data; @@ -157,7 +157,7 @@ __FUNCTION__, retval); } -static void wacom_penpartner_irq(struct urb *urb) +static void wacom_penpartner_irq(struct urb *urb, struct pt_regs *regs) { struct wacom *wacom = urb->context; unsigned char *data = wacom->data; @@ -194,7 +194,7 @@ __FUNCTION__, retval); } -static void wacom_graphire_irq(struct urb *urb) +static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) { struct wacom *wacom = urb->context; unsigned char *data = wacom->data; @@ -267,7 +267,7 @@ __FUNCTION__, retval); } -static void wacom_intuos_irq(struct urb *urb) +static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) { struct wacom *wacom = urb->context; unsigned char *data = wacom->data; diff -Nru a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c --- a/drivers/usb/input/xpad.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/input/xpad.c Thu Dec 5 15:27:48 2002 @@ -163,7 +163,7 @@ input_sync(dev); } -static void xpad_irq_in(struct urb *urb) +static void xpad_irq_in(struct urb *urb, struct pt_regs *regs) { struct usb_xpad *xpad = urb->context; int retval; diff -Nru a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c --- a/drivers/usb/media/se401.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/media/se401.c Thu Dec 5 15:27:48 2002 @@ -425,7 +425,7 @@ } /* irq handler for snapshot button */ -static void se401_button_irq(struct urb *urb) +static void se401_button_irq(struct urb *urb, struct pt_regs *regs) { struct usb_se401 *se401 = urb->context; int status; @@ -461,7 +461,7 @@ __FUNCTION__, status); } -static void se401_video_irq(struct urb *urb) +static void se401_video_irq(struct urb *urb, struct pt_regs *regs) { struct usb_se401 *se401 = urb->context; int length = urb->actual_length; diff -Nru a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c --- a/drivers/usb/media/stv680.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/media/stv680.c Thu Dec 5 15:27:48 2002 @@ -673,7 +673,7 @@ return 0; } -static void stv680_video_irq (struct urb *urb) +static void stv680_video_irq (struct urb *urb, struct pt_regs *regs) { struct usb_stv *stv680 = urb->context; int length = urb->actual_length; diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c --- a/drivers/usb/misc/auerswald.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/misc/auerswald.c Thu Dec 5 15:27:48 2002 @@ -287,7 +287,7 @@ /*-------------------------------------------------------------------*/ /* Forwards */ -static void auerswald_ctrlread_complete (struct urb * urb); +static void auerswald_ctrlread_complete (struct urb * urb, struct pt_regs *regs); static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp); extern struct usb_driver auerswald_driver; @@ -297,7 +297,7 @@ /* -------------------------- */ /* completion function for chained urbs */ -static void auerchain_complete (struct urb * urb) +static void auerchain_complete (struct urb * urb, struct pt_regs *regs) { unsigned long flags; int result; @@ -316,7 +316,7 @@ NOTE: this function may lead to more urbs submitted into the chain. (no chain lock at calling complete()!) acp->active != NULL is protecting us against recursion.*/ - urb->complete (urb); + urb->complete (urb, regs); /* detach element from chain data structure */ spin_lock_irqsave (&acp->lock, flags); @@ -351,7 +351,7 @@ urb->status = result; dbg("auerchain_complete: usb_submit_urb with error code %d", result); /* and do error handling via *this* completion function (recursive) */ - auerchain_complete( urb); + auerchain_complete( urb, NULL); } } else { /* simple return without submitting a new urb. @@ -428,7 +428,7 @@ urb->status = result; dbg("auerchain_submit_urb: usb_submit_urb with error code %d", result); /* and do error handling via completion function */ - auerchain_complete( urb); + auerchain_complete( urb, NULL); } } @@ -468,7 +468,7 @@ spin_unlock_irqrestore (&acp->lock, flags); dbg ("unlink waiting urb"); urb->status = -ENOENT; - urb->complete (urb); + urb->complete (urb, NULL); return 0; } } @@ -525,7 +525,7 @@ spin_unlock_irqrestore (&acp->lock, flags); dbg ("unlink waiting urb"); urbp->status = -ENOENT; - urbp->complete (urbp); + urbp->complete (urbp, NULL); spin_lock_irqsave (&acp->lock, flags); } spin_unlock_irqrestore (&acp->lock, flags); @@ -612,7 +612,7 @@ /* completion handler for synchronous chained URBs */ -static void auerchain_blocking_completion (struct urb *urb) +static void auerchain_blocking_completion (struct urb *urb, struct pt_regs *regs) { pauerchain_chs_t pchs = (pauerchain_chs_t)urb->context; pchs->done = 1; @@ -718,7 +718,7 @@ dr->wLength = cpu_to_le16 (size); usb_fill_control_urb (urb, dev, pipe, (unsigned char*)dr, data, size, /* build urb */ - (usb_complete_t)auerchain_blocking_completion,0); + auerchain_blocking_completion,0); ret = auerchain_start_wait_urb (acp, urb, timeout, &length); usb_free_urb (urb); @@ -881,7 +881,7 @@ } /* Completion of asynchronous write block */ -static void auerchar_ctrlwrite_complete (struct urb * urb) +static void auerchar_ctrlwrite_complete (struct urb * urb, struct pt_regs *regs) { pauerbuf_t bp = (pauerbuf_t) urb->context; pauerswald_t cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl))); @@ -894,7 +894,7 @@ } /* Completion handler for dummy retry packet */ -static void auerswald_ctrlread_wretcomplete (struct urb * urb) +static void auerswald_ctrlread_wretcomplete (struct urb * urb, struct pt_regs *regs) { pauerbuf_t bp = (pauerbuf_t) urb->context; pauerswald_t cp; @@ -921,19 +921,19 @@ /* bp->dr->index = channel id; remains */ usb_fill_control_urb (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0), (unsigned char*)bp->dr, bp->bufp, le16_to_cpu (bp->dr->wLength), - (usb_complete_t)auerswald_ctrlread_complete,bp); + auerswald_ctrlread_complete,bp); /* submit the control msg as next paket */ ret = auerchain_submit_urb_list (&cp->controlchain, bp->urbp, 1); if (ret) { dbg ("auerswald_ctrlread_complete: nonzero result of auerchain_submit_urb_list %d", ret); bp->urbp->status = ret; - auerswald_ctrlread_complete (bp->urbp); + auerswald_ctrlread_complete (bp->urbp, NULL); } } /* completion handler for receiving of control messages */ -static void auerswald_ctrlread_complete (struct urb * urb) +static void auerswald_ctrlread_complete (struct urb * urb, struct pt_regs *regs) { unsigned int serviceid; pauerswald_t cp; @@ -969,14 +969,14 @@ bp->dr->wLength = cpu_to_le16 (32); /* >= 8 bytes */ usb_fill_control_urb (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0), (unsigned char*)bp->dr, bp->bufp, 32, - (usb_complete_t)auerswald_ctrlread_wretcomplete,bp); + auerswald_ctrlread_wretcomplete,bp); /* submit the control msg as next paket */ ret = auerchain_submit_urb_list (&cp->controlchain, bp->urbp, 1); if (ret) { dbg ("auerswald_ctrlread_complete: nonzero result of auerchain_submit_urb_list %d", ret); bp->urbp->status = ret; - auerswald_ctrlread_wretcomplete (bp->urbp); + auerswald_ctrlread_wretcomplete (bp->urbp, regs); } return; } @@ -1005,7 +1005,7 @@ messages from the USB device. */ /* int completion handler. */ -static void auerswald_int_complete (struct urb * urb) +static void auerswald_int_complete (struct urb * urb, struct pt_regs *regs) { unsigned long flags; unsigned int channelid; @@ -1097,14 +1097,14 @@ bp->dr->wLength = cpu_to_le16 (bytecount); usb_fill_control_urb (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0), (unsigned char*)bp->dr, bp->bufp, bytecount, - (usb_complete_t)auerswald_ctrlread_complete,bp); + auerswald_ctrlread_complete,bp); /* submit the control msg */ ret = auerchain_submit_urb (&cp->controlchain, bp->urbp); if (ret) { dbg ("auerswald_int_complete: nonzero result of auerchain_submit_urb %d", ret); bp->urbp->status = ret; - auerswald_ctrlread_complete( bp->urbp); + auerswald_ctrlread_complete( bp->urbp, NULL); /* here applies the same problem as above: device locking! */ } exit: diff -Nru a/drivers/usb/misc/brlvger.c b/drivers/usb/misc/brlvger.c --- a/drivers/usb/misc/brlvger.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/misc/brlvger.c Thu Dec 5 15:27:48 2002 @@ -118,7 +118,7 @@ unsigned cmd, unsigned long arg); static unsigned brlvger_poll(struct file *file, poll_table *wait); static loff_t brlvger_llseek(struct file * file, loff_t offset, int orig); -static void intr_callback(struct urb *urb); +static void intr_callback(struct urb *urb, struct pt_regs *regs); struct brlvger_priv; static int brlvger_get_hw_version(struct brlvger_priv *priv, unsigned char *verbuf); @@ -842,7 +842,7 @@ } static void -intr_callback(struct urb *urb) +intr_callback(struct urb *urb, struct pt_regs *regs) { struct brlvger_priv *priv = urb->context; int intr_idx, read_idx; diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c --- a/drivers/usb/misc/speedtouch.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/misc/speedtouch.c Thu Dec 5 15:27:49 2002 @@ -570,7 +570,7 @@ struct atm_vcc *vcc; }; -static void udsl_usb_send_data_complete (struct urb *urb) +static void udsl_usb_send_data_complete (struct urb *urb, struct pt_regs *regs) { struct udsl_usb_send_data_context *ctx = (struct udsl_usb_send_data_context *) urb->context; struct udsl_instance_data *instance = ctx->instance; @@ -596,7 +596,7 @@ instance->usb_dev, usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT), (unsigned char *) ctx->skb->data, - ctx->skb->len, (usb_complete_t) udsl_usb_send_data_complete, ctx); + ctx->skb->len, udsl_usb_send_data_complete, ctx); err = usb_submit_urb (urb, GFP_KERNEL); @@ -678,7 +678,7 @@ usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT), (unsigned char *) skb->data, skb->len, - (usb_complete_t) udsl_usb_send_data_complete, &(instance->send_ctx[i]) + udsl_usb_send_data_complete, &(instance->send_ctx[i]) ); err = usb_submit_urb (urb, GFP_KERNEL); @@ -691,7 +691,7 @@ } /********* receive *******/ -void udsl_usb_data_receive (struct urb *urb) +void udsl_usb_data_receive (struct urb *urb, struct pt_regs *regs) { struct udsl_data_ctx *ctx; struct udsl_instance_data *instance; @@ -746,7 +746,7 @@ instance->usb_dev, usb_rcvbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_IN), (unsigned char *) ctx->skb->data, - UDSL_RECEIVE_BUFFER_SIZE, (usb_complete_t) udsl_usb_data_receive, ctx); + UDSL_RECEIVE_BUFFER_SIZE, udsl_usb_data_receive, ctx); usb_submit_urb (urb, GFP_KERNEL); return; }; @@ -795,7 +795,7 @@ usb_rcvbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_IN), (unsigned char *) ctx->skb->data, UDSL_RECEIVE_BUFFER_SIZE, - (usb_complete_t) udsl_usb_data_receive, ctx); + udsl_usb_data_receive, ctx); ctx->instance = instance; diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c --- a/drivers/usb/misc/usbtest.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/misc/usbtest.c Thu Dec 5 15:27:49 2002 @@ -85,7 +85,7 @@ * them with non-zero test data (or test for it) when appropriate. */ -static void simple_callback (struct urb *urb) +static void simple_callback (struct urb *urb, struct pt_regs *regs) { complete ((struct completion *) urb->context); } @@ -550,7 +550,7 @@ /*-------------------------------------------------------------------------*/ -static void unlink1_callback (struct urb *urb) +static void unlink1_callback (struct urb *urb, struct pt_regs *regs) { int status = urb->status; diff -Nru a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c --- a/drivers/usb/net/catc.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/net/catc.c Thu Dec 5 15:27:48 2002 @@ -221,7 +221,7 @@ * Receive routines. */ -static void catc_rx_done(struct urb *urb) +static void catc_rx_done(struct urb *urb, struct pt_regs *regs) { struct catc *catc = urb->context; u8 *pkt_start = urb->transfer_buffer; @@ -287,7 +287,7 @@ } } -static void catc_irq_done(struct urb *urb) +static void catc_irq_done(struct urb *urb, struct pt_regs *regs) { struct catc *catc = urb->context; u8 *data = urb->transfer_buffer; @@ -374,7 +374,7 @@ catc->netdev->trans_start = jiffies; } -static void catc_tx_done(struct urb *urb) +static void catc_tx_done(struct urb *urb, struct pt_regs *regs) { struct catc *catc = urb->context; unsigned long flags; @@ -486,7 +486,7 @@ err("submit(ctrl_urb) status %d", status); } -static void catc_ctrl_done(struct urb *urb) +static void catc_ctrl_done(struct urb *urb, struct pt_regs *regs) { struct catc *catc = urb->context; struct ctrl_queue *q; diff -Nru a/drivers/usb/net/cdc-ether.c b/drivers/usb/net/cdc-ether.c --- a/drivers/usb/net/cdc-ether.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/net/cdc-ether.c Thu Dec 5 15:27:48 2002 @@ -52,7 +52,7 @@ // Callback routines from USB device ///////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -static void read_bulk_callback( struct urb *urb ) +static void read_bulk_callback( struct urb *urb, struct pt_regs *regs ) { ether_dev_t *ether_dev = urb->context; struct net_device *net; @@ -140,7 +140,7 @@ ether_dev->flags &= ~CDC_ETHER_RX_BUSY; } -static void write_bulk_callback( struct urb *urb ) +static void write_bulk_callback( struct urb *urb, struct pt_regs *regs ) { ether_dev_t *ether_dev = urb->context; diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c --- a/drivers/usb/net/kaweth.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/net/kaweth.c Thu Dec 5 15:27:49 2002 @@ -462,13 +462,13 @@ return result; } -static void kaweth_usb_receive(struct urb *); +static void kaweth_usb_receive(struct urb *, struct pt_regs *regs); static int kaweth_resubmit_rx_urb(struct kaweth_device *, int); /**************************************************************** int_callback *****************************************************************/ -static void int_callback(struct urb *u) +static void int_callback(struct urb *u, struct pt_regs *regs) { struct kaweth_device *kaweth = u->context; int act_state, status; @@ -538,7 +538,7 @@ /**************************************************************** * kaweth_usb_receive ****************************************************************/ -static void kaweth_usb_receive(struct urb *urb) +static void kaweth_usb_receive(struct urb *urb, struct pt_regs *regs) { struct kaweth_device *kaweth = urb->context; struct net_device *net = kaweth->net; @@ -699,7 +699,7 @@ /**************************************************************** * kaweth_usb_transmit_complete ****************************************************************/ -static void kaweth_usb_transmit_complete(struct urb *urb) +static void kaweth_usb_transmit_complete(struct urb *urb, struct pt_regs *regs) { struct kaweth_device *kaweth = urb->context; struct sk_buff *skb = kaweth->tx_skb; @@ -1135,7 +1135,7 @@ /*-------------------------------------------------------------------* * completion handler for compatibility wrappers (sync control/bulk) * *-------------------------------------------------------------------*/ -static void usb_api_blocking_completion(struct urb *urb) +static void usb_api_blocking_completion(struct urb *urb, struct pt_regs *regs) { struct usb_api_data *awd = (struct usb_api_data *)urb->context; @@ -1208,7 +1208,7 @@ return -ENOMEM; usb_fill_control_urb(urb, usb_dev, pipe, (unsigned char*)cmd, data, - len, (usb_complete_t)usb_api_blocking_completion,0); + len, usb_api_blocking_completion,0); retv = usb_start_wait_urb(urb, timeout, &length); if (retv < 0) { diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c --- a/drivers/usb/net/pegasus.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/net/pegasus.c Thu Dec 5 15:27:49 2002 @@ -87,7 +87,7 @@ static int update_eth_regs_async(pegasus_t *); /* Aargh!!! I _really_ hate such tweaks */ -static void ctrl_callback(struct urb *urb) +static void ctrl_callback(struct urb *urb, struct pt_regs *regs) { pegasus_t *pegasus = urb->context; @@ -524,7 +524,7 @@ return NULL; } -static void read_bulk_callback(struct urb *urb) +static void read_bulk_callback(struct urb *urb, struct pt_regs *regs) { pegasus_t *pegasus = urb->context; struct net_device *net; @@ -644,7 +644,7 @@ } } -static void write_bulk_callback(struct urb *urb) +static void write_bulk_callback(struct urb *urb, struct pt_regs *regs) { pegasus_t *pegasus = urb->context; @@ -661,7 +661,7 @@ netif_wake_queue(pegasus->net); } -static void intr_callback(struct urb *urb) +static void intr_callback(struct urb *urb, struct pt_regs *regs) { pegasus_t *pegasus = urb->context; struct net_device *net; @@ -1092,7 +1092,7 @@ } pegasus->flags |= ETH_REGS_CHANGE; - ctrl_callback(pegasus->ctrl_urb); + ctrl_callback(pegasus->ctrl_urb, NULL); netif_wake_queue(net); } diff -Nru a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c --- a/drivers/usb/net/rtl8150.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/net/rtl8150.c Thu Dec 5 15:27:48 2002 @@ -143,7 +143,7 @@ indx, 0, data, size, HZ / 2); } -static void ctrl_callback(struct urb *urb) +static void ctrl_callback(struct urb *urb, struct pt_regs *regs) { rtl8150_t *dev; @@ -336,7 +336,7 @@ usb_unlink_urb(dev->ctrl_urb); } -static void read_bulk_callback(struct urb *urb) +static void read_bulk_callback(struct urb *urb, struct pt_regs *regs) { rtl8150_t *dev; unsigned pkt_len, res; @@ -435,7 +435,7 @@ tasklet_schedule(&dev->tl); } -static void write_bulk_callback(struct urb *urb) +static void write_bulk_callback(struct urb *urb, struct pt_regs *regs) { rtl8150_t *dev; @@ -451,7 +451,7 @@ netif_wake_queue(dev->netdev); } -void intr_callback(struct urb *urb) +void intr_callback(struct urb *urb, struct pt_regs *regs) { rtl8150_t *dev; int status; diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/net/usbnet.c Thu Dec 5 15:27:48 2002 @@ -445,7 +445,7 @@ return retval; } -static void gl_interrupt_complete (struct urb *urb) +static void gl_interrupt_complete (struct urb *urb, struct pt_regs *regs) { int status = urb->status; @@ -1437,7 +1437,7 @@ /*-------------------------------------------------------------------------*/ -static void rx_complete (struct urb *urb); +static void rx_complete (struct urb *urb, struct pt_regs *regs); static void rx_submit (struct usbnet *dev, struct urb *urb, int flags) { @@ -1549,7 +1549,7 @@ /*-------------------------------------------------------------------------*/ -static void rx_complete (struct urb *urb) +static void rx_complete (struct urb *urb, struct pt_regs *regs) { struct sk_buff *skb = (struct sk_buff *) urb->context; struct skb_data *entry = (struct skb_data *) skb->cb; @@ -1874,7 +1874,7 @@ /*-------------------------------------------------------------------------*/ -static void tx_complete (struct urb *urb) +static void tx_complete (struct urb *urb, struct pt_regs *regs) { struct sk_buff *skb = (struct sk_buff *) urb->context; struct skb_data *entry = (struct skb_data *) skb->cb; diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c --- a/drivers/usb/serial/belkin_sa.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/belkin_sa.c Thu Dec 5 15:27:48 2002 @@ -97,7 +97,7 @@ static void belkin_sa_shutdown (struct usb_serial *serial); static int belkin_sa_open (struct usb_serial_port *port, struct file *filp); static void belkin_sa_close (struct usb_serial_port *port, struct file *filp); -static void belkin_sa_read_int_callback (struct urb *urb); +static void belkin_sa_read_int_callback (struct urb *urb, struct pt_regs *regs); static void belkin_sa_set_termios (struct usb_serial_port *port, struct termios * old); static int belkin_sa_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); static void belkin_sa_break_ctl (struct usb_serial_port *port, int break_state ); @@ -252,7 +252,7 @@ } /* belkin_sa_close */ -static void belkin_sa_read_int_callback (struct urb *urb) +static void belkin_sa_read_int_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct belkin_sa_private *priv; diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c --- a/drivers/usb/serial/cyberjack.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/serial/cyberjack.c Thu Dec 5 15:27:49 2002 @@ -62,9 +62,9 @@ static void cyberjack_close (struct usb_serial_port *port, struct file *filp); static int cyberjack_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); -static void cyberjack_read_int_callback( struct urb *urb ); -static void cyberjack_read_bulk_callback (struct urb *urb); -static void cyberjack_write_bulk_callback (struct urb *urb); +static void cyberjack_read_int_callback (struct urb *urb, struct pt_regs *regs); +static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void cyberjack_write_bulk_callback (struct urb *urb, struct pt_regs *regs); static struct usb_device_id id_table [] = { { USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) }, @@ -276,7 +276,7 @@ return (count); } -static void cyberjack_read_int_callback( struct urb *urb ) +static void cyberjack_read_int_callback( struct urb *urb, struct pt_regs *regs ) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct cyberjack_private *priv = (struct cyberjack_private *)port->private; @@ -330,7 +330,7 @@ } } -static void cyberjack_read_bulk_callback (struct urb *urb) +static void cyberjack_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct cyberjack_private *priv = (struct cyberjack_private *)port->private; @@ -385,7 +385,7 @@ } } -static void cyberjack_write_bulk_callback (struct urb *urb) +static void cyberjack_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct cyberjack_private *priv = (struct cyberjack_private *)port->private; diff -Nru a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c --- a/drivers/usb/serial/digi_acceleport.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/digi_acceleport.c Thu Dec 5 15:27:48 2002 @@ -462,7 +462,7 @@ unsigned int cmd, unsigned long arg ); static int digi_write( struct usb_serial_port *port, int from_user, const unsigned char *buf, int count ); -static void digi_write_bulk_callback( struct urb *urb ); +static void digi_write_bulk_callback( struct urb *urb, struct pt_regs *regs ); static int digi_write_room( struct usb_serial_port *port ); static int digi_chars_in_buffer( struct usb_serial_port *port ); static int digi_open( struct usb_serial_port *port, struct file *filp ); @@ -470,7 +470,7 @@ static int digi_startup_device( struct usb_serial *serial ); static int digi_startup( struct usb_serial *serial ); static void digi_shutdown( struct usb_serial *serial ); -static void digi_read_bulk_callback( struct urb *urb ); +static void digi_read_bulk_callback( struct urb *urb, struct pt_regs *regs ); static int digi_read_inb_callback( struct urb *urb ); static int digi_read_oob_callback( struct urb *urb ); @@ -1347,7 +1347,7 @@ } -static void digi_write_bulk_callback( struct urb *urb ) +static void digi_write_bulk_callback( struct urb *urb, struct pt_regs *regs ) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; @@ -1766,7 +1766,7 @@ } -static void digi_read_bulk_callback( struct urb *urb ) +static void digi_read_bulk_callback( struct urb *urb, struct pt_regs *regs ) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c --- a/drivers/usb/serial/empeg.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/serial/empeg.c Thu Dec 5 15:27:49 2002 @@ -100,8 +100,8 @@ unsigned int cmd, unsigned long arg); static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios); -static void empeg_write_bulk_callback (struct urb *urb); -static void empeg_read_bulk_callback (struct urb *urb); +static void empeg_write_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs); static struct usb_device_id id_table [] = { { USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) }, @@ -348,7 +348,7 @@ } -static void empeg_write_bulk_callback (struct urb *urb) +static void empeg_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; @@ -366,7 +366,7 @@ } -static void empeg_read_bulk_callback (struct urb *urb) +static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c --- a/drivers/usb/serial/ftdi_sio.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/serial/ftdi_sio.c Thu Dec 5 15:27:49 2002 @@ -170,8 +170,8 @@ static void ftdi_sio_close (struct usb_serial_port *port, struct file *filp); static int ftdi_sio_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); static int ftdi_sio_write_room (struct usb_serial_port *port); -static void ftdi_sio_write_bulk_callback (struct urb *urb); -static void ftdi_sio_read_bulk_callback (struct urb *urb); +static void ftdi_sio_write_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void ftdi_sio_read_bulk_callback (struct urb *urb, struct pt_regs *regs); static void ftdi_sio_set_termios (struct usb_serial_port *port, struct termios * old); static int ftdi_sio_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); static void ftdi_sio_break_ctl (struct usb_serial_port *port, int break_state ); @@ -464,7 +464,7 @@ return (count - data_offset); } /* ftdi_sio_write */ -static void ftdi_sio_write_bulk_callback (struct urb *urb) +static void ftdi_sio_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial; @@ -504,7 +504,7 @@ } /* ftdi_sio_write_room */ -static void ftdi_sio_read_bulk_callback (struct urb *urb) +static void ftdi_sio_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { /* ftdi_sio_serial_buld_callback */ struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial; diff -Nru a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c --- a/drivers/usb/serial/generic.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/generic.c Thu Dec 5 15:27:48 2002 @@ -218,7 +218,7 @@ return (chars); } -void usb_serial_generic_read_bulk_callback (struct urb *urb) +void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); @@ -268,7 +268,7 @@ err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); } -void usb_serial_generic_write_bulk_callback (struct urb *urb) +void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c --- a/drivers/usb/serial/io_edgeport.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/io_edgeport.c Thu Dec 5 15:27:48 2002 @@ -435,10 +435,10 @@ /* local function prototypes */ /* function prototypes for all URB callbacks */ -static void edge_interrupt_callback (struct urb *urb); -static void edge_bulk_in_callback (struct urb *urb); -static void edge_bulk_out_data_callback (struct urb *urb); -static void edge_bulk_out_cmd_callback (struct urb *urb); +static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs); +static void edge_bulk_in_callback (struct urb *urb, struct pt_regs *regs); +static void edge_bulk_out_data_callback (struct urb *urb, struct pt_regs *regs); +static void edge_bulk_out_cmd_callback (struct urb *urb, struct pt_regs *regs); /* function prototypes for the usbserial callbacks */ static int edge_open (struct usb_serial_port *port, struct file *filp); @@ -753,7 +753,7 @@ * this is the callback function for when we have received data on the * interrupt endpoint. *****************************************************************************/ -static void edge_interrupt_callback (struct urb *urb) +static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs) { struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; struct edgeport_port *edge_port; @@ -850,7 +850,7 @@ * this is the callback function for when we have received data on the * bulk in endpoint. *****************************************************************************/ -static void edge_bulk_in_callback (struct urb *urb) +static void edge_bulk_in_callback (struct urb *urb, struct pt_regs *regs) { struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; unsigned char *data = urb->transfer_buffer; @@ -901,7 +901,7 @@ * this is the callback function for when we have finished sending serial data * on the bulk out endpoint. *****************************************************************************/ -static void edge_bulk_out_data_callback (struct urb *urb) +static void edge_bulk_out_data_callback (struct urb *urb, struct pt_regs *regs) { struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; struct tty_struct *tty; @@ -941,7 +941,7 @@ * this is the callback function for when we have finished sending a command * on the bulk out endpoint. *****************************************************************************/ -static void edge_bulk_out_cmd_callback (struct urb *urb) +static void edge_bulk_out_cmd_callback (struct urb *urb, struct pt_regs *regs) { struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; struct tty_struct *tty; diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c --- a/drivers/usb/serial/io_ti.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/serial/io_ti.c Thu Dec 5 15:27:49 2002 @@ -1614,7 +1614,7 @@ } -static void edge_interrupt_callback (struct urb *urb) +static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs) { struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; struct usb_serial_port *port; @@ -1713,7 +1713,7 @@ __FUNCTION__, status); } -static void edge_bulk_in_callback (struct urb *urb) +static void edge_bulk_in_callback (struct urb *urb, struct pt_regs *regs) { struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; unsigned char *data = urb->transfer_buffer; @@ -1781,7 +1781,7 @@ __FUNCTION__, status); } -static void edge_bulk_out_callback (struct urb *urb) +static void edge_bulk_out_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); diff -Nru a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c --- a/drivers/usb/serial/ipaq.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/serial/ipaq.c Thu Dec 5 15:27:49 2002 @@ -84,8 +84,8 @@ static int ipaq_write_bulk(struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); static void ipaq_write_gather(struct usb_serial_port *port); -static void ipaq_read_bulk_callback (struct urb *urb); -static void ipaq_write_bulk_callback(struct urb *urb); +static void ipaq_read_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void ipaq_write_bulk_callback(struct urb *urb, struct pt_regs *regs); static int ipaq_write_room(struct usb_serial_port *port); static int ipaq_chars_in_buffer(struct usb_serial_port *port); static void ipaq_destroy_lists(struct usb_serial_port *port); @@ -277,7 +277,7 @@ /* info ("Bytes In = %d Bytes Out = %d", bytes_in, bytes_out); */ } -static void ipaq_read_bulk_callback(struct urb *urb) +static void ipaq_read_bulk_callback(struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); @@ -445,7 +445,7 @@ return; } -static void ipaq_write_bulk_callback(struct urb *urb) +static void ipaq_write_bulk_callback(struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct ipaq_private *priv = (struct ipaq_private *)port->private; diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c --- a/drivers/usb/serial/ir-usb.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/ir-usb.c Thu Dec 5 15:27:48 2002 @@ -111,8 +111,8 @@ static int ir_open (struct usb_serial_port *port, struct file *filep); static void ir_close (struct usb_serial_port *port, struct file *filep); static int ir_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); -static void ir_write_bulk_callback (struct urb *urb); -static void ir_read_bulk_callback (struct urb *urb); +static void ir_write_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs); static void ir_set_termios (struct usb_serial_port *port, struct termios *old_termios); static u8 ir_baud = 0; @@ -406,7 +406,7 @@ return result; } -static void ir_write_bulk_callback (struct urb *urb) +static void ir_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; @@ -429,7 +429,7 @@ schedule_work(&port->work); } -static void ir_read_bulk_callback (struct urb *urb) +static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c --- a/drivers/usb/serial/keyspan.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/keyspan.c Thu Dec 5 15:27:48 2002 @@ -383,7 +383,7 @@ return count - left; } -static void usa26_indat_callback(struct urb *urb) +static void usa26_indat_callback(struct urb *urb, struct pt_regs *regs) { int i, err; int endpoint; @@ -438,7 +438,7 @@ } /* Outdat handling is common for usa26, usa28 and usa49 messages */ -static void usa2x_outdat_callback(struct urb *urb) +static void usa2x_outdat_callback(struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port; struct keyspan_port_private *p_priv; @@ -451,13 +451,13 @@ schedule_work(&port->work); } -static void usa26_inack_callback(struct urb *urb) +static void usa26_inack_callback(struct urb *urb, struct pt_regs *regs) { dbg ("%s", __FUNCTION__); } -static void usa26_outcont_callback(struct urb *urb) +static void usa26_outcont_callback(struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port; struct keyspan_port_private *p_priv; @@ -471,7 +471,7 @@ } } -static void usa26_instat_callback(struct urb *urb) +static void usa26_instat_callback(struct urb *urb, struct pt_regs *regs) { unsigned char *data = urb->transfer_buffer; struct keyspan_usa26_portStatusMessage *msg; @@ -533,14 +533,14 @@ exit: ; } -static void usa26_glocont_callback(struct urb *urb) +static void usa26_glocont_callback(struct urb *urb, struct pt_regs *regs) { dbg ("%s", __FUNCTION__); } -static void usa28_indat_callback(struct urb *urb) +static void usa28_indat_callback(struct urb *urb, struct pt_regs *regs) { int i, err; struct usb_serial_port *port; @@ -588,12 +588,12 @@ } while (urb->status != -EINPROGRESS); } -static void usa28_inack_callback(struct urb *urb) +static void usa28_inack_callback(struct urb *urb, struct pt_regs *regs) { dbg ("%s", __FUNCTION__); } -static void usa28_outcont_callback(struct urb *urb) +static void usa28_outcont_callback(struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port; struct keyspan_port_private *p_priv; @@ -607,7 +607,7 @@ } } -static void usa28_instat_callback(struct urb *urb) +static void usa28_instat_callback(struct urb *urb, struct pt_regs *regs) { int err; unsigned char *data = urb->transfer_buffer; @@ -668,13 +668,13 @@ exit: ; } -static void usa28_glocont_callback(struct urb *urb) +static void usa28_glocont_callback(struct urb *urb, struct pt_regs *regs) { dbg ("%s", __FUNCTION__); } -static void usa49_glocont_callback(struct urb *urb) +static void usa49_glocont_callback(struct urb *urb, struct pt_regs *regs) { struct usb_serial *serial; struct usb_serial_port *port; @@ -698,7 +698,7 @@ /* This is actually called glostat in the Keyspan doco */ -static void usa49_instat_callback(struct urb *urb) +static void usa49_instat_callback(struct urb *urb, struct pt_regs *regs) { int err; unsigned char *data = urb->transfer_buffer; @@ -761,12 +761,12 @@ exit: ; } -static void usa49_inack_callback(struct urb *urb) +static void usa49_inack_callback(struct urb *urb, struct pt_regs *regs) { dbg ("%s", __FUNCTION__); } -static void usa49_indat_callback(struct urb *urb) +static void usa49_indat_callback(struct urb *urb, struct pt_regs *regs) { int i, err; int endpoint; @@ -819,7 +819,7 @@ } /* not used, usa-49 doesn't have per-port control endpoints */ -static void usa49_outcont_callback(struct urb *urb) +static void usa49_outcont_callback(struct urb *urb, struct pt_regs *regs) { dbg ("%s", __FUNCTION__); } @@ -1070,7 +1070,7 @@ /* Helper functions used by keyspan_setup_urbs */ static struct urb *keyspan_setup_urb (struct usb_serial *serial, int endpoint, int dir, void *ctx, char *buf, int len, - void (*callback)(struct urb *)) + void (*callback)(struct urb *, struct pt_regs *regs)) { struct urb *urb; @@ -1093,12 +1093,12 @@ } static struct callbacks { - void (*instat_callback)(struct urb *); - void (*glocont_callback)(struct urb *); - void (*indat_callback)(struct urb *); - void (*outdat_callback)(struct urb *); - void (*inack_callback)(struct urb *); - void (*outcont_callback)(struct urb *); + void (*instat_callback)(struct urb *, struct pt_regs *regs); + void (*glocont_callback)(struct urb *, struct pt_regs *regs); + void (*indat_callback)(struct urb *, struct pt_regs *regs); + void (*outdat_callback)(struct urb *, struct pt_regs *regs); + void (*inack_callback)(struct urb *, struct pt_regs *regs); + void (*outcont_callback)(struct urb *, struct pt_regs *regs); } keyspan_callbacks[] = { { /* msg_usa26 callbacks */ diff -Nru a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c --- a/drivers/usb/serial/keyspan_pda.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/keyspan_pda.c Thu Dec 5 15:27:48 2002 @@ -222,7 +222,7 @@ } -static void keyspan_pda_rx_interrupt (struct urb *urb) +static void keyspan_pda_rx_interrupt (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial; @@ -637,7 +637,7 @@ } -static void keyspan_pda_write_bulk_callback (struct urb *urb) +static void keyspan_pda_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial; diff -Nru a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c --- a/drivers/usb/serial/kl5kusb105.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/kl5kusb105.c Thu Dec 5 15:27:48 2002 @@ -88,11 +88,11 @@ int from_user, const unsigned char *buf, int count); -static void klsi_105_write_bulk_callback (struct urb *urb); +static void klsi_105_write_bulk_callback (struct urb *urb, struct pt_regs *regs); static int klsi_105_chars_in_buffer (struct usb_serial_port *port); static int klsi_105_write_room (struct usb_serial_port *port); -static void klsi_105_read_bulk_callback (struct urb *urb); +static void klsi_105_read_bulk_callback (struct urb *urb, struct pt_regs *regs); static void klsi_105_set_termios (struct usb_serial_port *port, struct termios * old); static int klsi_105_ioctl (struct usb_serial_port *port, @@ -558,7 +558,7 @@ return bytes_sent; /* that's how much we wrote */ } /* klsi_105_write */ -static void klsi_105_write_bulk_callback ( struct urb *urb) +static void klsi_105_write_bulk_callback ( struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = port->serial; @@ -627,7 +627,7 @@ -static void klsi_105_read_bulk_callback (struct urb *urb) +static void klsi_105_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = port->serial; diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c --- a/drivers/usb/serial/mct_u232.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/mct_u232.c Thu Dec 5 15:27:48 2002 @@ -114,9 +114,9 @@ int from_user, const unsigned char *buf, int count); -static void mct_u232_write_bulk_callback (struct urb *urb); +static void mct_u232_write_bulk_callback (struct urb *urb, struct pt_regs *regs); #endif -static void mct_u232_read_int_callback (struct urb *urb); +static void mct_u232_read_int_callback (struct urb *urb, struct pt_regs *regs); static void mct_u232_set_termios (struct usb_serial_port *port, struct termios * old); static int mct_u232_ioctl (struct usb_serial_port *port, @@ -479,7 +479,7 @@ return bytes_sent; } /* mct_u232_write */ -static void mct_u232_write_bulk_callback (struct urb *urb) +static void mct_u232_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = port->serial; @@ -514,7 +514,7 @@ } /* mct_u232_write_bulk_callback */ #endif -static void mct_u232_read_int_callback (struct urb *urb) +static void mct_u232_read_int_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct mct_u232_private *priv = (struct mct_u232_private *)port->private; diff -Nru a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c --- a/drivers/usb/serial/omninet.c Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/serial/omninet.c Thu Dec 5 15:27:49 2002 @@ -70,8 +70,8 @@ /* function prototypes */ static int omninet_open (struct usb_serial_port *port, struct file *filp); static void omninet_close (struct usb_serial_port *port, struct file *filp); -static void omninet_read_bulk_callback (struct urb *urb); -static void omninet_write_bulk_callback (struct urb *urb); +static void omninet_read_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void omninet_write_bulk_callback (struct urb *urb, struct pt_regs *regs); static int omninet_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); static int omninet_write_room (struct usb_serial_port *port); static void omninet_shutdown (struct usb_serial *serial); @@ -214,7 +214,7 @@ #define OMNINET_HEADERLEN sizeof(struct omninet_header) #define OMNINET_BULKOUTSIZE (64 - OMNINET_HEADERLEN) -static void omninet_read_bulk_callback (struct urb *urb) +static void omninet_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); @@ -336,7 +336,7 @@ return (room); } -static void omninet_write_bulk_callback (struct urb *urb) +static void omninet_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { /* struct omninet_header *header = (struct omninet_header *) urb->transfer_buffer; */ struct usb_serial_port *port = (struct usb_serial_port *) urb->context; diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c --- a/drivers/usb/serial/pl2303.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/pl2303.c Thu Dec 5 15:27:48 2002 @@ -114,9 +114,9 @@ struct termios *old); static int pl2303_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg); -static void pl2303_read_int_callback (struct urb *urb); -static void pl2303_read_bulk_callback (struct urb *urb); -static void pl2303_write_bulk_callback (struct urb *urb); +static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs); +static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void pl2303_write_bulk_callback (struct urb *urb, struct pt_regs *regs); static int pl2303_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); static void pl2303_break_ctl(struct usb_serial_port *port,int break_state); @@ -587,7 +587,7 @@ } -static void pl2303_read_int_callback (struct urb *urb) +static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *) urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); @@ -625,7 +625,7 @@ } -static void pl2303_read_bulk_callback (struct urb *urb) +static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *) urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); @@ -690,7 +690,7 @@ -static void pl2303_write_bulk_callback (struct urb *urb) +static void pl2303_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *) urb->context; int result; diff -Nru a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c --- a/drivers/usb/serial/safe_serial.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/safe_serial.c Thu Dec 5 15:27:48 2002 @@ -206,7 +206,7 @@ return fcs; } -static void safe_read_bulk_callback (struct urb *urb) +static void safe_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *) urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h --- a/drivers/usb/serial/usb-serial.h Thu Dec 5 15:27:49 2002 +++ b/drivers/usb/serial/usb-serial.h Thu Dec 5 15:27:49 2002 @@ -225,9 +225,9 @@ void (*throttle) (struct usb_serial_port *port); void (*unthrottle) (struct usb_serial_port *port); - void (*read_int_callback)(struct urb *urb); - void (*read_bulk_callback)(struct urb *urb); - void (*write_bulk_callback)(struct urb *urb); + void (*read_int_callback)(struct urb *urb, struct pt_regs *regs); + void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs); + void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs); }; extern int usb_serial_register(struct usb_serial_device_type *new_device); @@ -256,8 +256,8 @@ extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); extern int usb_serial_generic_write_room (struct usb_serial_port *port); extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); -extern void usb_serial_generic_read_bulk_callback (struct urb *urb); -extern void usb_serial_generic_write_bulk_callback (struct urb *urb); +extern void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs); +extern void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs); extern void usb_serial_generic_shutdown (struct usb_serial *serial); extern int usb_serial_generic_register (int debug); extern void usb_serial_generic_deregister (void); diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/visor.c Thu Dec 5 15:27:48 2002 @@ -173,8 +173,8 @@ static void visor_shutdown (struct usb_serial *serial); static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); static void visor_set_termios (struct usb_serial_port *port, struct termios *old_termios); -static void visor_write_bulk_callback (struct urb *urb); -static void visor_read_bulk_callback (struct urb *urb); +static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs); +static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs); static int clie_3_5_startup (struct usb_serial *serial); @@ -449,7 +449,7 @@ } -static void visor_write_bulk_callback (struct urb *urb) +static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; @@ -470,7 +470,7 @@ } -static void visor_read_bulk_callback (struct urb *urb) +static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); diff -Nru a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c --- a/drivers/usb/serial/whiteheat.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/serial/whiteheat.c Thu Dec 5 15:27:48 2002 @@ -150,8 +150,8 @@ static int whiteheat_chars_in_buffer (struct usb_serial_port *port); static void whiteheat_throttle (struct usb_serial_port *port); static void whiteheat_unthrottle (struct usb_serial_port *port); -static void whiteheat_read_callback (struct urb *urb); -static void whiteheat_write_callback (struct urb *urb); +static void whiteheat_read_callback (struct urb *urb, struct pt_regs *regs); +static void whiteheat_write_callback (struct urb *urb, struct pt_regs *regs); static struct usb_serial_device_type whiteheat_fake_device = { .owner = THIS_MODULE, @@ -225,8 +225,8 @@ /* local function prototypes */ static int start_command_port(struct usb_serial *serial); static void stop_command_port(struct usb_serial *serial); -static void command_port_write_callback(struct urb *urb); -static void command_port_read_callback(struct urb *urb); +static void command_port_write_callback(struct urb *urb, struct pt_regs *regs); +static void command_port_read_callback(struct urb *urb, struct pt_regs *regs); static int start_port_read(struct usb_serial_port *port); static struct whiteheat_urb_wrap *urb_to_wrap(struct urb *urb, struct list_head *head); @@ -957,7 +957,7 @@ /***************************************************************************** * Connect Tech's White Heat callback routines *****************************************************************************/ -static void command_port_write_callback (struct urb *urb) +static void command_port_write_callback (struct urb *urb, struct pt_regs *regs) { dbg("%s", __FUNCTION__); @@ -972,7 +972,7 @@ } -static void command_port_read_callback (struct urb *urb) +static void command_port_read_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *command_port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (command_port, __FUNCTION__); @@ -1028,7 +1028,7 @@ } -static void whiteheat_read_callback(struct urb *urb) +static void whiteheat_read_callback(struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); @@ -1079,7 +1079,7 @@ } -static void whiteheat_write_callback(struct urb *urb) +static void whiteheat_write_callback(struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c --- a/drivers/usb/storage/transport.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/storage/transport.c Thu Dec 5 15:27:48 2002 @@ -401,7 +401,7 @@ /* This is the completion handler which will wake us up when an URB * completes. */ -static void usb_stor_blocking_completion(struct urb *urb) +static void usb_stor_blocking_completion(struct urb *urb, struct pt_regs *regs) { struct completion *urb_done_ptr = (struct completion *)urb->context; @@ -969,7 +969,7 @@ /* If we are waiting for an IRQ, simulate it */ if (test_bit(US_FLIDX_IP_WANTED, &us->flags)) { US_DEBUGP("-- simulating missing IRQ\n"); - usb_stor_CBI_irq(us->irq_urb); + usb_stor_CBI_irq(us->irq_urb, NULL); } /* Wait for the aborted command to finish */ @@ -984,7 +984,7 @@ */ /* The interrupt handler for CBI devices */ -void usb_stor_CBI_irq(struct urb *urb) +void usb_stor_CBI_irq(struct urb *urb, struct pt_regs *regs) { struct us_data *us = (struct us_data *)urb->context; int status; diff -Nru a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h --- a/drivers/usb/storage/transport.h Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/storage/transport.h Thu Dec 5 15:27:48 2002 @@ -145,7 +145,7 @@ #define US_CBI_ADSC 0 -extern void usb_stor_CBI_irq(struct urb*); +extern void usb_stor_CBI_irq(struct urb*, struct pt_regs *); extern int usb_stor_CBI_transport(Scsi_Cmnd*, struct us_data*); extern int usb_stor_CB_transport(Scsi_Cmnd*, struct us_data*); diff -Nru a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c --- a/drivers/usb/usb-skeleton.c Thu Dec 5 15:27:48 2002 +++ b/drivers/usb/usb-skeleton.c Thu Dec 5 15:27:48 2002 @@ -137,7 +137,7 @@ static int skel_probe (struct usb_interface *intf, const struct usb_device_id *id); static void skel_disconnect (struct usb_interface *intf); -static void skel_write_bulk_callback (struct urb *urb); +static void skel_write_bulk_callback (struct urb *urb, struct pt_regs *regs); /* array of pointers to our devices that are currently connected */ @@ -487,7 +487,7 @@ /** * skel_write_bulk_callback */ -static void skel_write_bulk_callback (struct urb *urb) +static void skel_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_skel *dev = (struct usb_skel *)urb->context; diff -Nru a/include/linux/usb.h b/include/linux/usb.h --- a/include/linux/usb.h Thu Dec 5 15:27:48 2002 +++ b/include/linux/usb.h Thu Dec 5 15:27:48 2002 @@ -554,8 +554,9 @@ }; struct urb; +struct pt_regs; -typedef void (*usb_complete_t)(struct urb *); +typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); /** * struct urb - USB Request Block diff -Nru a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c --- a/sound/usb/usbmidi.c Thu Dec 5 15:27:49 2002 +++ b/sound/usb/usbmidi.c Thu Dec 5 15:27:49 2002 @@ -168,7 +168,7 @@ /* * Processes the data read from the device. */ -static void snd_usbmidi_in_urb_complete(struct urb* urb) +static void snd_usbmidi_in_urb_complete(struct urb* urb, struct pt_regs *regs) { snd_usb_midi_in_endpoint_t* ep = snd_magic_cast(snd_usb_midi_in_endpoint_t, urb->context, return); @@ -191,7 +191,7 @@ /* * Converts the data read from a Midiman device to standard USB MIDI packets. */ -static void snd_usbmidi_in_midiman_complete(struct urb* urb) +static void snd_usbmidi_in_midiman_complete(struct urb* urb, struct pt_regs *regs) { if (urb->status == 0) { uint8_t* buffer = (uint8_t*)urb->transfer_buffer; @@ -220,7 +220,7 @@ snd_usbmidi_in_urb_complete(urb); } -static void snd_usbmidi_out_urb_complete(struct urb* urb) +static void snd_usbmidi_out_urb_complete(struct urb* urb, struct pt_regs *regs) { snd_usb_midi_out_endpoint_t* ep = snd_magic_cast(snd_usb_midi_out_endpoint_t, urb->context, return);