[parisc-linux] IBM TR patch
Jochen Friedrich
jochen@scram.de
Mon, 14 Jan 2002 20:53:26 +0100 (CET)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--2831155551-2009707125-1011038006=:7418
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi there,
this patch fixes some endianess issues of the current ibmtr driver.
Although the current uses of htons() etc look correct, they are not: the
writew/readw API already do the byte swap on big endian machines.
Additionally, i added a switch to turn off IPv4 summing. This might be
needed for IPv6 and is absolutely necessary on HP PARISC platform with the
current broken ioremap implementation. The IPv4 summing is the only place
in the driver that accesses memory directly without the readX or
memcpy_fromio macros.
With the patch, the ibmtr driver should work on big endian machines with
ISA/EISA bus (e.g. 68000 and HP PARISC).
On PARISC, the card gets initialized and joins the ring, but due to the
ISA memory access bug, it will receive garbage on memory regions with
(ISA memory & 0x300) == 0.
Cheers,
Jochen
--2831155551-2009707125-1011038006=:7418
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ibmtr.c.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.43.0201142053260.7418@alpha.bocc.de>
Content-Description:
Content-Disposition: attachment; filename="ibmtr.c.diff"
LS0tIGxpbnV4L2RyaXZlcnMvbmV0L3Rva2VucmluZy9pYm10ci5jCUZyaSBO
b3YgIDkgMjM6MDI6MjQgMjAwMQ0KKysrIGxpbnV4LTIuNC4xNy9kcml2ZXJz
L25ldC90b2tlbnJpbmcvaWJtdHIuYwlNb24gSmFuIDE0IDAwOjIxOjIxIDIw
MDINCkBAIC0xMDAsNiArMTAwLDkgQEANCiAgKg0KICAqICAgICAgQ2hhbmdl
cyBieSBCdXJ0IFNpbHZlcm1hbiB0byBhbGxvdyB0aGUgY29tcHV0ZXIgdG8g
YmVoYXZlIG5pY2VseSB3aGVuDQogICoJYSBjYWJsZSBpcyBwdWxsZWQgb3Ig
bm90IGluIHBsYWNlLCBvciBhIFBDTUNJQSB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