Support for Intel i354 Quad GbE network adapter?

2014-02-13 Thread Andrew Lester
Hi All,

 

I tried to install OpenBSD 5.4 (amd64) on a PC using a Supermicro

A1SRi-2758F motherboard which is based on the Intel Atom C2000

(Rangeley) platform, and has an integrated i354 Quad-port GbE

network adapter. The installation was unable to detect any of the

network interfaces. Is anybody aware of some sort of workaround for

this problem? I tried to do a PXE install which is ironic because it

was over one of the interfaces. At the network configuration part of

the installation, it detected a vlan0 interface which I was unable

to configure.

 

Thanks,

Andrew



Re: Support for Intel i354 Quad GbE network adapter?

2014-02-13 Thread Jonathan Gray
On Thu, Feb 13, 2014 at 11:30:14PM -0600, Andrew Lester wrote:
 Hi All,
 
  
 
 I tried to install OpenBSD 5.4 (amd64) on a PC using a Supermicro
 
 A1SRi-2758F motherboard which is based on the Intel Atom C2000
 
 (Rangeley) platform, and has an integrated i354 Quad-port GbE
 
 network adapter. The installation was unable to detect any of the
 
 network interfaces. Is anybody aware of some sort of workaround for
 
 this problem? I tried to do a PXE install which is ironic because it
 
 was over one of the interfaces. At the network configuration part of
 
 the installation, it detected a vlan0 interface which I was unable
 
 to configure.

Here is a diff against -current that may work but doesn't
handle some of the i354 special casing:

