diff options
Diffstat (limited to 'include/linux/phy_fixed.h')
-rw-r--r-- | include/linux/phy_fixed.h | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h index 04ba70d49fb8..509d8f5f984e 100644 --- a/include/linux/phy_fixed.h +++ b/include/linux/phy_fixed.h | |||
@@ -1,38 +1,31 @@ | |||
1 | #ifndef __PHY_FIXED_H | 1 | #ifndef __PHY_FIXED_H |
2 | #define __PHY_FIXED_H | 2 | #define __PHY_FIXED_H |
3 | 3 | ||
4 | #define MII_REGS_NUM 29 | ||
5 | |||
6 | /* max number of virtual phy stuff */ | ||
7 | #define MAX_PHY_AMNT 10 | ||
8 | /* | ||
9 | The idea is to emulate normal phy behavior by responding with | ||
10 | pre-defined values to mii BMCR read, so that read_status hook could | ||
11 | take all the needed info. | ||
12 | */ | ||
13 | |||
14 | struct fixed_phy_status { | 4 | struct fixed_phy_status { |
15 | u8 link; | 5 | int link; |
16 | u16 speed; | 6 | int speed; |
17 | u8 duplex; | 7 | int duplex; |
8 | int pause; | ||
9 | int asym_pause; | ||
18 | }; | 10 | }; |
19 | 11 | ||
20 | /*----------------------------------------------------------------------------- | 12 | #ifdef CONFIG_FIXED_PHY |
21 | * Private information hoder for mii_bus | 13 | extern int fixed_phy_add(unsigned int irq, int phy_id, |
22 | *-----------------------------------------------------------------------------*/ | 14 | struct fixed_phy_status *status); |
23 | struct fixed_info { | 15 | #else |
24 | u16 *regs; | 16 | static inline int fixed_phy_add(unsigned int irq, int phy_id, |
25 | u8 regs_num; | 17 | struct fixed_phy_status *status) |
26 | struct fixed_phy_status phy_status; | 18 | { |
27 | struct phy_device *phydev; /* pointer to the container */ | 19 | return -ENODEV; |
28 | /* link & speed cb */ | 20 | } |
29 | int (*link_update) (struct net_device *, struct fixed_phy_status *); | 21 | #endif /* CONFIG_FIXED_PHY */ |
30 | 22 | ||
31 | }; | 23 | /* |
32 | 24 | * This function issued only by fixed_phy-aware drivers, no need | |
33 | 25 | * protect it with #ifdef | |
34 | int fixed_mdio_set_link_update(struct phy_device *, | 26 | */ |
35 | int (*link_update) (struct net_device *, struct fixed_phy_status *)); | 27 | extern int fixed_phy_set_link_update(struct phy_device *phydev, |
36 | struct fixed_info *fixed_mdio_get_phydev (int phydev_ind); | 28 | int (*link_update)(struct net_device *, |
29 | struct fixed_phy_status *)); | ||
37 | 30 | ||
38 | #endif /* __PHY_FIXED_H */ | 31 | #endif /* __PHY_FIXED_H */ |