public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale•com>
To: Jochen Friedrich <jochen@scram•de>
Cc: Jeff Garzik <jeff@garzik•org>,
	"linuxppc-embedded@ozlabs•org" <linuxppc-embedded@ozlabs•org>
Subject: Re: [RFC] [POWERPC] Add support for PHY-less fs_enet operation
Date: Mon, 05 Nov 2007 13:04:33 -0600	[thread overview]
Message-ID: <472F6941.1040302@freescale.com> (raw)
In-Reply-To: <472CCA98.4000808@scram.de>

Jochen Friedrich wrote:
> diff --git a/drivers/net/fs_enet/fs_enet-main.c 
> b/drivers/net/fs_enet/fs_enet-main.c
> index f2a4d39..e142eff 100644
> --- a/drivers/net/fs_enet/fs_enet-main.c
> +++ b/drivers/net/fs_enet/fs_enet-main.c
> @@ -702,13 +702,16 @@ static void fs_timeout(struct net_device *dev)
>     spin_lock_irqsave(&fep->lock, flags);
> 
>     if (dev->flags & IFF_UP) {
> -        phy_stop(fep->phydev);
> +        if (fep->phydev)
> +            phy_stop(fep->phydev);
>         (*fep->ops->stop)(dev);
>         (*fep->ops->restart)(dev);
> -        phy_start(fep->phydev);
> +        if (fep->phydev)
> +            phy_start(fep->phydev);
>     }

It might be nice if phy_stop/phy_start/etc. were made to accept NULL 
parameters as no-ops to make things easier on drivers that support 
phyless operation...

-Scott

      reply	other threads:[~2007-11-05 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-03 19:23 [RFC] [POWERPC] Add support for PHY-less fs_enet operation Jochen Friedrich
2007-11-05 19:04 ` Scott Wood [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=472F6941.1040302@freescale.com \
    --to=scottwood@freescale$(echo .)com \
    --cc=jeff@garzik$(echo .)org \
    --cc=jochen@scram$(echo .)de \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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