Re: Power off ethernet device

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

 



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.

--
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