X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Firda%2Firda-usb.c;h=9e93080d2a13bde7246565d98fa5fd2e44318083;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=62f9853893ba7bbf62aa759e3252f768a1959b8a;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 62f985389..9e93080d2 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c @@ -52,7 +52,7 @@ /*------------------------------------------------------------------*/ #include - +#include #include #include #include @@ -88,10 +88,10 @@ static struct usb_device_id dongles[] = { /* * Important note : - * Devices based on the SigmaTel chipset (0x66f, 0x4200) are not compliant - * with the USB-IrDA specification (and actually very very different), and - * there is no way this driver can support those devices, apart from - * a complete rewrite... + * Devices based on the SigmaTel chipset (0x66f, 0x4200) are not designed + * using the "USB-IrDA specification" (yes, there exist such a thing), and + * therefore not supported by this driver (don't add them above). + * There is a Linux driver, stir4200, that support those USB devices. * Jean II */ @@ -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 */ 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; - usb_unlink_urb(self->speed_urb); + usb_kill_urb(self->speed_urb); /* Stop and remove instance of IrLAP */ if (self->irlap) @@ -1220,7 +1220,7 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_ ep = endpoint[i].desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; dir = endpoint[i].desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK; attr = endpoint[i].desc.bmAttributes; - psize = endpoint[i].desc.wMaxPacketSize; + psize = le16_to_cpu(endpoint[i].desc.wMaxPacketSize); /* Is it a bulk endpoint ??? */ if(attr == USB_ENDPOINT_XFER_BULK) { @@ -1360,8 +1360,8 @@ static int irda_usb_probe(struct usb_interface *intf, * Jean II */ MESSAGE("IRDA-USB found at address %d, Vendor: %x, Product: %x\n", - dev->devnum, dev->descriptor.idVendor, - dev->descriptor.idProduct); + dev->devnum, le16_to_cpu(dev->descriptor.idVendor), + le16_to_cpu(dev->descriptor.idProduct)); net = alloc_irdadev(sizeof(*self)); if (!net) @@ -1520,9 +1520,9 @@ static void irda_usb_disconnect(struct usb_interface *intf) /* Cancel Tx and speed URB. * Toggle flags to make sure it's synchronous. */ 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; - usb_unlink_urb(self->speed_urb); + usb_kill_urb(self->speed_urb); } /* Cleanup the device stuff */ @@ -1593,7 +1593,7 @@ module_exit(usb_irda_cleanup); /* * 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_AUTHOR("Roman Weissgaerber , Dag Brattli and Jean Tourrilhes "); MODULE_DESCRIPTION("IrDA-USB Dongle Driver");