From: Jeff Garzik <jgarzik@pobox.com>
To: Ondrej Zary <linux@rainbow-software.org>
Cc: netdev@vger.kernel.org,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] de2104x: fix TP link detection
Date: Sat, 25 Sep 2010 16:58:10 -0400 [thread overview]
Message-ID: <AANLkTikasuZbf6ymCWBjAW3oq7+BBox1N06jPZqTBQr4@mail.gmail.com> (raw)
In-Reply-To: <201009252239.21376.linux@rainbow-software.org>
On Sat, Sep 25, 2010 at 4:39 PM, Ondrej Zary <linux@rainbow-software.org> wrote:
> @@ -1160,14 +1164,29 @@ no_link_yet:
> static void de_media_interrupt (struct de_private *de, u32 status)
> {
> if (status & LinkPass) {
> + /* Ignore if current media is AUI or BNC and we can't use TP */
> + if ((de->media_type == DE_MEDIA_AUI ||
> + de->media_type == DE_MEDIA_BNC) &&
> + (de->media_lock ||
> + !de_ok_to_advertise(de, DE_MEDIA_TP_AUTO)))
> + return;
> + /* If current media is not TP, change it to TP */
> + if ((de->media_type == DE_MEDIA_AUI ||
> + de->media_type == DE_MEDIA_BNC)) {
> + de->media_type = DE_MEDIA_TP_AUTO;
> + de_stop_rxtx(de);
> + de_set_media(de);
> + de_start_rxtx(de);
> + }
> de_link_up(de);
> mod_timer(&de->media_timer, jiffies + DE_TIMER_LINK);
> return;
> }
>
> BUG_ON(!(status & LinkFail));
> -
> - if (netif_carrier_ok(de->dev)) {
> + /* Mark the link as down only if current media is TP */
> + if (netif_carrier_ok(de->dev) && de->media_type != DE_MEDIA_AUI &&
> + de->media_type != DE_MEDIA_BNC) {
> de_link_down(de);
> mod_timer(&de->media_timer, jiffies + DE_TIMER_NO_LINK);
> }
Acked-by: Jeff Garzik <jgarzik@redhat.com>
next prev parent reply other threads:[~2010-09-25 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-25 20:39 [PATCH] de2104x: fix TP link detection Ondrej Zary
2010-09-25 20:58 ` Jeff Garzik [this message]
2010-09-26 22:52 ` David Miller
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=AANLkTikasuZbf6ymCWBjAW3oq7+BBox1N06jPZqTBQr4@mail.gmail.com \
--to=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rainbow-software.org \
--cc=netdev@vger.kernel.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).