Remove ARM dependency for dm9000 driver
Hi,
What about this patch which removes ARM dependency for dm9000 ethernet controller driver ?
drivers/net/Kconfig +1 -1
@@ -856,7 +856,7 @@ config SMC9194 config DM9000 tristate "DM9000 support" - depends on ARM && NET_ETHERNET + depends on NET_ETHERNET select CRC32 select MII ---help---
My platform based on MIPS cpu used it...
Thanks
--
Franck
Quoted 19 lines · Franck
Hi,
What about this patch which removes ARM dependency for dm9000 ethernet controller driver ?
drivers/net/Kconfig +1
-1@@ -856,7 +856,7 @@ config SMC9194 config DM9000 tristate "DM9000 support" - depends on ARM && NET_ETHERNET + depends on NET_ETHERNET select CRC32 select MII ---help---
Quoted 1 line
My platform based on MIPS cpu used it...
Maybe that should be (ARM || MIPS) && NET_ETHERNET ?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
2005/11/30, Russell King <[email protected]>:
Quoted 8 lines · Franck
Quoted 5 lines
Hi,
What about this patch which removes ARM dependency for dm9000 ethernet controller driver ?
Maybe that should be (ARM || MIPS) &&
NET_ETHERNET?
Well, if this dependency means "it has only be tested on ARM and MIPS", then you're probably right. But if it means "this controller must be run with an ARM or MIPS cpu" then I don't see why setting such restriction. What do you think ?
thanks
--
Franck
Quoted 7 lines · Franck
2005/11/30, Russell King <[email protected]>:
Quoted 6 lines · Franck
Quoted 5 lines
Hi,
What about this patch which removes ARM dependency for dm9000 ethernet controller driver ?
Quoted 7 lines
Quoted 2 lines
Maybe that should be (ARM || MIPS) &&
NET_ETHERNET?Well, if this dependency means "it has only be tested on ARM and MIPS", then you're probably right. But if it means "this controller must be run with an ARM or MIPS cpu" then I don't see why setting such restriction. What do you think ?
If other CPUs use this then fine, but I find that having config options needlessly available to all architectures is annoying - especially when they are never used.
Eg, would you ever expect to see a DM9000 ethernet device on an x86 machine? Probably not - there's far better PCI solutions now.
So until someone says "I want to use this on such and such arch" I think it's better to keep it dependent on those we know are likely to support it.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
2005/11/30, Russell King <[email protected]>:
Quoted 5 lines
If other CPUs use this then fine, but I find that having config options needlessly available to all architectures is annoying - especially when they are never used.
Quoted 7 lines
Eg, would you ever expect to see a DM9000 ethernet device on an x86 machine? Probably not - there's far better PCI solutions now.
So until someone says "I want to use this on such and such arch" I think it's better to keep it dependent on those we know are likely to support it.
That makes sens, specially if it's going to be used only by few arch. I'll resend a new patch.
Thanks
--
Franck
Quoted 3 lines · Russell King
So until someone says "I want to use this on such and such arch" I think it's better to keep it dependent on those we know are likely to support it.
I disagree; unless there's a reason why it _shouldn't_ work on a given architecture, it should be possible to enable it there.
I believe I've seen FR-V boards with dm9000 too.
Signature · 1 line
dwmw2
Quoted 7 lines · David Woodhouse
Quoted 3 lines · Russell King
So until someone says "I want to use this on such and such arch" I think it's better to keep it dependent on those we know are likely to support it.
I disagree; unless there's a reason why it _shouldn't_ work on a given architecture, it should be possible to enable it there.
We agree to disagree. For example, in all probability, ARM will never see a TPM chip, yet it's offered for selection. Given that, does it really make sense to offer it for ARM?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 3 lines · Russell King
We agree to disagree. For example, in all probability, ARM will never see a TPM chip, yet it's offered for selection. Given that, does it really make sense to offer it for ARM?
You speak of _probability_. Yes, it makes sense to offer it as an _option_ for ARM. It just doesn't make sense to put it in the defconfig for any of the existing platforms.
Nobody expects 'allyesconfig' to be something you'd actually want to _use_.
Signature · 1 line
dwmw2
Quoted 11 lines · David Woodhouse
Quoted 3 lines · Russell King
We agree to disagree. For example, in all probability, ARM will never see a TPM chip, yet it's offered for selection. Given that, does it really make sense to offer it for ARM?
You speak of _probability_. Yes, it makes sense to offer it as an _option_ for ARM. It just doesn't make sense to put it in the defconfig for any of the existing platforms.
Nobody expects 'allyesconfig' to be something you'd actually want to _use_.
In which case why do we restrict floppy to only those machines which could have floppy? Why do we restrict IDE to only those platforms which may have IDE?
Hint: there's already a precident established for *not* offering configuration options which are pointless.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
David S. Miller
maintainerFrom: Russell King <[email protected]>
Date: Thu, 1 Dec 2005 09:41:11 +0000
Quoted 3 lines
In which case why do we restrict floppy to only those machines which could have floppy? Why do we restrict IDE to only those platforms which may have IDE?
These two examples require platform level support via an asm/*.h header file.
Whereas the driver's we are talking about use portable interfaces that should be available across the board.
So, bad example.
Quoted 7 lines · David S. Miller
From: Russell King <[email protected]>
Date: Thu, 1 Dec 2005 09:41:11 +0000Quoted 3 lines
In which case why do we restrict floppy to only those machines which could have floppy? Why do we restrict IDE to only those platforms which may have IDE?
Quoted 7 lines
These two examples require platform level support via an asm/*.h header file.
Whereas the driver's we are talking about use portable interfaces that should be available across the board.
So, bad example.
Not in the IDE case. Bart restricted IDE to a smaller number of ARM platforms, plus any that had PCMCIA. There is no such restriction in the asm-arm/*.h header files.
if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \
|| ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \
|| ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGEsource "drivers/ide/Kconfig"
endif
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 11 lines · Russell King
Quoted 10 lines · David S. Miller
From: Russell King <[email protected]>
Date: Thu, 1 Dec 2005 09:41:11 +0000Quoted 3 lines
In which case why do we restrict floppy to only those machines which could have floppy? Why do we restrict IDE to only those platforms which may have IDE?
These two examples require platform level support via an asm/*.h header file.
Quoted 8 lines
Quoted 4 lines
Whereas the driver's we are talking about use portable interfaces that should be available across the board.
So, bad example.
Not in the IDE case. Bart restricted IDE to a smaller number of ARM platforms, plus any that had PCMCIA. There is no such restriction in the asm-arm/*.h header files.
When I did this change there was such restriction in asm-arm/mach-*/ide.h files (some platforms just lacked ide.h making IDE build break for them).
IDE is a bad example anyway because of legacy ordering issues etc etc.
Quoted 5 lines
if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGEsource "
drivers/ide/Kconfig"
endif
Quoted 4 lines · Bartlomiej Zolnierkiewicz
Quoted 3 lines · Russell King
Quoted 1 line · David S. Miller
So, bad example.
Quoted 8 lines
Quoted 3 lines
Not in the IDE case. Bart restricted IDE to a smaller number of ARM platforms, plus any that had PCMCIA. There is no such restriction in the asm-arm/*.h header files.
When I did this change there was such restriction in
asm-arm/mach-*/ide.hfiles (some platforms just lackedide.hmaking IDE build break for them).IDE is a bad example anyway because of legacy ordering issues etc etc.
Okay. Given the general concensus in this thread, can this be removed now?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 9 lines · Russell King
Quoted 8 lines · Bartlomiej Zolnierkiewicz
Quoted 6 lines · Russell King
Quoted 1 line · David S. Miller
So, bad example.
Not in the IDE case. Bart restricted IDE to a smaller number of ARM platforms, plus any that had PCMCIA. There is no such restriction in the asm-arm/*.h header files.
Quoted 7 lines
Quoted 4 lines
When I did this change there was such restriction in
asm-arm/mach-*/ide.hfiles (some platforms just lackedide.hmaking IDE build break for them).IDE is a bad example anyway because of legacy ordering issues etc etc.
Okay. Given the general concensus in this thread, can this be removed now?
No, I didn't say that I agree with DaveM. :)
For IDE keeping restriction makes it much easier to maintain (i.e. to answer questions like "why is this ugly hack needed?").
Bartlomiej
Quoted 2 lines · Russell King
In which case why do we restrict floppy to only those machines which could have floppy?
Because the floopy drivers needs asm/floppy.h and wouldn't build on others.
Quoted 2 lines
Why do we restrict IDE to only those platforms
which may have IDE?
Dito with asm/ide.h
these are very old drivers where people weren't used to abstractions that would allow to write them platform-independent. For any driver that doesn't have an actual platform depency making it conditional is a bad idea.
David S. Miller
maintainerFrom: Russell King <[email protected]>
Date: Wed, 30 Nov 2005 16:55:47 +0000
Quoted 6 lines
If other CPUs use this then fine, but I find that having config options needlessly available to all architectures is annoying - especially when they are never used.
Eg, would you ever expect to see a DM9000 ethernet device on an x86 machine? Probably not - there's far better PCI solutions now.
If I, for example, make changes across the tree to SKB handling, I'd like to be able to build as many drivers as possible and fix up the compile warnings and build failures before _you_ get to see them.
That's why it's a good idea to make drivers available to as many platforms as possible, even if the hardware isn't necessarily used there.
2005/11/30, David S. Miller <[email protected]>:
Quoted 10 lines
From: Russell King <[email protected]>
Date: Wed, 30 Nov 2005 16:55:47 +0000Quoted 6 lines
If other CPUs use this then fine, but I find that having config options needlessly available to all architectures is annoying - especially when they are never used.
Eg, would you ever expect to see a DM9000 ethernet device on an x86 machine? Probably not - there's far better PCI solutions now.
Quoted 8 lines
If I, for example, make changes across the tree to SKB handling, I'd like to be able to build as many drivers as possible and fix up the compile warnings and build failures before _you_ get to see them.
That's why it's a good idea to make drivers available to as many platforms as possible, even if the hardware isn't necessarily used there.
this would mean that we should change almost all ethernet driver deps ?
thanks
--
Franck
Quoted 3 lines · Russell King
So until someone says "I want to use this on such and such arch" I think it's better to keep it dependent on those we know are likely to support it.
I use DM9000 on SH-4.
Signature · 1 line
Matan Ziv-Av. [email protected]