* [PATCH 1/6] [NET] replace code with FIELD_SIZEOF
@ 2008-02-11 17:25 Auke Kok
2008-02-11 17:25 ` [PATCH 2/6] e1000: warn if this driver is used for e1000e devices Auke Kok
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Auke Kok @ 2008-02-11 17:25 UTC (permalink / raw)
To: jeff; +Cc: netdev, e1000-devel
From: Julia Lawall <julia@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_ethtool.c | 2 +-
drivers/net/igb/igb_ethtool.c | 2 +-
drivers/net/ixgb/ixgb_ethtool.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index d876787..85e66f4 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -50,7 +50,7 @@ struct e1000_stats {
int stat_offset;
};
-#define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \
+#define E1000_STAT(m) FIELD_SIZEOF(struct e1000_adapter, m), \
offsetof(struct e1000_adapter, m)
static const struct e1000_stats e1000_gstrings_stats[] = {
{ "rx_packets", E1000_STAT(stats.gprc) },
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index f69721e..0447f9b 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -43,7 +43,7 @@ struct igb_stats {
int stat_offset;
};
-#define IGB_STAT(m) sizeof(((struct igb_adapter *)0)->m), \
+#define IGB_STAT(m) FIELD_SIZEOF(struct igb_adapter, m), \
offsetof(struct igb_adapter, m)
static const struct igb_stats igb_gstrings_stats[] = {
{ "rx_packets", IGB_STAT(stats.gprc) },
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
index a267dd8..53a9fd0 100644
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -49,7 +49,7 @@ struct ixgb_stats {
int stat_offset;
};
-#define IXGB_STAT(m) sizeof(((struct ixgb_adapter *)0)->m), \
+#define IXGB_STAT(m) FIELD_SIZEOF(struct ixgb_adapter, m), \
offsetof(struct ixgb_adapter, m)
static struct ixgb_stats ixgb_gstrings_stats[] = {
{"rx_packets", IXGB_STAT(net_stats.rx_packets)},
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/6] e1000: warn if this driver is used for e1000e devices
2008-02-11 17:25 [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Auke Kok
@ 2008-02-11 17:25 ` Auke Kok
2008-02-11 17:25 ` [PATCH 3/6] e1000e: Fix logic reversal keeping link active Auke Kok
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Auke Kok @ 2008-02-11 17:25 UTC (permalink / raw)
To: jeff; +Cc: netdev, e1000-devel
We're already starting to see reports from users still
using e1000 where they should be using e1000e now that this is
actually possible. Just to prevent some of this thrash, add
a big warning on load on these devices that people should
switch to e1000e.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
drivers/net/e1000/e1000_main.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 7c5b05a..81db7fd 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1203,6 +1203,14 @@ e1000_probe(struct pci_dev *pdev,
printk("%s\n", print_mac(mac, netdev->dev_addr));
+ if (adapter->hw.bus_type == e1000_bus_type_pci_express) {
+ DPRINTK(PROBE, WARNING, "This device (id %04x:%04x) will no "
+ "longer be supported by this driver in the future.\n",
+ pdev->vendor, pdev->device);
+ DPRINTK(PROBE, WARNING, "please use the \"e1000e\" "
+ "driver instead.\n");
+ }
+
/* reset the hardware with the new settings */
e1000_reset(adapter);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/6] e1000e: Fix logic reversal keeping link active
2008-02-11 17:25 [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Auke Kok
2008-02-11 17:25 ` [PATCH 2/6] e1000: warn if this driver is used for e1000e devices Auke Kok
@ 2008-02-11 17:25 ` Auke Kok
2008-02-11 17:25 ` [PATCH 4/6] ixgbe: warn when device is in a x4 or lower width slot Auke Kok
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Auke Kok @ 2008-02-11 17:25 UTC (permalink / raw)
To: jeff; +Cc: netdev, e1000-devel
A logic mishap caused the adapter to keep link while we can
disable it due to WoL not being active, and vice versa.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000e/netdev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index f58f017..b9b0d32 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2008,7 +2008,7 @@ static void e1000_power_down_phy(struct e1000_adapter *adapter)
u16 mii_reg;
/* WoL is enabled */
- if (!adapter->wol)
+ if (adapter->wol)
return;
/* non-copper PHY? */
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/6] ixgbe: warn when device is in a x4 or lower width slot
2008-02-11 17:25 [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Auke Kok
2008-02-11 17:25 ` [PATCH 2/6] e1000: warn if this driver is used for e1000e devices Auke Kok
2008-02-11 17:25 ` [PATCH 3/6] e1000e: Fix logic reversal keeping link active Auke Kok
@ 2008-02-11 17:25 ` Auke Kok
2008-02-11 17:26 ` [PATCH 5/6] ixgbe: Disallow device reset during ethtool test Auke Kok
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Auke Kok @ 2008-02-11 17:25 UTC (permalink / raw)
To: jeff; +Cc: e1000-devel, netdev
It's easy to oversee this issue when working with this card
as evrything will work OK but performance is severely limited
(something like 1.5gbit on a x1 link) if the pci-express
slot does not offer more bandwidth.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index ead49e5..576fb51 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2778,6 +2778,14 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
hw->mac.type, hw->phy.type,
(part_num >> 8), (part_num & 0xff));
+ if (link_width <= IXGBE_PCI_LINK_WIDTH_4) {
+ dev_warn(&pdev->dev, "PCI-Express bandwidth available for "
+ "this card is not sufficient for optimal "
+ "performance.\n");
+ dev_warn(&pdev->dev, "For optimal performance a x8 "
+ "PCI-Express slot is required.\n");
+ }
+
/* reset the hardware with the new settings */
ixgbe_start_hw(hw);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/6] ixgbe: Disallow device reset during ethtool test
2008-02-11 17:25 [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Auke Kok
` (2 preceding siblings ...)
2008-02-11 17:25 ` [PATCH 4/6] ixgbe: warn when device is in a x4 or lower width slot Auke Kok
@ 2008-02-11 17:26 ` Auke Kok
2008-02-11 17:26 ` [PATCH 6/6] ixgbe: remove accidentally added #ifdef Auke Kok
2008-02-11 19:51 ` [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Jeff Garzik
5 siblings, 0 replies; 7+ messages in thread
From: Auke Kok @ 2008-02-11 17:26 UTC (permalink / raw)
To: jeff; +Cc: e1000-devel, netdev
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 576fb51..a4aeaec 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1942,6 +1942,10 @@ static int ixgbe_open(struct net_device *netdev)
int err;
u32 num_rx_queues = adapter->num_rx_queues;
+ /* disallow open during test */
+ if (test_bit(__IXGBE_TESTING, &adapter->state))
+ return -EBUSY;
+
try_intr_reinit:
/* allocate transmit descriptors */
err = ixgbe_setup_all_tx_resources(adapter);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 6/6] ixgbe: remove accidentally added #ifdef
2008-02-11 17:25 [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Auke Kok
` (3 preceding siblings ...)
2008-02-11 17:26 ` [PATCH 5/6] ixgbe: Disallow device reset during ethtool test Auke Kok
@ 2008-02-11 17:26 ` Auke Kok
2008-02-11 19:51 ` [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Jeff Garzik
5 siblings, 0 replies; 7+ messages in thread
From: Auke Kok @ 2008-02-11 17:26 UTC (permalink / raw)
To: jeff; +Cc: e1000-devel, netdev
Let's not add these #ifdef NETIF_F_TSO's back.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a4aeaec..540b647 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -220,7 +220,6 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
tx_ring->stats.bytes += tx_buffer_info->length;
if (cleaned) {
struct sk_buff *skb = tx_buffer_info->skb;
-#ifdef NETIF_F_TSO
unsigned int segs, bytecount;
segs = skb_shinfo(skb)->gso_segs ?: 1;
/* multiply data chunks by size of headers */
@@ -228,10 +227,6 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
skb->len;
total_tx_packets += segs;
total_tx_bytes += bytecount;
-#else
- total_tx_packets++;
- total_tx_bytes += skb->len;
-#endif
}
ixgbe_unmap_and_free_tx_resource(adapter,
tx_buffer_info);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/6] [NET] replace code with FIELD_SIZEOF
2008-02-11 17:25 [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Auke Kok
` (4 preceding siblings ...)
2008-02-11 17:26 ` [PATCH 6/6] ixgbe: remove accidentally added #ifdef Auke Kok
@ 2008-02-11 19:51 ` Jeff Garzik
5 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2008-02-11 19:51 UTC (permalink / raw)
To: Auke Kok; +Cc: e1000-devel, netdev
Auke Kok wrote:
> From: Julia Lawall <julia@diku.dk>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
> ---
>
> drivers/net/e1000/e1000_ethtool.c | 2 +-
> drivers/net/igb/igb_ethtool.c | 2 +-
> drivers/net/ixgb/ixgb_ethtool.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
applied 1-6 to #upstream-fixes
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-02-11 19:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 17:25 [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Auke Kok
2008-02-11 17:25 ` [PATCH 2/6] e1000: warn if this driver is used for e1000e devices Auke Kok
2008-02-11 17:25 ` [PATCH 3/6] e1000e: Fix logic reversal keeping link active Auke Kok
2008-02-11 17:25 ` [PATCH 4/6] ixgbe: warn when device is in a x4 or lower width slot Auke Kok
2008-02-11 17:26 ` [PATCH 5/6] ixgbe: Disallow device reset during ethtool test Auke Kok
2008-02-11 17:26 ` [PATCH 6/6] ixgbe: remove accidentally added #ifdef Auke Kok
2008-02-11 19:51 ` [PATCH 1/6] [NET] replace code with FIELD_SIZEOF Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).