Thread (13 messages) 13 messages, 6 authors, 2004-02-05

Re: [PATCH] Fix byte-swapped ethernet addr for Asante Fast 10/100 PCI Adapter

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2003-12-23 14:01:49

On Tue, 23 Dec 2003, Michael Schmitz wrote:
quoted
quoted
This is a card with an Open Firmware driver or not ? If it has, then
I'd rather use the OF properties (like name property) to detect this
specific card and flip the MAC
Please forgive my ignorance, but how do I tell if the card has an OF
driver?  Running "ofpath /dev/eth1" doesn't reveal anything, although
looking at the source for "ofpath" shows me that it doesn't handle
ethernet devices.  I don't see anything under /proc/device-tree/ that
would map to the Asante ethernet card, either.
If there's nothing under /proc/device-tree/, the card doesn't have an OF
driver.
quoted
The card does show up in "lspci" and /proc/pci (obviously).  Would
checking for the PCI vendor/device and subvendor/subdevice be
equivalent to checking for the OF name property?
I'm not sure - the card having an OF driver might mean it's a Mac card,
needing byte swapping, whereas a card with no OF driver would be a PC
card, needing no byte swap. Or vice versa. Asante probably never built PC
specific ethernet cards so the PCI vendor/device property could be used
instead of OF data. OF data is just easier to get at :-)
Really? I'd say it's easier to look at the struct pci_dev the Tulip driver
already looks at. Besides, someone may want to try that card in a non-PowerMac,
while still having the correct MAC address.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help