From 9305a775210030a09f2e373e72920573770a37de Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 30 Nov 2007 09:53:09 +0200 Subject: ipg: remove old contact information Remove old comment as up-to-date contact information is in MAINTAINERS. Signed-off-by: Pekka Enberg Cc: Francois Romieu Cc: Sorbica Shieh Cc: Jesse Huang --- drivers/net/ipg.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index d5d092c9d0a..7bbb1314660 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -1,20 +1,8 @@ /* - * - * ipg.h - * * Include file for Gigabit Ethernet device driver for Network * Interface Cards (NICs) utilizing the Tamarack Microelectronics * Inc. IPG Gigabit or Triple Speed Ethernet Media Access * Controller. - * - * Craig Rich - * Sundance Technology, Inc. - * 1485 Saratoga Avenue - * Suite 200 - * San Jose, CA 95129 - * 408 873 4117 - * www.sundanceti.com - * craig_rich@sundanceti.com */ #ifndef __LINUX_IPG_H #define __LINUX_IPG_H -- cgit v1.2.3 From 4602e665ff45e0af4cc64a6caf4c872f18d14148 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 30 Nov 2007 09:53:33 +0200 Subject: ipg: remove boolean macros Signed-off-by: Pekka Enberg Cc: Francois Romieu Cc: Sorbica Shieh Cc: Jesse Huang --- drivers/net/ipg.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index 7bbb1314660..017727f7d7b 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -478,38 +478,34 @@ enum ipg_regs { * Tune */ -/* Miscellaneous Constants. */ -#define TRUE 1 -#define FALSE 0 - /* Assign IPG_APPEND_FCS_ON_TX > 0 for auto FCS append on TX. */ -#define IPG_APPEND_FCS_ON_TX TRUE +#define IPG_APPEND_FCS_ON_TX 1 /* Assign IPG_APPEND_FCS_ON_TX > 0 for auto FCS strip on RX. */ -#define IPG_STRIP_FCS_ON_RX TRUE +#define IPG_STRIP_FCS_ON_RX 1 /* Assign IPG_DROP_ON_RX_ETH_ERRORS > 0 to drop RX frames with * Ethernet errors. */ -#define IPG_DROP_ON_RX_ETH_ERRORS TRUE +#define IPG_DROP_ON_RX_ETH_ERRORS 1 /* Assign IPG_INSERT_MANUAL_VLAN_TAG > 0 to insert VLAN tags manually * (via TFC). */ -#define IPG_INSERT_MANUAL_VLAN_TAG FALSE +#define IPG_INSERT_MANUAL_VLAN_TAG 0 /* Assign IPG_ADD_IPCHECKSUM_ON_TX > 0 for auto IP checksum on TX. */ -#define IPG_ADD_IPCHECKSUM_ON_TX FALSE +#define IPG_ADD_IPCHECKSUM_ON_TX 0 /* Assign IPG_ADD_TCPCHECKSUM_ON_TX > 0 for auto TCP checksum on TX. * DO NOT USE FOR SILICON REVISIONS B3 AND EARLIER. */ -#define IPG_ADD_TCPCHECKSUM_ON_TX FALSE +#define IPG_ADD_TCPCHECKSUM_ON_TX 0 /* Assign IPG_ADD_UDPCHECKSUM_ON_TX > 0 for auto UDP checksum on TX. * DO NOT USE FOR SILICON REVISIONS B3 AND EARLIER. */ -#define IPG_ADD_UDPCHECKSUM_ON_TX FALSE +#define IPG_ADD_UDPCHECKSUM_ON_TX 0 /* If inserting VLAN tags manually, assign the IPG_MANUAL_VLAN_xx * constants as desired. -- cgit v1.2.3 From 85d68a58833a9e361ecabd5e89d228301d346d94 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 30 Nov 2007 09:53:51 +0200 Subject: ipg: remove IPG_DEV_KFREE_SKB macro Signed-off-by: Pekka Enberg Cc: Francois Romieu Cc: Sorbica Shieh Cc: Jesse Huang --- drivers/net/ipg.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index 017727f7d7b..9633b702fb5 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -27,8 +27,6 @@ #define DrvVer "2.09d" -#define IPG_DEV_KFREE_SKB(skb) dev_kfree_skb_irq(skb) - /* * Constants */ -- cgit v1.2.3 From 1662e4b7af956979c6cb864bf23cf88f882cdaf8 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 30 Nov 2007 09:54:06 +0200 Subject: ipg: remove driver version The driver is in mainline now so there's no need to maintain a separate version number. Signed-off-by: Pekka Enberg Cc: Francois Romieu Cc: Sorbica Shieh Cc: Jesse Huang --- drivers/net/ipg.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index 9633b702fb5..4f491928264 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -25,8 +25,6 @@ #include /*#include */ -#define DrvVer "2.09d" - /* * Constants */ -- cgit v1.2.3 From 6d3b2cb92bee1cec43c716f4cd6554be1e6b36ea Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 30 Nov 2007 09:54:33 +0200 Subject: ipg: remove commented out code Signed-off-by: Pekka Enberg Cc: Francois Romieu Cc: Sorbica Shieh Cc: Jesse Huang --- drivers/net/ipg.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index 4f491928264..7e3ccd10363 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -23,7 +23,6 @@ #include #include #include -/*#include */ /* * Constants @@ -733,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) -- cgit v1.2.3 From dea4a87cabc4ba0c09123c6e8392aa68fe437b31 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 30 Nov 2007 09:54:51 +0200 Subject: ipg: remove some internal comments This removes some now useless comments that were added when the driver was developed out-of-tree. Signed-off-by: Pekka Enberg Cc: Francois Romieu Cc: Sorbica Shieh Cc: Jesse Huang --- drivers/net/ipg.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index 7e3ccd10363..a328221d7ab 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -79,7 +79,7 @@ enum ipg_regs { TX_STATUS = 0x60, MAC_CTRL = 0x6c, VLAN_TAG = 0x70, // Unused - PHY_SET = 0x75, // JES20040127EEPROM + PHY_SET = 0x75, PHY_CTRL = 0x76, STATION_ADDRESS_0 = 0x78, STATION_ADDRESS_1 = 0x7a, @@ -312,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 @@ -369,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 @@ -785,7 +785,6 @@ struct ipg_nic_private { unsigned int tx_dirty; unsigned int rx_current; unsigned int rx_dirty; -// Add by Grace 2005/05/19 #ifdef JUMBO_FRAME struct SJumbo Jumbo; #endif @@ -796,7 +795,6 @@ struct ipg_nic_private { spinlock_t lock; int tenmbpsmode; - /*Jesse20040128EEPROM_VALUE */ u16 LED_Mode; u16 station_addr[3]; /* Station Address in EEPROM Reg 0x10..0x12 */ -- cgit v1.2.3 From 9893ba16c8fb9c94729061a88bdee40ecf3a3899 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Thu, 24 Jan 2008 02:01:17 -0800 Subject: ipg: naming convention fixes This changes some camel-case names to follow proper kernel naming convention. Signed-off-by: Pekka Enberg Cc: Francois Romieu Cc: Sorbica Shieh Cc: Jesse Huang Signed-off-by: David S. Miller --- drivers/net/ipg.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index a328221d7ab..8b10d633340 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -626,7 +626,7 @@ 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 @@ -767,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; @@ -779,14 +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; #ifdef JUMBO_FRAME - struct SJumbo Jumbo; + struct ipg_jumbo jumbo; #endif unsigned int rx_buf_sz; struct pci_dev *pdev; @@ -795,12 +796,12 @@ struct ipg_nic_private { spinlock_t lock; int tenmbpsmode; - 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; -- cgit v1.2.3 From 8da5bb7a274559737defa400a42461e1366fc30a Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 30 Nov 2007 09:55:43 +0200 Subject: ipg: fix checkpatch reported errors Signed-off-by: Pekka Enberg Cc: Francois Romieu Cc: Sorbica Shieh Cc: Jesse Huang --- drivers/net/ipg.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index 8b10d633340..cda53887d4d 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -51,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, @@ -64,21 +64,21 @@ 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 + VLAN_TAG = 0x70, /* Unused */ PHY_SET = 0x75, PHY_CTRL = 0x76, STATION_ADDRESS_0 = 0x78, @@ -90,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. */ @@ -590,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 @@ -598,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 @@ -628,7 +628,7 @@ enum ipg_regs { /* specify the jumbo frame maximum size * 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. */ -- cgit v1.2.3