On Tue, Aug 21, 2012 at 01:16:19PM +1200, Liam Farr wrote:
> Hi Guys,
>
>
> I have a HotLava Systems Sumatra 8G4S 4 port SFP PCIe network card with
> a Intel 82580EB chip set.
>
> I'm running OpenBSD 5.1 and according to the release notes the 82580
> chip set is supported under the em drivers in this release.
It was tested with copper not fiber, I guess you need something like
the following (diff against -current):
Index: if_em_hw.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em_hw.c,v
retrieving revision 1.69
diff -u -p -r1.69 if_em_hw.c
--- if_em_hw.c 17 May 2012 10:45:17 -0000 1.69
+++ if_em_hw.c 21 Aug 2012 04:48:21 -0000
@@ -1435,7 +1435,7 @@ em_adjust_serdes_amplitude(struct em_hw
DEBUGFUNC("em_adjust_serdes_amplitude");
if (hw->media_type != em_media_type_internal_serdes ||
- hw->mac_type == em_82575)
+ (hw->mac_type == em_82575 || hw->mac_type == em_82580))
return E1000_SUCCESS;
switch (hw->mac_type) {
@@ -1689,10 +1689,10 @@ em_setup_fiber_serdes_link(struct em_hw
* initialization.
*/
if (hw->mac_type == em_82571 || hw->mac_type == em_82572 ||
- hw->mac_type == em_82575)
+ hw->mac_type == em_82575 || hw->mac_type == em_82580)
E1000_WRITE_REG(hw, SCTL, E1000_DISABLE_SERDES_LOOPBACK);
- if (hw->mac_type == em_82575)
+ if (hw->mac_type == em_82575 || hw->mac_type == em_82580)
em_power_up_serdes_link_82575(hw);
/*
@@ -1713,7 +1713,7 @@ em_setup_fiber_serdes_link(struct em_hw
/* Take the link out of reset */
ctrl &= ~(E1000_CTRL_LRST);
- if (hw->mac_type == em_82575) {
+ if (hw->mac_type == em_82575 || hw->mac_type == em_82580) {
/* set both sw defined pins on 82575/82576*/
ctrl |= E1000_CTRL_SWDPIN0 | E1000_CTRL_SWDPIN1;
@@ -3600,7 +3600,7 @@ em_check_for_link(struct em_hw *hw)
DEBUGFUNC("em_check_for_link");
uint16_t speed, duplex;
- if (hw->mac_type == em_82575 &&
+ if ((hw->mac_type == em_82575 || hw->mac_type == em_82580) &&
hw->media_type != em_media_type_copper) {
ret_val = em_get_pcs_speed_and_duplex_82575(hw, &speed,
&duplex);
@@ -3933,7 +3933,8 @@ em_get_speed_and_duplex(struct em_hw *hw
uint16_t phy_data;
DEBUGFUNC("em_get_speed_and_duplex");
- if (hw->mac_type == em_82575 && hw->media_type != em_media_type_copper)
+ if ((hw->mac_type == em_82575 || hw->mac_type == em_82580) &&
+ hw->media_type != em_media_type_copper)
return em_get_pcs_speed_and_duplex_82575(hw, speed, duplex);
if (hw->mac_type >= em_82543) {
@@ -5250,7 +5251,7 @@ em_detect_gig_phy(struct em_hw *hw)
if ((hw->media_type == em_media_type_internal_serdes ||
hw->media_type == em_media_type_fiber) &&
- hw->mac_type == em_82575) {
+ (hw->mac_type == em_82575 || hw->mac_type == em_82580)) {
hw->phy_type = em_phy_undefined;
return E1000_SUCCESS;
}