Index: if_em.c
===
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.275
diff -u -p -r1.275 if_em.c
--- if_em.c 28 Dec 2013 03:34:54 -  1.275
+++ if_em.c 14 Feb 2014 05:55:27 -
@@ -144,6 +144,9 @@ const struct pci_matchid em_devices[] = 
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_FIBER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_SERDES },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_SGMII },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_BP_1GBPS },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_BP_2_5GBPS },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_SGMII },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_82567V_3 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE_G },
Index: if_em_hw.c
===
RCS file: /cvs/src/sys/dev/pci/if_em_hw.c,v
retrieving revision 1.75
diff -u -p -r1.75 if_em_hw.c
--- if_em_hw.c  27 Nov 2013 01:13:10 -  1.75
+++ if_em_hw.c  14 Feb 2014 05:54:27 -
@@ -523,6 +523,9 @@ em_set_mac_type(struct em_hw *hw)
case E1000_DEV_ID_I350_SERDES:
case E1000_DEV_ID_I350_SGMII:
case E1000_DEV_ID_I350_DA4:
+   case E1000_DEV_ID_I354_BACKPLANE_1GBPS:
+   case E1000_DEV_ID_I354_SGMII:
+   case E1000_DEV_ID_I354_BACKPLANE_2_5GBPS:
hw-mac_type = em_i350;
hw-initialize_hw_bits_disable = 1;
hw-eee_enable = 1;
Index: if_em_hw.h
===
RCS file: /cvs/src/sys/dev/pci/if_em_hw.h,v
retrieving revision 1.56
diff -u -p -r1.56 if_em_hw.h
--- if_em_hw.h  27 Nov 2013 01:13:10 -  1.56
+++ if_em_hw.h  14 Feb 2014 05:55:22 -
@@ -571,6 +571,9 @@ int32_t em_check_phy_reset_block(struct 
 #define E1000_DEV_ID_I350_SGMII  0x1524
 #define E1000_DEV_ID_82576_QUAD_CU_ET2   0x1526
 #define E1000_DEV_ID_I350_DA40x1546
+#define E1000_DEV_ID_I354_BACKPLANE_1GBPS   0x1F40
+#define E1000_DEV_ID_I354_SGMII 0x1F41
+#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45
 #define E1000_DEV_ID_82574L  0x10D3
 #define E1000_DEV_ID_EP80579_LAN_1   0x5040
 #define E1000_DEV_ID_EP80579_LAN_2   0x5044



Re: Support for Intel i354 Quad GbE network adapter?

2014-02-13 Thread Jonathan Gray
On Fri, Feb 14, 2014 at 05:00:03PM +1100, Jonathan Gray wrote:
 On Thu, Feb 13, 2014 at 11:30:14PM -0600, Andrew Lester wrote:
  Hi All,
  
   
  
  I tried to install OpenBSD 5.4 (amd64) on a PC using a Supermicro
  
  A1SRi-2758F motherboard which is based on the Intel Atom C2000
  
  (Rangeley) platform, and has an integrated i354 Quad-port GbE
  
  network adapter. The installation was unable to detect any of the
  
  network interfaces. Is anybody aware of some sort of workaround for
  
  this problem? I tried to do a PXE install which is ironic because it
  
  was over one of the interfaces. At the network configuration part of
  
  the installation, it detected a vlan0 interface which I was unable
  
  to configure.
 
 Here is a diff against -current that may work but doesn't
 handle some of the i354 special casing:

And here is one that might give the phy more chance of working:

Index: if_em.c
===
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.275
diff -u -p -r1.275 if_em.c
--- if_em.c 28 Dec 2013 03:34:54 -  1.275
+++ if_em.c 14 Feb 2014 05:55:27 -
@@ -144,6 +144,9 @@ const struct pci_matchid em_devices[] = 
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_FIBER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_SERDES },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_SGMII },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_BP_1GBPS },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_BP_2_5GBPS },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_SGMII },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_82567V_3 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE_G },
Index: if_em_hw.c
===
RCS file: /cvs/src/sys/dev/pci/if_em_hw.c,v
retrieving revision 1.75
diff -u -p -r1.75 if_em_hw.c
--- if_em_hw.c  27 Nov 2013 01:13:10 -  1.75
+++ if_em_hw.c  14 Feb 2014 06:22:25 -
@@ -225,6 +225,7 @@ em_set_phy_type(struct em_hw *hw)
case M88E1000_I_PHY_ID:
case M88E1011_I_PHY_ID:
case M88E_I_PHY_ID:
+   case M88E1543_E_PHY_ID:
hw-phy_type = em_phy_m88;
break;
case IGP01E1000_I_PHY_ID:
@@ -523,6 +524,9 @@ em_set_mac_type(struct em_hw *hw)
case E1000_DEV_ID_I350_SERDES:
case E1000_DEV_ID_I350_SGMII:
case E1000_DEV_ID_I350_DA4:
+   case E1000_DEV_ID_I354_BACKPLANE_1GBPS:
+   case E1000_DEV_ID_I354_SGMII:
+   case E1000_DEV_ID_I354_BACKPLANE_2_5GBPS:
hw-mac_type = em_i350;
hw-initialize_hw_bits_disable = 1;
hw-eee_enable = 1;
@@ -5178,7 +5182,9 @@ em_match_gig_phy(struct em_hw *hw)
break;
case em_82580:
case em_i350:
-   if (hw-phy_id == I82580_I_PHY_ID || hw-phy_id == 
I350_I_PHY_ID) {
+   if (hw-phy_id == I82580_I_PHY_ID ||
+   hw-phy_id == I350_I_PHY_ID ||
+   hw-phy_id == M88E1543_E_PHY_ID) {
uint32_t mdic;
 
mdic = EM_READ_REG(hw, E1000_MDICNFG);
Index: if_em_hw.h
===
RCS file: /cvs/src/sys/dev/pci/if_em_hw.h,v
retrieving revision 1.56
diff -u -p -r1.56 if_em_hw.h
--- if_em_hw.h  27 Nov 2013 01:13:10 -  1.56
+++ if_em_hw.h  14 Feb 2014 06:20:45 -
@@ -571,6 +571,9 @@ int32_t em_check_phy_reset_block(struct 
 #define E1000_DEV_ID_I350_SGMII  0x1524
 #define E1000_DEV_ID_82576_QUAD_CU_ET2   0x1526
 #define E1000_DEV_ID_I350_DA40x1546
+#define E1000_DEV_ID_I354_BACKPLANE_1GBPS   0x1F40
+#define E1000_DEV_ID_I354_SGMII 0x1F41
+#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45
 #define E1000_DEV_ID_82574L  0x10D3
 #define E1000_DEV_ID_EP80579_LAN_1   0x5040
 #define E1000_DEV_ID_EP80579_LAN_2   0x5044
@@ -3374,6 +3377,7 @@ struct em_host_command_info {
 #define GG82563_E_PHY_ID 0x01410CA0
 #define BME1000_E_PHY_ID 0x01410CB0
 #define BME1000_E_PHY_ID_R2  0x01410CB1
+#define M88E1543_E_PHY_ID0x01410EA0
 #define I82577_E_PHY_ID  0x01540050
 #define I82578_E_PHY_ID  0x004DD040
 #define I82579_E_PHY_ID  0x01540090



Re: Support for Intel i354 Quad GbE network adapter?

2014-02-13 Thread Andrew Lester
Jonathan,

Thanks for the reply (I also saw the update you sent). How would I make use
of that?
Simply use the install files from /pub/OpenBSD/snapshots/amd64 versus
/pub/OpenBSD/5.4/amd64? Could you elaborate what you mean by not handling 
some of the special casing? Sorry, this is my first run with any sort of
BSD!

Thanks,
Andrew

-Original Message-
From: Jonathan Gray [mailto:j...@jsg.id.au] 
Sent: Friday, February 14, 2014 12:00 AM
To: Andrew Lester
Cc: misc@openbsd.org
Subject: Re: Support for Intel i354 Quad GbE network adapter?

On Thu, Feb 13, 2014 at 11:30:14PM -0600, Andrew Lester wrote:
 Hi All,
 
  
 
 I tried to install OpenBSD 5.4 (amd64) on a PC using a Supermicro
 
 A1SRi-2758F motherboard which is based on the Intel Atom C2000
 
 (Rangeley) platform, and has an integrated i354 Quad-port GbE
 
 network adapter. The installation was unable to detect any of the
 
 network interfaces. Is anybody aware of some sort of workaround for
 
 this problem? I tried to do a PXE install which is ironic because it
 
 was over one of the interfaces. At the network configuration part of
 
 the installation, it detected a vlan0 interface which I was unable
 
 to configure.

Here is a diff against -current that may work but doesn't handle some of the
i354 special casing:

Index: if_em.c
===
RCS file: /cvs/src/sys/dev/pci/if_em.c,v retrieving revision 1.275 diff -u
-p -r1.275 if_em.c
--- if_em.c 28 Dec 2013 03:34:54 -  1.275
+++ if_em.c 14 Feb 2014 05:55:27 -
@@ -144,6 +144,9 @@ const struct pci_matchid em_devices[] = 
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_FIBER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_SERDES },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_SGMII },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_BP_1GBPS },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_BP_2_5GBPS },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_SGMII },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_82567V_3 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE_G },
Index: if_em_hw.c
===
RCS file: /cvs/src/sys/dev/pci/if_em_hw.c,v retrieving revision 1.75 diff -u
-p -r1.75 if_em_hw.c
--- if_em_hw.c  27 Nov 2013 01:13:10 -  1.75
+++ if_em_hw.c  14 Feb 2014 05:54:27 -
@@ -523,6 +523,9 @@ em_set_mac_type(struct em_hw *hw)
case E1000_DEV_ID_I350_SERDES:
case E1000_DEV_ID_I350_SGMII:
case E1000_DEV_ID_I350_DA4:
+   case E1000_DEV_ID_I354_BACKPLANE_1GBPS:
+   case E1000_DEV_ID_I354_SGMII:
+   case E1000_DEV_ID_I354_BACKPLANE_2_5GBPS:
hw-mac_type = em_i350;
hw-initialize_hw_bits_disable = 1;
hw-eee_enable = 1;
Index: if_em_hw.h
===
RCS file: /cvs/src/sys/dev/pci/if_em_hw.h,v retrieving revision 1.56 diff -u
-p -r1.56 if_em_hw.h
--- if_em_hw.h  27 Nov 2013 01:13:10 -  1.56
+++ if_em_hw.h  14 Feb 2014 05:55:22 -
@@ -571,6 +571,9 @@ int32_t em_check_phy_reset_block(struct 
 #define E1000_DEV_ID_I350_SGMII  0x1524
 #define E1000_DEV_ID_82576_QUAD_CU_ET2   0x1526
 #define E1000_DEV_ID_I350_DA40x1546
+#define E1000_DEV_ID_I354_BACKPLANE_1GBPS   0x1F40
+#define E1000_DEV_ID_I354_SGMII 0x1F41
+#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45
 #define E1000_DEV_ID_82574L  0x10D3
 #define E1000_DEV_ID_EP80579_LAN_1   0x5040
 #define E1000_DEV_ID_EP80579_LAN_2   0x5044



Re: Support for Intel i354 Quad GbE network adapter?

2014-02-13 Thread Jonathan Gray
Well, you'd ideally install a snapshot and check out
the src tree as described here:

http://www.openbsd.org/faq/faq5.html#Bld

apply the diff via patch before building a kernel.

cd /usr/src/sys/dev/pci
patch -p0  /path/to/patch

If that sounds a bit overwhelming I can perhaps
build a snapshot with the change here over
the weekend.

The 'special casing' meaning some of the i354 specific
code in the Intel driver in FreeBSD/Linux I have not
included in the diff.

On Fri, Feb 14, 2014 at 12:29:03AM -0600, Andrew Lester wrote:
 Jonathan,
 
 Thanks for the reply (I also saw the update you sent). How would I make use
 of that?
 Simply use the install files from /pub/OpenBSD/snapshots/amd64 versus
 /pub/OpenBSD/5.4/amd64? Could you elaborate what you mean by not handling 
 some of the special casing? Sorry, this is my first run with any sort of
 BSD!
 
 Thanks,
 Andrew
 
 -Original Message-
 From: Jonathan Gray [mailto:j...@jsg.id.au] 
 Sent: Friday, February 14, 2014 12:00 AM
 To: Andrew Lester
 Cc: misc@openbsd.org
 Subject: Re: Support for Intel i354 Quad GbE network adapter?
 
 On Thu, Feb 13, 2014 at 11:30:14PM -0600, Andrew Lester wrote:
  Hi All,
  
   
  
  I tried to install OpenBSD 5.4 (amd64) on a PC using a Supermicro
  
  A1SRi-2758F motherboard which is based on the Intel Atom C2000
  
  (Rangeley) platform, and has an integrated i354 Quad-port GbE
  
  network adapter. The installation was unable to detect any of the
  
  network interfaces. Is anybody aware of some sort of workaround for
  
  this problem? I tried to do a PXE install which is ironic because it
  
  was over one of the interfaces. At the network configuration part of
  
  the installation, it detected a vlan0 interface which I was unable
  
  to configure.
 
 Here is a diff against -current that may work but doesn't handle some of the
 i354 special casing:
 
 Index: if_em.c
 ===
 RCS file: /cvs/src/sys/dev/pci/if_em.c,v retrieving revision 1.275 diff -u
 -p -r1.275 if_em.c
 --- if_em.c   28 Dec 2013 03:34:54 -  1.275
 +++ if_em.c   14 Feb 2014 05:55:27 -
 @@ -144,6 +144,9 @@ const struct pci_matchid em_devices[] = 
   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_FIBER },
   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_SERDES },
   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I350_SGMII },
 + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_BP_1GBPS },
 + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_BP_2_5GBPS },
 + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I354_SGMII },
   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_82567V_3 },
   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE },
   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE_G },
 Index: if_em_hw.c
 ===
 RCS file: /cvs/src/sys/dev/pci/if_em_hw.c,v retrieving revision 1.75 diff -u
 -p -r1.75 if_em_hw.c
 --- if_em_hw.c27 Nov 2013 01:13:10 -  1.75
 +++ if_em_hw.c14 Feb 2014 05:54:27 -
 @@ -523,6 +523,9 @@ em_set_mac_type(struct em_hw *hw)
   case E1000_DEV_ID_I350_SERDES:
   case E1000_DEV_ID_I350_SGMII:
   case E1000_DEV_ID_I350_DA4:
 + case E1000_DEV_ID_I354_BACKPLANE_1GBPS:
 + case E1000_DEV_ID_I354_SGMII:
 + case E1000_DEV_ID_I354_BACKPLANE_2_5GBPS:
   hw-mac_type = em_i350;
   hw-initialize_hw_bits_disable = 1;
   hw-eee_enable = 1;
 Index: if_em_hw.h
 ===
 RCS file: /cvs/src/sys/dev/pci/if_em_hw.h,v retrieving revision 1.56 diff -u
 -p -r1.56 if_em_hw.h
 --- if_em_hw.h27 Nov 2013 01:13:10 -  1.56
 +++ if_em_hw.h14 Feb 2014 05:55:22 -
 @@ -571,6 +571,9 @@ int32_t em_check_phy_reset_block(struct 
  #define E1000_DEV_ID_I350_SGMII  0x1524
  #define E1000_DEV_ID_82576_QUAD_CU_ET2   0x1526
  #define E1000_DEV_ID_I350_DA40x1546
 +#define E1000_DEV_ID_I354_BACKPLANE_1GBPS   0x1F40
 +#define E1000_DEV_ID_I354_SGMII 0x1F41
 +#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45
  #define E1000_DEV_ID_82574L  0x10D3
  #define E1000_DEV_ID_EP80579_LAN_1   0x5040
  #define E1000_DEV_ID_EP80579_LAN_2   0x5044