netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Fuzzey <mfuzzey@gmail.com>
To: nico@cam.org
Cc: netdev@vger.kernel.org
Subject: SMC91x: forcing speed
Date: Thu, 4 Jun 2009 15:08:29 +0200	[thread overview]
Message-ID: <ba4215e10906040608m36538458u60a7971834f26d2@mail.gmail.com> (raw)

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

             reply	other threads:[~2009-06-04 13:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 13:08 Martin Fuzzey [this message]
2009-06-04 15:02 ` SMC91x: forcing speed 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba4215e10906040608m36538458u60a7971834f26d2@mail.gmail.com \
    --to=mfuzzey@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).