]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/e1000.h
e1000: Rewrite EEPROM checksum error to give more information
[u-boot] / drivers / net / e1000.h
index 720d8c67ca6e741d0b367d8b175e6e9a5ad64026..b4e9cf22401ba24ddceaf592088e077e2895314e 100644 (file)
 #include <asm/io.h>
 #include <pci.h>
 
-#define E1000_ERR(args...) printf("e1000: " args)
+#define E1000_ERR(NIC, fmt, args...) \
+       printf("e1000: %s: ERROR: " fmt, (NIC)->name ,##args)
 
 #ifdef E1000_DEBUG
-#define E1000_DBG(args...)     printf("e1000: " args)
-#define DEBUGOUT(fmt,args...) printf(fmt ,##args)
-#define DEBUGFUNC()       printf("%s\n", __FUNCTION__);
+#define E1000_DBG(NIC, fmt, args...) \
+       printf("e1000: %s: DEBUG: " fmt, (NIC)->name ,##args)
+#define DEBUGOUT(fmt, args...) printf(fmt ,##args)
+#define DEBUGFUNC()            printf("%s\n", __func__);
 #else
-#define E1000_DBG(args...)
-#define DEBUGFUNC()
-#define DEBUGOUT(fmt,args...)
+#define E1000_DBG(HW, args...) do { } while (0)
+#define DEBUGFUNC()            do { } while (0)
+#define DEBUGOUT(fmt, args...) do { } while (0)
 #endif
 
 /* Forward declarations of structures used by the shared code */
@@ -113,11 +115,6 @@ typedef enum {
        e1000_100_full = 3
 } e1000_speed_duplex_type;
 
-typedef enum {
-       e1000_lan_a = 0,
-       e1000_lan_b = 1
-} e1000_lan_loc;
-
 /* Flow Control Settings */
 typedef enum {
        e1000_fc_none = 0,
@@ -1052,6 +1049,9 @@ typedef enum {
 
 /* Structure containing variables used by the shared code (e1000_hw.c) */
 struct e1000_hw {
+       struct eth_device *nic;
+       unsigned int cardnum;
+
        pci_dev_t pdev;
        uint8_t *hw_addr;
        e1000_mac_type mac_type;
@@ -1059,7 +1059,6 @@ struct e1000_hw {
        uint32_t phy_init_script;
        uint32_t txd_cmd;
        e1000_media_type media_type;
-       e1000_lan_loc lan_loc;
        e1000_fc_type fc;
        e1000_bus_type bus_type;
 #if 0