Skip to contentSkip to conversation

myri10ge minor updates

PATCH In review [email protected] 1 participant 7 messages Jul 3, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover myri10ge minor updates

Hi,

the following patches bring some minor updates for the myri10ge driver:
1) Drop unused pm_state
2) Drop ununsed nvidia chipset id
3) Use dev_info() when printing parameters after probe
4) Export more parameters to ethtool

Please apply.

thanks,
Brice

#1 lore raw

PATCH 1/4 myri10ge - Drop unused pm_state

The pm_state field in the myri10ge_priv structure is unused. Drop it.

---
 drivers/net/myri10ge/myri10ge.c |    1 -
 1 file changed, 1 deletion(-)
drivers/net/myri10ge/myri10ge.c +0 -1
Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -188,7 +188,6 @@
 	int vendor_specific_offset;
 	u32 devctl;
 	u16 msi_flags;
-	u32 pm_state[16];
 	u32 read_dma;
 	u32 write_dma;
 	u32 read_write_dma;
#2 lore raw

PATCH 2/4 myri10ge - Drop ununsed nvidia chipset id

In reply to [email protected]

The workaround for the AER capability of the nVidia chipset has been removed, we don't need this PCI id anymore. Drop it.

---
 drivers/net/myri10ge/myri10ge.c |    2 --
 1 file changed, 2 deletions(-)
drivers/net/myri10ge/myri10ge.c +0 -2
Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -2196,8 +2196,6 @@
  * any other device, except if forced with myri10ge_ecrc_enable > 1.
  */
 
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_PCIE	0x005d
-
 static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)
 {
 	struct pci_dev *bridge = mgp->pdev->bus->self;
#3 lore raw

PATCH 3/4 myri10ge - Use dev_info() when printing parameters after probe

In reply to [email protected]

Displaying the interface name when listing the device parameters at the end of myri10ge_probe is not a good idea since udev might rename the interface soon afterwards.
Print the bus id instead, using dev_info().

---
 drivers/net/myri10ge/myri10ge.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/net/myri10ge/myri10ge.c +4 -5
Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -2734,11 +2734,10 @@
 		dev_err(&pdev->dev, "register_netdev failed: %d\n", status);
 		goto abort_with_irq;
 	}
-
-	printk(KERN_INFO "myri10ge: %s: %s IRQ %d, tx bndry %d, fw %s, WC %s\n",
-	       netdev->name, (mgp->msi_enabled ? "MSI" : "xPIC"),
-	       pdev->irq, mgp->tx.boundary, mgp->fw_name,
-	       (mgp->mtrr >= 0 ? "Enabled" : "Disabled"));
+	dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n",
+		 (mgp->msi_enabled ? "MSI" : "xPIC"),
+		 pdev->irq, mgp->tx.boundary, mgp->fw_name,
+		 (mgp->mtrr >= 0 ? "Enabled" : "Disabled"));
 
 	return 0;
 
Quoted 1 line

From [email protected] Mon Jul 3 18:05:17 2006

Message-Id: <[email protected]>
References: <[email protected]>
User-Agent: quilt/0.45-1
Date: Mon, 03 Jul 2006 18:02:34 -0400
From: [email protected]
To: [email protected]
Cc: Brice Goglin <[email protected]>
Subject: [patch 4/4] myri10ge - Export more parameters to ethtool.
Content-Disposition: inline; filename=myri10ge4-export_more_parameters_to_ethtool.patch

Add the IRQ line, the tx_boundary, and whether Write-combining and MSI are enabled to the list of parameters that are exported to ethtool.

---
 drivers/net/myri10ge/myri10ge.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/net/myri10ge/myri10ge.c +5 -0
Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -1288,6 +1288,7 @@
 	"tx_aborted_errors", "tx_carrier_errors", "tx_fifo_errors",
 	"tx_heartbeat_errors", "tx_window_errors",
 	/* device-specific stats */
+	"tx_boundary", "WC", "irq", "MSI",
 	"read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs",
 	"serial_number", "tx_pkt_start", "tx_pkt_done",
 	"tx_req", "tx_done", "rx_small_cnt", "rx_big_cnt",
@@ -1326,6 +1327,10 @@
 	for (i = 0; i < MYRI10GE_NET_STATS_LEN; i++)
 		data[i] = ((unsigned long *)&mgp->stats)[i];
 
+	data[i++] = (unsigned int)mgp->tx.boundary;
+	data[i++] = (unsigned int)(mgp->mtrr >= 0);
+	data[i++] = (unsigned int)mgp->pdev->irq;
+	data[i++] = (unsigned int)mgp->msi_enabled;
 	data[i++] = (unsigned int)mgp->read_dma;
 	data[i++] = (unsigned int)mgp->write_dma;
 	data[i++] = (unsigned int)mgp->read_write_dma;
#4 lore raw

Re: [patch 3/4] myri10ge - Use dev_info() when printing parameters after probe

Please forget this one, something went wrong, it contains both #3 and #4. I have resent #3 and #4 separately.

Brice

Quoted 74 lines · [email protected] wrote:

Displaying the interface name when listing the device parameters at the end of myri10ge_probe is not a good idea since udev might rename the interface soon afterwards.
Print the bus id instead, using dev_info().

---
 drivers/net/myri10ge/myri10ge.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================

drivers/net/myri10ge/myri10ge.c +4 -5
@@ -2734,11 +2734,10 @@
 		dev_err(&pdev->dev, "register_netdev failed: %d\n", status);
 		goto abort_with_irq;
 	}
