aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/e1000.h16
-rw-r--r--drivers/net/e1000/e1000_ethtool.c16
-rw-r--r--drivers/net/e1000/e1000_hw.c53
-rw-r--r--drivers/net/e1000/e1000_main.c14
-rw-r--r--drivers/net/e1000/e1000_osdep.h2
5 files changed, 50 insertions, 51 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 20188af0ccdd..a1f4a764bfb5 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -287,16 +287,16 @@ struct e1000_adapter {
287 287
288 /* RX */ 288 /* RX */
289#ifdef CONFIG_E1000_NAPI 289#ifdef CONFIG_E1000_NAPI
290 bool (*clean_rx) (struct e1000_adapter *adapter, 290 bool (*clean_rx)(struct e1000_adapter *adapter,
291 struct e1000_rx_ring *rx_ring, 291 struct e1000_rx_ring *rx_ring,
292 int *work_done, int work_to_do); 292 int *work_done, int work_to_do);
293#else 293#else
294 bool (*clean_rx) (struct e1000_adapter *adapter, 294 bool (*clean_rx)(struct e1000_adapter *adapter,
295 struct e1000_rx_ring *rx_ring); 295 struct e1000_rx_ring *rx_ring);
296#endif 296#endif
297 void (*alloc_rx_buf) (struct e1000_adapter *adapter, 297 void (*alloc_rx_buf)(struct e1000_adapter *adapter,
298 struct e1000_rx_ring *rx_ring, 298 struct e1000_rx_ring *rx_ring,
299 int cleaned_count); 299 int cleaned_count);
300 struct e1000_rx_ring *rx_ring; /* One per active queue */ 300 struct e1000_rx_ring *rx_ring; /* One per active queue */
301#ifdef CONFIG_E1000_NAPI 301#ifdef CONFIG_E1000_NAPI
302 struct napi_struct napi; 302 struct napi_struct napi;
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index e262605c4700..f9ac9a87ffab 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -881,7 +881,7 @@ static int e1000_eeprom_test(struct e1000_adapter *adapter, u64 *data)
881 } 881 }
882 882
883 /* If Checksum is not Correct return error else test passed */ 883 /* If Checksum is not Correct return error else test passed */
884 if ((checksum != (u16) EEPROM_SUM) && !(*data)) 884 if ((checksum != (u16)EEPROM_SUM) && !(*data))
885 *data = 2; 885 *data = 2;
886 886
887 return *data; 887 return *data;
@@ -889,7 +889,7 @@ static int e1000_eeprom_test(struct e1000_adapter *adapter, u64 *data)
889 889
890static irqreturn_t e1000_test_intr(int irq, void *data) 890static irqreturn_t e1000_test_intr(int irq, void *data)
891{ 891{
892 struct net_device *netdev = (struct net_device *) data; 892 struct net_device *netdev = (struct net_device *)data;
893 struct e1000_adapter *adapter = netdev_priv(netdev); 893 struct e1000_adapter *adapter = netdev_priv(netdev);
894 struct e1000_hw *hw = &adapter->hw; 894 struct e1000_hw *hw = &adapter->hw;
895 895
@@ -1074,8 +1074,8 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
1074 memset(txdr->desc, 0, txdr->size); 1074 memset(txdr->desc, 0, txdr->size);
1075 txdr->next_to_use = txdr->next_to_clean = 0; 1075 txdr->next_to_use = txdr->next_to_clean = 0;
1076 1076
1077 ew32(TDBAL, ((u64) txdr->dma & 0x00000000FFFFFFFF)); 1077 ew32(TDBAL, ((u64)txdr->dma & 0x00000000FFFFFFFF));
1078 ew32(TDBAH, ((u64) txdr->dma >> 32)); 1078 ew32(TDBAH, ((u64)txdr->dma >> 32));
1079 ew32(TDLEN, txdr->count * sizeof(struct e1000_tx_desc)); 1079 ew32(TDLEN, txdr->count * sizeof(struct e1000_tx_desc));
1080 ew32(TDH, 0); 1080 ew32(TDH, 0);
1081 ew32(TDT, 0); 1081 ew32(TDT, 0);
@@ -1128,8 +1128,8 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
1128 1128
1129 rctl = er32(RCTL); 1129 rctl = er32(RCTL);
1130 ew32(RCTL, rctl & ~E1000_RCTL_EN); 1130 ew32(RCTL, rctl & ~E1000_RCTL_EN);
1131 ew32(RDBAL, ((u64) rxdr->dma & 0xFFFFFFFF)); 1131 ew32(RDBAL, ((u64)rxdr->dma & 0xFFFFFFFF));
1132 ew32(RDBAH, ((u64) rxdr->dma >> 32)); 1132 ew32(RDBAH, ((u64)rxdr->dma >> 32));
1133 ew32(RDLEN, rxdr->size); 1133 ew32(RDLEN, rxdr->size);
1134 ew32(RDH, 0); 1134 ew32(RDH, 0);
1135 ew32(RDT, 0); 1135 ew32(RDT, 0);
@@ -1863,7 +1863,7 @@ static int e1000_phys_id(struct net_device *netdev, u32 data)
1863 if (!adapter->blink_timer.function) { 1863 if (!adapter->blink_timer.function) {
1864 init_timer(&adapter->blink_timer); 1864 init_timer(&adapter->blink_timer);
1865 adapter->blink_timer.function = e1000_led_blink_callback; 1865 adapter->blink_timer.function = e1000_led_blink_callback;
1866 adapter->blink_timer.data = (unsigned long) adapter; 1866 adapter->blink_timer.data = (unsigned long)adapter;
1867 } 1867 }
1868 e1000_setup_led(hw); 1868 e1000_setup_led(hw);
1869 mod_timer(&adapter->blink_timer, jiffies); 1869 mod_timer(&adapter->blink_timer, jiffies);
@@ -1873,7 +1873,7 @@ static int e1000_phys_id(struct net_device *netdev, u32 data)
1873 if (!adapter->blink_timer.function) { 1873 if (!adapter->blink_timer.function) {
1874 init_timer(&adapter->blink_timer); 1874 init_timer(&adapter->blink_timer);
1875 adapter->blink_timer.function = e1000_led_blink_callback; 1875 adapter->blink_timer.function = e1000_led_blink_callback;
1876 adapter->blink_timer.data = (unsigned long) adapter; 1876 adapter->blink_timer.data = (unsigned long)adapter;
1877 } 1877 }
1878 mod_timer(&adapter->blink_timer, jiffies); 1878 mod_timer(&adapter->blink_timer, jiffies);
1879 msleep_interruptible(data * 1000); 1879 msleep_interruptible(data * 1000);
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 5d3c2bd7b612..9d6edf3e73f9 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -3533,7 +3533,7 @@ static s32 e1000_read_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr,
3533 DEBUGOUT("MDI Error\n"); 3533 DEBUGOUT("MDI Error\n");
3534 return -E1000_ERR_PHY; 3534 return -E1000_ERR_PHY;
3535 } 3535 }
3536 *phy_data = (u16) mdic; 3536 *phy_data = (u16)mdic;
3537 } else { 3537 } else {
3538 /* We must first send a preamble through the MDIO pin to signal the 3538 /* We must first send a preamble through the MDIO pin to signal the
3539 * beginning of an MII instruction. This is done by sending 32 3539 * beginning of an MII instruction. This is done by sending 32
@@ -3648,7 +3648,7 @@ static s32 e1000_write_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr,
3648 * for the PHY register in the MDI Control register. The MAC will take 3648 * for the PHY register in the MDI Control register. The MAC will take
3649 * care of interfacing with the PHY to send the desired data. 3649 * care of interfacing with the PHY to send the desired data.
3650 */ 3650 */
3651 mdic = (((u32) phy_data) | 3651 mdic = (((u32)phy_data) |
3652 (reg_addr << E1000_MDIC_REG_SHIFT) | 3652 (reg_addr << E1000_MDIC_REG_SHIFT) |
3653 (phy_addr << E1000_MDIC_PHY_SHIFT) | 3653 (phy_addr << E1000_MDIC_PHY_SHIFT) |
3654 (E1000_MDIC_OP_WRITE)); 3654 (E1000_MDIC_OP_WRITE));
@@ -3682,7 +3682,7 @@ static s32 e1000_write_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr,
3682 mdic = ((PHY_TURNAROUND) | (reg_addr << 2) | (phy_addr << 7) | 3682 mdic = ((PHY_TURNAROUND) | (reg_addr << 2) | (phy_addr << 7) |
3683 (PHY_OP_WRITE << 12) | (PHY_SOF << 14)); 3683 (PHY_OP_WRITE << 12) | (PHY_SOF << 14));
3684 mdic <<= 16; 3684 mdic <<= 16;
3685 mdic |= (u32) phy_data; 3685 mdic |= (u32)phy_data;
3686 3686
3687 e1000_shift_out_mdi_bits(hw, mdic, 32); 3687 e1000_shift_out_mdi_bits(hw, mdic, 32);
3688 } 3688 }
@@ -4032,14 +4032,14 @@ static s32 e1000_detect_gig_phy(struct e1000_hw *hw)
4032 if (ret_val) 4032 if (ret_val)
4033 return ret_val; 4033 return ret_val;
4034 4034
4035 hw->phy_id = (u32) (phy_id_high << 16); 4035 hw->phy_id = (u32)(phy_id_high << 16);
4036 udelay(20); 4036 udelay(20);
4037 ret_val = e1000_read_phy_reg(hw, PHY_ID2, &phy_id_low); 4037 ret_val = e1000_read_phy_reg(hw, PHY_ID2, &phy_id_low);
4038 if (ret_val) 4038 if (ret_val)
4039 return ret_val; 4039 return ret_val;
4040 4040
4041 hw->phy_id |= (u32) (phy_id_low & PHY_REVISION_MASK); 4041 hw->phy_id |= (u32)(phy_id_low & PHY_REVISION_MASK);
4042 hw->phy_revision = (u32) phy_id_low & ~PHY_REVISION_MASK; 4042 hw->phy_revision = (u32)phy_id_low & ~PHY_REVISION_MASK;
4043 4043
4044 switch (hw->mac_type) { 4044 switch (hw->mac_type) {
4045 case e1000_82543: 4045 case e1000_82543:
@@ -5174,7 +5174,7 @@ s32 e1000_validate_eeprom_checksum(struct e1000_hw *hw)
5174 checksum += eeprom_data; 5174 checksum += eeprom_data;
5175 } 5175 }
5176 5176
5177 if (checksum == (u16) EEPROM_SUM) 5177 if (checksum == (u16)EEPROM_SUM)
5178 return E1000_SUCCESS; 5178 return E1000_SUCCESS;
5179 else { 5179 else {
5180 DEBUGOUT("EEPROM Checksum Invalid\n"); 5180 DEBUGOUT("EEPROM Checksum Invalid\n");
@@ -5205,7 +5205,7 @@ s32 e1000_update_eeprom_checksum(struct e1000_hw *hw)
5205 } 5205 }
5206 checksum += eeprom_data; 5206 checksum += eeprom_data;
5207 } 5207 }
5208 checksum = (u16) EEPROM_SUM - checksum; 5208 checksum = (u16)EEPROM_SUM - checksum;
5209 if (e1000_write_eeprom(hw, EEPROM_CHECKSUM_REG, 1, &checksum) < 0) { 5209 if (e1000_write_eeprom(hw, EEPROM_CHECKSUM_REG, 1, &checksum) < 0) {
5210 DEBUGOUT("EEPROM Write Error\n"); 5210 DEBUGOUT("EEPROM Write Error\n");
5211 return -E1000_ERR_EEPROM; 5211 return -E1000_ERR_EEPROM;
@@ -5610,8 +5610,8 @@ s32 e1000_read_mac_addr(struct e1000_hw *hw)
5610 DEBUGOUT("EEPROM Read Error\n"); 5610 DEBUGOUT("EEPROM Read Error\n");
5611 return -E1000_ERR_EEPROM; 5611 return -E1000_ERR_EEPROM;
5612 } 5612 }
5613 hw->perm_mac_addr[i] = (u8) (eeprom_data & 0x00FF); 5613 hw->perm_mac_addr[i] = (u8)(eeprom_data & 0x00FF);
5614 hw->perm_mac_addr[i+1] = (u8) (eeprom_data >> 8); 5614 hw->perm_mac_addr[i+1] = (u8)(eeprom_data >> 8);
5615 } 5615 }
5616 5616
5617 switch (hw->mac_type) { 5617 switch (hw->mac_type) {
@@ -5693,37 +5693,37 @@ u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr)
5693 case 0: 5693 case 0:
5694 if (hw->mac_type == e1000_ich8lan) { 5694 if (hw->mac_type == e1000_ich8lan) {
5695 /* [47:38] i.e. 0x158 for above example address */ 5695 /* [47:38] i.e. 0x158 for above example address */
5696 hash_value = ((mc_addr[4] >> 6) | (((u16) mc_addr[5]) << 2)); 5696 hash_value = ((mc_addr[4] >> 6) | (((u16)mc_addr[5]) << 2));
5697 } else { 5697 } else {
5698 /* [47:36] i.e. 0x563 for above example address */ 5698 /* [47:36] i.e. 0x563 for above example address */
5699 hash_value = ((mc_addr[4] >> 4) | (((u16) mc_addr[5]) << 4)); 5699 hash_value = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4));
5700 } 5700 }
5701 break; 5701 break;
5702 case 1: 5702 case 1:
5703 if (hw->mac_type == e1000_ich8lan) { 5703 if (hw->mac_type == e1000_ich8lan) {
5704 /* [46:37] i.e. 0x2B1 for above example address */ 5704 /* [46:37] i.e. 0x2B1 for above example address */
5705 hash_value = ((mc_addr[4] >> 5) | (((u16) mc_addr[5]) << 3)); 5705 hash_value = ((mc_addr[4] >> 5) | (((u16)mc_addr[5]) << 3));
5706 } else { 5706 } else {
5707 /* [46:35] i.e. 0xAC6 for above example address */ 5707 /* [46:35] i.e. 0xAC6 for above example address */
5708 hash_value = ((mc_addr[4] >> 3) | (((u16) mc_addr[5]) << 5)); 5708 hash_value = ((mc_addr[4] >> 3) | (((u16)mc_addr[5]) << 5));
5709 } 5709 }
5710 break; 5710 break;
5711 case 2: 5711 case 2:
5712 if (hw->mac_type == e1000_ich8lan) { 5712 if (hw->mac_type == e1000_ich8lan) {
5713 /*[45:36] i.e. 0x163 for above example address */ 5713 /*[45:36] i.e. 0x163 for above example address */
5714 hash_value = ((mc_addr[4] >> 4) | (((u16) mc_addr[5]) << 4)); 5714 hash_value = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4));
5715 } else { 5715 } else {
5716 /* [45:34] i.e. 0x5D8 for above example address */ 5716 /* [45:34] i.e. 0x5D8 for above example address */
5717 hash_value = ((mc_addr[4] >> 2) | (((u16) mc_addr[5]) << 6)); 5717 hash_value = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6));
5718 } 5718 }
5719 break; 5719 break;
5720 case 3: 5720 case 3:
5721 if (hw->mac_type == e1000_ich8lan) { 5721 if (hw->mac_type == e1000_ich8lan) {
5722 /* [43:34] i.e. 0x18D for above example address */ 5722 /* [43:34] i.e. 0x18D for above example address */
5723 hash_value = ((mc_addr[4] >> 2) | (((u16) mc_addr[5]) << 6)); 5723 hash_value = ((mc_addr[4] >> 2) | (((u16)mc_addr[5]) << 6));
5724 } else { 5724 } else {
5725 /* [43:32] i.e. 0x634 for above example address */ 5725 /* [43:32] i.e. 0x634 for above example address */
5726 hash_value = ((mc_addr[4]) | (((u16) mc_addr[5]) << 8)); 5726 hash_value = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8));
5727 } 5727 }
5728 break; 5728 break;
5729 } 5729 }
@@ -5795,10 +5795,9 @@ void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
5795 /* HW expects these in little endian so we reverse the byte order 5795 /* HW expects these in little endian so we reverse the byte order
5796 * from network order (big endian) to little endian 5796 * from network order (big endian) to little endian
5797 */ 5797 */
5798 rar_low = ((u32) addr[0] | 5798 rar_low = ((u32)addr[0] | ((u32)addr[1] << 8) |
5799 ((u32) addr[1] << 8) | 5799 ((u32)addr[2] << 16) | ((u32)addr[3] << 24));
5800 ((u32) addr[2] << 16) | ((u32) addr[3] << 24)); 5800 rar_high = ((u32)addr[4] | ((u32)addr[5] << 8));
5801 rar_high = ((u32) addr[4] | ((u32) addr[5] << 8));
5802 5801
5803 /* Disable Rx and flush all Rx frames before enabling RSS to avoid Rx 5802 /* Disable Rx and flush all Rx frames before enabling RSS to avoid Rx
5804 * unit hang. 5803 * unit hang.
@@ -6412,7 +6411,7 @@ void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats,
6412 * since the test for a multicast frame will test positive on 6411 * since the test for a multicast frame will test positive on
6413 * a broadcast frame. 6412 * a broadcast frame.
6414 */ 6413 */
6415 if ((mac_addr[0] == (u8) 0xff) && (mac_addr[1] == (u8) 0xff)) 6414 if ((mac_addr[0] == (u8)0xff) && (mac_addr[1] == (u8)0xff))
6416 /* Broadcast packet */ 6415 /* Broadcast packet */
6417 stats->bprc++; 6416 stats->bprc++;
6418 else if (*mac_addr & 0x01) 6417 else if (*mac_addr & 0x01)
@@ -7382,7 +7381,7 @@ static s32 e1000_host_if_read_cookie(struct e1000_hw *hw, u8 *buffer)
7382 offset = (offset >> 2); 7381 offset = (offset >> 2);
7383 7382
7384 for (i = 0; i < length; i++) { 7383 for (i = 0; i < length; i++) {
7385 *((u32 *) buffer + i) = 7384 *((u32 *)buffer + i) =
7386 E1000_READ_REG_ARRAY_DWORD(hw, HOST_IF, offset + i); 7385 E1000_READ_REG_ARRAY_DWORD(hw, HOST_IF, offset + i);
7387 } 7386 }
7388 return E1000_SUCCESS; 7387 return E1000_SUCCESS;
@@ -7513,7 +7512,7 @@ static s32 e1000_mng_write_cmd_header(struct e1000_hw *hw,
7513 sum = hdr->checksum; 7512 sum = hdr->checksum;
7514 hdr->checksum = 0; 7513 hdr->checksum = 0;
7515 7514
7516 buffer = (u8 *) hdr; 7515 buffer = (u8 *)hdr;
7517 i = length; 7516 i = length;
7518 while (i--) 7517 while (i--)
7519 sum += buffer[i]; 7518 sum += buffer[i];
@@ -7523,7 +7522,7 @@ static s32 e1000_mng_write_cmd_header(struct e1000_hw *hw,
7523 length >>= 2; 7522 length >>= 2;
7524 /* The device driver writes the relevant command block into the ram area. */ 7523 /* The device driver writes the relevant command block into the ram area. */
7525 for (i = 0; i < length; i++) { 7524 for (i = 0; i < length; i++) {
7526 E1000_WRITE_REG_ARRAY_DWORD(hw, HOST_IF, i, *((u32 *) hdr + i)); 7525 E1000_WRITE_REG_ARRAY_DWORD(hw, HOST_IF, i, *((u32 *)hdr + i));
7527 E1000_WRITE_FLUSH(); 7526 E1000_WRITE_FLUSH();
7528 } 7527 }
7529 7528
@@ -7616,7 +7615,7 @@ static u8 e1000_calculate_mng_checksum(char *buffer, u32 length)
7616 for (i=0; i < length; i++) 7615 for (i=0; i < length; i++)
7617 sum += buffer[i]; 7616 sum += buffer[i];
7618 7617
7619 return (u8) (0 - sum); 7618 return (u8)(0 - sum);
7620} 7619}
7621 7620
7622/***************************************************************************** 7621/*****************************************************************************
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index ad1f052c3d3a..cb44fded47ed 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1056,7 +1056,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
1056 1056
1057 init_timer(&adapter->tx_fifo_stall_timer); 1057 init_timer(&adapter->tx_fifo_stall_timer);
1058 adapter->tx_fifo_stall_timer.function = &e1000_82547_tx_fifo_stall; 1058 adapter->tx_fifo_stall_timer.function = &e1000_82547_tx_fifo_stall;
1059 adapter->tx_fifo_stall_timer.data = (unsigned long) adapter; 1059 adapter->tx_fifo_stall_timer.data = (unsigned long)adapter;
1060 1060
1061 init_timer(&adapter->watchdog_timer); 1061 init_timer(&adapter->watchdog_timer);
1062 adapter->watchdog_timer.function = &e1000_watchdog; 1062 adapter->watchdog_timer.function = &e1000_watchdog;
@@ -1064,7 +1064,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
1064 1064
1065 init_timer(&adapter->phy_info_timer); 1065 init_timer(&adapter->phy_info_timer);
1066 adapter->phy_info_timer.function = &e1000_update_phy_info; 1066 adapter->phy_info_timer.function = &e1000_update_phy_info;
1067 adapter->phy_info_timer.data = (unsigned long) adapter; 1067 adapter->phy_info_timer.data = (unsigned long)adapter;
1068 1068
1069 INIT_WORK(&adapter->reset_task, e1000_reset_task); 1069 INIT_WORK(&adapter->reset_task, e1000_reset_task);
1070 1070
@@ -1542,7 +1542,7 @@ static bool e1000_check_64k_bound(struct e1000_adapter *adapter, void *start,
1542 unsigned long len) 1542 unsigned long len)
1543{ 1543{
1544 struct e1000_hw *hw = &adapter->hw; 1544 struct e1000_hw *hw = &adapter->hw;
1545 unsigned long begin = (unsigned long) start; 1545 unsigned long begin = (unsigned long)start;
1546 unsigned long end = begin + len; 1546 unsigned long end = begin + len;
1547 1547
1548 /* First rev 82545 and 82546 need to not allow any memory 1548 /* First rev 82545 and 82546 need to not allow any memory
@@ -2538,7 +2538,7 @@ static void e1000_set_rx_mode(struct net_device *netdev)
2538 2538
2539static void e1000_update_phy_info(unsigned long data) 2539static void e1000_update_phy_info(unsigned long data)
2540{ 2540{
2541 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 2541 struct e1000_adapter *adapter = (struct e1000_adapter *)data;
2542 struct e1000_hw *hw = &adapter->hw; 2542 struct e1000_hw *hw = &adapter->hw;
2543 e1000_phy_get_info(hw, &adapter->phy_info); 2543 e1000_phy_get_info(hw, &adapter->phy_info);
2544} 2544}
@@ -2550,7 +2550,7 @@ static void e1000_update_phy_info(unsigned long data)
2550 2550
2551static void e1000_82547_tx_fifo_stall(unsigned long data) 2551static void e1000_82547_tx_fifo_stall(unsigned long data)
2552{ 2552{
2553 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 2553 struct e1000_adapter *adapter = (struct e1000_adapter *)data;
2554 struct e1000_hw *hw = &adapter->hw; 2554 struct e1000_hw *hw = &adapter->hw;
2555 struct net_device *netdev = adapter->netdev; 2555 struct net_device *netdev = adapter->netdev;
2556 u32 tctl; 2556 u32 tctl;
@@ -2583,7 +2583,7 @@ static void e1000_82547_tx_fifo_stall(unsigned long data)
2583 **/ 2583 **/
2584static void e1000_watchdog(unsigned long data) 2584static void e1000_watchdog(unsigned long data)
2585{ 2585{
2586 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 2586 struct e1000_adapter *adapter = (struct e1000_adapter *)data;
2587 struct e1000_hw *hw = &adapter->hw; 2587 struct e1000_hw *hw = &adapter->hw;
2588 struct net_device *netdev = adapter->netdev; 2588 struct net_device *netdev = adapter->netdev;
2589 struct e1000_tx_ring *txdr = adapter->tx_ring; 2589 struct e1000_tx_ring *txdr = adapter->tx_ring;
@@ -3225,7 +3225,7 @@ static int e1000_transfer_dhcp_info(struct e1000_adapter *adapter,
3225 return 0; 3225 return 0;
3226 } 3226 }
3227 if (skb->len > MINIMUM_DHCP_PACKET_SIZE) { 3227 if (skb->len > MINIMUM_DHCP_PACKET_SIZE) {
3228 struct ethhdr *eth = (struct ethhdr *) skb->data; 3228 struct ethhdr *eth = (struct ethhdr *)skb->data;
3229 if ((htons(ETH_P_IP) == eth->h_proto)) { 3229 if ((htons(ETH_P_IP) == eth->h_proto)) {
3230 const struct iphdr *ip = 3230 const struct iphdr *ip =
3231 (struct iphdr *)((u8 *)skb->data+14); 3231 (struct iphdr *)((u8 *)skb->data+14);
diff --git a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h
index acb5134ab22e..d9298522f5ae 100644
--- a/drivers/net/e1000/e1000_osdep.h
+++ b/drivers/net/e1000/e1000_osdep.h
@@ -55,7 +55,7 @@
55#define DEBUGOUT7 DEBUGOUT3 55#define DEBUGOUT7 DEBUGOUT3
56 56
57 57
58#define er32(reg)\ 58#define er32(reg) \
59 (readl(hw->hw_addr + ((hw->mac_type >= e1000_82543) \ 59 (readl(hw->hw_addr + ((hw->mac_type >= e1000_82543) \
60 ? E1000_##reg : E1000_82542_##reg))) 60 ? E1000_##reg : E1000_82542_##reg)))
61 61