[OpenWrt-Devel] lantiq usb - isochronous transfers

pasdVn pasdVn3 at gmx.de
Sun Nov 16 12:58:33 EST 2014


Hi all,

I'm trying to play around with isochronous USB mode an a fritz box
router using freetz (a firmware mod of the original AVM firmware) and
found this discussion during my research.

As far as figured out, openwrt AA uses the dwc usb module (originally
written by DesignWare) for the most lantiq SoC's except those used by
AVM devices. Those are using the ifx-hcd module (v1.0) instead, that
originally was written by lantiq and was published by AVM's code
tarballs. While dwc-usb obviously supports isochronous transfer ifx-hcd
doesn't (code does not compile if you activate this feature).
Openwrt BB instead uses a more up-to-date version of ifx-hcd (3.2) for
all lantiq SoC's that includes isochronous transfer that compiles but
does not work.

Obviously those two modules targeting the same usb-controller and are
exchangeable, am I right? So in my special case using the dwc-usb module
of openwrt AA with the original AVM kernel/freetz seems a promising
approach to make isochronous transfer work?

I also tried to port the ifx-hcd's code of openwrt BB to AVM/freetz, but
by now I only get crashes. As this module obviously does not even work
with a nativ openwrt build I don't need to invest more work here unless
anybody find's a more up-to-date version of the code. Does anybody know
where the currently used v3.2 code is from? I think it is not from AVM
as all those comments and hacks of v1.0 etc. are missing.

Thanks a lot,
Tobias Herzog

Am Montag, den 10.11.2014, 09:37 +0100 schrieb Ben Mulvihill:
> Thanks!
> 
> Any recommendations for good reasonably up-to-date GPL tarballs? 
> 
> On Mon, 2014-11-10 at 09:21 +0100, John Crispin wrote:
> > there is now a upstream driver for dwc2 usb. i already started using it
> > on ralink. we should really try to use that one. i am happy to take any
> > patches though that imporve the current state.
> > 
> > maybe we could also try to port a ifxhcd froma  recent GPL tarball.
> > 
> > 
> > 
> > 
> > On 10/11/2014 09:03, Ben Mulvihill wrote:
> > > May I ask what the status of isochronous transfer support is
> > > in the lantiq hcd driver? It was working in Attitude Adjustment
> > > (at least my usb sound card worked anyway).
> > > But a lot of changes were made to the driver between AA and BB,
> > > including new code related to isosynchronous transfers, which are
> > > now disabled by default (CONFIG_USB_HOST_IFX_WITH_ISO=n).
> > > Someone else has filed a bug about this:
> > > 
> > > https://dev.openwrt.org/ticket/15364
> > > 
> > > I tried building a BB image with isochronous transfers enabled,
> > > but ifxhcd_intr.c failed to compile. The errors look like the
> > > sorts of careless syntax errors which most people make when
> > > writing a first version of a new piece of code, and my guess is
> > > that this bit of code has have never in fact been compiled, let
> > > alone tested. I have managed to get it to compile by making
> > > various plausible corrections, but I don't yet have any sound.
> > > Before I investigate further can you tell me whether it is
> > > supposed to be working?
> > > 
> > > (Below, for reference, are the corrections I have made. But this
> > > is just an initial attempt, certainly not a patch to be merged.)
> > > 
> > > Many thanks,
> > > 
> > > Ben Mulvihill
> > > 
> > > --- a/package/kernel/lantiq/ltq-hcd/src/ifxhcd_intr.c	2014-11-10 00:31:52.744641266 +0100
> > > +++ b/package/kernel/lantiq/ltq-hcd/src/ifxhcd_intr.c	2014-11-10 00:25:03.321242453 +0100
> > > @@ -103,6 +103,10 @@
> > >  		ifxusb_mreg(&((_hc_regs_)->hcintmsk),0, hcintmsk.d32); \
> > >  	} while (0)
> > >  
> > > +
> > > +static
> > > +void init_hc(ifxhcd_epqh_t *_epqh);
> > > +
> > >  /*
> > >   * Save the starting data toggle for the next transfer. The data toggle is
> > >   * saved in the QH for non-control transfers and it's saved in the QTD for
> > > @@ -4089,13 +4093,13 @@ void init_hc(ifxhcd_epqh_t *_epqh)
> > >  				ifxhc->isoc_xact_pos = IFXUSB_HCSPLIT_XACTPOS_ALL;
> > >  			#endif
> > >  
> > > -			_epqh->isoc_frame_index=0;
> > > +			urbd->isoc_frame_index=0;
> > >  			_epqh->isoc_now=0;
> > >  			_epqh->isoc_start_frame=0;
> > > -			if(_urb->transfer_flags && URB_ISO_ASAP)
> > > +			if(urb->transfer_flags && URB_ISO_ASAP)
> > >  				_epqh->isoc_now=1;
> > >  			else
> > > -				_epqh->isoc_start_frame=_urb->start_frame;
> > > +				_epqh->isoc_start_frame=urb->start_frame;
> > >  			#ifdef __EN_ISOC_SPLIT__
> > >  				_epqh->isoc_split_pos   =0;
> > >  				_epqh->isoc_split_offset=0;
> > > @@ -4296,8 +4300,8 @@ void select_eps_sub(ifxhcd_hcd_t *_ifxhc
> > >  								list_add_tail(&epqh->ql, &_ifxhcd->epqh_list_isoc);
> > >  								init_hc(epqh);
> > >  								epqh->phase=EPQH_ACTIVE;
> > > -								urbd->phase==URBD_ACTIVE;
> > > -								epqh->hc.phase=HC_WAITING;
> > > +								urbd->phase=URBD_ACTIVE;
> > > +								epqh->hc->phase=HC_WAITING;
> > >  								ifxhcd_hc_start(_ifxhcd, epqh->hc);
> > >  							}
> > >  							break;
> > > 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list