-
-	printk(KERN_INFO "myri10ge: %s: %s IRQ %d, tx bndry %d, fw %s, WC %s\n",
-	       netdev->name, (mgp->msi_enabled ? "MSI" : "xPIC"),
-	       pdev->irq, mgp->tx.boundary, mgp->fw_name,
-	       (mgp->mtrr >= 0 ? "Enabled" : "Disabled"));
+	dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n",
+		 (mgp->msi_enabled ? "MSI" : "xPIC"),
+		 pdev->irq, mgp->tx.boundary, mgp->fw_name,
+		 (mgp->mtrr >= 0 ? "Enabled" : "Disabled"));
 
 	return 0;
 
Quoted 1 line

From [email protected] Mon Jul 3 18:05:17 2006

Message-Id: <[email protected]>
References: <[email protected]>
User-Agent: quilt/0.45-1
Date: Mon, 03 Jul 2006 18:02:34 -0400
From: [email protected]
To: [email protected]
Cc: Brice Goglin <[email protected]>
Subject: [patch 4/4] myri10ge - Export more parameters to ethtool.
Content-Disposition: inline; filename=myri10ge4-export_more_parameters_to_ethtool.patch

Add the IRQ line, the tx_boundary, and whether Write-combining and MSI are enabled to the list of parameters that are exported to ethtool.

---
 drivers/net/myri10ge/myri10ge.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================

drivers/net/myri10ge/myri10ge.c +5 -0
@@ -1288,6 +1288,7 @@
 	"tx_aborted_errors", "tx_carrier_errors", "tx_fifo_errors",
 	"tx_heartbeat_errors", "tx_window_errors",
 	/* device-specific stats */
+	"tx_boundary", "WC", "irq", "MSI",
 	"read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs",
 	"serial_number", "tx_pkt_start", "tx_pkt_done",
 	"tx_req", "tx_done", "rx_small_cnt", "rx_big_cnt",
@@ -1326,6 +1327,10 @@
 	for (i = 0; i < MYRI10GE_NET_STATS_LEN; i++)
 		data[i] = ((unsigned long *)&mgp->stats)[i];
 
+	data[i++] = (unsigned int)mgp->tx.boundary;
+	data[i++] = (unsigned int)(mgp->mtrr >= 0);
+	data[i++] = (unsigned int)mgp->pdev->irq;
+	data[i++] = (unsigned int)mgp->msi_enabled;
 	data[i++] = (unsigned int)mgp->read_dma;
 	data[i++] = (unsigned int)mgp->write_dma;
 	data[i++] = (unsigned int)mgp->read_write_dma;
#5 lore raw

PATCH 3/4 myri10ge - Use dev_info() when printing parameters after probe

In reply to [email protected]

Displaying the interface name when listing the device parameters at the end of myri10ge_probe is not a good idea since udev might rename the interface soon afterwards.
Print the bus id instead, using dev_info().

---
 drivers/net/myri10ge/myri10ge.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/net/myri10ge/myri10ge.c +4 -5
Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -2734,11 +2734,10 @@
 		dev_err(&pdev->dev, "register_netdev failed: %d\n", status);
 		goto abort_with_irq;
 	}
-
-	printk(KERN_INFO "myri10ge: %s: %s IRQ %d, tx bndry %d, fw %s, WC %s\n",
-	       netdev->name, (mgp->msi_enabled ? "MSI" : "xPIC"),
-	       pdev->irq, mgp->tx.boundary, mgp->fw_name,
-	       (mgp->mtrr >= 0 ? "Enabled" : "Disabled"));
+	dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n",
+		 (mgp->msi_enabled ? "MSI" : "xPIC"),
+		 pdev->irq, mgp->tx.boundary, mgp->fw_name,
+		 (mgp->mtrr >= 0 ? "Enabled" : "Disabled"));
 
 	return 0;
 
#6 lore raw

PATCH 4/4 myri10ge - Export more parameters to ethtool

In reply to [email protected]

Add the IRQ line, the tx_boundary, and whether Write-combining and MSI are enabled to the list of parameters that are exported to ethtool.

---
 drivers/net/myri10ge/myri10ge.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/net/myri10ge/myri10ge.c +5 -0
Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -1288,6 +1288,7 @@
 	"tx_aborted_errors", "tx_carrier_errors", "tx_fifo_errors",
 	"tx_heartbeat_errors", "tx_window_errors",
 	/* device-specific stats */
+	"tx_boundary", "WC", "irq", "MSI",
 	"read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs",
 	"serial_number", "tx_pkt_start", "tx_pkt_done",
 	"tx_req", "tx_done", "rx_small_cnt", "rx_big_cnt",
@@ -1326,6 +1327,10 @@
 	for (i = 0; i < MYRI10GE_NET_STATS_LEN; i++)
 		data[i] = ((unsigned long *)&mgp->stats)[i];
 
+	data[i++] = (unsigned int)mgp->tx.boundary;
+	data[i++] = (unsigned int)(mgp->mtrr >= 0);
+	data[i++] = (unsigned int)mgp->pdev->irq;
+	data[i++] = (unsigned int)mgp->msi_enabled;
 	data[i++] = (unsigned int)mgp->read_dma;
 	data[i++] = (unsigned int)mgp->write_dma;
 	data[i++] = (unsigned int)mgp->read_write_dma;