Skip to contentSkip to conversation

Net: Add Intel E1000 82574L PCIe card support

PATCH Superseded Roy Zang 4 participants 6 messages Jan 18, 2011 – Jan 19, 2011 Network drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Roy Zang

author
#0 lore raw

PATCH 1/1 Net: Add Intel E1000 82574L PCIe card support

Add Intel E1000 82574L PCIe card support. Test on MPC8544DS and MPC8572 board.
Add the missing contact information for future support.

---

based on commit e1ccf97c5d7651664d37c0c5aa243874b8851b2d

 drivers/net/e1000.c |   35 +++++++++++++++++++++++++++--------
 drivers/net/e1000.h |   11 +++++++++++
 include/pci_ids.h   |    1 +
 3 files changed, 39 insertions(+), 8 deletions(-)
drivers/net/e1000.c +27 -8
index 5f390bd..a545cd1 100644
@@ -40,6 +40,10 @@ tested on both gig copper and gig fiber boards
  *  Copyright (C) Linux Networx.
  *  Massive upgrade to work with the new intel gigabit NICs.
  *  <ebiederman@lnxi dot com>
+ *
+ *  Copyright 2009, 2011 Freescale Semiconductor, Inc.
+ *  Authors: Roy Zang <[email protected]>
+ *     - Add PCI Express card support in Jul. 2009
  */
 
 #include "e1000.h"
@@ -100,6 +104,7 @@ static struct pci_device_id supported[] = {
 	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82573E},
 	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82573E_IAMT},
 	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82573L},
+	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82574L},
 	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82546GB_QUAD_COPPER_KSP3},
 	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_80003ES2LAN_COPPER_DPT},
 	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_80003ES2LAN_SERDES_DPT},
@@ -331,7 +336,7 @@ static boolean_t e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw)
 	if (hw->mac_type == e1000_ich8lan)
 		return FALSE;
 
