Re: Power off ethernet device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 3 Jun 2008 08:48:30 +0000 (GMT)
Nicola Salvemini <nicolasalvemini@xxxxxxxx> wrote:

> Thanks to all to help me!
>  
> Now I’m testing the possibility to use ioctl to command the PHY device. I’m studying how mii-tools works and about the possibility to reuse the Giuseppe’s patch, but I’m not an expert and I need many time!
> When I’ll achieve something good, I’ll post a message.
>  
> Thank you very much for your help.
>  
> Nicola.
> 
> ----- Messaggio originale -----
> Da: Giuseppe Cavallaro <peppe.cavallaro@xxxxxxxxx>
> A: Nicola Salvemini <nicolasalvemini@xxxxxxxx>
> Cc: Glenn Henshaw <thraxisp@xxxxxxxxxxxxxxxxx>; linux-net@xxxxxxxxxxxxxxx
> Inviato: Lunedì 2 giugno 2008, 19:54:58
> Oggetto: Re: Power off ethernet device
> 
> Glenn Henshaw wrote:
> >
> > On 28-May-08, at 6:43 AM, Nicola Salvemini wrote:
> >
> >> Hello,
> >>
> >> I'm developing some
> >> software on a development board based on AT91SAM9260 processor. I
> >> need to power off the ethernet device, but I need a “low level”
> >> command. I mean that an “ifconfig eth0 down” command is not
> >> suffice to my purpose, I need a command to emulate a cable
> >> disconnection, something to power off the yellow LED on the ethernet
> >> port.
> >>
> >> I'd like to implement an "application layer" function that uses  some 
> >> kernel functions (maybe some physical abstract layer function), but 
> >> I'm not very sure on how to proceed.
> >
> >  What PHY device are you using? Many of them allow the link to be 
> > controlled using ioctl commands. Look at mii-tool for examples of how 
> > this is done,
> >
> If your Ethernet driver uses a PHY device driver trough the PAL 
> (physical abstract layer), there is no specific command to put in power 
> save the PHY device (no entry in proc or sys FS, no user 
> application).Note that, PHY Power save operation is usually performed by 
> setting the Reg0 bit 11. Maybe, you could use the suspend/resume 
> functions. There is a patch I posted some weeks ago to do that. Indeed,  
> I'm continuing to work on it for the stlinux but I use the Linux PM 
> framework to test the PHY power mode.
> So you ought to hack your code, as Glenn, suggested, adding a specific 
> ioctl.
> mii-tool is a good example to start.

An ethernet device should just power off PHY if possible when the
interface is marked down (ifconfig eth0 down). There are cases such
as wake-on-lan, and ASF where this is not possible because there are
features that are expected to work when device is offline.

Don't introduce additional device specific complexity to handle something
that existing device's do with existing API's.
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux