netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Dan Williams <dcbw@redhat.com>
Cc: Petko Manolov <petkan@nucleusys.com>, Greg KH <greg@kroah.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] usb-net/pegasus: simplify carrier detection
Date: Fri, 27 Apr 2007 20:17:10 -0400	[thread overview]
Message-ID: <46329286.8050708@garzik.org> (raw)
In-Reply-To: <1177551029.1684.2.camel@localhost.localdomain>

Dan Williams wrote:
> Simplify pegasus carrier detection; rely only on the periodic MII
> polling.  Reverts pieces of c43c49bd61fdb9bb085ddafcaadb17d06f95ec43.
> 
> Signed-off-by: Dan Williams <dcbw@redhat.com>
> 
> --- a/drivers/usb/net/pegasus.h	2007-04-25 21:21:00.000000000 -0400
> +++ b/drivers/usb/net/pegasus.h	2007-04-25 21:21:13.000000000 -0400
> @@ -11,7 +11,6 @@
>  
>  #define	PEGASUS_II		0x80000000
>  #define	HAS_HOME_PNA		0x40000000
> -#define	TRUST_LINK_STATUS	0x20000000
>  
>  #define	PEGASUS_MTU		1536
>  #define	RX_SKBS			4
> @@ -204,7 +203,7 @@
>  PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100,
>  		DEFAULT_GPIO_RESET | PEGASUS_II )
>  PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121,
> -		DEFAULT_GPIO_RESET | PEGASUS_II | TRUST_LINK_STATUS )
> +		DEFAULT_GPIO_RESET | PEGASUS_II )
>  PEGASUS_DEV( "Billionton USB-100", VENDOR_BILLIONTON, 0x0986,
>  		DEFAULT_GPIO_RESET )
>  PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987,
> --- a/drivers/usb/net/pegasus.c	2007-04-25 21:20:32.000000000 -0400
> +++ b/drivers/usb/net/pegasus.c	2007-04-25 21:22:15.000000000 -0400
> @@ -848,16 +848,6 @@
>  		 * d[0].NO_CARRIER kicks in only with failed TX.
>  		 * ... so monitoring with MII may be safest.
>  		 */
> -		if (pegasus->features & TRUST_LINK_STATUS) {
> -			if (d[5] & LINK_STATUS)
> -				netif_carrier_on(net);
> -			else
> -				netif_carrier_off(net);
> -		} else {
> -			/* Never set carrier _on_ based on ! NO_CARRIER */
> -			if (d[0] & NO_CARRIER)
> -				netif_carrier_off(net);	
> -		}
>  
>  		/* bytes 3-4 == rx_lostpkt, reg 2E/2F */
>  		pegasus->stats.rx_missed_errors += ((d[3] & 0x7f) << 8) | d[4];

applied



      parent reply	other threads:[~2007-04-28  0:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 14:20 [PATCH] usb-net/pegasus: fix pegasus carrier detection Dan Williams
2007-04-24 16:49 ` Jeff Garzik
2007-04-24 17:04   ` Greg KH
2007-04-24 17:41     ` Jeff Garzik
2007-04-24 17:48     ` petkan
2007-04-24 20:24       ` Dan Williams
2007-04-25 14:58         ` Petko Manolov
2007-04-25 15:08           ` Dan Williams
2007-04-25 15:09             ` Petko Manolov
2007-04-25 16:03               ` Dan Williams
2007-04-25 16:02                 ` Jeff Garzik
2007-04-26  1:30                   ` [PATCH] usb-net/pegasus: simplify " Dan Williams
2007-04-26  9:12                     ` Petko Manolov
2007-04-28  0:17                     ` Jeff Garzik [this message]

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=46329286.8050708@garzik.org \
    --to=jeff@garzik.org \
    --cc=dcbw@redhat.com \
    --cc=greg@kroah.com \
    --cc=netdev@vger.kernel.org \
    --cc=petkan@nucleusys.com \
    /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).