summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300/include/linux
diff options
context:
space:
mode:
authorJun Xiang2012-05-31 20:06:51 +0800
committerJun Xiang2012-06-14 15:45:38 +0800
commit34369e157cedeb5102428722bb457e9581bd73b1 (patch)
treefaa8db332dd3327d0a652a654f985d2ed453b12c /cleopatre/linux-2.6.25.10-spc300/include/linux
parent30e7f2e86a3e3cb5518bb4a55be99fe4f3c4ce8f (diff)
cleo/linux[eoc]: Process 3 new ethtool's ioctl to configure IP175D chipset, refs #t3154
Process 3 new ethtool's ioctrl to configure IP175D chipset.
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300/include/linux')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/include/linux/ethtool.h51
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/include/linux/phy.h18
2 files changed, 68 insertions, 1 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/include/linux/ethtool.h b/cleopatre/linux-2.6.25.10-spc300/include/linux/ethtool.h
index 57398fad71..b9d18f93e2 100644
--- a/cleopatre/linux-2.6.25.10-spc300/include/linux/ethtool.h
+++ b/cleopatre/linux-2.6.25.10-spc300/include/linux/ethtool.h
@@ -280,6 +280,50 @@ struct ethtool_qosrateparam {
}port[MAX_PORT_NUM];
};
+enum {
+ ETHTOOL_MIRROR_MODE_RX,
+ ETHTOOL_MIRROR_MODE_TX,
+ ETHTOOL_MIRROR_MODE_RXTX,
+ ETHTOOL_MIRROR_MODE_NB,
+};
+enum {
+ ETHTOOL_MIRROR_STATE_OFF,
+ ETHTOOL_MIRROR_STATE_ON,
+ ETHTOOL_MIRROR_STATE_NB,
+};
+enum {
+ ETHTOOL_FLOW_STATE_OFF,
+ ETHTOOL_FLOW_STATE_ON,
+ ETHTOOL_FLOW_STATE_NB,
+};
+enum {
+ ETHTOOL_IGMP_FORWARD,
+ ETHTOOL_IGMP_FTOCPU,
+ ETHTOOL_IGMP_DISCARD,
+ ETHTOOL_IGMP_RESERVE,
+ ETHTOOL_IGMP_NB,
+};
+#define ETHTOOL_MIRROR_PORT_NONE (MAX_PORT_NUM + 1)
+#define ETHTOOL_MIRROR_PORT_MANY (MAX_PORT_NUM + 2)
+struct ethtool_mirror {
+ u32 cmd; /*ETHTOOL_RMIRROR, ETHTOOL_SMIRROR*/
+ u8 state;
+ u8 type;
+ u8 rport;
+ u8 tport;
+ u8 dport;
+};
+
+struct ethtool_fat {
+ u32 cmd; /*ETHTOOL_RFAT, ETHTOOL_SFAT*/
+ u8 flow;
+ u16 atime;
+};
+
+struct ethtool_igmp {
+ u32 cmd; /* ETHTOOL_RIGMP, ETHTOOL_SIGMP */
+ u8 tigmp;
+};
/* for passing string sets for data tagging */
struct ethtool_gstrings {
@@ -506,7 +550,12 @@ struct ethtool_ops {
#define ETHTOOL_SSTM_CTL 0x0000002f /*Write Storm Protect (MStar Code)*/
#define ETHTOOL_RQOSRATE 0x00000030 /*Read Qos and Port Rate (MStar Code)*/
#define ETHTOOL_SQOSRATE 0x00000031 /*Write Qos and Port Rate (MStar Code)*/
-
+#define ETHTOOL_RMIRROR 0x00000032 /*Read Port Mirror (MStar Code)*/
+#define ETHTOOL_SMIRROR 0x00000033 /*Write Port Mirror (MStar Code)*/
+#define ETHTOOL_RFAT 0x00000034 /*Read Flow and Aging Time (MStar Code)*/
+#define ETHTOOL_SFAT 0x00000035 /*Write Flow and Aging Time (MStar Code)*/
+#define ETHTOOL_RIGMP 0x00000036 /*Read Trap IGMP (MStar Code)*/
+#define ETHTOOL_SIGMP 0x00000037 /*Write Trap IGMP (MStar Code)*/
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/cleopatre/linux-2.6.25.10-spc300/include/linux/phy.h b/cleopatre/linux-2.6.25.10-spc300/include/linux/phy.h
index c0a9c4dd02..fc9b228b07 100644
--- a/cleopatre/linux-2.6.25.10-spc300/include/linux/phy.h
+++ b/cleopatre/linux-2.6.25.10-spc300/include/linux/phy.h
@@ -380,6 +380,24 @@ struct phy_driver {
/* Write Qos and Rate Control */
int (*write_qosrate)(struct phy_device *phydev, struct ethtool_qosrateparam *ecmd);
+
+ /* Read Port Mirror */
+ int (*read_mirror)(struct phy_device *phydev, struct ethtool_mirror *ecmd);
+
+ /* Write Port Mirror */
+ int (*write_mirror)(struct phy_device *phydev, struct ethtool_mirror *ecmd);
+
+ /* Read Flow And Aging Time */
+ int (*read_fat)(struct phy_device *phydev, struct ethtool_fat *ecmd);
+
+ /* Write Flow And Aging Time */
+ int (*write_fat)(struct phy_device *phydev, struct ethtool_fat *ecmd);
+
+ /* Read Trap_IGMP */
+ int (*read_igmp)(struct phy_device *phydev, struct ethtool_igmp *ecmd);
+
+ /* Write Trap_IGMP */
+ int (*write_igmp)(struct phy_device *phydev, struct ethtool_igmp *ecmd);
};
#define to_phy_driver(d) container_of(d, struct phy_driver, driver)