aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-23 23:29:14 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-23 23:29:14 -0500
commitdcb571be2019ae677bc5ed64437dbc87ae1eb67f (patch)
tree1b93f9ea3568be4dcc49ffb2adc0d3ab0a02b47f /include/linux
parent9156ad48338e0306e508ead5c0d9986050744475 (diff)
parent96f39c1718091d63dc1c5012d566737ea0d2a20c (diff)
Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.25
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/phy_fixed.h51
1 files changed, 22 insertions, 29 deletions
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h
index 04ba70d49fb..509d8f5f984 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
14struct fixed_phy_status { 4struct 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 13extern int fixed_phy_add(unsigned int irq, int phy_id,
22 *-----------------------------------------------------------------------------*/ 14 struct fixed_phy_status *status);
23struct fixed_info { 15#else
24 u16 *regs; 16static 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
34int fixed_mdio_set_link_update(struct phy_device *, 26 */
35 int (*link_update) (struct net_device *, struct fixed_phy_status *)); 27extern int fixed_phy_set_link_update(struct phy_device *phydev,
36struct 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 */