Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1399965

Re: [PATCH] usb: dwc2: fix regression on big-endian PowerPC/ARM systems

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] usb: dwc2: fix regression on big-endian PowerPC/ARM systems
Date 2016-05-12 14:00 +0200
Message-ID <rxXrB-4Y2-29@gated-at.bofh.it> (permalink)
References <rxWlP-3Oh-5@gated-at.bofh.it> <rxX8e-4Hz-17@gated-at.bofh.it> <rxXhU-4OQ-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday 12 May 2016 14:43:43 Felipe Balbi wrote:
> >> How many more drivers will we have to 'fix' like this ?
> >
> > Endianess problems will keep coming up, and we have hundreds or thousands
> > of drivers that are written with a particular design in mind that could
> > be wrong as soon as someone chooses to build an SoC that does things
> > differently. Once that happens, we'll fix them.
> >
> > Also, Christian has already posted a better version of the patch
> > that fixes this driver in an architecture independent way, but we still
> > need a workaround for the stable backports.
> 
> hmmm, at least dwc3 (also from SNPS) has a couple bits where we can
> choose endianess for registers and DMA descriptors. John, do we have the
> same for dwc2 ? Wouldn't that be a better way to solve the problem ?

Yes, I think that would be the best solution (provided it works correctly).

My understanding is that the descriptors don't need to change
for the particular MIPS machine, only the registers do. If we have
another machine that requires the descriptor endianess to be flipped
from the default, we probably need a DT property or platform_data
flag to encode that.

We can do the register endianess detection from Christian's patch to
flip it around if necessary, and then revert back to the previous
state of always using readl/writel.

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] usb: dwc2: fix regression on big-endian PowerPC/ARM systems Arnd Bergmann <arnd@arndb.de> - 2016-05-12 12:50 +0200
  Re: [PATCH] usb: dwc2: fix regression on big-endian PowerPC/ARM systems Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-05-12 13:30 +0200
    Re: [PATCH] usb: dwc2: fix regression on big-endian PowerPC/ARM systems Arnd Bergmann <arnd@arndb.de> - 2016-05-12 13:40 +0200
      Re: [PATCH] usb: dwc2: fix regression on big-endian PowerPC/ARM systems Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-05-12 13:50 +0200
        Re: [PATCH] usb: dwc2: fix regression on big-endian PowerPC/ARM systems Arnd Bergmann <arnd@arndb.de> - 2016-05-12 14:00 +0200

csiph-web