Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/unistd.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/phy.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
Go to the source code of this file.
Macros | |
#define | pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
Definition at line 18 of file phy_device.c.
EXPORT_SYMBOL | ( | phy_device_free | ) |
EXPORT_SYMBOL | ( | phy_register_fixup | ) |
EXPORT_SYMBOL | ( | phy_register_fixup_for_uid | ) |
EXPORT_SYMBOL | ( | phy_register_fixup_for_id | ) |
EXPORT_SYMBOL | ( | phy_scan_fixups | ) |
EXPORT_SYMBOL | ( | phy_device_create | ) |
EXPORT_SYMBOL | ( | get_phy_device | ) |
EXPORT_SYMBOL | ( | phy_device_register | ) |
EXPORT_SYMBOL | ( | phy_find_first | ) |
EXPORT_SYMBOL | ( | phy_connect_direct | ) |
EXPORT_SYMBOL | ( | phy_connect | ) |
EXPORT_SYMBOL | ( | phy_disconnect | ) |
EXPORT_SYMBOL | ( | phy_attach | ) |
EXPORT_SYMBOL | ( | phy_detach | ) |
EXPORT_SYMBOL | ( | genphy_restart_aneg | ) |
EXPORT_SYMBOL | ( | genphy_config_aneg | ) |
EXPORT_SYMBOL | ( | genphy_update_link | ) |
EXPORT_SYMBOL | ( | genphy_read_status | ) |
EXPORT_SYMBOL | ( | genphy_suspend | ) |
EXPORT_SYMBOL | ( | genphy_resume | ) |
EXPORT_SYMBOL | ( | phy_driver_register | ) |
EXPORT_SYMBOL | ( | phy_drivers_register | ) |
EXPORT_SYMBOL | ( | phy_driver_unregister | ) |
EXPORT_SYMBOL | ( | phy_drivers_unregister | ) |
int genphy_config_aneg | ( | struct phy_device * | phydev | ) |
genphy_config_aneg - restart auto-negotiation or write BMCR : target phy_device struct
Description: If auto-negotiation is enabled, we configure the advertising, and then restart auto-negotiation. If it is not enabled, then we write the BMCR.
Definition at line 754 of file phy_device.c.
int genphy_read_status | ( | struct phy_device * | phydev | ) |
genphy_read_status - check the link status and update current link state : target phy_device struct
Description: Check the link, then figure out the current state by comparing what we advertise with what the link partner advertises. Start by checking the gigabit possibilities, then move on to 10/100.
Definition at line 829 of file phy_device.c.
int genphy_restart_aneg | ( | struct phy_device * | phydev | ) |
genphy_restart_aneg - Enable and Restart Autonegotiation : target phy_device struct
Definition at line 725 of file phy_device.c.
int genphy_resume | ( | struct phy_device * | phydev | ) |
Definition at line 977 of file phy_device.c.
int genphy_suspend | ( | struct phy_device * | phydev | ) |
Definition at line 962 of file phy_device.c.
int genphy_update_link | ( | struct phy_device * | phydev | ) |
genphy_update_link - update link status in : target phy_device struct
Description: Update the value in phydev->link to reflect the current link value. In order to do this, we need to read the status register twice, keeping the second value.
Definition at line 795 of file phy_device.c.
get_phy_device - reads the specified PHY device and returns its struct : the target MII bus : PHY address on the MII bus : If true the PHY uses the 802.3 clause 45 protocol
Description: Reads the ID registers of the PHY at on the , then allocates and returns the phy_device to represent it.
Definition at line 328 of file phy_device.c.
Definition at line 455 of file mdio_bus.c.
Definition at line 441 of file mdio_bus.c.
MODULE_AUTHOR | ( | "Andy Fleming" | ) |
MODULE_DESCRIPTION | ( | "PHY library" | ) |
module_exit | ( | phy_exit | ) |
MODULE_LICENSE | ( | "GPL" | ) |
|
read |
Definition at line 585 of file phy_device.c.
|
read |
Definition at line 457 of file phy_device.c.
int phy_connect_direct | ( | struct net_device * | dev, |
struct phy_device * | phydev, | ||
void(*)(struct net_device *) | handler, | ||
u32 | flags, | ||
phy_interface_t | interface | ||
) |
Definition at line 422 of file phy_device.c.
void phy_detach | ( | struct phy_device * | phydev | ) |
phy_detach - detach a PHY device from its network device : target phy_device struct
Definition at line 614 of file phy_device.c.
|
read |
Definition at line 155 of file phy_device.c.
void phy_device_free | ( | struct phy_device * | phydev | ) |
Definition at line 45 of file phy_device.c.
int phy_device_register | ( | struct phy_device * | phydev | ) |
phy_device_register - Register the phy device on the MDIO bus : phy_device structure to be added to the MDIO bus
Definition at line 353 of file phy_device.c.
void phy_disconnect | ( | struct phy_device * | phydev | ) |
phy_disconnect - disable interrupts, stop state machine, and detach a PHY device : target phy_device struct
Definition at line 486 of file phy_device.c.
int phy_driver_register | ( | struct phy_driver * | new_driver | ) |
phy_driver_register - register a phy_driver with the PHY layer : new phy_driver to register
Definition at line 1058 of file phy_device.c.
void phy_driver_unregister | ( | struct phy_driver * | drv | ) |
Definition at line 1098 of file phy_device.c.
int phy_drivers_register | ( | struct phy_driver * | new_driver, |
int | n | ||
) |
Definition at line 1082 of file phy_device.c.
void phy_drivers_unregister | ( | struct phy_driver * | drv, |
int | n | ||
) |
Definition at line 1104 of file phy_device.c.
|
read |
int phy_init_hw | ( | struct phy_device * | phydev | ) |
Definition at line 499 of file phy_device.c.
int phy_register_fixup | ( | const char * | bus_id, |
u32 | phy_uid, | ||
u32 | phy_uid_mask, | ||
int(*)(struct phy_device *) | run | ||
) |
Definition at line 75 of file phy_device.c.
Definition at line 106 of file phy_device.c.
Definition at line 98 of file phy_device.c.
int phy_scan_fixups | ( | struct phy_device * | phydev | ) |
Definition at line 132 of file phy_device.c.
subsys_initcall | ( | phy_init | ) |