netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	Manfred Spraul <manfred@colorfullife.com>,
	nedev <netdev@vger.kernel.org>,
	stable@kernel.org
Subject: Re: [PATCH] forcedeth boot delay fix
Date: Tue, 20 Nov 2007 01:08:58 -0800	[thread overview]
Message-ID: <20071120010858.4d098194.akpm@linux-foundation.org> (raw)
In-Reply-To: <47408EE5.2040302@nvidia.com>

On Sun, 18 Nov 2007 14:13:41 -0500 Ayaz Abdulla <aabdulla@nvidia.com> wrote:

> This patch fixes a long boot delay in the forcedeth driver. During 
> initialization, the timeout for the handshake between mgmt unit and 
> driver can be very long. The patch reduces the timeout by eliminating a 
> extra loop around the timeout logic.
> 
> Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
> 
> 
> 
> [patch-forcedeth-sema-fix  text/plain (1.3KB)]
> --- old/drivers/net/forcedeth.c	2007-11-08 17:33:00.000000000 -0500
> +++ new/drivers/net/forcedeth.c	2007-11-08 17:34:25.000000000 -0500
> @@ -5286,20 +5286,17 @@
>  		if (readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_PHY_INIT) {
>  			np->mac_in_use = readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_MGMT_ST;
>  			dprintk(KERN_INFO "%s: mgmt unit is running. mac in use %x.\n", pci_name(pci_dev), np->mac_in_use);
> -			for (i = 0; i < 5000; i++) {
> -				msleep(1);
> -				if (nv_mgmt_acquire_sema(dev)) {
> -					/* management unit setup the phy already? */
> -					if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) ==
> -					    NVREG_XMITCTL_SYNC_PHY_INIT) {
> -						/* phy is inited by mgmt unit */
> -						phyinitialized = 1;
> -						dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev));
> -					} else {
> -						/* we need to init the phy */
> -					}
> -					break;
> +			if (nv_mgmt_acquire_sema(dev)) {
> +				/* management unit setup the phy already? */
> +				if ((readl(base + NvRegTransmitterControl) & NVREG_XMITCTL_SYNC_MASK) ==
> +				    NVREG_XMITCTL_SYNC_PHY_INIT) {
> +					/* phy is inited by mgmt unit */
> +					phyinitialized = 1;
> +					dprintk(KERN_INFO "%s: Phy already initialized by mgmt unit.\n", pci_name(pci_dev));
> +				} else {
> +					/* we need to init the phy */
>  				}
> +				break;
>  			}
>  		}
>  	}

drivers/net/forcedeth.c: In function 'nv_probe':
drivers/net/forcedeth.c:5307: error: break statement not within loop or switch  

  reply	other threads:[~2007-11-20  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-18 19:13 [PATCH] forcedeth boot delay fix Ayaz Abdulla
2007-11-20  9:08 ` Andrew Morton [this message]
2007-11-19 18:13   ` Ayaz Abdulla

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=20071120010858.4d098194.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aabdulla@nvidia.com \
    --cc=jgarzik@pobox.com \
    --cc=manfred@colorfullife.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@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).