Commit 6ab1c9a3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

usb_submit_urb() changes for the drivers/usb/*.c drivers.

Some driver changes were done by Oliver Neukum and David Brownell.
parent da62b3af
...@@ -132,7 +132,7 @@ static void read_bulk_callback( struct urb *urb ) ...@@ -132,7 +132,7 @@ static void read_bulk_callback( struct urb *urb )
// Give this to the USB subsystem so it can tell us // Give this to the USB subsystem so it can tell us
// when more data arrives. // when more data arrives.
if ( (res = usb_submit_urb(ether_dev->rx_urb)) ) { if ( (res = usb_submit_urb(ether_dev->rx_urb, GFP_KERNEL)) ) {
warn( __FUNCTION__ " failed submint rx_urb %d", res); warn( __FUNCTION__ " failed submint rx_urb %d", res);
} }
...@@ -302,7 +302,7 @@ static int CDCEther_start_xmit( struct sk_buff *skb, struct net_device *net ) ...@@ -302,7 +302,7 @@ static int CDCEther_start_xmit( struct sk_buff *skb, struct net_device *net )
ether_dev->tx_urb->transfer_buffer_length = count; ether_dev->tx_urb->transfer_buffer_length = count;
// Send the URB on its merry way. // Send the URB on its merry way.
if ((res = usb_submit_urb(ether_dev->tx_urb))) { if ((res = usb_submit_urb(ether_dev->tx_urb, GFP_KERNEL))) {
// Hmm... It didn't go. Tell someone... // Hmm... It didn't go. Tell someone...
warn("failed tx_urb %d", res); warn("failed tx_urb %d", res);
// update some stats... // update some stats...
...@@ -350,7 +350,7 @@ static int CDCEther_open(struct net_device *net) ...@@ -350,7 +350,7 @@ static int CDCEther_open(struct net_device *net)
read_bulk_callback, ether_dev ); read_bulk_callback, ether_dev );
// Put it out there so the device can send us stuff // Put it out there so the device can send us stuff
if ( (res = usb_submit_urb(ether_dev->rx_urb)) ) if ( (res = usb_submit_urb(ether_dev->rx_urb, GFP_KERNEL)) )
{ {
// Hmm... Okay... // Hmm... Okay...
warn( __FUNCTION__ " failed rx_urb %d", res ); warn( __FUNCTION__ " failed rx_urb %d", res );
......
...@@ -261,7 +261,7 @@ static void acm_read_bulk(struct urb *urb) ...@@ -261,7 +261,7 @@ static void acm_read_bulk(struct urb *urb)
urb->actual_length = 0; urb->actual_length = 0;
urb->dev = acm->dev; urb->dev = acm->dev;
if (usb_submit_urb(urb)) if (usb_submit_urb(urb, GFP_KERNEL))
dbg("failed resubmitting read urb"); dbg("failed resubmitting read urb");
} }
...@@ -316,11 +316,11 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -316,11 +316,11 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
unlock_kernel(); unlock_kernel();
acm->ctrlurb.dev = acm->dev; acm->ctrlurb.dev = acm->dev;
if (usb_submit_urb(&acm->ctrlurb)) if (usb_submit_urb(&acm->ctrlurb, GFP_KERNEL))
dbg("usb_submit_urb(ctrl irq) failed"); dbg("usb_submit_urb(ctrl irq) failed");
acm->readurb.dev = acm->dev; acm->readurb.dev = acm->dev;
if (usb_submit_urb(&acm->readurb)) if (usb_submit_urb(&acm->readurb, GFP_KERNEL))
dbg("usb_submit_urb(read bulk) failed"); dbg("usb_submit_urb(read bulk) failed");
acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS); acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS);
...@@ -371,7 +371,7 @@ static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned c ...@@ -371,7 +371,7 @@ static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned c
acm->writeurb.transfer_buffer_length = count; acm->writeurb.transfer_buffer_length = count;
acm->writeurb.dev = acm->dev; acm->writeurb.dev = acm->dev;
if (usb_submit_urb(&acm->writeurb)) if (usb_submit_urb(&acm->writeurb, GFP_KERNEL))
dbg("usb_submit_urb(write bulk) failed"); dbg("usb_submit_urb(write bulk) failed");
return count; return count;
......
...@@ -917,7 +917,7 @@ static void usbin_completed(struct urb *urb) ...@@ -917,7 +917,7 @@ static void usbin_completed(struct urb *urb)
if (!usbin_retire_desc(u, urb) && if (!usbin_retire_desc(u, urb) &&
u->flags & FLG_RUNNING && u->flags & FLG_RUNNING &&
!usbin_prepare_desc(u, urb) && !usbin_prepare_desc(u, urb) &&
(suret = usb_submit_urb(urb)) == 0) { (suret = usb_submit_urb(urb, GFP_KERNEL)) == 0) {
u->flags |= mask; u->flags |= mask;
} else { } else {
u->flags &= ~(mask | FLG_RUNNING); u->flags &= ~(mask | FLG_RUNNING);
...@@ -982,7 +982,7 @@ static void usbin_sync_completed(struct urb *urb) ...@@ -982,7 +982,7 @@ static void usbin_sync_completed(struct urb *urb)
if (!usbin_sync_retire_desc(u, urb) && if (!usbin_sync_retire_desc(u, urb) &&
u->flags & FLG_RUNNING && u->flags & FLG_RUNNING &&
!usbin_sync_prepare_desc(u, urb) && !usbin_sync_prepare_desc(u, urb) &&
(suret = usb_submit_urb(urb)) == 0) { (suret = usb_submit_urb(urb, GFP_KERNEL)) == 0) {
u->flags |= mask; u->flags |= mask;
} else { } else {
u->flags &= ~(mask | FLG_RUNNING); u->flags &= ~(mask | FLG_RUNNING);
...@@ -1055,7 +1055,7 @@ static int usbin_start(struct usb_audiodev *as) ...@@ -1055,7 +1055,7 @@ static int usbin_start(struct usb_audiodev *as)
urb->number_of_packets = DESCFRAMES; urb->number_of_packets = DESCFRAMES;
urb->context = as; urb->context = as;
urb->complete = usbin_completed; urb->complete = usbin_completed;
if (!usbin_prepare_desc(u, urb) && !usb_submit_urb(urb)) if (!usbin_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
u->flags |= FLG_URB0RUNNING; u->flags |= FLG_URB0RUNNING;
else else
u->flags &= ~FLG_RUNNING; u->flags &= ~FLG_RUNNING;
...@@ -1068,7 +1068,7 @@ static int usbin_start(struct usb_audiodev *as) ...@@ -1068,7 +1068,7 @@ static int usbin_start(struct usb_audiodev *as)
urb->number_of_packets = DESCFRAMES; urb->number_of_packets = DESCFRAMES;
urb->context = as; urb->context = as;
urb->complete = usbin_completed; urb->complete = usbin_completed;
if (!usbin_prepare_desc(u, urb) && !usb_submit_urb(urb)) if (!usbin_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
u->flags |= FLG_URB1RUNNING; u->flags |= FLG_URB1RUNNING;
else else
u->flags &= ~FLG_RUNNING; u->flags &= ~FLG_RUNNING;
...@@ -1083,7 +1083,7 @@ static int usbin_start(struct usb_audiodev *as) ...@@ -1083,7 +1083,7 @@ static int usbin_start(struct usb_audiodev *as)
urb->context = as; urb->context = as;
urb->complete = usbin_sync_completed; urb->complete = usbin_sync_completed;
/* stride: u->syncinterval */ /* stride: u->syncinterval */
if (!usbin_sync_prepare_desc(u, urb) && !usb_submit_urb(urb)) if (!usbin_sync_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
u->flags |= FLG_SYNC0RUNNING; u->flags |= FLG_SYNC0RUNNING;
else else
u->flags &= ~FLG_RUNNING; u->flags &= ~FLG_RUNNING;
...@@ -1097,7 +1097,7 @@ static int usbin_start(struct usb_audiodev *as) ...@@ -1097,7 +1097,7 @@ static int usbin_start(struct usb_audiodev *as)
urb->context = as; urb->context = as;
urb->complete = usbin_sync_completed; urb->complete = usbin_sync_completed;
/* stride: u->syncinterval */ /* stride: u->syncinterval */
if (!usbin_sync_prepare_desc(u, urb) && !usb_submit_urb(urb)) if (!usbin_sync_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
u->flags |= FLG_SYNC1RUNNING; u->flags |= FLG_SYNC1RUNNING;
else else
u->flags &= ~FLG_RUNNING; u->flags &= ~FLG_RUNNING;
...@@ -1275,7 +1275,7 @@ static void usbout_completed(struct urb *urb) ...@@ -1275,7 +1275,7 @@ static void usbout_completed(struct urb *urb)
if (!usbout_retire_desc(u, urb) && if (!usbout_retire_desc(u, urb) &&
u->flags & FLG_RUNNING && u->flags & FLG_RUNNING &&
!usbout_prepare_desc(u, urb) && !usbout_prepare_desc(u, urb) &&
(suret = usb_submit_urb(urb)) == 0) { (suret = usb_submit_urb(urb, GFP_KERNEL)) == 0) {
u->flags |= mask; u->flags |= mask;
} else { } else {
u->flags &= ~(mask | FLG_RUNNING); u->flags &= ~(mask | FLG_RUNNING);
...@@ -1347,7 +1347,7 @@ static void usbout_sync_completed(struct urb *urb) ...@@ -1347,7 +1347,7 @@ static void usbout_sync_completed(struct urb *urb)
if (!usbout_sync_retire_desc(u, urb) && if (!usbout_sync_retire_desc(u, urb) &&
u->flags & FLG_RUNNING && u->flags & FLG_RUNNING &&
!usbout_sync_prepare_desc(u, urb) && !usbout_sync_prepare_desc(u, urb) &&
(suret = usb_submit_urb(urb)) == 0) { (suret = usb_submit_urb(urb, GFP_KERNEL)) == 0) {
u->flags |= mask; u->flags |= mask;
} else { } else {
u->flags &= ~(mask | FLG_RUNNING); u->flags &= ~(mask | FLG_RUNNING);
...@@ -1420,7 +1420,7 @@ static int usbout_start(struct usb_audiodev *as) ...@@ -1420,7 +1420,7 @@ static int usbout_start(struct usb_audiodev *as)
urb->number_of_packets = DESCFRAMES; urb->number_of_packets = DESCFRAMES;
urb->context = as; urb->context = as;
urb->complete = usbout_completed; urb->complete = usbout_completed;
if (!usbout_prepare_desc(u, urb) && !usb_submit_urb(urb)) if (!usbout_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
u->flags |= FLG_URB0RUNNING; u->flags |= FLG_URB0RUNNING;
else else
u->flags &= ~FLG_RUNNING; u->flags &= ~FLG_RUNNING;
...@@ -1433,7 +1433,7 @@ static int usbout_start(struct usb_audiodev *as) ...@@ -1433,7 +1433,7 @@ static int usbout_start(struct usb_audiodev *as)
urb->number_of_packets = DESCFRAMES; urb->number_of_packets = DESCFRAMES;
urb->context = as; urb->context = as;
urb->complete = usbout_completed; urb->complete = usbout_completed;
if (!usbout_prepare_desc(u, urb) && !usb_submit_urb(urb)) if (!usbout_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
u->flags |= FLG_URB1RUNNING; u->flags |= FLG_URB1RUNNING;
else else
u->flags &= ~FLG_RUNNING; u->flags &= ~FLG_RUNNING;
...@@ -1448,7 +1448,7 @@ static int usbout_start(struct usb_audiodev *as) ...@@ -1448,7 +1448,7 @@ static int usbout_start(struct usb_audiodev *as)
urb->context = as; urb->context = as;
urb->complete = usbout_sync_completed; urb->complete = usbout_sync_completed;
/* stride: u->syncinterval */ /* stride: u->syncinterval */
if (!usbout_sync_prepare_desc(u, urb) && !usb_submit_urb(urb)) if (!usbout_sync_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
u->flags |= FLG_SYNC0RUNNING; u->flags |= FLG_SYNC0RUNNING;
else else
u->flags &= ~FLG_RUNNING; u->flags &= ~FLG_RUNNING;
...@@ -1462,7 +1462,7 @@ static int usbout_start(struct usb_audiodev *as) ...@@ -1462,7 +1462,7 @@ static int usbout_start(struct usb_audiodev *as)
urb->context = as; urb->context = as;
urb->complete = usbout_sync_completed; urb->complete = usbout_sync_completed;
/* stride: u->syncinterval */ /* stride: u->syncinterval */
if (!usbout_sync_prepare_desc(u, urb) && !usb_submit_urb(urb)) if (!usbout_sync_prepare_desc(u, urb) && !usb_submit_urb(urb, GFP_KERNEL))
u->flags |= FLG_SYNC1RUNNING; u->flags |= FLG_SYNC1RUNNING;
else else
u->flags &= ~FLG_RUNNING; u->flags &= ~FLG_RUNNING;
......
...@@ -330,7 +330,7 @@ static void auerchain_complete (struct urb * urb) ...@@ -330,7 +330,7 @@ static void auerchain_complete (struct urb * urb)
urb = acep->urbp; urb = acep->urbp;
dbg ("auerchain_complete: submitting next urb from chain"); dbg ("auerchain_complete: submitting next urb from chain");
urb->status = 0; /* needed! */ urb->status = 0; /* needed! */
result = usb_submit_urb( urb); result = usb_submit_urb(urb, GFP_KERNEL);
/* check for submit errors */ /* check for submit errors */
if (result) { if (result) {
...@@ -408,7 +408,7 @@ static int auerchain_submit_urb_list (pauerchain_t acp, struct urb * urb, int ea ...@@ -408,7 +408,7 @@ static int auerchain_submit_urb_list (pauerchain_t acp, struct urb * urb, int ea
if (acep) { if (acep) {
dbg("submitting urb immediate"); dbg("submitting urb immediate");
urb->status = 0; /* needed! */ urb->status = 0; /* needed! */
result = usb_submit_urb( urb); result = usb_submit_urb(urb, GFP_KERNEL);
/* check for submit errors */ /* check for submit errors */
if (result) { if (result) {
urb->status = result; urb->status = result;
...@@ -1128,7 +1128,7 @@ static int auerswald_int_open (pauerswald_t cp) ...@@ -1128,7 +1128,7 @@ static int auerswald_int_open (pauerswald_t cp)
FILL_INT_URB (cp->inturbp, cp->usbdev, usb_rcvintpipe (cp->usbdev,AU_IRQENDP), cp->intbufp, irqsize, auerswald_int_complete, cp, ep->bInterval); FILL_INT_URB (cp->inturbp, cp->usbdev, usb_rcvintpipe (cp->usbdev,AU_IRQENDP), cp->intbufp, irqsize, auerswald_int_complete, cp, ep->bInterval);
/* start the urb */ /* start the urb */
cp->inturbp->status = 0; /* needed! */ cp->inturbp->status = 0; /* needed! */
ret = usb_submit_urb (cp->inturbp); ret = usb_submit_urb (cp->inturbp, GFP_KERNEL);
intoend: intoend:
if (ret < 0) { if (ret < 0) {
......
...@@ -335,7 +335,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int ...@@ -335,7 +335,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int
(unsigned char*)dr, urb->transfer_buffer, len, bluetooth_ctrl_callback, bluetooth); (unsigned char*)dr, urb->transfer_buffer, len, bluetooth_ctrl_callback, bluetooth);
/* send it down the pipe */ /* send it down the pipe */
status = usb_submit_urb(urb); status = usb_submit_urb(urb, GFP_KERNEL);
if (status) if (status)
dbg(__FUNCTION__ " - usb_submit_urb(control) failed with status = %d", status); dbg(__FUNCTION__ " - usb_submit_urb(control) failed with status = %d", status);
...@@ -390,7 +390,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp) ...@@ -390,7 +390,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp)
bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer,
bluetooth->bulk_in_buffer_size, bluetooth->bulk_in_buffer_size,
bluetooth_read_bulk_callback, bluetooth); bluetooth_read_bulk_callback, bluetooth);
result = usb_submit_urb(bluetooth->read_urb); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL);
if (result) if (result)
dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed with status %d", result); dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed with status %d", result);
#endif #endif
...@@ -400,7 +400,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp) ...@@ -400,7 +400,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp)
bluetooth->interrupt_in_buffer_size, bluetooth->interrupt_in_buffer_size,
bluetooth_int_callback, bluetooth, bluetooth_int_callback, bluetooth,
bluetooth->interrupt_in_interval); bluetooth->interrupt_in_interval);
result = usb_submit_urb(bluetooth->interrupt_in_urb); result = usb_submit_urb(bluetooth->interrupt_in_urb, GFP_KERNEL);
if (result) if (result)
dbg(__FUNCTION__ " - usb_submit_urb(interrupt in) failed with status %d", result); dbg(__FUNCTION__ " - usb_submit_urb(interrupt in) failed with status %d", result);
} }
...@@ -540,7 +540,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign ...@@ -540,7 +540,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign
urb->transfer_flags |= USB_QUEUE_BULK; urb->transfer_flags |= USB_QUEUE_BULK;
/* send it down the pipe */ /* send it down the pipe */
retval = usb_submit_urb(urb); retval = usb_submit_urb(urb, GFP_KERNEL);
if (retval) { if (retval) {
dbg(__FUNCTION__ " - usb_submit_urb(write bulk) failed with error = %d", retval); dbg(__FUNCTION__ " - usb_submit_urb(write bulk) failed with error = %d", retval);
goto exit; goto exit;
...@@ -730,7 +730,7 @@ void btusb_enable_bulk_read(struct tty_struct *tty){ ...@@ -730,7 +730,7 @@ void btusb_enable_bulk_read(struct tty_struct *tty){
usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress), usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size,
bluetooth_read_bulk_callback, bluetooth); bluetooth_read_bulk_callback, bluetooth);
result = usb_submit_urb(bluetooth->read_urb); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL);
if (result) if (result)
err (__FUNCTION__ " - failed submitting read urb, error %d", result); err (__FUNCTION__ " - failed submitting read urb, error %d", result);
} }
...@@ -921,7 +921,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb) ...@@ -921,7 +921,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb)
usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress), usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size,
bluetooth_read_bulk_callback, bluetooth); bluetooth_read_bulk_callback, bluetooth);
result = usb_submit_urb(bluetooth->read_urb); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL);
if (result) if (result)
err (__FUNCTION__ " - failed resubmitting read urb, error %d", result); err (__FUNCTION__ " - failed resubmitting read urb, error %d", result);
...@@ -982,7 +982,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb) ...@@ -982,7 +982,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb)
usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress), usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size,
bluetooth_read_bulk_callback, bluetooth); bluetooth_read_bulk_callback, bluetooth);
result = usb_submit_urb(bluetooth->read_urb); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL);
if (result) if (result)
err (__FUNCTION__ " - failed resubmitting read urb, error %d", result); err (__FUNCTION__ " - failed resubmitting read urb, error %d", result);
......
...@@ -257,7 +257,7 @@ static void catc_irq_done(struct urb *urb) ...@@ -257,7 +257,7 @@ static void catc_irq_done(struct urb *urb)
if ((data[1] & 0x80) && !test_and_set_bit(RX_RUNNING, &catc->flags)) { if ((data[1] & 0x80) && !test_and_set_bit(RX_RUNNING, &catc->flags)) {
catc->rx_urb->dev = catc->usbdev; catc->rx_urb->dev = catc->usbdev;
if ((status = usb_submit_urb(catc->rx_urb)) < 0) { if ((status = usb_submit_urb(catc->rx_urb, GFP_KERNEL)) < 0) {
err("submit(rx_urb) status %d", status); err("submit(rx_urb) status %d", status);
return; return;
} }
...@@ -286,7 +286,7 @@ static void catc_tx_run(struct catc *catc) ...@@ -286,7 +286,7 @@ static void catc_tx_run(struct catc *catc)
catc->tx_urb->transfer_buffer = catc->tx_buf[catc->tx_idx]; catc->tx_urb->transfer_buffer = catc->tx_buf[catc->tx_idx];
catc->tx_urb->dev = catc->usbdev; catc->tx_urb->dev = catc->usbdev;
if ((status = usb_submit_urb(catc->tx_urb)) < 0) if ((status = usb_submit_urb(catc->tx_urb, GFP_KERNEL)) < 0)
err("submit(tx_urb), status %d", status); err("submit(tx_urb), status %d", status);
catc->tx_idx = !catc->tx_idx; catc->tx_idx = !catc->tx_idx;
...@@ -402,7 +402,7 @@ static void catc_ctrl_run(struct catc *catc) ...@@ -402,7 +402,7 @@ static void catc_ctrl_run(struct catc *catc)
if (!q->dir && q->buf && q->len) if (!q->dir && q->buf && q->len)
memcpy(catc->ctrl_buf, q->buf, q->len); memcpy(catc->ctrl_buf, q->buf, q->len);
if ((status = usb_submit_urb(catc->ctrl_urb))) if ((status = usb_submit_urb(catc->ctrl_urb, GFP_KERNEL)))
err("submit(ctrl_urb) status %d", status); err("submit(ctrl_urb) status %d", status);
} }
...@@ -625,7 +625,7 @@ static int catc_open(struct net_device *netdev) ...@@ -625,7 +625,7 @@ static int catc_open(struct net_device *netdev)
int status; int status;
catc->irq_urb->dev = catc->usbdev; catc->irq_urb->dev = catc->usbdev;
if ((status = usb_submit_urb(catc->irq_urb)) < 0) { if ((status = usb_submit_urb(catc->irq_urb, GFP_KERNEL)) < 0) {
err("submit(irq_urb) status %d", status); err("submit(irq_urb) status %d", status);
return -1; return -1;
} }
......
...@@ -458,7 +458,7 @@ static int dabusb_startrek (pdabusb_t s) ...@@ -458,7 +458,7 @@ static int dabusb_startrek (pdabusb_t s)
end = list_entry (s->rec_buff_list.prev, buff_t, buff_list); end = list_entry (s->rec_buff_list.prev, buff_t, buff_list);
ret = usb_submit_urb (end->purb); ret = usb_submit_urb (end->purb, GFP_KERNEL);
if (ret) { if (ret) {
err("usb_submit_urb returned:%d", ret); err("usb_submit_urb returned:%d", ret);
if (dabusb_add_buf_tail (s, &s->free_buff_list, &s->rec_buff_list)) if (dabusb_add_buf_tail (s, &s->free_buff_list, &s->rec_buff_list))
......
...@@ -364,7 +364,7 @@ static int checkintf(struct dev_state *ps, unsigned int intf) ...@@ -364,7 +364,7 @@ static int checkintf(struct dev_state *ps, unsigned int intf)
if (test_bit(intf, &ps->ifclaimed)) if (test_bit(intf, &ps->ifclaimed))
return 0; return 0;
/* if not yet claimed, claim it for the driver */ /* if not yet claimed, claim it for the driver */
printk(KERN_WARNING "usbdevfs: process %d (%s) did not claim interface %u before use\n", printk(KERN_WARNING "usbfs: process %d (%s) did not claim interface %u before use\n",
current->pid, current->comm, intf); current->pid, current->comm, intf);
return claimintf(ps, intf); return claimintf(ps, intf);
} }
...@@ -563,7 +563,7 @@ static int proc_control(struct dev_state *ps, void *arg) ...@@ -563,7 +563,7 @@ static int proc_control(struct dev_state *ps, void *arg)
} }
free_page((unsigned long)tbuf); free_page((unsigned long)tbuf);
if (i<0) { if (i<0) {
printk(KERN_DEBUG "usbdevfs: USBDEVFS_CONTROL failed dev %d rqt %u rq %u len %u ret %d\n", printk(KERN_DEBUG "usbfs: USBDEVFS_CONTROL failed dev %d rqt %u rq %u len %u ret %d\n",
dev->devnum, ctrl.bRequestType, ctrl.bRequest, ctrl.wLength, i); dev->devnum, ctrl.bRequestType, ctrl.bRequest, ctrl.wLength, i);
} }
return i; return i;
...@@ -619,7 +619,7 @@ static int proc_bulk(struct dev_state *ps, void *arg) ...@@ -619,7 +619,7 @@ static int proc_bulk(struct dev_state *ps, void *arg)
} }
free_page((unsigned long)tbuf); free_page((unsigned long)tbuf);
if (i < 0) { if (i < 0) {
printk(KERN_WARNING "usbdevfs: USBDEVFS_BULK failed dev %d ep 0x%x len %u ret %d\n", printk(KERN_WARNING "usbfs: USBDEVFS_BULK failed dev %d ep 0x%x len %u ret %d\n",
dev->devnum, bulk.ep, bulk.len, i); dev->devnum, bulk.ep, bulk.len, i);
return i; return i;
} }
...@@ -906,8 +906,8 @@ static int proc_submiturb(struct dev_state *ps, void *arg) ...@@ -906,8 +906,8 @@ static int proc_submiturb(struct dev_state *ps, void *arg)
} }
} }
async_newpending(as); async_newpending(as);
if ((ret = usb_submit_urb(as->urb))) { if ((ret = usb_submit_urb(as->urb, GFP_KERNEL))) {
printk(KERN_DEBUG "usbdevfs: usb_submit_urb returned %d\n", ret); printk(KERN_DEBUG "usbfs: usb_submit_urb returned %d\n", ret);
async_removepending(as); async_removepending(as);
free_async(as); free_async(as);
return ret; return ret;
......
...@@ -992,7 +992,7 @@ static int hid_submit_out(struct hid_device *hid) ...@@ -992,7 +992,7 @@ static int hid_submit_out(struct hid_device *hid)
hid->urbout.setup_packet = (void *) &(hid->out[hid->outtail].dr); hid->urbout.setup_packet = (void *) &(hid->out[hid->outtail].dr);
hid->urbout.dev = hid->dev; hid->urbout.dev = hid->dev;
if (usb_submit_urb(&hid->urbout)) { if (usb_submit_urb(&hid->urbout, GFP_KERNEL)) {
err("usb_submit_urb(out) failed"); err("usb_submit_urb(out) failed");
return -1; return -1;
} }
...@@ -1036,7 +1036,7 @@ int hid_open(struct hid_device *hid) ...@@ -1036,7 +1036,7 @@ int hid_open(struct hid_device *hid)
hid->urb.dev = hid->dev; hid->urb.dev = hid->dev;
if (usb_submit_urb(&hid->urb)) if (usb_submit_urb(&hid->urb, GFP_KERNEL))
return -EIO; return -EIO;
return 0; return 0;
......
...@@ -245,7 +245,7 @@ hpusbscsi_scsi_detect (struct SHT *sht) ...@@ -245,7 +245,7 @@ hpusbscsi_scsi_detect (struct SHT *sht)
desc->interrupt_interval desc->interrupt_interval
); );
if ( 0 > usb_submit_urb(desc->controlurb)) { if ( 0 > usb_submit_urb(desc->controlurb, GFP_KERNEL)) {
kfree(sht->proc_name); kfree(sht->proc_name);
return 0; return 0;
} }
...@@ -321,7 +321,7 @@ static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback) ...@@ -321,7 +321,7 @@ static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback)
hpusbscsi->scallback = callback; hpusbscsi->scallback = callback;
hpusbscsi->srb = srb; hpusbscsi->srb = srb;
res = usb_submit_urb(hpusbscsi->dataurb); res = usb_submit_urb(hpusbscsi->dataurb, GFP_ATOMIC);
if (unlikely(res)) { if (unlikely(res)) {
hpusbscsi->state = HP_STATE_FREE; hpusbscsi->state = HP_STATE_FREE;
TRACE_STATE; TRACE_STATE;
...@@ -460,7 +460,7 @@ static void scatter_gather_callback(struct urb *u) ...@@ -460,7 +460,7 @@ static void scatter_gather_callback(struct urb *u)
hpusbscsi hpusbscsi
); );
res = usb_submit_urb(u); res = usb_submit_urb(u, GFP_ATOMIC);
if (unlikely(res)) if (unlikely(res))
hpusbscsi->state = HP_STATE_ERROR; hpusbscsi->state = HP_STATE_ERROR;
TRACE_STATE; TRACE_STATE;
...@@ -509,7 +509,7 @@ static void simple_payload_callback (struct urb *u) ...@@ -509,7 +509,7 @@ static void simple_payload_callback (struct urb *u)
hpusbscsi hpusbscsi
); );
res = usb_submit_urb(u); res = usb_submit_urb(u, GFP_ATOMIC);
if (unlikely(res)) { if (unlikely(res)) {
handle_usb_error(hpusbscsi); handle_usb_error(hpusbscsi);
return; return;
......
...@@ -312,7 +312,7 @@ static int usb_hub_configure(struct usb_hub *hub, ...@@ -312,7 +312,7 @@ static int usb_hub_configure(struct usb_hub *hub,
FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq, FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
hub, endpoint->bInterval); hub, endpoint->bInterval);
ret = usb_submit_urb(hub->urb); ret = usb_submit_urb(hub->urb, GFP_KERNEL);
if (ret) { if (ret) {
err("usb_submit_urb failed (%d)", ret); err("usb_submit_urb failed (%d)", ret);
kfree(hub->descriptor); kfree(hub->descriptor);
...@@ -498,7 +498,7 @@ static int usb_hub_reset(struct usb_hub *hub) ...@@ -498,7 +498,7 @@ static int usb_hub_reset(struct usb_hub *hub)
return -1; return -1;
hub->urb->dev = dev; hub->urb->dev = dev;
if (usb_submit_urb(hub->urb)) if (usb_submit_urb(hub->urb, GFP_KERNEL))
return -1; return -1;
usb_hub_power_on(hub); usb_hub_power_on(hub);
......
...@@ -447,7 +447,8 @@ static void kaweth_usb_receive(struct urb *); ...@@ -447,7 +447,8 @@ static void kaweth_usb_receive(struct urb *);
/**************************************************************** /****************************************************************
* kaweth_resubmit_rx_urb * kaweth_resubmit_rx_urb
****************************************************************/ ****************************************************************/
static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth) static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth,
int mem_flags)
{ {
int result; int result;
...@@ -461,7 +462,7 @@ static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth) ...@@ -461,7 +462,7 @@ static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
kaweth_usb_receive, kaweth_usb_receive,
kaweth); kaweth);
if((result = usb_submit_urb(kaweth->rx_urb))) { if((result = usb_submit_urb(kaweth->rx_urb, mem_flags))) {
kaweth_err("resubmitting rx_urb %d failed", result); kaweth_err("resubmitting rx_urb %d failed", result);
} }
} }
...@@ -493,7 +494,7 @@ static void kaweth_usb_receive(struct urb *urb) ...@@ -493,7 +494,7 @@ static void kaweth_usb_receive(struct urb *urb)
urb->status, urb->status,
count, count,
(int)pkt_len); (int)pkt_len);
kaweth_resubmit_rx_urb(kaweth); kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
return; return;
} }
...@@ -502,12 +503,12 @@ static void kaweth_usb_receive(struct urb *urb) ...@@ -502,12 +503,12 @@ static void kaweth_usb_receive(struct urb *urb)
kaweth_err("Packet length too long for USB frame (pkt_len: %x, count: %x)",pkt_len, count); kaweth_err("Packet length too long for USB frame (pkt_len: %x, count: %x)",pkt_len, count);
kaweth_err("Packet len & 2047: %x", pkt_len & 2047); kaweth_err("Packet len & 2047: %x", pkt_len & 2047);
kaweth_err("Count 2: %x", count2); kaweth_err("Count 2: %x", count2);
kaweth_resubmit_rx_urb(kaweth); kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
return; return;
} }
if(!(skb = dev_alloc_skb(pkt_len+2))) { if(!(skb = dev_alloc_skb(pkt_len+2))) {
kaweth_resubmit_rx_urb(kaweth); kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
return; return;
} }
...@@ -525,7 +526,7 @@ static void kaweth_usb_receive(struct urb *urb) ...@@ -525,7 +526,7 @@ static void kaweth_usb_receive(struct urb *urb)
kaweth->stats.rx_bytes += pkt_len; kaweth->stats.rx_bytes += pkt_len;
} }
kaweth_resubmit_rx_urb(kaweth); kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
} }
/**************************************************************** /****************************************************************
...@@ -539,11 +540,11 @@ static int kaweth_open(struct net_device *net) ...@@ -539,11 +540,11 @@ static int kaweth_open(struct net_device *net)
kaweth_dbg("Opening network device."); kaweth_dbg("Opening network device.");
kaweth_resubmit_rx_urb(kaweth); MOD_INC_USE_COUNT;
netif_start_queue(net); kaweth_resubmit_rx_urb(kaweth, GFP_KERNEL);
MOD_INC_USE_COUNT; netif_start_queue(net);
kaweth_async_set_rx_mode(kaweth); kaweth_async_set_rx_mode(kaweth);
return 0; return 0;
...@@ -621,7 +622,7 @@ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net) ...@@ -621,7 +622,7 @@ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
kaweth_usb_transmit_complete, kaweth_usb_transmit_complete,
kaweth); kaweth);
if((res = usb_submit_urb(kaweth->tx_urb))) if((res = usb_submit_urb(kaweth->tx_urb, GFP_ATOMIC)))
{ {
kaweth_warn("kaweth failed tx_urb %d", res); kaweth_warn("kaweth failed tx_urb %d", res);
kaweth->stats.tx_errors++; kaweth->stats.tx_errors++;
...@@ -975,7 +976,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length) ...@@ -975,7 +976,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&awd.wqh, &wait); add_wait_queue(&awd.wqh, &wait);
urb->context = &awd; urb->context = &awd;
status = usb_submit_urb(urb); status = usb_submit_urb(urb, GFP_KERNEL);
if (status) { if (status) {
// something went wrong // something went wrong
usb_free_urb(urb); usb_free_urb(urb);
......
...@@ -605,7 +605,7 @@ static int mdc800_device_open (struct inode* inode, struct file *file) ...@@ -605,7 +605,7 @@ static int mdc800_device_open (struct inode* inode, struct file *file)
retval=0; retval=0;
mdc800->irq_urb->dev = mdc800->dev; mdc800->irq_urb->dev = mdc800->dev;
if (usb_submit_urb (mdc800->irq_urb)) if (usb_submit_urb (mdc800->irq_urb, GFP_KERNEL))
{ {
err ("request USB irq fails (submit_retval=%i urb_status=%i).",retval, mdc800->irq_urb->status); err ("request USB irq fails (submit_retval=%i urb_status=%i).",retval, mdc800->irq_urb->status);
errn = -EIO; errn = -EIO;
...@@ -694,7 +694,7 @@ static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, lof ...@@ -694,7 +694,7 @@ static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, lof
/* Download -> Request new bytes */ /* Download -> Request new bytes */
mdc800->download_urb->dev = mdc800->dev; mdc800->download_urb->dev = mdc800->dev;
if (usb_submit_urb (mdc800->download_urb)) if (usb_submit_urb (mdc800->download_urb, GFP_KERNEL))
{ {
err ("Can't submit download urb (status=%i)",mdc800->download_urb->status); err ("Can't submit download urb (status=%i)",mdc800->download_urb->status);
up (&mdc800->io_lock); up (&mdc800->io_lock);
...@@ -808,7 +808,7 @@ static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t l ...@@ -808,7 +808,7 @@ static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t l
mdc800->state=WORKING; mdc800->state=WORKING;
memcpy (mdc800->write_urb->transfer_buffer, mdc800->in,8); memcpy (mdc800->write_urb->transfer_buffer, mdc800->in,8);
mdc800->write_urb->dev = mdc800->dev; mdc800->write_urb->dev = mdc800->dev;
if (usb_submit_urb (mdc800->write_urb)) if (usb_submit_urb (mdc800->write_urb, GFP_KERNEL))
{ {
err ("submitting write urb fails (status=%i)", mdc800->write_urb->status); err ("submitting write urb fails (status=%i)", mdc800->write_urb->status);
up (&mdc800->io_lock); up (&mdc800->io_lock);
......
...@@ -499,7 +499,7 @@ void mts_int_submit_urb (struct urb* transfer, ...@@ -499,7 +499,7 @@ void mts_int_submit_urb (struct urb* transfer,
transfer->status = 0; transfer->status = 0;
res = usb_submit_urb( transfer ); res = usb_submit_urb( transfer, GFP_ATOMIC );
if ( unlikely(res) ) { if ( unlikely(res) ) {
MTS_INT_ERROR( "could not submit URB! Error was %d\n",(int)res ); MTS_INT_ERROR( "could not submit URB! Error was %d\n",(int)res );
context->srb->result = DID_ERROR << 16; context->srb->result = DID_ERROR << 16;
...@@ -719,7 +719,8 @@ int mts_scsi_queuecommand( Scsi_Cmnd *srb, mts_scsi_cmnd_callback callback ) ...@@ -719,7 +719,8 @@ int mts_scsi_queuecommand( Scsi_Cmnd *srb, mts_scsi_cmnd_callback callback )
mts_build_transfer_context( srb, desc ); mts_build_transfer_context( srb, desc );
desc->context.final_callback = callback; desc->context.final_callback = callback;
res=usb_submit_urb(desc->urb); /* here we need ATOMIC as we are called with the iolock */
res=usb_submit_urb(desc->urb, GFP_ATOMIC);
if(unlikely(res)){ if(unlikely(res)){
MTS_ERROR("error %d submitting URB\n",(int)res); MTS_ERROR("error %d submitting URB\n",(int)res);
......
...@@ -4457,7 +4457,7 @@ ov511_init_isoc(struct usb_ov511 *ov511) ...@@ -4457,7 +4457,7 @@ ov511_init_isoc(struct usb_ov511 *ov511)
for (n = 0; n < OV511_NUMSBUF; n++) { for (n = 0; n < OV511_NUMSBUF; n++) {
ov511->sbuf[n].urb->dev = ov511->dev; ov511->sbuf[n].urb->dev = ov511->dev;
err = usb_submit_urb(ov511->sbuf[n].urb); err = usb_submit_urb(ov511->sbuf[n].urb, GFP_KERNEL);
if (err) if (err)
err("init isoc: usb_submit_urb(%d) ret %d", n, err); err("init isoc: usb_submit_urb(%d) ret %d", n, err);
} }
......
...@@ -157,7 +157,8 @@ static int get_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data) ...@@ -157,7 +157,8 @@ static int get_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
add_wait_queue( &pegasus->ctrl_wait, &wait ); add_wait_queue( &pegasus->ctrl_wait, &wait );
set_current_state( TASK_UNINTERRUPTIBLE ); set_current_state( TASK_UNINTERRUPTIBLE );
if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) { /* using ATOMIC, we'd never wake up if we slept */
if ( (ret = usb_submit_urb( pegasus->ctrl_urb, GFP_ATOMIC )) ) {
err("%s: BAD CTRLs %d", __FUNCTION__, ret); err("%s: BAD CTRLs %d", __FUNCTION__, ret);
goto out; goto out;
} }
...@@ -207,7 +208,7 @@ static int set_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data) ...@@ -207,7 +208,7 @@ static int set_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
add_wait_queue( &pegasus->ctrl_wait, &wait ); add_wait_queue( &pegasus->ctrl_wait, &wait );
set_current_state( TASK_UNINTERRUPTIBLE ); set_current_state( TASK_UNINTERRUPTIBLE );
if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) { if ( (ret = usb_submit_urb( pegasus->ctrl_urb, GFP_ATOMIC )) ) {
err("%s: BAD CTRL %d", __FUNCTION__, ret); err("%s: BAD CTRL %d", __FUNCTION__, ret);
goto out; goto out;
} }
...@@ -257,7 +258,7 @@ static int set_register( pegasus_t *pegasus, __u16 indx, __u8 data ) ...@@ -257,7 +258,7 @@ static int set_register( pegasus_t *pegasus, __u16 indx, __u8 data )
add_wait_queue( &pegasus->ctrl_wait, &wait ); add_wait_queue( &pegasus->ctrl_wait, &wait );
set_current_state( TASK_UNINTERRUPTIBLE ); set_current_state( TASK_UNINTERRUPTIBLE );
if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) { if ( (ret = usb_submit_urb( pegasus->ctrl_urb, GFP_ATOMIC )) ) {
err("%s: BAD CTRL %d", __FUNCTION__, ret); err("%s: BAD CTRL %d", __FUNCTION__, ret);
goto out; goto out;
} }
...@@ -287,7 +288,7 @@ static int update_eth_regs_async( pegasus_t *pegasus ) ...@@ -287,7 +288,7 @@ static int update_eth_regs_async( pegasus_t *pegasus )
(char *)&pegasus->dr, (char *)&pegasus->dr,
pegasus->eth_regs, 3, ctrl_callback, pegasus ); pegasus->eth_regs, 3, ctrl_callback, pegasus );
if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) if ( (ret = usb_submit_urb( pegasus->ctrl_urb, GFP_ATOMIC )) )
err("%s: BAD CTRL %d, flgs %x",__FUNCTION__,ret,pegasus->flags); err("%s: BAD CTRL %d, flgs %x",__FUNCTION__,ret,pegasus->flags);
return ret; return ret;
...@@ -573,7 +574,7 @@ static void read_bulk_callback( struct urb *urb ) ...@@ -573,7 +574,7 @@ static void read_bulk_callback( struct urb *urb )
usb_rcvbulkpipe(pegasus->usb, 1), usb_rcvbulkpipe(pegasus->usb, 1),
pegasus->rx_buff, PEGASUS_MAX_MTU, pegasus->rx_buff, PEGASUS_MAX_MTU,
read_bulk_callback, pegasus ); read_bulk_callback, pegasus );
if ( (res = usb_submit_urb(pegasus->rx_urb)) ) if ( (res = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) )
warn("%s: failed submint rx_urb %d", __FUNCTION__, res); warn("%s: failed submint rx_urb %d", __FUNCTION__, res);
pegasus->flags &= ~PEGASUS_RX_BUSY; pegasus->flags &= ~PEGASUS_RX_BUSY;
} }
...@@ -661,7 +662,7 @@ static int pegasus_start_xmit( struct sk_buff *skb, struct net_device *net ) ...@@ -661,7 +662,7 @@ static int pegasus_start_xmit( struct sk_buff *skb, struct net_device *net )
pegasus->tx_buff, PEGASUS_MAX_MTU, pegasus->tx_buff, PEGASUS_MAX_MTU,
write_bulk_callback, pegasus ); write_bulk_callback, pegasus );
pegasus->tx_urb->transfer_buffer_length = count; pegasus->tx_urb->transfer_buffer_length = count;
if ((res = usb_submit_urb(pegasus->tx_urb))) { if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) {
warn("failed tx_urb %d", res); warn("failed tx_urb %d", res);
pegasus->stats.tx_errors++; pegasus->stats.tx_errors++;
netif_start_queue( net ); netif_start_queue( net );
...@@ -721,14 +722,14 @@ static int pegasus_open(struct net_device *net) ...@@ -721,14 +722,14 @@ static int pegasus_open(struct net_device *net)
usb_rcvbulkpipe(pegasus->usb, 1), usb_rcvbulkpipe(pegasus->usb, 1),
pegasus->rx_buff, PEGASUS_MAX_MTU, pegasus->rx_buff, PEGASUS_MAX_MTU,
read_bulk_callback, pegasus ); read_bulk_callback, pegasus );
if ( (res = usb_submit_urb(pegasus->rx_urb)) ) if ( (res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL)) )
warn("%s: failed rx_urb %d", __FUNCTION__, res); warn("%s: failed rx_urb %d", __FUNCTION__, res);
#ifdef PEGASUS_USE_INTR #ifdef PEGASUS_USE_INTR
FILL_INT_URB( pegasus->intr_urb, pegasus->usb, FILL_INT_URB( pegasus->intr_urb, pegasus->usb,
usb_rcvintpipe(pegasus->usb, 3), usb_rcvintpipe(pegasus->usb, 3),
pegasus->intr_buff, sizeof(pegasus->intr_buff), pegasus->intr_buff, sizeof(pegasus->intr_buff),
intr_callback, pegasus, pegasus->intr_interval ); intr_callback, pegasus, pegasus->intr_interval );
if ( (res = usb_submit_urb(pegasus->intr_urb)) ) if ( (res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL)) )
warn("%s: failed intr_urb %d", __FUNCTION__, res); warn("%s: failed intr_urb %d", __FUNCTION__, res);
#endif #endif
netif_start_queue( net ); netif_start_queue( net );
......
...@@ -261,7 +261,7 @@ static int usblp_open(struct inode *inode, struct file *file) ...@@ -261,7 +261,7 @@ static int usblp_open(struct inode *inode, struct file *file)
if (usblp->bidir) { if (usblp->bidir) {
usblp->readcount = 0; usblp->readcount = 0;
usblp->readurb.dev = usblp->dev; usblp->readurb.dev = usblp->dev;
if (usb_submit_urb(&usblp->readurb) < 0) { if (usb_submit_urb(&usblp->readurb, GFP_KERNEL) < 0) {
retval = -EIO; retval = -EIO;
usblp->used = 0; usblp->used = 0;
file->private_data = NULL; file->private_data = NULL;
...@@ -456,7 +456,7 @@ static ssize_t usblp_write(struct file *file, const char *buffer, size_t count, ...@@ -456,7 +456,7 @@ static ssize_t usblp_write(struct file *file, const char *buffer, size_t count,
usblp->writeurb.dev = usblp->dev; usblp->writeurb.dev = usblp->dev;
usblp->wcomplete = 0; usblp->wcomplete = 0;
if (usb_submit_urb(&usblp->writeurb)) { if (usb_submit_urb(&usblp->writeurb, GFP_KERNEL)) {
count = -EIO; count = -EIO;
up (&usblp->sem); up (&usblp->sem);
break; break;
...@@ -521,7 +521,7 @@ static ssize_t usblp_read(struct file *file, char *buffer, size_t count, loff_t ...@@ -521,7 +521,7 @@ static ssize_t usblp_read(struct file *file, char *buffer, size_t count, loff_t
usblp->minor, usblp->readurb.status); usblp->minor, usblp->readurb.status);
usblp->readurb.dev = usblp->dev; usblp->readurb.dev = usblp->dev;
usblp->readcount = 0; usblp->readcount = 0;
usb_submit_urb(&usblp->readurb); usb_submit_urb(&usblp->readurb, GFP_KERNEL);
count = -EIO; count = -EIO;
goto done; goto done;
} }
...@@ -538,7 +538,7 @@ static ssize_t usblp_read(struct file *file, char *buffer, size_t count, loff_t ...@@ -538,7 +538,7 @@ static ssize_t usblp_read(struct file *file, char *buffer, size_t count, loff_t
usblp->readcount = 0; usblp->readcount = 0;
usblp->readurb.dev = usblp->dev; usblp->readurb.dev = usblp->dev;
usblp->rcomplete = 0; usblp->rcomplete = 0;
if (usb_submit_urb(&usblp->readurb)) { if (usb_submit_urb(&usblp->readurb, GFP_KERNEL)) {
count = -EIO; count = -EIO;
goto done; goto done;
} }
......
...@@ -869,7 +869,7 @@ static int pwc_isoc_init(struct pwc_device *pdev) ...@@ -869,7 +869,7 @@ static int pwc_isoc_init(struct pwc_device *pdev)
/* link */ /* link */
for (i = 0; i < MAX_ISO_BUFS; i++) { for (i = 0; i < MAX_ISO_BUFS; i++) {
ret = usb_submit_urb(pdev->sbuf[i].urb); ret = usb_submit_urb(pdev->sbuf[i].urb, GFP_KERNEL);
if (ret) if (ret)
Err("isoc_init() submit_urb %d failed with error %d\n", i, ret); Err("isoc_init() submit_urb %d failed with error %d\n", i, ret);
else else
......
...@@ -992,7 +992,7 @@ probe_scanner(struct usb_device *dev, unsigned int ifnum, ...@@ -992,7 +992,7 @@ probe_scanner(struct usb_device *dev, unsigned int ifnum,
// endpoint[(int)have_intr].bInterval); // endpoint[(int)have_intr].bInterval);
250); 250);
if (usb_submit_urb(scn->scn_irq)) { if (usb_submit_urb(scn->scn_irq, GFP_KERNEL)) {
err("probe_scanner(%d): Unable to allocate INT URB.", scn_minor); err("probe_scanner(%d): Unable to allocate INT URB.", scn_minor);
kfree(scn); kfree(scn);
up(&scn_mutex); up(&scn_mutex);
......
...@@ -556,7 +556,7 @@ static void se401_video_irq(struct urb *urb) ...@@ -556,7 +556,7 @@ static void se401_video_irq(struct urb *urb)
/* Resubmit urb for new data */ /* Resubmit urb for new data */
urb->status=0; urb->status=0;
urb->dev=se401->dev; urb->dev=se401->dev;
if(usb_submit_urb(urb)) if(usb_submit_urb(urb, GFP_KERNEL))
info("urb burned down"); info("urb burned down");
return; return;
} }
...@@ -657,7 +657,7 @@ static int se401_start_stream(struct usb_se401 *se401) ...@@ -657,7 +657,7 @@ static int se401_start_stream(struct usb_se401 *se401)
se401->urb[i]=urb; se401->urb[i]=urb;
err=usb_submit_urb(se401->urb[i]); err=usb_submit_urb(se401->urb[i], GFP_KERNEL);
if(err) if(err)
err("urb burned down"); err("urb burned down");
} }
...@@ -1477,7 +1477,7 @@ static int se401_init(struct usb_se401 *se401) ...@@ -1477,7 +1477,7 @@ static int se401_init(struct usb_se401 *se401)
se401, se401,
HZ/10 HZ/10
); );
if (usb_submit_urb(se401->inturb)) { if (usb_submit_urb(se401->inturb, GFP_KERNEL)) {
info("int urb burned down"); info("int urb burned down");
return 1; return 1;
} }
......
...@@ -765,7 +765,7 @@ static void stv680_video_irq (struct urb *urb) ...@@ -765,7 +765,7 @@ static void stv680_video_irq (struct urb *urb)
/* Resubmit urb for new data */ /* Resubmit urb for new data */
urb->status = 0; urb->status = 0;
urb->dev = stv680->udev; urb->dev = stv680->udev;
if (usb_submit_urb (urb)) if (usb_submit_urb (urb, GFP_KERNEL))
PDEBUG (0, "STV(e): urb burned down in video irq"); PDEBUG (0, "STV(e): urb burned down in video irq");
return; return;
} /* _video_irq */ } /* _video_irq */
...@@ -816,7 +816,7 @@ static int stv680_start_stream (struct usb_stv *stv680) ...@@ -816,7 +816,7 @@ static int stv680_start_stream (struct usb_stv *stv680)
urb->timeout = PENCAM_TIMEOUT * 2; urb->timeout = PENCAM_TIMEOUT * 2;
urb->transfer_flags |= USB_QUEUE_BULK; urb->transfer_flags |= USB_QUEUE_BULK;
stv680->urb[i] = urb; stv680->urb[i] = urb;
err = usb_submit_urb (stv680->urb[i]); err = usb_submit_urb (stv680->urb[i], GFP_KERNEL);
if (err) if (err)
PDEBUG (0, "STV(e): urb burned down in start stream"); PDEBUG (0, "STV(e): urb burned down in start stream");
} /* i STV680_NUMSBUF */ } /* i STV680_NUMSBUF */
......
...@@ -431,7 +431,9 @@ static ssize_t skel_write (struct file *file, const char *buffer, size_t count, ...@@ -431,7 +431,9 @@ static ssize_t skel_write (struct file *file, const char *buffer, size_t count,
skel_write_bulk_callback, dev); skel_write_bulk_callback, dev);
/* send the data out the bulk port */ /* send the data out the bulk port */
retval = usb_submit_urb(dev->write_urb); /* a character device write uses GFP_KERNEL,
unless a spinlock is held */
retval = usb_submit_urb(dev->write_urb, GFP_KERNEL);
if (retval) { if (retval) {
err(__FUNCTION__ " - failed submitting write urb, error %d", err(__FUNCTION__ " - failed submitting write urb, error %d",
retval); retval);
......
...@@ -129,7 +129,7 @@ int usb_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, i ...@@ -129,7 +129,7 @@ int usb_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, i
kbd->leds = kbd->newleds; kbd->leds = kbd->newleds;
kbd->led->dev = kbd->usbdev; kbd->led->dev = kbd->usbdev;
if (usb_submit_urb(kbd->led)) if (usb_submit_urb(kbd->led, GFP_KERNEL))
err("usb_submit_urb(leds) failed"); err("usb_submit_urb(leds) failed");
return 0; return 0;
...@@ -147,7 +147,7 @@ static void usb_kbd_led(struct urb *urb) ...@@ -147,7 +147,7 @@ static void usb_kbd_led(struct urb *urb)
kbd->leds = kbd->newleds; kbd->leds = kbd->newleds;
kbd->led->dev = kbd->usbdev; kbd->led->dev = kbd->usbdev;
if (usb_submit_urb(kbd->led)) if (usb_submit_urb(kbd->led, GFP_KERNEL))
err("usb_submit_urb(leds) failed"); err("usb_submit_urb(leds) failed");
} }
...@@ -159,7 +159,7 @@ static int usb_kbd_open(struct input_dev *dev) ...@@ -159,7 +159,7 @@ static int usb_kbd_open(struct input_dev *dev)
return 0; return 0;
kbd->irq->dev = kbd->usbdev; kbd->irq->dev = kbd->usbdev;
if (usb_submit_urb(kbd->irq)) if (usb_submit_urb(kbd->irq, GFP_KERNEL))
return -EIO; return -EIO;
return 0; return 0;
......
...@@ -85,7 +85,7 @@ static int usb_mouse_open(struct input_dev *dev) ...@@ -85,7 +85,7 @@ static int usb_mouse_open(struct input_dev *dev)
return 0; return 0;
mouse->irq->dev = mouse->usbdev; mouse->irq->dev = mouse->usbdev;
if (usb_submit_urb(mouse->irq)) if (usb_submit_urb(mouse->irq, GFP_KERNEL))
return -EIO; return -EIO;
return 0; return 0;
......
...@@ -373,7 +373,7 @@ static int gl_interrupt_read (struct usbnet *dev) ...@@ -373,7 +373,7 @@ static int gl_interrupt_read (struct usbnet *dev)
// issue usb interrupt read // issue usb interrupt read
if (priv && priv->irq_urb) { if (priv && priv->irq_urb) {
// submit urb // submit urb
if ((retval = usb_submit_urb (priv->irq_urb)) != 0) if ((retval = usb_submit_urb (priv->irq_urb, GFP_KERNEL)) != 0)
dbg ("gl_interrupt_read: submit fail - %X...", retval); dbg ("gl_interrupt_read: submit fail - %X...", retval);
else else
dbg ("gl_interrupt_read: submit success..."); dbg ("gl_interrupt_read: submit success...");
...@@ -1281,7 +1281,7 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, int flags) ...@@ -1281,7 +1281,7 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, int flags)
spin_lock_irqsave (&dev->rxq.lock, lockflags); spin_lock_irqsave (&dev->rxq.lock, lockflags);
if (netif_running (&dev->net)) { if (netif_running (&dev->net)) {
if ((retval = usb_submit_urb (urb)) != 0) { if ((retval = usb_submit_urb (urb, GFP_ATOMIC)) != 0) {
dbg ("%s rx submit, %d", dev->net.name, retval); dbg ("%s rx submit, %d", dev->net.name, retval);
tasklet_schedule (&dev->bh); tasklet_schedule (&dev->bh);
} else { } else {
...@@ -1642,7 +1642,7 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) ...@@ -1642,7 +1642,7 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
#endif /* CONFIG_USB_NET1080 */ #endif /* CONFIG_USB_NET1080 */
netif_stop_queue (net); netif_stop_queue (net);
if ((retval = usb_submit_urb (urb)) != 0) { if ((retval = usb_submit_urb (urb, GFP_ATOMIC)) != 0) {
netif_start_queue (net); netif_start_queue (net);
dbg ("%s tx: submit urb err %d", net->name, retval); dbg ("%s tx: submit urb err %d", net->name, retval);
} else { } else {
......
...@@ -1916,7 +1916,7 @@ int usbvideo_StartDataPump(uvd_t *uvd) ...@@ -1916,7 +1916,7 @@ int usbvideo_StartDataPump(uvd_t *uvd)
/* Submit all URBs */ /* Submit all URBs */
for (i=0; i < USBVIDEO_NUMSBUF; i++) { for (i=0; i < USBVIDEO_NUMSBUF; i++) {
errFlag = usb_submit_urb(uvd->sbuf[i].urb); errFlag = usb_submit_urb(uvd->sbuf[i].urb, GFP_KERNEL);
if (errFlag) if (errFlag)
err("%s: usb_submit_isoc(%d) ret %d", proc, i, errFlag); err("%s: usb_submit_isoc(%d) ret %d", proc, i, errFlag);
} }
......
...@@ -350,7 +350,7 @@ static void params_changed(struct usb_vicam *vicam) ...@@ -350,7 +350,7 @@ static void params_changed(struct usb_vicam *vicam)
synchronize(vicam); synchronize(vicam);
mdelay(10); mdelay(10);
vicam_parameters(vicam); vicam_parameters(vicam);
printk("Submiting urb: %d\n", usb_submit_urb(vicam->readurb)); printk(KERN_DEBUG "Submiting urb: %d\n", usb_submit_urb(vicam->readurb, GFP_KERNEL));
#endif #endif
} }
...@@ -765,7 +765,7 @@ static void vicam_bulk(struct urb *urb) ...@@ -765,7 +765,7 @@ static void vicam_bulk(struct urb *urb)
memcpy(vicam->fbuf, buf+64, 0x1e480); memcpy(vicam->fbuf, buf+64, 0x1e480);
if (!change_pending) { if (!change_pending) {
if (usb_submit_urb(urb)) if (usb_submit_urb(urb, GFP_ATOMIC))
dbg("failed resubmitting read urb"); dbg("failed resubmitting read urb");
} else { } else {
change_pending = 0; change_pending = 0;
...@@ -849,7 +849,7 @@ static int vicam_init(struct usb_vicam *vicam) ...@@ -849,7 +849,7 @@ static int vicam_init(struct usb_vicam *vicam)
FILL_BULK_URB(vicam->readurb, vicam->udev, usb_rcvbulkpipe(vicam->udev, 0x81), FILL_BULK_URB(vicam->readurb, vicam->udev, usb_rcvbulkpipe(vicam->udev, 0x81),
buf, 0x1e480, vicam_bulk, vicam); buf, 0x1e480, vicam_bulk, vicam);
printk("Submiting urb: %d\n", usb_submit_urb(vicam->readurb)); printk(KERN_DEBUG "Submiting urb: %d\n", usb_submit_urb(vicam->readurb, GFP_KERNEL));
return 0; return 0;
error: error:
......
...@@ -336,7 +336,7 @@ static int wacom_open(struct input_dev *dev) ...@@ -336,7 +336,7 @@ static int wacom_open(struct input_dev *dev)
return 0; return 0;
wacom->irq->dev = wacom->usbdev; wacom->irq->dev = wacom->usbdev;
if (usb_submit_urb(wacom->irq)) if (usb_submit_urb(wacom->irq, GFP_KERNEL))
return -EIO; return -EIO;
return 0; return 0;
......
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