[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1217941466.24157.190.camel@pasglop>
Date: Tue, 05 Aug 2008 23:04:26 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Karsten Keil <kkeil@...e.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, isdn4linux@...tserv.isdn4linux.de
Subject: Re: [PATCH 3/4] Fix remaining big endian issue of hfcmulti
> Thanks for this hint, I didn't know that the repetive versions are
> for byte streams and not for eg. transfer of multiple u32.
> So it makes things lot easier the code should look like:
>
> int l = len >> 2;
>
> if (l) {
> ioread32_rep(hc->pci_membase + A_FIFO_DATA0, data, l);
> data += l << 2;
> }
> if (len & 2) {
> ioread16_rep(hc->pci_membase + A_FIFO_DATA0, data, 1);
> data += 2;
> }
> if (len & 1)
> writeb(*data, hc->pci_membase + A_FIFO_DATA0);
Don't mix the io* variants with the PCI variants. Use iowrite8 for the
last one and make sure you do a proper pci_iomap.
One cool thing with the new iomap stuff is that it also works for both
PIO and MMIO, so you no longer need to differenciate writeX from outX
as long as you use the right mapping stuff initially.
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists