]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/ipg.h
powerpc: Explicitly copy elements of pt_regs
[linux-2.6-omap-h63xx.git] / drivers / net / ipg.h
index 9633b702fb5bfd4bd3f2be68cddc0153295fe1fe..cda53887d4db0ac84371a638db66807c88e82e67 100644 (file)
@@ -23,9 +23,6 @@
 #include <linux/skbuff.h>
 #include <linux/version.h>
 #include <asm/bitops.h>
-/*#include <asm/spinlock.h>*/
-
-#define DrvVer "2.09d"
 
 /*
  *     Constants
@@ -54,7 +51,7 @@
 /* I/O register offsets. */
 enum ipg_regs {
        DMA_CTRL                = 0x00,
-       RX_DMA_STATUS           = 0x08, // Unused + reserved
+       RX_DMA_STATUS           = 0x08, /* Unused + reserved */
        TFD_LIST_PTR_0          = 0x10,
        TFD_LIST_PTR_1          = 0x14,
        TX_DMA_BURST_THRESH     = 0x18,
@@ -67,22 +64,22 @@ enum ipg_regs {
        RX_DMA_POLL_PERIOD      = 0x26,
        DEBUG_CTRL              = 0x2c,
        ASIC_CTRL               = 0x30,
-       FIFO_CTRL               = 0x38, // Unused
+       FIFO_CTRL               = 0x38, /* Unused */
        FLOW_OFF_THRESH         = 0x3c,
        FLOW_ON_THRESH          = 0x3e,
        EEPROM_DATA             = 0x48,
        EEPROM_CTRL             = 0x4a,
-       EXPROM_ADDR             = 0x4c, // Unused
-       EXPROM_DATA             = 0x50, // Unused
-       WAKE_EVENT              = 0x51, // Unused
-       COUNTDOWN               = 0x54, // Unused
+       EXPROM_ADDR             = 0x4c, /* Unused */
+       EXPROM_DATA             = 0x50, /* Unused */
+       WAKE_EVENT              = 0x51, /* Unused */
+       COUNTDOWN               = 0x54, /* Unused */
        INT_STATUS_ACK          = 0x5a,
        INT_ENABLE              = 0x5c,
-       INT_STATUS              = 0x5e, // Unused
+       INT_STATUS              = 0x5e, /* Unused */
        TX_STATUS               = 0x60,
        MAC_CTRL                = 0x6c,
-       VLAN_TAG                = 0x70, // Unused
-       PHY_SET                 = 0x75, // JES20040127EEPROM
+       VLAN_TAG                = 0x70, /* Unused */
+       PHY_SET                 = 0x75,
        PHY_CTRL                = 0x76,
        STATION_ADDRESS_0       = 0x78,
        STATION_ADDRESS_1       = 0x7a,
@@ -93,11 +90,11 @@ enum ipg_regs {
        HASHTABLE_1             = 0x90,
        RMON_STATISTICS_MASK    = 0x98,
        STATISTICS_MASK         = 0x9c,
-       RX_JUMBO_FRAMES         = 0xbc, // Unused
-       TCP_CHECKSUM_ERRORS     = 0xc0, // Unused
-       IP_CHECKSUM_ERRORS      = 0xc2, // Unused
-       UDP_CHECKSUM_ERRORS     = 0xc4, // Unused
-       TX_JUMBO_FRAMES         = 0xf4  // Unused
+       RX_JUMBO_FRAMES         = 0xbc, /* Unused */
+       TCP_CHECKSUM_ERRORS     = 0xc0, /* Unused */
+       IP_CHECKSUM_ERRORS      = 0xc2, /* Unused */
+       UDP_CHECKSUM_ERRORS     = 0xc4, /* Unused */
+       TX_JUMBO_FRAMES         = 0xf4  /* Unused */
 };
 
 /* Ethernet MIB statistic register offsets. */
@@ -315,7 +312,7 @@ enum ipg_regs {
 #define IPG_RM_RECEIVEMULTICASTHASH     0x10
 #define IPG_RM_RECEIVEIPMULTICAST       0x20
 
-/* PhySet JES20040127EEPROM*/
+/* PhySet */
 #define IPG_PS_MEM_LENB9B               0x01
 #define IPG_PS_MEM_LEN9                 0x02
 #define IPG_PS_NON_COMPDET              0x04
@@ -372,8 +369,8 @@ enum ipg_regs {
 #define IPG_AC_RST_OUT                  0x01000000
 #define IPG_AC_INT_REQUEST              0x02000000
 #define IPG_AC_RESET_BUSY               0x04000000
-#define IPG_AC_LED_SPEED                0x08000000     //JES20040127EEPROM
-#define IPG_AC_LED_MODE_BIT_1           0x20000000     //JES20040127EEPROM
+#define IPG_AC_LED_SPEED                0x08000000
+#define IPG_AC_LED_MODE_BIT_1           0x20000000
 
 /* EepromCtrl */
 #define IPG_EC_RSVD_MASK                0x83FF
@@ -593,7 +590,7 @@ enum ipg_regs {
  * Define larger if expecting jumbo frames.
  */
 #ifdef JUMBO_FRAME
-//IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash
+/* IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash */
 #define                IPG_TXFRAG_SIZE         JUMBO_FRAME_SIZE
 #endif
 
@@ -601,7 +598,7 @@ enum ipg_regs {
  * Define larger if expecting jumbo frames.
  */
 #ifdef JUMBO_FRAME
-//4088=4096-8
+/* 4088 = 4096 - 8 */
 #define                IPG_RXFRAG_SIZE         __IPG_RXFRAG_SIZE
 #define     IPG_RXSUPPORT_SIZE   IPG_MAX_RXFRAME_SIZE
 #else
@@ -629,9 +626,9 @@ enum ipg_regs {
 #define                IPG_MINUSEDRFDSTOFREE   0x80
 
 /* specify the jumbo frame maximum size
- * per unit is 0x600 (the RxBuffer size that one RFD can carry)
+ * per unit is 0x600 (the rx_buffer size that one RFD can carry)
  */
-#define     MAX_JUMBOSIZE              0x8     // max is 12K
+#define     MAX_JUMBOSIZE              0x8     /* max is 12K */
 
 /* Key register values loaded at driver start up. */
 
@@ -735,8 +732,7 @@ enum ipg_regs {
  * Miscellaneous macros.
  */
 
-/* Marco for printing debug statements.
-#  define IPG_DDEBUG_MSG(args...) printk(KERN_DEBUG "IPG: " ## args) */
+/* Marco for printing debug statements. */
 #ifdef IPG_DEBUG
 #  define IPG_DEBUG_MSG(args...)
 #  define IPG_DDEBUG_MSG(args...) printk(KERN_DEBUG "IPG: " args)
@@ -771,11 +767,12 @@ struct ipg_rx {
        __le64 frag_info;
 };
 
-struct SJumbo {
-       int FoundStart;
-       int CurrentSize;
+struct ipg_jumbo {
+       int found_start;
+       int current_size;
        struct sk_buff *skb;
 };
+
 /* Structure of IPG NIC specific data. */
 struct ipg_nic_private {
        void __iomem *ioaddr;
@@ -783,15 +780,14 @@ struct ipg_nic_private {
        struct ipg_rx *rxd;
        dma_addr_t txd_map;
        dma_addr_t rxd_map;
-       struct sk_buff *TxBuff[IPG_TFDLIST_LENGTH];
-       struct sk_buff *RxBuff[IPG_RFDLIST_LENGTH];
+       struct sk_buff *tx_buff[IPG_TFDLIST_LENGTH];
+       struct sk_buff *rx_buff[IPG_RFDLIST_LENGTH];
        unsigned int tx_current;
        unsigned int tx_dirty;
        unsigned int rx_current;
        unsigned int rx_dirty;
-// Add by Grace 2005/05/19
 #ifdef JUMBO_FRAME
-       struct SJumbo Jumbo;
+       struct ipg_jumbo jumbo;
 #endif
        unsigned int rx_buf_sz;
        struct pci_dev *pdev;
@@ -800,13 +796,12 @@ struct ipg_nic_private {
        spinlock_t lock;
        int tenmbpsmode;
 
-       /*Jesse20040128EEPROM_VALUE */
-       u16 LED_Mode;
+       u16 led_mode;
        u16 station_addr[3];    /* Station Address in EEPROM Reg 0x10..0x12 */
 
        struct mutex            mii_mutex;
        struct mii_if_info      mii_if;
-       int ResetCurrentTFD;
+       int reset_current_tfd;
 #ifdef IPG_DEBUG
        int RFDlistendCount;
        int RFDListCheckedCount;