netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SMC91x: forcing speed
@ 2009-06-04 13:08 Martin Fuzzey
  2009-06-04 15:02 ` Richard Röjfors
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Fuzzey @ 2009-06-04 13:08 UTC (permalink / raw)
  To: nico; +Cc: netdev

Hi,

I am using the SMC91x driver on a based ARM board that has a hardware
problem causing 100Mbps mode not to work (even though the PHY
negotiates to that speed).
Unfortunately fixing the hardware is not an option :(

I'm currently using this simple hack to make it work:

diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index fdcbaf8..95f129e 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2022,7 +2022,9 @@ static int __devinit smc_probe(struct net_device
*dev, void __iomem *ioaddr,

        if (lp->version >= (CHIP_91100 << 4)) {
                lp->ctl_rfduplx = 1;
+#ifndef CONFIG_MACH_PKN_TGX200
                lp->ctl_rspeed = 100;
+#endif
        }

        /* Grab the IRQ */

Is there a better way of doing this that would be acceptable for mainline?
The options I can think of are :

1) platform data : (new bit in flags or new member in struct smc91x_platdata)
2) command line parameter

I prefer 1) since that lets the board specific code do it rather than
messing with bootloader parameters.

I need NFS root so setting the speed later with miitool etc is not an
option [I don't want to add an initrd just for this]

I'm happy to submit the patch if we can agree on the method and other
people may be interested or should I just stick to my current hack?

Regards,

Martin

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-06-09  1:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-04 13:08 SMC91x: forcing speed Martin Fuzzey
2009-06-04 15:02 ` Richard Röjfors
2009-06-08 12:02   ` Martin Fuzzey
2009-06-08 21:22     ` David Miller
2009-06-08 21:42       ` Martin Fuzzey
2009-06-08 21:44         ` David Miller
2009-06-08 22:17           ` Nicolas Pitre
2009-06-08 23:06             ` David Miller
2009-06-09  1:08               ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).