Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67856
b: refs/heads/master
c: 503add4
h: refs/heads/master
v: v3
  • Loading branch information
Stanislaw Gruszka authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent 8a412a1 commit 60ce59c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 603cf6087c5f3ee054bb257195b023848d26d76f
refs/heads/master: 503add467d4dd2355fe16ebffa7f6d5e9fcd10a8
28 changes: 12 additions & 16 deletions trunk/drivers/usb/atm/ueagle-atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,16 @@ static const char *chip_name[] = {"ADI930", "Eagle I", "Eagle II", "Eagle III",

static int modem_index;
static unsigned int debug;
static int use_iso[NB_MODEM] = {[0 ... (NB_MODEM - 1)] = 1};
static unsigned int altsetting[NB_MODEM] = {[0 ... (NB_MODEM - 1)] = FASTEST_ISO_INTF};
static int sync_wait[NB_MODEM];
static char *cmv_file[NB_MODEM];
static int annex[NB_MODEM];

module_param(debug, uint, 0644);
MODULE_PARM_DESC(debug, "module debug level (0=off,1=on,2=verbose)");
module_param_array(use_iso, bool, NULL, 0644);
MODULE_PARM_DESC(use_iso, "use isochronous usb pipe for incoming traffic");
module_param_array(altsetting, uint, NULL, 0644);
MODULE_PARM_DESC(altsetting, "alternate setting for incoming traffic: 0=bulk, "
"1=isoc slowest, ... , 8=isoc fastest (default)");
module_param_array(sync_wait, bool, NULL, 0644);
MODULE_PARM_DESC(sync_wait, "wait the synchronisation before starting ATM");
module_param_array(cmv_file, charp, NULL, 0644);
Expand Down Expand Up @@ -1254,7 +1255,7 @@ static void uea_set_bulk_timeout(struct uea_softc *sc, u32 dsrate)
*/

if (UEA_CHIP_VERSION(sc) == ADI930 ||
use_iso[sc->modem_index] > 0 ||
altsetting[sc->modem_index] > 0 ||
sc->stats.phy.dsrate == dsrate)
return;

Expand Down Expand Up @@ -2459,6 +2460,7 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
struct usb_device *usb = interface_to_usbdev(intf);
struct uea_softc *sc;
int ret, ifnum = intf->altsetting->desc.bInterfaceNumber;
unsigned int alt;

uea_enters(usb);

Expand Down Expand Up @@ -2506,22 +2508,16 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
else
sc->annex = (le16_to_cpu(sc->usb_dev->descriptor.bcdDevice) & 0x80)?ANNEXB:ANNEXA;

alt = altsetting[sc->modem_index];
/* ADI930 don't support iso */
if (UEA_CHIP_VERSION(id) != ADI930 && use_iso[sc->modem_index]) {
int i;

/* try set fastest alternate for inbound traffic interface */
for (i = FASTEST_ISO_INTF; i > 0; i--)
if (usb_set_interface(usb, UEA_DS_IFACE_NO, i) == 0)
break;

if (i > 0) {
uea_dbg(usb, "set alternate %d for 2 interface\n", i);
if (UEA_CHIP_VERSION(id) != ADI930 && alt > 0) {
if (alt <= 8 && usb_set_interface(usb, UEA_DS_IFACE_NO, alt) == 0) {
uea_dbg(usb, "set alternate %u for 2 interface\n", alt);
uea_info(usb, "using iso mode\n");
usbatm->flags |= UDSL_USE_ISOC | UDSL_IGNORE_EILSEQ;
} else {
uea_err(usb, "setting any alternate failed for "
"2 interface, using bulk mode\n");
uea_err(usb, "setting alternate %u failed for "
"2 interface, using bulk mode\n", alt);
}
}

Expand Down

0 comments on commit 60ce59c

Please sign in to comment.