From dee1ad47f2ee75f5146d83ca757c1b7861c34c3b Mon Sep 17 00:00:00 2001 From: Jeff Kirsher Date: Thu, 7 Apr 2011 07:42:33 -0700 Subject: intel: Move the Intel wired LAN drivers Moves the Intel wired LAN drivers into drivers/net/ethernet/intel/ and the necessary Kconfig and Makefile changes. Signed-off-by: Jeff Kirsher --- drivers/net/Kconfig | 200 - drivers/net/Makefile | 8 - drivers/net/e100.c | 3109 -------- drivers/net/e1000/Makefile | 35 - drivers/net/e1000/e1000.h | 361 - drivers/net/e1000/e1000_ethtool.c | 1863 ----- drivers/net/e1000/e1000_hw.c | 5824 -------------- drivers/net/e1000/e1000_hw.h | 3103 -------- drivers/net/e1000/e1000_main.c | 4974 ------------ drivers/net/e1000/e1000_osdep.h | 109 - drivers/net/e1000/e1000_param.c | 755 -- drivers/net/e1000e/82571.c | 2115 ------ drivers/net/e1000e/Makefile | 37 - drivers/net/e1000e/defines.h | 844 --- drivers/net/e1000e/e1000.h | 736 -- drivers/net/e1000e/es2lan.c | 1516 ---- drivers/net/e1000e/ethtool.c | 2081 ----- drivers/net/e1000e/hw.h | 984 --- drivers/net/e1000e/ich8lan.c | 4111 ---------- drivers/net/e1000e/lib.c | 2692 ------- drivers/net/e1000e/netdev.c | 6312 ---------------- drivers/net/e1000e/param.c | 478 -- drivers/net/e1000e/phy.c | 3377 --------- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/intel/Kconfig | 220 + drivers/net/ethernet/intel/Makefile | 12 + drivers/net/ethernet/intel/e100.c | 3109 ++++++++ drivers/net/ethernet/intel/e1000/Makefile | 35 + drivers/net/ethernet/intel/e1000/e1000.h | 361 + drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 1863 +++++ drivers/net/ethernet/intel/e1000/e1000_hw.c | 5824 ++++++++++++++ drivers/net/ethernet/intel/e1000/e1000_hw.h | 3103 ++++++++ drivers/net/ethernet/intel/e1000/e1000_main.c | 4974 ++++++++++++ drivers/net/ethernet/intel/e1000/e1000_osdep.h | 109 + drivers/net/ethernet/intel/e1000/e1000_param.c | 755 ++ drivers/net/ethernet/intel/e1000e/80003es2lan.c | 1516 ++++ drivers/net/ethernet/intel/e1000e/82571.c | 2115 ++++++ drivers/net/ethernet/intel/e1000e/Makefile | 37 + drivers/net/ethernet/intel/e1000e/defines.h | 844 +++ drivers/net/ethernet/intel/e1000e/e1000.h | 736 ++ drivers/net/ethernet/intel/e1000e/ethtool.c | 2081 +++++ drivers/net/ethernet/intel/e1000e/hw.h | 984 +++ drivers/net/ethernet/intel/e1000e/ich8lan.c | 4111 ++++++++++ drivers/net/ethernet/intel/e1000e/lib.c | 2692 +++++++ drivers/net/ethernet/intel/e1000e/netdev.c | 6312 ++++++++++++++++ drivers/net/ethernet/intel/e1000e/param.c | 478 ++ drivers/net/ethernet/intel/e1000e/phy.c | 3377 +++++++++ drivers/net/ethernet/intel/igb/Makefile | 37 + drivers/net/ethernet/intel/igb/e1000_82575.c | 2084 +++++ drivers/net/ethernet/intel/igb/e1000_82575.h | 258 + drivers/net/ethernet/intel/igb/e1000_defines.h | 834 ++ drivers/net/ethernet/intel/igb/e1000_hw.h | 529 ++ drivers/net/ethernet/intel/igb/e1000_mac.c | 1421 ++++ drivers/net/ethernet/intel/igb/e1000_mac.h | 90 + drivers/net/ethernet/intel/igb/e1000_mbx.c | 446 ++ drivers/net/ethernet/intel/igb/e1000_mbx.h | 77 + drivers/net/ethernet/intel/igb/e1000_nvm.c | 713 ++ drivers/net/ethernet/intel/igb/e1000_nvm.h | 43 + drivers/net/ethernet/intel/igb/e1000_phy.c | 2341 ++++++ drivers/net/ethernet/intel/igb/e1000_phy.h | 136 + drivers/net/ethernet/intel/igb/e1000_regs.h | 354 + drivers/net/ethernet/intel/igb/igb.h | 415 + drivers/net/ethernet/intel/igb/igb_ethtool.c | 2201 ++++++ drivers/net/ethernet/intel/igb/igb_main.c | 6890 +++++++++++++++++ drivers/net/ethernet/intel/igbvf/Makefile | 38 + drivers/net/ethernet/intel/igbvf/defines.h | 125 + drivers/net/ethernet/intel/igbvf/ethtool.c | 534 ++ drivers/net/ethernet/intel/igbvf/igbvf.h | 326 + drivers/net/ethernet/intel/igbvf/mbx.c | 350 + drivers/net/ethernet/intel/igbvf/mbx.h | 75 + drivers/net/ethernet/intel/igbvf/netdev.c | 2859 +++++++ drivers/net/ethernet/intel/igbvf/regs.h | 108 + drivers/net/ethernet/intel/igbvf/vf.c | 402 + drivers/net/ethernet/intel/igbvf/vf.h | 266 + drivers/net/ethernet/intel/ixgb/Makefile | 35 + drivers/net/ethernet/intel/ixgb/ixgb.h | 217 + drivers/net/ethernet/intel/ixgb/ixgb_ee.c | 607 ++ drivers/net/ethernet/intel/ixgb/ixgb_ee.h | 106 + drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c | 758 ++ drivers/net/ethernet/intel/ixgb/ixgb_hw.c | 1262 ++++ drivers/net/ethernet/intel/ixgb/ixgb_hw.h | 801 ++ drivers/net/ethernet/intel/ixgb/ixgb_ids.h | 53 + drivers/net/ethernet/intel/ixgb/ixgb_main.c | 2332 ++++++ drivers/net/ethernet/intel/ixgb/ixgb_osdep.h | 63 + drivers/net/ethernet/intel/ixgb/ixgb_param.c | 469 ++ drivers/net/ethernet/intel/ixgbe/Makefile | 42 + drivers/net/ethernet/intel/ixgbe/ixgbe.h | 617 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 1353 ++++ drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 2263 ++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 3510 +++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 145 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c | 320 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h | 167 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c | 297 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.h | 97 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c | 346 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.h | 123 + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 816 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2592 +++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 836 +++ drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h | 81 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7934 ++++++++++++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c | 471 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h | 93 + drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 1725 +++++ drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 131 + drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 687 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 46 + drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2877 +++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 941 +++ drivers/net/ethernet/intel/ixgbevf/Makefile | 38 + drivers/net/ethernet/intel/ixgbevf/defines.h | 297 + drivers/net/ethernet/intel/ixgbevf/ethtool.c | 742 ++ drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 318 + drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3523 +++++++++ drivers/net/ethernet/intel/ixgbevf/mbx.c | 341 + drivers/net/ethernet/intel/ixgbevf/mbx.h | 99 + drivers/net/ethernet/intel/ixgbevf/regs.h | 85 + drivers/net/ethernet/intel/ixgbevf/vf.c | 426 ++ drivers/net/ethernet/intel/ixgbevf/vf.h | 174 + drivers/net/igb/Makefile | 37 - drivers/net/igb/e1000_82575.c | 2084 ----- drivers/net/igb/e1000_82575.h | 258 - drivers/net/igb/e1000_defines.h | 834 -- drivers/net/igb/e1000_hw.h | 529 -- drivers/net/igb/e1000_mac.c | 1421 ---- drivers/net/igb/e1000_mac.h | 90 - drivers/net/igb/e1000_mbx.c | 446 -- drivers/net/igb/e1000_mbx.h | 77 - drivers/net/igb/e1000_nvm.c | 713 -- drivers/net/igb/e1000_nvm.h | 43 - drivers/net/igb/e1000_phy.c | 2341 ------ drivers/net/igb/e1000_phy.h | 136 - drivers/net/igb/e1000_regs.h | 354 - drivers/net/igb/igb.h | 415 - drivers/net/igb/igb_ethtool.c | 2201 ------ drivers/net/igb/igb_main.c | 6890 ----------------- drivers/net/igbvf/Makefile | 38 - drivers/net/igbvf/defines.h | 125 - drivers/net/igbvf/ethtool.c | 534 -- drivers/net/igbvf/igbvf.h | 326 - drivers/net/igbvf/mbx.c | 350 - drivers/net/igbvf/mbx.h | 75 - drivers/net/igbvf/netdev.c | 2859 ------- drivers/net/igbvf/regs.h | 108 - drivers/net/igbvf/vf.c | 402 - drivers/net/igbvf/vf.h | 266 - drivers/net/ixgb/Makefile | 35 - drivers/net/ixgb/ixgb.h | 217 - drivers/net/ixgb/ixgb_ee.c | 607 -- drivers/net/ixgb/ixgb_ee.h | 106 - drivers/net/ixgb/ixgb_ethtool.c | 758 -- drivers/net/ixgb/ixgb_hw.c | 1262 ---- drivers/net/ixgb/ixgb_hw.h | 801 -- drivers/net/ixgb/ixgb_ids.h | 53 - drivers/net/ixgb/ixgb_main.c | 2332 ------ drivers/net/ixgb/ixgb_osdep.h | 63 - drivers/net/ixgb/ixgb_param.c | 469 -- drivers/net/ixgbe/Makefile | 42 - drivers/net/ixgbe/ixgbe.h | 617 -- drivers/net/ixgbe/ixgbe_82598.c | 1353 ---- drivers/net/ixgbe/ixgbe_82599.c | 2263 ------ drivers/net/ixgbe/ixgbe_common.c | 3510 --------- drivers/net/ixgbe/ixgbe_common.h | 145 - drivers/net/ixgbe/ixgbe_dcb.c | 320 - drivers/net/ixgbe/ixgbe_dcb.h | 167 - drivers/net/ixgbe/ixgbe_dcb_82598.c | 297 - drivers/net/ixgbe/ixgbe_dcb_82598.h | 97 - drivers/net/ixgbe/ixgbe_dcb_82599.c | 346 - drivers/net/ixgbe/ixgbe_dcb_82599.h | 123 - drivers/net/ixgbe/ixgbe_dcb_nl.c | 816 -- drivers/net/ixgbe/ixgbe_ethtool.c | 2592 ------- drivers/net/ixgbe/ixgbe_fcoe.c | 836 --- drivers/net/ixgbe/ixgbe_fcoe.h | 81 - drivers/net/ixgbe/ixgbe_main.c | 7934 -------------------- drivers/net/ixgbe/ixgbe_mbx.c | 471 -- drivers/net/ixgbe/ixgbe_mbx.h | 93 - drivers/net/ixgbe/ixgbe_phy.c | 1725 ----- drivers/net/ixgbe/ixgbe_phy.h | 131 - drivers/net/ixgbe/ixgbe_sriov.c | 687 -- drivers/net/ixgbe/ixgbe_sriov.h | 46 - drivers/net/ixgbe/ixgbe_type.h | 2877 ------- drivers/net/ixgbe/ixgbe_x540.c | 941 --- drivers/net/ixgbevf/Makefile | 38 - drivers/net/ixgbevf/defines.h | 297 - drivers/net/ixgbevf/ethtool.c | 742 -- drivers/net/ixgbevf/ixgbevf.h | 318 - drivers/net/ixgbevf/ixgbevf_main.c | 3523 --------- drivers/net/ixgbevf/mbx.c | 341 - drivers/net/ixgbevf/mbx.h | 99 - drivers/net/ixgbevf/regs.h | 85 - drivers/net/ixgbevf/vf.c | 426 -- drivers/net/ixgbevf/vf.h | 174 - 194 files changed, 110858 insertions(+), 110832 deletions(-) delete mode 100644 drivers/net/e100.c delete mode 100644 drivers/net/e1000/Makefile delete mode 100644 drivers/net/e1000/e1000.h delete mode 100644 drivers/net/e1000/e1000_ethtool.c delete mode 100644 drivers/net/e1000/e1000_hw.c delete mode 100644 drivers/net/e1000/e1000_hw.h delete mode 100644 drivers/net/e1000/e1000_main.c delete mode 100644 drivers/net/e1000/e1000_osdep.h delete mode 100644 drivers/net/e1000/e1000_param.c delete mode 100644 drivers/net/e1000e/82571.c delete mode 100644 drivers/net/e1000e/Makefile delete mode 100644 drivers/net/e1000e/defines.h delete mode 100644 drivers/net/e1000e/e1000.h delete mode 100644 drivers/net/e1000e/es2lan.c delete mode 100644 drivers/net/e1000e/ethtool.c delete mode 100644 drivers/net/e1000e/hw.h delete mode 100644 drivers/net/e1000e/ich8lan.c delete mode 100644 drivers/net/e1000e/lib.c delete mode 100644 drivers/net/e1000e/netdev.c delete mode 100644 drivers/net/e1000e/param.c delete mode 100644 drivers/net/e1000e/phy.c create mode 100644 drivers/net/ethernet/intel/Kconfig create mode 100644 drivers/net/ethernet/intel/Makefile create mode 100644 drivers/net/ethernet/intel/e100.c create mode 100644 drivers/net/ethernet/intel/e1000/Makefile create mode 100644 drivers/net/ethernet/intel/e1000/e1000.h create mode 100644 drivers/net/ethernet/intel/e1000/e1000_ethtool.c create mode 100644 drivers/net/ethernet/intel/e1000/e1000_hw.c create mode 100644 drivers/net/ethernet/intel/e1000/e1000_hw.h create mode 100644 drivers/net/ethernet/intel/e1000/e1000_main.c create mode 100644 drivers/net/ethernet/intel/e1000/e1000_osdep.h create mode 100644 drivers/net/ethernet/intel/e1000/e1000_param.c create mode 100644 drivers/net/ethernet/intel/e1000e/80003es2lan.c create mode 100644 drivers/net/ethernet/intel/e1000e/82571.c create mode 100644 drivers/net/ethernet/intel/e1000e/Makefile create mode 100644 drivers/net/ethernet/intel/e1000e/defines.h create mode 100644 drivers/net/ethernet/intel/e1000e/e1000.h create mode 100644 drivers/net/ethernet/intel/e1000e/ethtool.c create mode 100644 drivers/net/ethernet/intel/e1000e/hw.h create mode 100644 drivers/net/ethernet/intel/e1000e/ich8lan.c create mode 100644 drivers/net/ethernet/intel/e1000e/lib.c create mode 100644 drivers/net/ethernet/intel/e1000e/netdev.c create mode 100644 drivers/net/ethernet/intel/e1000e/param.c create mode 100644 drivers/net/ethernet/intel/e1000e/phy.c create mode 100644 drivers/net/ethernet/intel/igb/Makefile create mode 100644 drivers/net/ethernet/intel/igb/e1000_82575.c create mode 100644 drivers/net/ethernet/intel/igb/e1000_82575.h create mode 100644 drivers/net/ethernet/intel/igb/e1000_defines.h create mode 100644 drivers/net/ethernet/intel/igb/e1000_hw.h create mode 100644 drivers/net/ethernet/intel/igb/e1000_mac.c create mode 100644 drivers/net/ethernet/intel/igb/e1000_mac.h create mode 100644 drivers/net/ethernet/intel/igb/e1000_mbx.c create mode 100644 drivers/net/ethernet/intel/igb/e1000_mbx.h create mode 100644 drivers/net/ethernet/intel/igb/e1000_nvm.c create mode 100644 drivers/net/ethernet/intel/igb/e1000_nvm.h create mode 100644 drivers/net/ethernet/intel/igb/e1000_phy.c create mode 100644 drivers/net/ethernet/intel/igb/e1000_phy.h create mode 100644 drivers/net/ethernet/intel/igb/e1000_regs.h create mode 100644 drivers/net/ethernet/intel/igb/igb.h create mode 100644 drivers/net/ethernet/intel/igb/igb_ethtool.c create mode 100644 drivers/net/ethernet/intel/igb/igb_main.c create mode 100644 drivers/net/ethernet/intel/igbvf/Makefile create mode 100644 drivers/net/ethernet/intel/igbvf/defines.h create mode 100644 drivers/net/ethernet/intel/igbvf/ethtool.c create mode 100644 drivers/net/ethernet/intel/igbvf/igbvf.h create mode 100644 drivers/net/ethernet/intel/igbvf/mbx.c create mode 100644 drivers/net/ethernet/intel/igbvf/mbx.h create mode 100644 drivers/net/ethernet/intel/igbvf/netdev.c create mode 100644 drivers/net/ethernet/intel/igbvf/regs.h create mode 100644 drivers/net/ethernet/intel/igbvf/vf.c create mode 100644 drivers/net/ethernet/intel/igbvf/vf.h create mode 100644 drivers/net/ethernet/intel/ixgb/Makefile create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb.h create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_ee.c create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_ee.h create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_hw.c create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_hw.h create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_ids.h create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_main.c create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_osdep.h create mode 100644 drivers/net/ethernet/intel/ixgb/ixgb_param.c create mode 100644 drivers/net/ethernet/intel/ixgbe/Makefile create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_common.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c create mode 100644 drivers/net/ethernet/intel/ixgbevf/Makefile create mode 100644 drivers/net/ethernet/intel/ixgbevf/defines.h create mode 100644 drivers/net/ethernet/intel/ixgbevf/ethtool.c create mode 100644 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h create mode 100644 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c create mode 100644 drivers/net/ethernet/intel/ixgbevf/mbx.c create mode 100644 drivers/net/ethernet/intel/ixgbevf/mbx.h create mode 100644 drivers/net/ethernet/intel/ixgbevf/regs.h create mode 100644 drivers/net/ethernet/intel/ixgbevf/vf.c create mode 100644 drivers/net/ethernet/intel/ixgbevf/vf.h delete mode 100644 drivers/net/igb/Makefile delete mode 100644 drivers/net/igb/e1000_82575.c delete mode 100644 drivers/net/igb/e1000_82575.h delete mode 100644 drivers/net/igb/e1000_defines.h delete mode 100644 drivers/net/igb/e1000_hw.h delete mode 100644 drivers/net/igb/e1000_mac.c delete mode 100644 drivers/net/igb/e1000_mac.h delete mode 100644 drivers/net/igb/e1000_mbx.c delete mode 100644 drivers/net/igb/e1000_mbx.h delete mode 100644 drivers/net/igb/e1000_nvm.c delete mode 100644 drivers/net/igb/e1000_nvm.h delete mode 100644 drivers/net/igb/e1000_phy.c delete mode 100644 drivers/net/igb/e1000_phy.h delete mode 100644 drivers/net/igb/e1000_regs.h delete mode 100644 drivers/net/igb/igb.h delete mode 100644 drivers/net/igb/igb_ethtool.c delete mode 100644 drivers/net/igb/igb_main.c delete mode 100644 drivers/net/igbvf/Makefile delete mode 100644 drivers/net/igbvf/defines.h delete mode 100644 drivers/net/igbvf/ethtool.c delete mode 100644 drivers/net/igbvf/igbvf.h delete mode 100644 drivers/net/igbvf/mbx.c delete mode 100644 drivers/net/igbvf/mbx.h delete mode 100644 drivers/net/igbvf/netdev.c delete mode 100644 drivers/net/igbvf/regs.h delete mode 100644 drivers/net/igbvf/vf.c delete mode 100644 drivers/net/igbvf/vf.h delete mode 100644 drivers/net/ixgb/Makefile delete mode 100644 drivers/net/ixgb/ixgb.h delete mode 100644 drivers/net/ixgb/ixgb_ee.c delete mode 100644 drivers/net/ixgb/ixgb_ee.h delete mode 100644 drivers/net/ixgb/ixgb_ethtool.c delete mode 100644 drivers/net/ixgb/ixgb_hw.c delete mode 100644 drivers/net/ixgb/ixgb_hw.h delete mode 100644 drivers/net/ixgb/ixgb_ids.h delete mode 100644 drivers/net/ixgb/ixgb_main.c delete mode 100644 drivers/net/ixgb/ixgb_osdep.h delete mode 100644 drivers/net/ixgb/ixgb_param.c delete mode 100644 drivers/net/ixgbe/Makefile delete mode 100644 drivers/net/ixgbe/ixgbe.h delete mode 100644 drivers/net/ixgbe/ixgbe_82598.c delete mode 100644 drivers/net/ixgbe/ixgbe_82599.c delete mode 100644 drivers/net/ixgbe/ixgbe_common.c delete mode 100644 drivers/net/ixgbe/ixgbe_common.h delete mode 100644 drivers/net/ixgbe/ixgbe_dcb.c delete mode 100644 drivers/net/ixgbe/ixgbe_dcb.h delete mode 100644 drivers/net/ixgbe/ixgbe_dcb_82598.c delete mode 100644 drivers/net/ixgbe/ixgbe_dcb_82598.h delete mode 100644 drivers/net/ixgbe/ixgbe_dcb_82599.c delete mode 100644 drivers/net/ixgbe/ixgbe_dcb_82599.h delete mode 100644 drivers/net/ixgbe/ixgbe_dcb_nl.c delete mode 100644 drivers/net/ixgbe/ixgbe_ethtool.c delete mode 100644 drivers/net/ixgbe/ixgbe_fcoe.c delete mode 100644 drivers/net/ixgbe/ixgbe_fcoe.h delete mode 100644 drivers/net/ixgbe/ixgbe_main.c delete mode 100644 drivers/net/ixgbe/ixgbe_mbx.c delete mode 100644 drivers/net/ixgbe/ixgbe_mbx.h delete mode 100644 drivers/net/ixgbe/ixgbe_phy.c delete mode 100644 drivers/net/ixgbe/ixgbe_phy.h delete mode 100644 drivers/net/ixgbe/ixgbe_sriov.c delete mode 100644 drivers/net/ixgbe/ixgbe_sriov.h delete mode 100644 drivers/net/ixgbe/ixgbe_type.h delete mode 100644 drivers/net/ixgbe/ixgbe_x540.c delete mode 100644 drivers/net/ixgbevf/Makefile delete mode 100644 drivers/net/ixgbevf/defines.h delete mode 100644 drivers/net/ixgbevf/ethtool.c delete mode 100644 drivers/net/ixgbevf/ixgbevf.h delete mode 100644 drivers/net/ixgbevf/ixgbevf_main.c delete mode 100644 drivers/net/ixgbevf/mbx.c delete mode 100644 drivers/net/ixgbevf/mbx.h delete mode 100644 drivers/net/ixgbevf/regs.h delete mode 100644 drivers/net/ixgbevf/vf.c delete mode 100644 drivers/net/ixgbevf/vf.h (limited to 'drivers') diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 77ab2e189475..e6491169cc6f 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -1032,32 +1032,6 @@ config TC35815 depends on NET_PCI && PCI && MIPS select PHYLIB -config E100 - tristate "Intel(R) PRO/100+ support" - depends on NET_PCI && PCI - select MII - ---help--- - This driver supports Intel(R) PRO/100 family of adapters. - To verify that your adapter is supported, find the board ID number - on the adapter. Look for a label that has a barcode and a number - in the format 123456-001 (six digits hyphen three digits). - - Use the above information and the Adapter & Driver ID Guide at: - - - - to identify the adapter. - - For the latest Intel PRO/100 network driver for Linux, see: - - - - More specific information on configuring the driver is in - . - - To compile this driver as a module, choose M here. The module - will be called e100. - config FEALNX tristate "Myson MTD-8xx PCI Ethernet support" depends on NET_PCI && PCI @@ -1490,47 +1464,6 @@ config DL2K To compile this driver as a module, choose M here: the module will be called dl2k. -config E1000 - tristate "Intel(R) PRO/1000 Gigabit Ethernet support" - depends on PCI - ---help--- - This driver supports Intel(R) PRO/1000 gigabit ethernet family of - adapters. For more information on how to identify your adapter, go - to the Adapter & Driver ID Guide at: - - - - For general information and support, go to the Intel support - website at: - - - - More specific information on configuring the driver is in - . - - To compile this driver as a module, choose M here. The module - will be called e1000. - -config E1000E - tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support" - depends on PCI && (!SPARC32 || BROKEN) - select CRC32 - ---help--- - This driver supports the PCI-Express Intel(R) PRO/1000 gigabit - ethernet family of adapters. For PCI or PCI-X e1000 adapters, - use the regular e1000 driver For more information on how to - identify your adapter, go to the Adapter & Driver ID Guide at: - - - - For general information and support, go to the Intel support - website at: - - - - To compile this driver as a module, choose M here. The module - will be called e1000e. - config IP1000 tristate "IP1000 Gigabit Ethernet support" depends on PCI && EXPERIMENTAL @@ -1541,57 +1474,6 @@ config IP1000 To compile this driver as a module, choose M here: the module will be called ipg. This is recommended. -config IGB - tristate "Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support" - depends on PCI - ---help--- - This driver supports Intel(R) 82575/82576 gigabit ethernet family of - adapters. For more information on how to identify your adapter, go - to the Adapter & Driver ID Guide at: - - - - For general information and support, go to the Intel support - website at: - - - - More specific information on configuring the driver is in - . - - To compile this driver as a module, choose M here. The module - will be called igb. - -config IGB_DCA - bool "Direct Cache Access (DCA) Support" - default y - depends on IGB && DCA && !(IGB=y && DCA=m) - ---help--- - Say Y here if you want to use Direct Cache Access (DCA) in the - driver. DCA is a method for warming the CPU cache before data - is used, with the intent of lessening the impact of cache misses. - -config IGBVF - tristate "Intel(R) 82576 Virtual Function Ethernet support" - depends on PCI - ---help--- - This driver supports Intel(R) 82576 virtual functions. For more - information on how to identify your adapter, go to the Adapter & - Driver ID Guide at: - - - - For general information and support, go to the Intel support - website at: - - - - More specific information on configuring the driver is in - . - - To compile this driver as a module, choose M here. The module - will be called igbvf. - source "drivers/net/ixp2000/Kconfig" config NS83820 @@ -1958,88 +1840,6 @@ config ENIC help This enables the support for the Cisco VIC Ethernet card. -config IXGBE - tristate "Intel(R) 10GbE PCI Express adapters support" - depends on PCI && INET - select MDIO - ---help--- - This driver supports Intel(R) 10GbE PCI Express family of - adapters. For more information on how to identify your adapter, go - to the Adapter & Driver ID Guide at: - - - - For general information and support, go to the Intel support - website at: - - - - To compile this driver as a module, choose M here. The module - will be called ixgbe. - -config IXGBE_DCA - bool "Direct Cache Access (DCA) Support" - default y - depends on IXGBE && DCA && !(IXGBE=y && DCA=m) - ---help--- - Say Y here if you want to use Direct Cache Access (DCA) in the - driver. DCA is a method for warming the CPU cache before data - is used, with the intent of lessening the impact of cache misses. - -config IXGBE_DCB - bool "Data Center Bridging (DCB) Support" - default n - depends on IXGBE && DCB - ---help--- - Say Y here if you want to use Data Center Bridging (DCB) in the - driver. - - If unsure, say N. - -config IXGBEVF - tristate "Intel(R) 82599 Virtual Function Ethernet support" - depends on PCI_MSI - ---help--- - This driver supports Intel(R) 82599 virtual functions. For more - information on how to identify your adapter, go to the Adapter & - Driver ID Guide at: - - - - For general information and support, go to the Intel support - website at: - - - - More specific information on configuring the driver is in - . - - To compile this driver as a module, choose M here. The module - will be called ixgbevf. MSI-X interrupt support is required - for this driver to work correctly. - -config IXGB - tristate "Intel(R) PRO/10GbE support" - depends on PCI - ---help--- - This driver supports Intel(R) PRO/10GbE family of adapters for - PCI-X type cards. For PCI-E type cards, use the "ixgbe" driver - instead. For more information on how to identify your adapter, go - to the Adapter & Driver ID Guide at: - - - - For general information and support, go to the Intel support - website at: - - - - More specific information on configuring the driver is in - . - - To compile this driver as a module, choose M here. The module - will be called ixgb. - config S2IO tristate "Exar Xframe 10Gb Ethernet Adapter" depends on PCI diff --git a/drivers/net/Makefile b/drivers/net/Makefile index a987d46bf67b..84b986004385 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -10,14 +10,7 @@ obj-$(CONFIG_TI_DAVINCI_EMAC) += davinci_emac.o obj-$(CONFIG_TI_DAVINCI_MDIO) += davinci_mdio.o obj-$(CONFIG_TI_DAVINCI_CPDMA) += davinci_cpdma.o -obj-$(CONFIG_E1000) += e1000/ -obj-$(CONFIG_E1000E) += e1000e/ obj-$(CONFIG_IBM_NEW_EMAC) += ibm_newemac/ -obj-$(CONFIG_IGB) += igb/ -obj-$(CONFIG_IGBVF) += igbvf/ -obj-$(CONFIG_IXGBE) += ixgbe/ -obj-$(CONFIG_IXGBEVF) += ixgbevf/ -obj-$(CONFIG_IXGB) += ixgb/ obj-$(CONFIG_IP1000) += ipg.o obj-$(CONFIG_EHEA) += ehea/ obj-$(CONFIG_CAN) += can/ @@ -61,7 +54,6 @@ obj-$(CONFIG_SUNVNET) += sunvnet.o obj-$(CONFIG_MACE) += mace.o obj-$(CONFIG_BMAC) += bmac.o -obj-$(CONFIG_E100) += e100.o obj-$(CONFIG_TLAN) += tlan.o obj-$(CONFIG_EPIC100) += epic100.o obj-$(CONFIG_SMSC9420) += smsc9420.o diff --git a/drivers/net/e100.c b/drivers/net/e100.c deleted file mode 100644 index c1352c60c299..000000000000 --- a/drivers/net/e100.c +++ /dev/null @@ -1,3109 +0,0 @@ -/******************************************************************************* - - Intel PRO/100 Linux driver - Copyright(c) 1999 - 2006 Intel Corporation. - - This program is free software; you can redistribute it and/or modify it - under the terms and conditions of the GNU General Public License, - version 2, as published by the Free Software Foundation. - - This program is distributed in the hope it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. - - The full GNU General Public License is included in this distribution in - the file called "COPYING". - - Contact Information: - Linux NICS - e1000-devel Mailing List - Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 - -*******************************************************************************/ - -/* - * e100.c: Intel(R) PRO/100 ethernet driver - * - * (Re)written 2003 by scott.feldman@intel.com. Based loosely on - * original e100 driver, but better described as a munging of - * e100, e1000, eepro100, tg3, 8139cp, and other drivers. - * - * References: - * Intel 8255x 10/100 Mbps Ethernet Controller Family, - * Open Source Software Developers Manual, - * http://sourceforge.net/projects/e1000 - * - * - * Theory of Operation - * - * I. General - * - * The driver supports Intel(R) 10/100 Mbps PCI Fast Ethernet - * controller family, which includes the 82557, 82558, 82559, 82550, - * 82551, and 82562 devices. 82558 and greater controllers - * integrate the Intel 82555 PHY. The controllers are used in - * server and client network interface cards, as well as in - * LAN-On-Motherboard (LOM), CardBus, MiniPCI, and ICHx - * configurations. 8255x supports a 32-bit linear addressing - * mode and operates at 33Mhz PCI clock rate. - * - * II. Driver Operation - * - * Memory-mapped mode is used exclusively to access the device's - * shared-memory structure, the Control/Status Registers (CSR). All - * setup, configuration, and control of the device, including queuing - * of Tx, Rx, and configuration commands is through the CSR. - * cmd_lock serializes accesses to the CSR command register. cb_lock - * protects the shared Command Block List (CBL). - * - * 8255x is highly MII-compliant and all access to the PHY go - * through the Management Data Interface (MDI). Consequently, the - * driver leverages the mii.c library shared with other MII-compliant - * devices. - * - * Big- and Little-Endian byte order as well as 32- and 64-bit - * archs are supported. Weak-ordered memory and non-cache-coherent - * archs are supported. - * - * III. Transmit - * - * A Tx skb is mapped and hangs off of a TCB. TCBs are linked - * together in a fixed-size ring (CBL) thus forming the flexible mode - * memory structure. A TCB marked with the suspend-bit indicates - * the end of the ring. The last TCB processed suspends the - * controller, and the controller can be restarted by issue a CU - * resume command to continue from the suspend point, or a CU start - * command to start at a given position in the ring. - * - * Non-Tx commands (config, multicast setup, etc) are linked - * into the CBL ring along with Tx commands. The common structure - * used for both Tx and non-Tx commands is the Command Block (CB). - * - * cb_to_use is the next CB to use for queuing a command; cb_to_clean - * is the next CB to check for completion; cb_to_send is the first - * CB to start on in case of a previous failure to resume. CB clean - * up happens in interrupt context in response to a CU interrupt. - * cbs_avail keeps track of number of free CB resources available. - * - * Hardware padding of short packets to minimum packet size is - * enabled. 82557 pads with 7Eh, while the later controllers pad - * with 00h. - * - * IV. Receive - * - * The Receive Frame Area (RFA) comprises a ring of Receive Frame - * Descriptors (RFD) + data buffer, thus forming the simplified mode - * memory structure. Rx skbs are allocated to contain both the RFD - * and the data buffer, but the RFD is pulled off before the skb is - * indicated. The data buffer is aligned such that encapsulated - * protocol headers are u32-aligned. Since the RFD is part of the - * mapped shared memory, and completion status is contained within - * the RFD, the RFD must be dma_sync'ed to maintain a consistent - * view from software and hardware. - * - * In order to keep updates to the RFD link field from colliding with - * hardware writes to mark packets complete, we use the feature that - * hardware will not write to a size 0 descriptor and mark the previous - * packet as end-of-list (EL). After updating the link, we remove EL - * and only then restore the size such that hardware may use the - * previous-to-end RFD. - * - * Under typical operation, the receive unit (RU) is start once, - * and the controller happily fills RFDs as frames arrive. If - * replacement RFDs cannot be allocated, or the RU goes non-active, - * the RU must be restarted. Frame arrival generates an interrupt, - * and Rx indication and re-allocation happen in the same context, - * therefore no locking is required. A software-generated interrupt - * is generated from the watchdog to recover from a failed allocation - * scenario where all Rx resources have been indicated and none re- - * placed. - * - * V. Miscellaneous - * - * VLAN offloading of tagging, stripping and filtering is not - * supported, but driver will accommodate the extra 4-byte VLAN tag - * for processing by upper layers. Tx/Rx Checksum offloading is not - * supported. Tx Scatter/Gather is not supported. Jumbo Frames is - * not supported (hardware limitation). - * - * MagicPacket(tm) WoL support is enabled/disabled via ethtool. - * - * Thanks to JC (jchapman@katalix.com) for helping with - * testing/troubleshooting the development driver. - * - * TODO: - * o several entry points race with dev->close - * o check for tx-no-resources/stop Q races with tx clean/wake Q - * - * FIXES: - * 2005/12/02 - Michael O'Donnell - * - Stratus87247: protect MDI control register manipulations - * 2009/06/01 - Andreas Mohr - * - add clean lowlevel I/O emulation for cards with MII-lacking PHYs - */ - -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define DRV_NAME "e100" -#define DRV_EXT "-NAPI" -#define DRV_VERSION "3.5.24-k2"DRV_EXT -#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" -#define DRV_COPYRIGHT "Copyright(c) 1999-2006 Intel Corporation" - -#define E100_WATCHDOG_PERIOD (2 * HZ) -#define E100_NAPI_WEIGHT 16 - -#define FIRMWARE_D101M "e100/d101m_ucode.bin" -#define FIRMWARE_D101S "e100/d101s_ucode.bin" -#define FIRMWARE_D102E "e100/d102e_ucode.bin" - -MODULE_DESCRIPTION(DRV_DESCRIPTION); -MODULE_AUTHOR(DRV_COPYRIGHT); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); -MODULE_FIRMWARE(FIRMWARE_D101M); -MODULE_FIRMWARE(FIRMWARE_D101S); -MODULE_FIRMWARE(FIRMWARE_D102E); - -static int debug = 3; -static int eeprom_bad_csum_allow = 0; -static int use_io = 0; -module_param(debug, int, 0); -module_param(eeprom_bad_csum_allow, int, 0); -module_param(use_io, int, 0); -MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); -MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums"); -MODULE_PARM_DESC(use_io, "Force use of i/o access mode"); - -#define INTEL_8255X_ETHERNET_DEVICE(device_id, ich) {\ - PCI_VENDOR_ID_INTEL, device_id, PCI_ANY_ID, PCI_ANY_ID, \ - PCI_CLASS_NETWORK_ETHERNET << 8, 0xFFFF00, ich } -static DEFINE_PCI_DEVICE_TABLE(e100_id_table) = { - INTEL_8255X_ETHERNET_DEVICE(0x1029, 0), - INTEL_8255X_ETHERNET_DEVICE(0x1030, 0), - INTEL_8255X_ETHERNET_DEVICE(0x1031, 3), - INTEL_8255X_ETHERNET_DEVICE(0x1032, 3), - INTEL_8255X_ETHERNET_DEVICE(0x1033, 3), - INTEL_8255X_ETHERNET_DEVICE(0x1034, 3), - INTEL_8255X_ETHERNET_DEVICE(0x1038, 3), - INTEL_8255X_ETHERNET_DEVICE(0x1039, 4), - INTEL_8255X_ETHERNET_DEVICE(0x103A, 4), - INTEL_8255X_ETHERNET_DEVICE(0x103B, 4), - INTEL_8255X_ETHERNET_DEVICE(0x103C, 4), - INTEL_8255X_ETHERNET_DEVICE(0x103D, 4), - INTEL_8255X_ETHERNET_DEVICE(0x103E, 4), - INTEL_8255X_ETHERNET_DEVICE(0x1050, 5), - INTEL_8255X_ETHERNET_DEVICE(0x1051, 5), - INTEL_8255X_ETHERNET_DEVICE(0x1052, 5), - INTEL_8255X_ETHERNET_DEVICE(0x1053, 5), - INTEL_8255X_ETHERNET_DEVICE(0x1054, 5), - INTEL_8255X_ETHERNET_DEVICE(0x1055, 5), - INTEL_8255X_ETHERNET_DEVICE(0x1056, 5), - INTEL_8255X_ETHERNET_DEVICE(0x1057, 5), - INTEL_8255X_ETHERNET_DEVICE(0x1059, 0), - INTEL_8255X_ETHERNET_DEVICE(0x1064, 6), - INTEL_8255X_ETHERNET_DEVICE(0x1065, 6), - INTEL_8255X_ETHERNET_DEVICE(0x1066, 6), - INTEL_8255X_ETHERNET_DEVICE(0x1067, 6), - INTEL_8255X_ETHERNET_DEVICE(0x1068, 6), - INTEL_8255X_ETHERNET_DEVICE(0x1069, 6), - INTEL_8255X_ETHERNET_DEVICE(0x106A, 6), - INTEL_8255X_ETHERNET_DEVICE(0x106B, 6), - INTEL_8255X_ETHERNET_DEVICE(0x1091, 7), - INTEL_8255X_ETHERNET_DEVICE(0x1092, 7), - INTEL_8255X_ETHERNET_DEVICE(0x1093, 7), - INTEL_8255X_ETHERNET_DEVICE(0x1094, 7), - INTEL_8255X_ETHERNET_DEVICE(0x1095, 7), - INTEL_8255X_ETHERNET_DEVICE(0x10fe, 7), - INTEL_8255X_ETHERNET_DEVICE(0x1209, 0), - INTEL_8255X_ETHERNET_DEVICE(0x1229, 0), - INTEL_8255X_ETHERNET_DEVICE(0x2449, 2), - INTEL_8255X_ETHERNET_DEVICE(0x2459, 2), - INTEL_8255X_ETHERNET_DEVICE(0x245D, 2), - INTEL_8255X_ETHERNET_DEVICE(0x27DC, 7), - { 0, } -}; -MODULE_DEVICE_TABLE(pci, e100_id_table); - -enum mac { - mac_82557_D100_A = 0, - mac_82557_D100_B = 1, - mac_82557_D100_C = 2, - mac_82558_D101_A4 = 4, - mac_82558_D101_B0 = 5, - mac_82559_D101M = 8, - mac_82559_D101S = 9, - mac_82550_D102 = 12, - mac_82550_D102_C = 13, - mac_82551_E = 14, - mac_82551_F = 15, - mac_82551_10 = 16, - mac_unknown = 0xFF, -}; - -enum phy { - phy_100a = 0x000003E0, - phy_100c = 0x035002A8, - phy_82555_tx = 0x015002A8, - phy_nsc_tx = 0x5C002000, - phy_82562_et = 0x033002A8, - phy_82562_em = 0x032002A8, - phy_82562_ek = 0x031002A8, - phy_82562_eh = 0x017002A8, - phy_82552_v = 0xd061004d, - phy_unknown = 0xFFFFFFFF, -}; - -/* CSR (Control/Status Registers) */ -struct csr { - struct { - u8 status; - u8 stat_ack; - u8 cmd_lo; - u8 cmd_hi; - u32 gen_ptr; - } scb; - u32 port; - u16 flash_ctrl; - u8 eeprom_ctrl_lo; - u8 eeprom_ctrl_hi; - u32 mdi_ctrl; - u32 rx_dma_count; -}; - -enum scb_status { - rus_no_res = 0x08, - rus_ready = 0x10, - rus_mask = 0x3C, -}; - -enum ru_state { - RU_SUSPENDED = 0, - RU_RUNNING = 1, - RU_UNINITIALIZED = -1, -}; - -enum scb_stat_ack { - stat_ack_not_ours = 0x00, - stat_ack_sw_gen = 0x04, - stat_ack_rnr = 0x10, - stat_ack_cu_idle = 0x20, - stat_ack_frame_rx = 0x40, - stat_ack_cu_cmd_done = 0x80, - stat_ack_not_present = 0xFF, - stat_ack_rx = (stat_ack_sw_gen | stat_ack_rnr | stat_ack_frame_rx), - stat_ack_tx = (stat_ack_cu_idle | stat_ack_cu_cmd_done), -}; - -enum scb_cmd_hi { - irq_mask_none = 0x00, - irq_mask_all = 0x01, - irq_sw_gen = 0x02, -}; - -enum scb_cmd_lo { - cuc_nop = 0x00, - ruc_start = 0x01, - ruc_load_base = 0x06, - cuc_start = 0x10, - cuc_resume = 0x20, - cuc_dump_addr = 0x40, - cuc_dump_stats = 0x50, - cuc_load_base = 0x60, - cuc_dump_reset = 0x70, -}; - -enum cuc_dump { - cuc_dump_complete = 0x0000A005, - cuc_dump_reset_complete = 0x0000A007, -}; - -enum port { - software_reset = 0x0000, - selftest = 0x0001, - selective_reset = 0x0002, -}; - -enum eeprom_ctrl_lo { - eesk = 0x01, - eecs = 0x02, - eedi = 0x04, - eedo = 0x08, -}; - -enum mdi_ctrl { - mdi_write = 0x04000000, - mdi_read = 0x08000000, - mdi_ready = 0x10000000, -}; - -enum eeprom_op { - op_write = 0x05, - op_read = 0x06, - op_ewds = 0x10, - op_ewen = 0x13, -}; - -enum eeprom_offsets { - eeprom_cnfg_mdix = 0x03, - eeprom_phy_iface = 0x06, - eeprom_id = 0x0A, - eeprom_config_asf = 0x0D, - eeprom_smbus_addr = 0x90, -}; - -enum eeprom_cnfg_mdix { - eeprom_mdix_enabled = 0x0080, -}; - -enum eeprom_phy_iface { - NoSuchPhy = 0, - I82553AB, - I82553C, - I82503, - DP83840, - S80C240, - S80C24, - I82555, - DP83840A = 10, -}; - -enum eeprom_id { - eeprom_id_wol = 0x0020, -}; - -enum eeprom_config_asf { - eeprom_asf = 0x8000, - eeprom_gcl = 0x4000, -}; - -enum cb_status { - cb_complete = 0x8000, - cb_ok = 0x2000, -}; - -enum cb_command { - cb_nop = 0x0000, - cb_iaaddr = 0x0001, - cb_config = 0x0002, - cb_multi = 0x0003, - cb_tx = 0x0004, - cb_ucode = 0x0005, - cb_dump = 0x0006, - cb_tx_sf = 0x0008, - cb_cid = 0x1f00, - cb_i = 0x2000, - cb_s = 0x4000, - cb_el = 0x8000, -}; - -struct rfd { - __le16 status; - __le16 command; - __le32 link; - __le32 rbd; - __le16 actual_size; - __le16 size; -}; - -struct rx { - struct rx *next, *prev; - struct sk_buff *skb; - dma_addr_t dma_addr; -}; - -#if defined(__BIG_ENDIAN_BITFIELD) -#define X(a,b) b,a -#else -#define X(a,b) a,b -#endif -struct config { -/*0*/ u8 X(byte_count:6, pad0:2); -/*1*/ u8 X(X(rx_fifo_limit:4, tx_fifo_limit:3), pad1:1); -/*2*/ u8 adaptive_ifs; -/*3*/ u8 X(X(X(X(mwi_enable:1, type_enable:1), read_align_enable:1), - term_write_cache_line:1), pad3:4); -/*4*/ u8 X(rx_dma_max_count:7, pad4:1); -/*5*/ u8 X(tx_dma_max_count:7, dma_max_count_enable:1); -/*6*/ u8 X(X(X(X(X(X(X(late_scb_update:1, direct_rx_dma:1), - tno_intr:1), cna_intr:1), standard_tcb:1), standard_stat_counter:1), - rx_discard_overruns:1), rx_save_bad_frames:1); -/*7*/ u8 X(X(X(X(X(rx_discard_short_frames:1, tx_underrun_retry:2), - pad7:2), rx_extended_rfd:1), tx_two_frames_in_fifo:1), - tx_dynamic_tbd:1); -/*8*/ u8 X(X(mii_mode:1, pad8:6), csma_disabled:1); -/*9*/ u8 X(X(X(X(X(rx_tcpudp_checksum:1, pad9:3), vlan_arp_tco:1), - link_status_wake:1), arp_wake:1), mcmatch_wake:1); -/*10*/ u8 X(X(X(pad10:3, no_source_addr_insertion:1), preamble_length:2), - loopback:2); -/*11*/ u8 X(linear_priority:3, pad11:5); -/*12*/ u8 X(X(linear_priority_mode:1, pad12:3), ifs:4); -/*13*/ u8 ip_addr_lo; -/*14*/ u8 ip_addr_hi; -/*15*/ u8 X(X(X(X(X(X(X(promiscuous_mode:1, broadcast_disabled:1), - wait_after_win:1), pad15_1:1), ignore_ul_bit:1), crc_16_bit:1), - pad15_2:1), crs_or_cdt:1); -/*16*/ u8 fc_delay_lo; -/*17*/ u8 fc_delay_hi; -/*18*/ u8 X(X(X(X(X(rx_stripping:1, tx_padding:1), rx_crc_transfer:1), - rx_long_ok:1), fc_priority_threshold:3), pad18:1); -/*19*/ u8 X(X(X(X(X(X(X(addr_wake:1, magic_packet_disable:1), - fc_disable:1), fc_restop:1), fc_restart:1), fc_reject:1), - full_duplex_force:1), full_duplex_pin:1); -/*20*/ u8 X(X(X(pad20_1:5, fc_priority_location:1), multi_ia:1), pad20_2:1); -/*21*/ u8 X(X(pad21_1:3, multicast_all:1), pad21_2:4); -/*22*/ u8 X(X(rx_d102_mode:1, rx_vlan_drop:1), pad22:6); - u8 pad_d102[9]; -}; - -#define E100_MAX_MULTICAST_ADDRS 64 -struct multi { - __le16 count; - u8 addr[E100_MAX_MULTICAST_ADDRS * ETH_ALEN + 2/*pad*/]; -}; - -/* Important: keep total struct u32-aligned */ -#define UCODE_SIZE 134 -struct cb { - __le16 status; - __le16 command; - __le32 link; - union { - u8 iaaddr[ETH_ALEN]; - __le32 ucode[UCODE_SIZE]; - struct config config; - struct multi multi; - struct { - u32 tbd_array; - u16 tcb_byte_count; - u8 threshold; - u8 tbd_count; - struct { - __le32 buf_addr; - __le16 size; - u16 eol; - } tbd; - } tcb; - __le32 dump_buffer_addr; - } u; - struct cb *next, *prev; - dma_addr_t dma_addr; - struct sk_buff *skb; -}; - -enum loopback { - lb_none = 0, lb_mac = 1, lb_phy = 3, -}; - -struct stats { - __le32 tx_good_frames, tx_max_collisions, tx_late_collisions, - tx_underruns, tx_lost_crs, tx_deferred, tx_single_collisions, - tx_multiple_collisions, tx_total_collisions; - __le32 rx_good_frames, rx_crc_errors, rx_alignment_errors, - rx_resource_errors, rx_overrun_errors, rx_cdt_errors, - rx_short_frame_errors; - __le32 fc_xmt_pause, fc_rcv_pause, fc_rcv_unsupported; - __le16 xmt_tco_frames, rcv_tco_frames; - __le32 complete; -}; - -struct mem { - struct { - u32 signature; - u32 result; - } selftest; - struct stats stats; - u8 dump_buf[596]; -}; - -struct param_range { - u32 min; - u32 max; - u32 count; -}; - -struct params { - struct param_range rfds; - struct param_range cbs; -}; - -struct nic { - /* Begin: frequently used values: keep adjacent for cache effect */ - u32 msg_enable ____cacheline_aligned; - struct net_device *netdev; - struct pci_dev *pdev; - u16 (*mdio_ctrl)(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data); - - struct rx *rxs ____cacheline_aligned; - struct rx *rx_to_use; - struct rx *rx_to_clean; - struct rfd blank_rfd; - enum ru_state ru_running; - - spinlock_t cb_lock ____cacheline_aligned; - spinlock_t cmd_lock; - struct csr __iomem *csr; - enum scb_cmd_lo cuc_cmd; - unsigned int cbs_avail; - struct napi_struct napi; - struct cb *cbs; - struct cb *cb_to_use; - struct cb *cb_to_send; - struct cb *cb_to_clean; - __le16 tx_command; - /* End: frequently used values: keep adjacent for cache effect */ - - enum { - ich = (1 << 0), - promiscuous = (1 << 1), - multicast_all = (1 << 2), - wol_magic = (1 << 3), - ich_10h_workaround = (1 << 4), - } flags ____cacheline_aligned; - - enum mac mac; - enum phy phy; - struct params params; - struct timer_list watchdog; - struct mii_if_info mii; - struct work_struct tx_timeout_task; - enum loopback loopback; - - struct mem *mem; - dma_addr_t dma_addr; - - struct pci_pool *cbs_pool; - dma_addr_t cbs_dma_addr; - u8 adaptive_ifs; - u8 tx_threshold; - u32 tx_frames; - u32 tx_collisions; - u32 tx_deferred; - u32 tx_single_collisions; - u32 tx_multiple_collisions; - u32 tx_fc_pause; - u32 tx_tco_frames; - - u32 rx_fc_pause; - u32 rx_fc_unsupported; - u32 rx_tco_frames; - u32 rx_over_length_errors; - - u16 eeprom_wc; - __le16 eeprom[256]; - spinlock_t mdio_lock; - const struct firmware *fw; -}; - -static inline void e100_write_flush(struct nic *nic) -{ - /* Flush previous PCI writes through intermediate bridges - * by doing a benign read */ - (void)ioread8(&nic->csr->scb.status); -} - -static void e100_enable_irq(struct nic *nic) -{ - unsigned long flags; - - spin_lock_irqsave(&nic->cmd_lock, flags); - iowrite8(irq_mask_none, &nic->csr->scb.cmd_hi); - e100_write_flush(nic); - spin_unlock_irqrestore(&nic->cmd_lock, flags); -} - -static void e100_disable_irq(struct nic *nic) -{ - unsigned long flags; - - spin_lock_irqsave(&nic->cmd_lock, flags); - iowrite8(irq_mask_all, &nic->csr->scb.cmd_hi); - e100_write_flush(nic); - spin_unlock_irqrestore(&nic->cmd_lock, flags); -} - -static void e100_hw_reset(struct nic *nic) -{ - /* Put CU and RU into idle with a selective reset to get - * device off of PCI bus */ - iowrite32(selective_reset, &nic->csr->port); - e100_write_flush(nic); udelay(20); - - /* Now fully reset device */ - iowrite32(software_reset, &nic->csr->port); - e100_write_flush(nic); udelay(20); - - /* Mask off our interrupt line - it's unmasked after reset */ - e100_disable_irq(nic); -} - -static int e100_self_test(struct nic *nic) -{ - u32 dma_addr = nic->dma_addr + offsetof(struct mem, selftest); - - /* Passing the self-test is a pretty good indication - * that the device can DMA to/from host memory */ - - nic->mem->selftest.signature = 0; - nic->mem->selftest.result = 0xFFFFFFFF; - - iowrite32(selftest | dma_addr, &nic->csr->port); - e100_write_flush(nic); - /* Wait 10 msec for self-test to complete */ - msleep(10); - - /* Interrupts are enabled after self-test */ - e100_disable_irq(nic); - - /* Check results of self-test */ - if (nic->mem->selftest.result != 0) { - netif_err(nic, hw, nic->netdev, - "Self-test failed: result=0x%08X\n", - nic->mem->selftest.result); - return -ETIMEDOUT; - } - if (nic->mem->selftest.signature == 0) { - netif_err(nic, hw, nic->netdev, "Self-test failed: timed out\n"); - return -ETIMEDOUT; - } - - return 0; -} - -static void e100_eeprom_write(struct nic *nic, u16 addr_len, u16 addr, __le16 data) -{ - u32 cmd_addr_data[3]; - u8 ctrl; - int i, j; - - /* Three cmds: write/erase enable, write data, write/erase disable */ - cmd_addr_data[0] = op_ewen << (addr_len - 2); - cmd_addr_data[1] = (((op_write << addr_len) | addr) << 16) | - le16_to_cpu(data); - cmd_addr_data[2] = op_ewds << (addr_len - 2); - - /* Bit-bang cmds to write word to eeprom */ - for (j = 0; j < 3; j++) { - - /* Chip select */ - iowrite8(eecs | eesk, &nic->csr->eeprom_ctrl_lo); - e100_write_flush(nic); udelay(4); - - for (i = 31; i >= 0; i--) { - ctrl = (cmd_addr_data[j] & (1 << i)) ? - eecs | eedi : eecs; - iowrite8(ctrl, &nic->csr->eeprom_ctrl_lo); - e100_write_flush(nic); udelay(4); - - iowrite8(ctrl | eesk, &nic->csr->eeprom_ctrl_lo); - e100_write_flush(nic); udelay(4); - } - /* Wait 10 msec for cmd to complete */ - msleep(10); - - /* Chip deselect */ - iowrite8(0, &nic->csr->eeprom_ctrl_lo); - e100_write_flush(nic); udelay(4); - } -}; - -/* General technique stolen from the eepro100 driver - very clever */ -static __le16 e100_eeprom_read(struct nic *nic, u16 *addr_len, u16 addr) -{ - u32 cmd_addr_data; - u16 data = 0; - u8 ctrl; - int i; - - cmd_addr_data = ((op_read << *addr_len) | addr) << 16; - - /* Chip select */ - iowrite8(eecs | eesk, &nic->csr->eeprom_ctrl_lo); - e100_write_flush(nic); udelay(4); - - /* Bit-bang to read word from eeprom */ - for (i = 31; i >= 0; i--) { - ctrl = (cmd_addr_data & (1 << i)) ? eecs | eedi : eecs; - iowrite8(ctrl, &nic->csr->eeprom_ctrl_lo); - e100_write_flush(nic); udelay(4); - - iowrite8(ctrl | eesk, &nic->csr->eeprom_ctrl_lo); - e100_write_flush(nic); udelay(4); - - /* Eeprom drives a dummy zero to EEDO after receiving - * complete address. Use this to adjust addr_len. */ - ctrl = ioread8(&nic->csr->eeprom_ctrl_lo); - if (!(ctrl & eedo) && i > 16) { - *addr_len -= (i - 16); - i = 17; - } - - data = (data << 1) | (ctrl & eedo ? 1 : 0); - } - - /* Chip deselect */ - iowrite8(0, &nic->csr->eeprom_ctrl_lo); - e100_write_flush(nic); udelay(4); - - return cpu_to_le16(data); -}; - -/* Load entire EEPROM image into driver cache and validate checksum */ -static int e100_eeprom_load(struct nic *nic) -{ - u16 addr, addr_len = 8, checksum = 0; - - /* Try reading with an 8-bit addr len to discover actual addr len */ - e100_eeprom_read(nic, &addr_len, 0); - nic->eeprom_wc = 1 << addr_len; - - for (addr = 0; addr < nic->eeprom_wc; addr++) { - nic->eeprom[addr] = e100_eeprom_read(nic, &addr_len, addr); - if (addr < nic->eeprom_wc - 1) - checksum += le16_to_cpu(nic->eeprom[addr]); - } - - /* The checksum, stored in the last word, is calculated such that - * the sum of words should be 0xBABA */ - if (cpu_to_le16(0xBABA - checksum) != nic->eeprom[nic->eeprom_wc - 1]) { - netif_err(nic, probe, nic->netdev, "EEPROM corrupted\n"); - if (!eeprom_bad_csum_allow) - return -EAGAIN; - } - - return 0; -} - -/* Save (portion of) driver EEPROM cache to device and update checksum */ -static int e100_eeprom_save(struct nic *nic, u16 start, u16 count) -{ - u16 addr, addr_len = 8, checksum = 0; - - /* Try reading with an 8-bit addr len to discover actual addr len */ - e100_eeprom_read(nic, &addr_len, 0); - nic->eeprom_wc = 1 << addr_len; - - if (start + count >= nic->eeprom_wc) - return -EINVAL; - - for (addr = start; addr < start + count; addr++) - e100_eeprom_write(nic, addr_len, addr, nic->eeprom[addr]); - - /* The checksum, stored in the last word, is calculated such that - * the sum of words should be 0xBABA */ - for (addr = 0; addr < nic->eeprom_wc - 1; addr++) - checksum += le16_to_cpu(nic->eeprom[addr]); - nic->eeprom[nic->eeprom_wc - 1] = cpu_to_le16(0xBABA - checksum); - e100_eeprom_write(nic, addr_len, nic->eeprom_wc - 1, - nic->eeprom[nic->eeprom_wc - 1]); - - return 0; -} - -#define E100_WAIT_SCB_TIMEOUT 20000 /* we might have to wait 100ms!!! */ -#define E100_WAIT_SCB_FAST 20 /* delay like the old code */ -static int e100_exec_cmd(struct nic *nic, u8 cmd, dma_addr_t dma_addr) -{ - unsigned long flags; - unsigned int i; - int err = 0; - - spin_lock_irqsave(&nic->cmd_lock, flags); - - /* Previous command is accepted when SCB clears */ - for (i = 0; i < E100_WAIT_SCB_TIMEOUT; i++) { - if (likely(!ioread8(&nic->csr->scb.cmd_lo))) - break; - cpu_relax(); - if (unlikely(i > E100_WAIT_SCB_FAST)) - udelay(5); - } - if (unlikely(i == E100_WAIT_SCB_TIMEOUT)) { - err = -EAGAIN; - goto err_unlock; - } - - if (unlikely(cmd != cuc_resume)) - iowrite32(dma_addr, &nic->csr->scb.gen_ptr); - iowrite8(cmd, &nic->csr->scb.cmd_lo); - -err_unlock: - spin_unlock_irqrestore(&nic->cmd_lock, flags); - - return err; -} - -static int e100_exec_cb(struct nic *nic, struct sk_buff *skb, - void (*cb_prepare)(struct nic *, struct cb *, struct sk_buff *)) -{ - struct cb *cb; - unsigned long flags; - int err = 0; - - spin_lock_irqsave(&nic->cb_lock, flags); - - if (unlikely(!nic->cbs_avail)) { - err = -ENOMEM; - goto err_unlock; - } - - cb = nic->cb_to_use; - nic->cb_to_use = cb->next; - nic->cbs_avail--; - cb->skb = skb; - - if (unlikely(!nic->cbs_avail)) - err = -ENOSPC; - - cb_prepare(nic, cb, skb); - - /* Order is important otherwise we'll be in a race with h/w: - * set S-bit in current first, then clear S-bit in previous. */ - cb->command |= cpu_to_le16(cb_s); - wmb(); - cb->prev->command &= cpu_to_le16(~cb_s); - - while (nic->cb_to_send != nic->cb_to_use) { - if (unlikely(e100_exec_cmd(nic, nic->cuc_cmd, - nic->cb_to_send->dma_addr))) { - /* Ok, here's where things get sticky. It's - * possible that we can't schedule the command - * because the controller is too busy, so - * let's just queue the command and try again - * when another command is scheduled. */ - if (err == -ENOSPC) { - //request a reset - schedule_work(&nic->tx_timeout_task); - } - break; - } else { - nic->cuc_cmd = cuc_resume; - nic->cb_to_send = nic->cb_to_send->next; - } - } - -err_unlock: - spin_unlock_irqrestore(&nic->cb_lock, flags); - - return err; -} - -static int mdio_read(struct net_device *netdev, int addr, int reg) -{ - struct nic *nic = netdev_priv(netdev); - return nic->mdio_ctrl(nic, addr, mdi_read, reg, 0); -} - -static void mdio_write(struct net_device *netdev, int addr, int reg, int data) -{ - struct nic *nic = netdev_priv(netdev); - - nic->mdio_ctrl(nic, addr, mdi_write, reg, data); -} - -/* the standard mdio_ctrl() function for usual MII-compliant hardware */ -static u16 mdio_ctrl_hw(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data) -{ - u32 data_out = 0; - unsigned int i; - unsigned long flags; - - - /* - * Stratus87247: we shouldn't be writing the MDI control - * register until the Ready bit shows True. Also, since - * manipulation of the MDI control registers is a multi-step - * procedure it should be done under lock. - */ - spin_lock_irqsave(&nic->mdio_lock, flags); - for (i = 100; i; --i) { - if (ioread32(&nic->csr->mdi_ctrl) & mdi_ready) - break; - udelay(20); - } - if (unlikely(!i)) { - netdev_err(nic->netdev, "e100.mdio_ctrl won't go Ready\n"); - spin_unlock_irqrestore(&nic->mdio_lock, flags); - return 0; /* No way to indicate timeout error */ - } - iowrite32((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl); - - for (i = 0; i < 100; i++) { - udelay(20); - if ((data_out = ioread32(&nic->csr->mdi_ctrl)) & mdi_ready) - break; - } - spin_unlock_irqrestore(&nic->mdio_lock, flags); - netif_printk(nic, hw, KERN_DEBUG, nic->netdev, - "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n", - dir == mdi_read ? "READ" : "WRITE", - addr, reg, data, data_out); - return (u16)data_out; -} - -/* slightly tweaked mdio_ctrl() function for phy_82552_v specifics */ -static u16 mdio_ctrl_phy_82552_v(struct nic *nic, - u32 addr, - u32 dir, - u32 reg, - u16 data) -{ - if ((reg == MII_BMCR) && (dir == mdi_write)) { - if (data & (BMCR_ANRESTART | BMCR_ANENABLE)) { - u16 advert = mdio_read(nic->netdev, nic->mii.phy_id, - MII_ADVERTISE); - - /* - * Workaround Si issue where sometimes the part will not - * autoneg to 100Mbps even when advertised. - */ - if (advert & ADVERTISE_100FULL) - data |= BMCR_SPEED100 | BMCR_FULLDPLX; - else if (advert & ADVERTISE_100HALF) - data |= BMCR_SPEED100; - } - } - return mdio_ctrl_hw(nic, addr, dir, reg, data); -} - -/* Fully software-emulated mdio_ctrl() function for cards without - * MII-compliant PHYs. - * For now, this is mainly geared towards 80c24 support; in case of further - * requirements for other types (i82503, ...?) either extend this mechanism - * or split it, whichever is cleaner. - */ -static u16 mdio_ctrl_phy_mii_emulated(struct nic *nic, - u32 addr, - u32 dir, - u32 reg, - u16 data) -{ - /* might need to allocate a netdev_priv'ed register array eventually - * to be able to record state changes, but for now - * some fully hardcoded register handling ought to be ok I guess. */ - - if (dir == mdi_read) { - switch (reg) { - case MII_BMCR: - /* Auto-negotiation, right? */ - return BMCR_ANENABLE | - BMCR_FULLDPLX; - case MII_BMSR: - return BMSR_LSTATUS /* for mii_link_ok() */ | - BMSR_ANEGCAPABLE | - BMSR_10FULL; - case MII_ADVERTISE: - /* 80c24 is a "combo card" PHY, right? */ - return ADVERTISE_10HALF | - ADVERTISE_10FULL; - default: - netif_printk(nic, hw, KERN_DEBUG, nic->netdev, - "%s:addr=%d, reg=%d, data=0x%04X: unimplemented emulation!\n", - dir == mdi_read ? "READ" : "WRITE", - addr, reg, data); - return 0xFFFF; - } - } else { - switch (reg) { - default: - netif_printk(nic, hw, KERN_DEBUG, nic->netdev, - "%s:addr=%d, reg=%d, data=0x%04X: unimplemented emulation!\n", - dir == mdi_read ? "READ" : "WRITE", - addr, reg, data); - return 0xFFFF; - } - } -} -static inline int e100_phy_supports_mii(struct nic *nic) -{ - /* for now, just check it by comparing whether we - are using MII software emulation. - */ - return (nic->mdio_ctrl != mdio_ctrl_phy_mii_emulated); -} - -static void e100_get_defaults(struct nic *nic) -{ - struct param_range rfds = { .min = 16, .max = 256, .count = 256 }; - struct param_range cbs = { .min = 64, .max = 256, .count = 128 }; - - /* MAC type is encoded as rev ID; exception: ICH is treated as 82559 */ - nic->mac = (nic->flags & ich) ? mac_82559_D101M : nic->pdev->revision; - if (nic->mac == mac_unknown) - nic->mac = mac_82557_D100_A; - - nic->params.rfds = rfds; - nic->params.cbs = cbs; - - /* Quadwords to DMA into FIFO before starting frame transmit */ - nic->tx_threshold = 0xE0; - - /* no interrupt for every tx completion, delay = 256us if not 557 */ - nic->tx_command = cpu_to_le16(cb_tx | cb_tx_sf | - ((nic->mac >= mac_82558_D101_A4) ? cb_cid : cb_i)); - - /* Template for a freshly allocated RFD */ - nic->blank_rfd.command = 0; - nic->blank_rfd.rbd = cpu_to_le32(0xFFFFFFFF); - nic->blank_rfd.size = cpu_to_le16(VLAN_ETH_FRAME_LEN); - - /* MII setup */ - nic->mii.phy_id_mask = 0x1F; - nic->mii.reg_num_mask = 0x1F; - nic->mii.dev = nic->netdev; - nic->mii.mdio_read = mdio_read; - nic->mii.mdio_write = mdio_write; -} - -static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb) -{ - struct config *config = &cb->u.config; - u8 *c = (u8 *)config; - - cb->command = cpu_to_le16(cb_config); - - memset(config, 0, sizeof(struct config)); - - config->byte_count = 0x16; /* bytes in this struct */ - config->rx_fifo_limit = 0x8; /* bytes in FIFO before DMA */ - config->direct_rx_dma = 0x1; /* reserved */ - config->standard_tcb = 0x1; /* 1=standard, 0=extended */ - config->standard_stat_counter = 0x1; /* 1=standard, 0=extended */ - config->rx_discard_short_frames = 0x1; /* 1=discard, 0=pass */ - config->tx_underrun_retry = 0x3; /* # of underrun retries */ - if (e100_phy_supports_mii(nic)) - config->mii_mode = 1; /* 1=MII mode, 0=i82503 mode */ - config->pad10 = 0x6; - config->no_source_addr_insertion = 0x1; /* 1=no, 0=yes */ - config->preamble_length = 0x2; /* 0=1, 1=3, 2=7, 3=15 bytes */ - config->ifs = 0x6; /* x16 = inter frame spacing */ - config->ip_addr_hi = 0xF2; /* ARP IP filter -