Commit 4a8925d1 authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by David S. Miller

[IRDA]: Use kill_urb() in irda-usb

* change comment about Sigmatel now that there is a driver
* convert to new module_param
* places where urb is unlinked synchronously, use usb_kill_urb
  because that is now a runtime warning.

Original patch from Stephen Hemminger
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarJean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d2b920e
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -88,10 +88,10 @@ static struct usb_device_id dongles[] = { ...@@ -88,10 +88,10 @@ static struct usb_device_id dongles[] = {
/* /*
* Important note : * Important note :
* Devices based on the SigmaTel chipset (0x66f, 0x4200) are not compliant * Devices based on the SigmaTel chipset (0x66f, 0x4200) are not designed
* with the USB-IrDA specification (and actually very very different), and * using the "USB-IrDA specification" (yes, there exist such a thing), and
* there is no way this driver can support those devices, apart from * therefore not supported by this driver (don't add them above).
* a complete rewrite... * There is a Linux driver, stir4200, that support those USB devices.
* Jean II * Jean II
*/ */
...@@ -1007,9 +1007,9 @@ static int irda_usb_net_close(struct net_device *netdev) ...@@ -1007,9 +1007,9 @@ static int irda_usb_net_close(struct net_device *netdev)
} }
/* Cancel Tx and speed URB - need to be synchronous to avoid races */ /* Cancel Tx and speed URB - need to be synchronous to avoid races */
self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK; self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->tx_urb); usb_kill_urb(self->tx_urb);
self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK; self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->speed_urb); usb_kill_urb(self->speed_urb);
/* Stop and remove instance of IrLAP */ /* Stop and remove instance of IrLAP */
if (self->irlap) if (self->irlap)
...@@ -1520,9 +1520,9 @@ static void irda_usb_disconnect(struct usb_interface *intf) ...@@ -1520,9 +1520,9 @@ static void irda_usb_disconnect(struct usb_interface *intf)
/* Cancel Tx and speed URB. /* Cancel Tx and speed URB.
* Toggle flags to make sure it's synchronous. */ * Toggle flags to make sure it's synchronous. */
self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK; self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->tx_urb); usb_kill_urb(self->tx_urb);
self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK; self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->speed_urb); usb_kill_urb(self->speed_urb);
} }
/* Cleanup the device stuff */ /* Cleanup the device stuff */
...@@ -1593,7 +1593,7 @@ module_exit(usb_irda_cleanup); ...@@ -1593,7 +1593,7 @@ module_exit(usb_irda_cleanup);
/* /*
* Module parameters * Module parameters
*/ */
MODULE_PARM(qos_mtt_bits, "i"); module_param(qos_mtt_bits, int, 0);
MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time"); MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time");
MODULE_AUTHOR("Roman Weissgaerber <weissg@vienna.at>, Dag Brattli <dag@brattli.net> and Jean Tourrilhes <jt@hpl.hp.com>"); MODULE_AUTHOR("Roman Weissgaerber <weissg@vienna.at>, Dag Brattli <dag@brattli.net> and Jean Tourrilhes <jt@hpl.hp.com>");
MODULE_DESCRIPTION("IrDA-USB Dongle Driver"); MODULE_DESCRIPTION("IrDA-USB Dongle Driver");
......
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