-	if (hw->mac_type == e1000_82573) {
+	if (hw->mac_type == e1000_82573 || hw->mac_type == e1000_82574) {
 		eecd = E1000_READ_REG(hw, EECD);
 
 		/* Isolate bits 15 & 16 */
@@ -364,7 +369,7 @@ e1000_acquire_eeprom(struct e1000_hw *hw)
 		return -E1000_ERR_SWFW_SYNC;
 	eecd = E1000_READ_REG(hw, EECD);
 
-	if (hw->mac_type != e1000_82573) {
+	if (hw->mac_type != e1000_82573 || hw->mac_type != e1000_82574) {
 		/* Request EEPROM Access */
 		if (hw->mac_type > e1000_82544) {
 			eecd |= E1000_EECD_REQ;
@@ -498,6 +503,7 @@ static int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
 		eeprom->use_eewr = FALSE;
 		break;
 	case e1000_82573:
+	case e1000_82574:
 		eeprom->type = e1000_eeprom_spi;
 		eeprom->opcode_bits = 8;
 		eeprom->delay_usec = 1;
@@ -1317,6 +1323,9 @@ e1000_set_mac_type(struct e1000_hw *hw)
 	case E1000_DEV_ID_82573L:
 		hw->mac_type = e1000_82573;
 		break;
+	case E1000_DEV_ID_82574L:
+		hw->mac_type = e1000_82574;
+		break;
 	case E1000_DEV_ID_80003ES2LAN_COPPER_SPT:
 	case E1000_DEV_ID_80003ES2LAN_SERDES_SPT:
 	case E1000_DEV_ID_80003ES2LAN_COPPER_DPT:
@@ -1487,6 +1496,7 @@ e1000_initialize_hardware_bits(struct e1000_hw *hw)
 			E1000_WRITE_REG(hw, TARC1, reg_tarc1);
 			break;
 		case e1000_82573:
+		case e1000_82574:
 			reg_ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
 			reg_ctrl_ext &= ~(1 << 23);
 			reg_ctrl_ext |= (1 << 22);
@@ -1728,12 +1738,11 @@ e1000_init_hw(struct eth_device *nic)
 			| E1000_TXDCTL_FULL_TX_DESC_WB;
 		E1000_WRITE_REG(hw, TXDCTL1, ctrl);
 		break;
-	}
-
-	if (hw->mac_type == e1000_82573) {
-		uint32_t gcr = E1000_READ_REG(hw, GCR);
-		gcr |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX;
-		E1000_WRITE_REG(hw, GCR, gcr);
+	case e1000_82573:
+	case e1000_82574:
+		reg_data = E1000_READ_REG(hw, GCR);
+		reg_data |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX;
+		E1000_WRITE_REG(hw, GCR, reg_data);
 	}
 
 #if 0
@@ -1812,6 +1821,7 @@ e1000_setup_link(struct eth_device *nic)
 		switch (hw->mac_type) {
 		case e1000_ich8lan:
 		case e1000_82573:
+		case e1000_82574:
 			hw->fc = e1000_fc_full;
 			break;
 		default:
@@ -4560,6 +4570,9 @@ static int e1000_set_phy_type (struct e1000_hw *hw)
 			hw->phy_type = e1000_phy_gg82563;
 			break;
 		}
+	case BME1000_E_PHY_ID:
+		hw->phy_type = e1000_phy_bm ;
+		break;
 		/* Fall Through */
 	default:
 		/* Should never have loaded on this device */
@@ -4646,6 +4659,10 @@ e1000_detect_gig_phy(struct e1000_hw *hw)
 		if (hw->phy_id == M88E1111_I_PHY_ID)
 			match = TRUE;
 		break;
+	case e1000_82574:
+		if (hw->phy_id == BME1000_E_PHY_ID)
+			match = TRUE;
+		break;
 	case e1000_80003es2lan:
 		if (hw->phy_id == GG82563_E_PHY_ID)
 			match = TRUE;
@@ -4710,6 +4727,7 @@ e1000_set_media_type(struct e1000_hw *hw)
 			break;
 		case e1000_ich8lan:
 		case e1000_82573:
+		case e1000_82574:
 			/* The STATUS_TBIMODE bit is reserved or reused
 			 * for the this device.
 			 */
@@ -5125,6 +5143,7 @@ void e1000_get_bus_type(struct e1000_hw *hw)
 	case e1000_82571:
 	case e1000_82572:
 	case e1000_82573:
+	case e1000_82574:
 	case e1000_80003es2lan:
 		hw->bus_type = e1000_bus_type_pci_express;
 		break;
drivers/net/e1000.h +11 -0
index eb0804b..4c60b70 100644
@@ -24,12 +24,18 @@
   Linux NICS <[email protected]>
   Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 
+
 *******************************************************************************/
 
 /* e1000_hw.h
  * Structures, enums, and macros for the MAC
  */
 
+/* Copyright 2009, 2011 Freescale Semiconductor, Inc.
+ * Authors: Roy Zang <[email protected]>
+ *       - Add PCI Express card support in Jul. 2009
+ */
+
 #ifndef _E1000_HW_H_
 #define _E1000_HW_H_
 
@@ -81,6 +87,7 @@ typedef enum {
 	e1000_82571,
 	e1000_82572,
 	e1000_82573,
+	e1000_82574,
 	e1000_80003es2lan,
 	e1000_ich8lan,
 	e1000_num_macs
@@ -200,6 +207,7 @@ typedef enum {
 	e1000_phy_gg82563,
 	e1000_phy_igp_3,
 	e1000_phy_ife,
+	e1000_phy_bm,
 	e1000_phy_undefined = 0xFF
 } e1000_phy_type;
 
@@ -286,6 +294,7 @@ struct e1000_phy_stats {
 #define E1000_DEV_ID_82573E              0x108B
 #define E1000_DEV_ID_82573E_IAMT         0x108C
 #define E1000_DEV_ID_82573L              0x109A
+#define E1000_DEV_ID_82574L              0x10D3
 #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5
 #define E1000_DEV_ID_80003ES2LAN_COPPER_DPT     0x1096
 #define E1000_DEV_ID_80003ES2LAN_SERDES_DPT     0x1098
@@ -2417,6 +2426,8 @@ struct e1000_hw {
 #define L1LXT971A_PHY_ID   0x001378E0
 #define GG82563_E_PHY_ID   0x01410CA0
 
+#define BME1000_E_PHY_ID     0x01410CB0
+
 /* Miscellaneous PHY bit definitions. */
 #define PHY_PREAMBLE			0xFFFFFFFF
 #define PHY_SOF				0x01
include/pci_ids.h +1 -0
index cb8398d..02a6c6e 100644
@@ -1853,6 +1853,7 @@
 #define PCI_DEVICE_ID_INTEL_82573E              0x108B
 #define PCI_DEVICE_ID_INTEL_82573E_IAMT         0x108C
 #define PCI_DEVICE_ID_INTEL_82573L              0x109A
+#define PCI_DEVICE_ID_INTEL_82574L              0x10D3
 #define PCI_DEVICE_ID_INTEL_82546GB_QUAD_COPPER_KSP3 0x10B5
 #define PCI_DEVICE_ID_INTEL_80003ES2LAN_COPPER_DPT     0x1096
 #define PCI_DEVICE_ID_INTEL_80003ES2LAN_SERDES_DPT     0x1098
Signature · 1 line
1.7.3.5
#1 lore raw

PATCH 1/1 Net: Add Intel E1000 82574L PCIe card support

Quoted 4 lines · Roy Zang

Add Intel E1000 82574L PCIe card support. Test on MPC8544DS and MPC8572 board.
Add the missing contact information for future support.

Quoted 8 lines

---

based on commit e1ccf97c5d7651664d37c0c5aa243874b8851b2d

drivers/net/e1000.c |   35 +++++++++++++++++++++++++++--------
drivers/net/e1000.h |   11 +++++++++++
include/pci_ids.h   |    1 +
3 files changed, 39 insertions(+), 8 deletions(-)

- k

#2 lore raw

PATCH 1/1 Net: Add Intel E1000 82574L PCIe card support

In reply to Roy Zang

Dear Roy Zang,

Quoted 18 lines · In message <[email protected]> you…

Add Intel E1000 82574L PCIe card support. Test on MPC8544DS and MPC8572 board.
Add the missing contact information for future support.

---

based on commit e1ccf97c5d7651664d37c0c5aa243874b8851b2d

 drivers/net/e1000.c |   35 +++++++++++++++++++++++++++--------
 drivers/net/e1000.h |   11 +++++++++++
 include/pci_ids.h   |    1 +
 3 files changed, 39 insertions(+), 8 deletions(-)
drivers/net/e1000.c +0 -0
index 5f390bd..a545cd1 100644

drivers/net/e1000.c tested on both gig copper and gig fiber boards · line 47

Quoted 8 lines
drivers/net/e1000.c +4 -0
@@ -40,6 +40,10 @@ tested on both gig copper and gig fiber boards
  *  Copyright (C) Linux Networx.
  *  Massive upgrade to work with the new intel gigabit NICs.
  *  <ebiederman@lnxi dot com>
+ *
+ *  Copyright 2009, 2011 Freescale Semiconductor, Inc.
+ *  Authors: Roy Zang <[email protected]>
+ *     - Add PCI Express card support in Jul. 2009
  */

Jul. 2009 ???

drivers/net/e1000.h line 28

Quoted 10 lines
drivers/net/e1000.h +1 -0
index eb0804b..4c60b70 100644
@@ -24,12 +24,18 @@
   Linux NICS <[email protected]>
   Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 
+
 *******************************************************************************/

Please drop the additional blank line

drivers/net/e1000.h line 37

Quoted 4 lines
drivers/net/e1000.h +4 -0
+/* Copyright 2009, 2011 Freescale Semiconductor, Inc.
+ * Authors: Roy Zang <[email protected]>
+ *       - Add PCI Express card support in Jul. 2009
+ */

If you really insist on adding this, thenmove it up into the header. What what exactly do you claim Copyright for - for these 4 lines of "code"?

Also, is this really Jul. 2009?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
As a general rule, the freedom of any people can  be  judged  by  the
volume of their laughter.
#3 lore raw

PATCH 1/1 Net: Add Intel E1000 82574L PCIe card support

Quoted 50 lines · Wolfgang Denk

Dear Roy Zang,

Quoted 18 lines · In message <[email protected]> you…

Add Intel E1000 82574L PCIe card support. Test on MPC8544DS and MPC8572 board.
Add the missing contact information for future support.

---

based on commit e1ccf97c5d7651664d37c0c5aa243874b8851b2d

drivers/net/e1000.c |   35 +++++++++++++++++++++++++++--------
drivers/net/e1000.h |   11 +++++++++++
include/pci_ids.h   |    1 +
3 files changed, 39 insertions(+), 8 deletions(-)
drivers/net/e1000.c +0 -0
index 5f390bd..a545cd1 100644

drivers/net/e1000.c tested on both gig copper and gig fiber boards · line 47

Quoted 8 lines
drivers/net/e1000.c +4 -0
@@ -40,6 +40,10 @@ tested on both gig copper and gig fiber boards
 *  Copyright (C) Linux Networx.
 *  Massive upgrade to work with the new intel gigabit NICs.
 *  <ebiederman@lnxi dot com>
+ *
+ *  Copyright 2009, 2011 Freescale Semiconductor, Inc.
+ *  Authors: Roy Zang <[email protected]>
+ *     - Add PCI Express card support in Jul. 2009
 */

Jul. 2009 ???

drivers/net/e1000.h line 28

Quoted 10 lines
drivers/net/e1000.h +1 -0
index eb0804b..4c60b70 100644
@@ -24,12 +24,18 @@
  Linux NICS <[email protected]>
  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 
+
 *******************************************************************************/

Please drop the additional blank line

drivers/net/e1000.h line 37

Quoted 4 lines
drivers/net/e1000.h +4 -0
+/* Copyright 2009, 2011 Freescale Semiconductor, Inc.
+ * Authors: Roy Zang <[email protected]>
+ *       - Add PCI Express card support in Jul. 2009
+ */
Quoted 6 lines

If you really insist on adding this, thenmove it up into the header. What what exactly do you claim Copyright for - for these 4 lines of "code"?

Also, is this really Jul. 2009?

I think Roy is referencing the following commit in which he added support for numerous e1000 PCIe variants:

commit aa0707897c49c330b7d6b8d8362e44f60f224732

Author: Roy Zang <[email protected]>
Date:   Fri Jul 31 13:34:02 2009 +0800

Add Intel E1000 PCIE card support

- k

#4 lore raw

PATCH 1/1 Net: Add Intel E1000 82574L PCIe card support

Dear Kumar Gala,

Quoted 12 lines · In message <[email protected]> you wrote:
Quoted 11 lines
Quoted 4 lines

+ * Authors: Roy Zang <[email protected]>
+ * - Add PCI Express card support in Jul. 2009
+ */

If you really insist on adding this, thenmove it up into the header. What what exactly do you claim Copyright for - for these 4 lines of "code"?

Also, is this really Jul. 2009?

Quoted 8 lines

I think Roy is referencing the following commit in which he added support for numerous e1000 PCIe variants:

commit aa0707897c49c330b7d6b8d8362e44f60f224732

Author: Roy Zang <[email protected]>
Date:   Fri Jul 31 13:34:02 2009 +0800

Add Intel E1000 PCIE card support

That was then, and now is now. I don't see what that old commit has to do with the current one?

Best regards,

Wolfgang Denk

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
#5 lore raw

PATCH 1/1 Net: Add Intel E1000 82574L PCIe card support

In reply to Wolfgang Denk
Quoted 19 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Wednesday, January 19, 2011 6:33 AM
To: Zang Roy-R61911
Cc: u-boot at lists.denx.de; Gala Kumar-B11780
Subject: Re: [U-Boot] [PATCH] Net: Add Intel E1000 82574L PCIe card support

Dear Roy Zang,

In message <[email protected]> you

Quoted 6 lines · wrote:

Add Intel E1000 82574L PCIe card support. Test on MPC8544DS and MPC8572 board.
Add the missing contact information for future support.

---

[snip]

Quoted 13 lines

drivers/net/e1000.h line 28

Quoted 10 lines
drivers/net/e1000.h +1 -0
index eb0804b..4c60b70 100644
@@ -24,12 +24,18 @@
   Linux NICS <[email protected]>
   Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 
+
 

******************************************************************************
*/

Quoted 8 lines

Please drop the additional blank line

drivers/net/e1000.h line 37

Quoted 4 lines
drivers/net/e1000.h +4 -0
+/* Copyright 2009, 2011 Freescale Semiconductor, Inc.
+ * Authors: Roy Zang <[email protected]>
+ *       - Add PCI Express card support in Jul. 2009
+ */

If you really insist on adding this, thenmove it up into the header.

In fact, my original internal code put it to the header, but when I check it with checkpatch.pl, I will get a warning such as:
WARNING: please, no spaces at the start of a line
#156: FILE: drivers/net/e1000.h:5:
+ Copyright 2011 Freescale Semiconductor, Inc.$

How to balance?
Thanks.
Roy