Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2010 14:23:04 -0700 (PDT)
From:      Sushanth Rai <sushanth_rai@yahoo.com>
To:        pyunyh@gmail.com
Cc:        freebsd-net@freebsd.org, Luiz Otavio O Souza <lists.br@gmail.com>
Subject:   Re: Changing link status in bge driver
Message-ID:  <603765.7505.qm@web180004.mail.gq1.yahoo.com>
In-Reply-To: <20100923182637.GB15014@michelle.cdnetworks.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Implementing IFM_NONE in brgphy_service() to power down PHY works like a charm !!

Many thanks
Sushanth

--- On Thu, 9/23/10, Pyun YongHyeon <pyunyh@gmail.com> wrote:

> From: Pyun YongHyeon <pyunyh@gmail.com>
> Subject: Re: Changing link status in bge driver
> To: "Sushanth Rai" <sushanth_rai@yahoo.com>
> Cc: "Luiz Otavio O Souza" <lists.br@gmail.com>, freebsd-net@freebsd.org
> Date: Thursday, September 23, 2010, 11:26 AM
> On Thu, Sep 23, 2010 at 11:05:08AM
> -0700, Sushanth Rai wrote:
> > "ifconfig bge1 media none" does change the PHY status
> temporarily. I see the following when I run this command:
> > 
> > bge1:
> flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
> metric 0 mtu 1500
> >   
>    options=bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM>
> >         ether
> 00:40:d0:b8:1e:0b
> >         media: Ethernet
> none
> >         status: no
> carrier
> > 
> > After a few seconds if I do "ifconfig bge1", it's
> automagically changed to:
> > 
> > bge1:
> flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
> metric 0 mtu 1500
> >   
>    options=bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM>
> >         ether
> 00:40:d0:b8:1e:0b
> >         media: Ethernet
> none (1000baseTX <full-duplex>)
> >         status: active
> > 
> > 
> > I tried playing around with mediaopt, but PHY status
> doesn't seem to change permanently. 
> > 
> 
> brgphy(4) does not correctly handle IFM_NONE at this
> moment. In
> fact, brgphy(4)'s manual media configuration does not seem
> to work
> well. See MII_MEDIACHG handler of brgphy_physervice and
> implement
> IFM_NONE media type to power down or isolate the PHY.
> 
> > 
> > --- On Thu, 9/23/10, Luiz Otavio O Souza <lists.br@gmail.com>
> wrote:
> > 
> > > From: Luiz Otavio O Souza <lists.br@gmail.com>
> > > Subject: Re: Changing link status in bge driver
> > > To: "Sushanth Rai" <sushanth_rai@yahoo.com>
> > > Date: Thursday, September 23, 2010, 2:31 AM
> > > On Sep 23, 2010, at 4:11 AM, Sushanth
> > > Rai wrote:
> > > 
> > > > Hello,
> > > > 
> > > > I'm using BCM5715C based NIC card on a
> FreeBSD 7.2
> > > system. I would like to simulate condition where
> the PHY
> > > layer is powered-off i.e, the link status should
> show as "no
> > > carrier". When I do "ifconfig down", it just
> turns-off the
> > > driver and the link status is still active. Is
> there is
> > > anything I can do in the bge driver or anywhere
> else in the
> > > software stack to simulate this condition without
> physically
> > > disconnecting the cable ?
> > > > 
> > > > Thanks,
> > > > Sushanth
> > > 
> > > Hi,
> > > 
> > > ifconfig bgeX media none should do what you
> need.
> > > 
> > > Luiz
> > _______________________________________________
> > freebsd-net@freebsd.org
> mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-net
> > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?603765.7505.qm>