diff options
Diffstat (limited to 'drivers/usb/atm/ueagle-atm.c')
-rw-r--r-- | drivers/usb/atm/ueagle-atm.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index 4362cfd801b5..ea7dfe0c8275 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c | |||
@@ -68,7 +68,7 @@ | |||
68 | 68 | ||
69 | #include "usbatm.h" | 69 | #include "usbatm.h" |
70 | 70 | ||
71 | #define EAGLEUSBVERSION "ueagle 1.1" | 71 | #define EAGLEUSBVERSION "ueagle 1.2" |
72 | 72 | ||
73 | 73 | ||
74 | /* | 74 | /* |
@@ -364,11 +364,14 @@ static const char *chip_name[] = {"ADI930", "Eagle I", "Eagle II", "Eagle III"}; | |||
364 | 364 | ||
365 | static int modem_index; | 365 | static int modem_index; |
366 | static unsigned int debug; | 366 | static unsigned int debug; |
367 | static int use_iso[NB_MODEM] = {[0 ... (NB_MODEM - 1)] = 1}; | ||
367 | static int sync_wait[NB_MODEM]; | 368 | static int sync_wait[NB_MODEM]; |
368 | static char *cmv_file[NB_MODEM]; | 369 | static char *cmv_file[NB_MODEM]; |
369 | 370 | ||
370 | module_param(debug, uint, 0644); | 371 | module_param(debug, uint, 0644); |
371 | MODULE_PARM_DESC(debug, "module debug level (0=off,1=on,2=verbose)"); | 372 | MODULE_PARM_DESC(debug, "module debug level (0=off,1=on,2=verbose)"); |
373 | module_param_array(use_iso, bool, NULL, 0644); | ||
374 | MODULE_PARM_DESC(use_iso, "use isochronous usb pipe for incoming traffic"); | ||
372 | module_param_array(sync_wait, bool, NULL, 0644); | 375 | module_param_array(sync_wait, bool, NULL, 0644); |
373 | MODULE_PARM_DESC(sync_wait, "wait the synchronisation before starting ATM"); | 376 | MODULE_PARM_DESC(sync_wait, "wait the synchronisation before starting ATM"); |
374 | module_param_array(cmv_file, charp, NULL, 0644); | 377 | module_param_array(cmv_file, charp, NULL, 0644); |
@@ -936,6 +939,7 @@ static int uea_stat(struct uea_softc *sc) | |||
936 | * ADI930 don't support it (-EPIPE error). | 939 | * ADI930 don't support it (-EPIPE error). |
937 | */ | 940 | */ |
938 | if (UEA_CHIP_VERSION(sc) != ADI930 | 941 | if (UEA_CHIP_VERSION(sc) != ADI930 |
942 | && !use_iso[sc->modem_index] | ||
939 | && sc->stats.phy.dsrate != (data >> 16) * 32) { | 943 | && sc->stats.phy.dsrate != (data >> 16) * 32) { |
940 | /* Original timming from ADI(used in windows driver) | 944 | /* Original timming from ADI(used in windows driver) |
941 | * 0x20ffff>>16 * 32 = 32 * 32 = 1Mbits | 945 | * 0x20ffff>>16 * 32 = 32 * 32 = 1Mbits |
@@ -1659,6 +1663,25 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf, | |||
1659 | sc->modem_index = (modem_index < NB_MODEM) ? modem_index++ : 0; | 1663 | sc->modem_index = (modem_index < NB_MODEM) ? modem_index++ : 0; |
1660 | sc->driver_info = id->driver_info; | 1664 | sc->driver_info = id->driver_info; |
1661 | 1665 | ||
1666 | /* ADI930 don't support iso */ | ||
1667 | if (UEA_CHIP_VERSION(id) != ADI930 && use_iso[sc->modem_index]) { | ||
1668 | int i; | ||
1669 | |||
1670 | /* try set fastest alternate for inbound traffic interface */ | ||
1671 | for (i = FASTEST_ISO_INTF; i > 0; i--) | ||
1672 | if (usb_set_interface(usb, UEA_DS_IFACE_NO, i) == 0) | ||
1673 | break; | ||
1674 | |||
1675 | if (i > 0) { | ||
1676 | uea_dbg(usb, "set alternate %d for 2 interface\n", i); | ||
1677 | uea_info(usb, "using iso mode\n"); | ||
1678 | usbatm->flags |= UDSL_USE_ISOC | UDSL_IGNORE_EILSEQ; | ||
1679 | } else { | ||
1680 | uea_err(usb, "setting any alternate failed for " | ||
1681 | "2 interface, using bulk mode\n"); | ||
1682 | } | ||
1683 | } | ||
1684 | |||
1662 | ret = uea_boot(sc); | 1685 | ret = uea_boot(sc); |
1663 | if (ret < 0) { | 1686 | if (ret < 0) { |
1664 | kfree(sc); | 1687 | kfree(sc); |
@@ -1708,6 +1731,7 @@ static struct usbatm_driver uea_usbatm_driver = { | |||
1708 | .heavy_init = uea_heavy, | 1731 | .heavy_init = uea_heavy, |
1709 | .bulk_in = UEA_BULK_DATA_PIPE, | 1732 | .bulk_in = UEA_BULK_DATA_PIPE, |
1710 | .bulk_out = UEA_BULK_DATA_PIPE, | 1733 | .bulk_out = UEA_BULK_DATA_PIPE, |
1734 | .isoc_in = UEA_ISO_DATA_PIPE, | ||
1711 | }; | 1735 | }; |
1712 | 1736 | ||
1713 | static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id) | 1737 | static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id) |