Hi,

I submitted this patch a while ago, and I still find myself patching
it in every time I compile a new kernel.  Can something like this be
merged, please?


thanks,
Lennert


----- Forwarded message from Lennert Buytenhek <buytenh at wantstofly dot org> 
-----

Date: Wed, 24 Nov 2004 16:15:17 +0100
From: Lennert Buytenhek <buytenh at wantstofly dot org>
To: ganesh.venkatesan at intel dot com, netdev at oss dot sgi dot com
Cc: Robert Olsson <Robert.Olsson at data dot slu dot se>, hadi at cyberus dot ca
Subject: [e1000] print bus type/speed/width on probe

Hi,

The attached patch (based on a patch by Robert Olsson) makes e1000
display bus type/speed/width on probe.  All this info is already
determined by e1000_hw.  Output is as such (a la tg3):

eth1: e1000 (PCI:33MHz:32-bit) 00:0e:0c:64:cc:a1
eth2: e1000 (PCI:66MHz:32-bit) 00:04:23:46:e2:50

I've found it useful -- please consider applying.


cheers,
Lennert


Signed-off-by: Lennert Buytenhek <buytenh at wantstofly dot org>

diff -urN e1000.orig/e1000_main.c e1000/e1000_main.c
--- e1000.orig/e1000_main.c     2004-11-24 15:35:23.000000000 +0100
+++ e1000/e1000_main.c  2004-11-24 16:04:30.000000000 +0100
@@ -585,6 +585,21 @@
        if(eeprom_data & E1000_EEPROM_APME)
                adapter->wol |= E1000_WUFC_MAG;
 
+       /* print bus type/speed/width info */
+       printk(KERN_INFO "%s: e1000 (PCI%s:%s:%s) ", netdev->name,
+               ((adapter->hw.bus_type == e1000_bus_type_pcix) ? "X" : ""),
+               ((adapter->hw.bus_speed == e1000_bus_speed_133) ? "133MHz" :
+                (adapter->hw.bus_speed == e1000_bus_speed_120) ? "120MHz" :
+                (adapter->hw.bus_speed == e1000_bus_speed_100) ? "100MHz" :
+                (adapter->hw.bus_speed == e1000_bus_speed_66) ? "66MHz" :
+                 "33MHz"),
+               ((adapter->hw.bus_width == e1000_bus_width_64) ? "64-bit" :
+                 "32-bit"));
+
+       for (i = 0; i < 6; i++)
+               printk("%2.2x%c", netdev->dev_addr[i],
+                       i == 5 ? '\n' : ':');
+
        /* reset the hardware with the new settings */
        e1000_reset(adapter);
 


----- End forwarded message -----
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to