public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: matthieu castet <castet.matthieu@free.fr>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org, usbatm@lists.infradead.org,
	linux-usb-devel@lists.sourceforge.net,
	ueagle <ueagleatm-dev@gna.org>
Subject: [PATCH 1/2] UEAGLE : add iso support
Date: Sat, 14 Jan 2006 12:22:54 +0100	[thread overview]
Message-ID: <43C8DF0E.4040402@free.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

Hi,

This patch adds the support for isochronous pipe.

A new module parameter is added to select iso mode.
It is set to iso by default because bulk mode doesn't work well at high 
speed rate (>3 Mbps for upload).

We use UDSL_IGNORE_EILSEQ flags because ADI firmware doesn't reply to 
ISO IN when it has nothing to send [1].


[1]
from cypress datasheet :

The ISOSEND0 Bit (bit 7 in the USBPAIR Register) is used when the EZ-USB 
FX chip receives an
isochronous IN token while the IN FIFO is empty. If ISOSEND0=0 (the 
default value), the USB
core does not respond to the IN token. If ISOSEND0=1, the USB core sends 
a zero-length data
packet in response to the IN token. The action to take depends on the 
overall system design. The
ISOSEND0 Bit applies to all of the isochronous IN endpoints, IN-8 
through IN-15.



Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>

[-- Attachment #2: ueagle_iso --]
[-- Type: text/plain, Size: 2188 bytes --]

--- Linux1/drivers/usb/atm/ueagle-atm.c	2006-01-14 12:05:58.000000000 +0100
+++ Linux/drivers/usb/atm/ueagle-atm.c	2006-01-14 12:07:29.000000000 +0100
@@ -67,7 +67,7 @@
 
 #include "usbatm.h"
 
-#define EAGLEUSBVERSION "ueagle 1.1"
+#define EAGLEUSBVERSION "ueagle 1.2"
 
 
 /*
@@ -363,11 +363,14 @@
 
 static int modem_index;
 static unsigned int debug;
+static int use_iso[NB_MODEM] = {[0 ... (NB_MODEM - 1)] = 1};
 static int sync_wait[NB_MODEM];
 static char *cmv_file[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(sync_wait, bool, NULL, 0644);
 MODULE_PARM_DESC(sync_wait, "wait the synchronisation before starting ATM");
 module_param_array(cmv_file, charp, NULL, 0644);
@@ -935,6 +938,7 @@
 	 * ADI930 don't support it (-EPIPE error).
 	 */
 	if (UEA_CHIP_VERSION(sc) != ADI930
+		    && !use_iso[sc->modem_index]
 		    && sc->stats.phy.dsrate != (data >> 16) * 32) {
 		/* Original timming from ADI(used in windows driver)
 		 * 0x20ffff>>16 * 32 = 32 * 32 = 1Mbits
@@ -1658,6 +1662,25 @@
 	sc->modem_index = (modem_index < NB_MODEM) ? modem_index++ : 0;
 	sc->driver_info = id->driver_info;
 
+	/* 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);
+			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");
+		}
+	}
+
 	ret = uea_boot(sc);
 	if (ret < 0) {
 		kfree(sc);
@@ -1707,6 +1730,7 @@
 	.heavy_init = uea_heavy,
 	.bulk_in = UEA_BULK_DATA_PIPE,
 	.bulk_out = UEA_BULK_DATA_PIPE,
+	.isoc_in = UEA_ISO_DATA_PIPE,
 };
 
 static int uea_probe(struct usb_interface *intf, const struct usb_device_id *id)

                 reply	other threads:[~2006-01-14 11:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43C8DF0E.4040402@free.fr \
    --to=castet.matthieu@free.fr \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=ueagleatm-dev@gna.org \
    --cc=usbatm@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox