Commit 6cf08d1c authored by David Ertman's avatar David Ertman Committed by Jeff Kirsher

e1000e: Cleanup to fix checkpatch missing blank lines

Fixing "WARNING:SPACING: networking uses a blank line after declarations"
Signed-off-by: default avatarDave Ertman <davidx.m.ertman@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 3992c8ed
...@@ -169,6 +169,7 @@ static int e1000_get_settings(struct net_device *netdev, ...@@ -169,6 +169,7 @@ static int e1000_get_settings(struct net_device *netdev,
} }
} else if (!pm_runtime_suspended(netdev->dev.parent)) { } else if (!pm_runtime_suspended(netdev->dev.parent)) {
u32 status = er32(STATUS); u32 status = er32(STATUS);
if (status & E1000_STATUS_LU) { if (status & E1000_STATUS_LU) {
if (status & E1000_STATUS_SPEED_1000) if (status & E1000_STATUS_SPEED_1000)
speed = SPEED_1000; speed = SPEED_1000;
...@@ -793,6 +794,7 @@ static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, ...@@ -793,6 +794,7 @@ static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data,
int reg, u32 mask, u32 write) int reg, u32 mask, u32 write)
{ {
u32 val; u32 val;
__ew32(&adapter->hw, reg, write & mask); __ew32(&adapter->hw, reg, write & mask);
val = __er32(&adapter->hw, reg); val = __er32(&adapter->hw, reg);
if ((write & mask) != (val & mask)) { if ((write & mask) != (val & mask)) {
...@@ -1717,6 +1719,7 @@ static int e1000_link_test(struct e1000_adapter *adapter, u64 *data) ...@@ -1717,6 +1719,7 @@ static int e1000_link_test(struct e1000_adapter *adapter, u64 *data)
*data = 0; *data = 0;
if (hw->phy.media_type == e1000_media_type_internal_serdes) { if (hw->phy.media_type == e1000_media_type_internal_serdes) {
int i = 0; int i = 0;
hw->mac.serdes_has_link = false; hw->mac.serdes_has_link = false;
/* On some blade server designs, link establishment /* On some blade server designs, link establishment
......
...@@ -1320,6 +1320,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw) ...@@ -1320,6 +1320,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
*/ */
if ((hw->mac.type == e1000_pch2lan) && link) { if ((hw->mac.type == e1000_pch2lan) && link) {
u32 reg; u32 reg;
reg = er32(STATUS); reg = er32(STATUS);
if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) { if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) {
reg = er32(TIPG); reg = er32(TIPG);
......
...@@ -599,6 +599,7 @@ static void e1000e_update_rdt_wa(struct e1000_ring *rx_ring, unsigned int i) ...@@ -599,6 +599,7 @@ static void e1000e_update_rdt_wa(struct e1000_ring *rx_ring, unsigned int i)
if (unlikely(!ret_val && (i != readl(rx_ring->tail)))) { if (unlikely(!ret_val && (i != readl(rx_ring->tail)))) {
u32 rctl = er32(RCTL); u32 rctl = er32(RCTL);
ew32(RCTL, rctl & ~E1000_RCTL_EN); ew32(RCTL, rctl & ~E1000_RCTL_EN);
e_err("ME firmware caused invalid RDT - resetting\n"); e_err("ME firmware caused invalid RDT - resetting\n");
schedule_work(&adapter->reset_task); schedule_work(&adapter->reset_task);
...@@ -615,6 +616,7 @@ static void e1000e_update_tdt_wa(struct e1000_ring *tx_ring, unsigned int i) ...@@ -615,6 +616,7 @@ static void e1000e_update_tdt_wa(struct e1000_ring *tx_ring, unsigned int i)
if (unlikely(!ret_val && (i != readl(tx_ring->tail)))) { if (unlikely(!ret_val && (i != readl(tx_ring->tail)))) {
u32 tctl = er32(TCTL); u32 tctl = er32(TCTL);
ew32(TCTL, tctl & ~E1000_TCTL_EN); ew32(TCTL, tctl & ~E1000_TCTL_EN);
e_err("ME firmware caused invalid TDT - resetting\n"); e_err("ME firmware caused invalid TDT - resetting\n");
schedule_work(&adapter->reset_task); schedule_work(&adapter->reset_task);
...@@ -1198,6 +1200,7 @@ static bool e1000_clean_tx_irq(struct e1000_ring *tx_ring) ...@@ -1198,6 +1200,7 @@ static bool e1000_clean_tx_irq(struct e1000_ring *tx_ring)
while ((eop_desc->upper.data & cpu_to_le32(E1000_TXD_STAT_DD)) && while ((eop_desc->upper.data & cpu_to_le32(E1000_TXD_STAT_DD)) &&
(count < tx_ring->count)) { (count < tx_ring->count)) {
bool cleaned = false; bool cleaned = false;
rmb(); /* read buffer_info after eop_desc */ rmb(); /* read buffer_info after eop_desc */
for (; !cleaned; count++) { for (; !cleaned; count++) {
tx_desc = E1000_TX_DESC(*tx_ring, i); tx_desc = E1000_TX_DESC(*tx_ring, i);
...@@ -1753,6 +1756,7 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data) ...@@ -1753,6 +1756,7 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data)
adapter->flags & FLAG_RX_NEEDS_RESTART) { adapter->flags & FLAG_RX_NEEDS_RESTART) {
/* disable receives */ /* disable receives */
u32 rctl = er32(RCTL); u32 rctl = er32(RCTL);
ew32(RCTL, rctl & ~E1000_RCTL_EN); ew32(RCTL, rctl & ~E1000_RCTL_EN);
adapter->flags |= FLAG_RESTART_NOW; adapter->flags |= FLAG_RESTART_NOW;
} }
...@@ -1960,6 +1964,7 @@ static void e1000_configure_msix(struct e1000_adapter *adapter) ...@@ -1960,6 +1964,7 @@ static void e1000_configure_msix(struct e1000_adapter *adapter)
/* Workaround issue with spurious interrupts on 82574 in MSI-X mode */ /* Workaround issue with spurious interrupts on 82574 in MSI-X mode */
if (hw->mac.type == e1000_82574) { if (hw->mac.type == e1000_82574) {
u32 rfctl = er32(RFCTL); u32 rfctl = er32(RFCTL);
rfctl |= E1000_RFCTL_ACK_DIS; rfctl |= E1000_RFCTL_ACK_DIS;
ew32(RFCTL, rfctl); ew32(RFCTL, rfctl);
} }
...@@ -2204,6 +2209,7 @@ static void e1000_irq_disable(struct e1000_adapter *adapter) ...@@ -2204,6 +2209,7 @@ static void e1000_irq_disable(struct e1000_adapter *adapter)
if (adapter->msix_entries) { if (adapter->msix_entries) {
int i; int i;
for (i = 0; i < adapter->num_vectors; i++) for (i = 0; i < adapter->num_vectors; i++)
synchronize_irq(adapter->msix_entries[i].vector); synchronize_irq(adapter->msix_entries[i].vector);
} else { } else {
...@@ -2921,6 +2927,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter) ...@@ -2921,6 +2927,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
if (adapter->flags2 & FLAG2_DMA_BURST) { if (adapter->flags2 & FLAG2_DMA_BURST) {
u32 txdctl = er32(TXDCTL(0)); u32 txdctl = er32(TXDCTL(0));
txdctl &= ~(E1000_TXDCTL_PTHRESH | E1000_TXDCTL_HTHRESH | txdctl &= ~(E1000_TXDCTL_PTHRESH | E1000_TXDCTL_HTHRESH |
E1000_TXDCTL_WTHRESH); E1000_TXDCTL_WTHRESH);
/* set up some performance related parameters to encourage the /* set up some performance related parameters to encourage the
...@@ -3239,6 +3246,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) ...@@ -3239,6 +3246,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
if (adapter->flags & FLAG_IS_ICH) { if (adapter->flags & FLAG_IS_ICH) {
u32 rxdctl = er32(RXDCTL(0)); u32 rxdctl = er32(RXDCTL(0));
ew32(RXDCTL(0), rxdctl | 0x3); ew32(RXDCTL(0), rxdctl | 0x3);
} }
...@@ -4695,6 +4703,7 @@ static void e1000e_update_stats(struct e1000_adapter *adapter) ...@@ -4695,6 +4703,7 @@ static void e1000e_update_stats(struct e1000_adapter *adapter)
/* Correctable ECC Errors */ /* Correctable ECC Errors */
if (hw->mac.type == e1000_pch_lpt) { if (hw->mac.type == e1000_pch_lpt) {
u32 pbeccsts = er32(PBECCSTS); u32 pbeccsts = er32(PBECCSTS);
adapter->corr_errors += adapter->corr_errors +=
pbeccsts & E1000_PBECCSTS_CORR_ERR_CNT_MASK; pbeccsts & E1000_PBECCSTS_CORR_ERR_CNT_MASK;
adapter->uncorr_errors += adapter->uncorr_errors +=
...@@ -4808,6 +4817,7 @@ static void e1000e_enable_receives(struct e1000_adapter *adapter) ...@@ -4808,6 +4817,7 @@ static void e1000e_enable_receives(struct e1000_adapter *adapter)
(adapter->flags & FLAG_RESTART_NOW)) { (adapter->flags & FLAG_RESTART_NOW)) {
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
u32 rctl = er32(RCTL); u32 rctl = er32(RCTL);
ew32(RCTL, rctl | E1000_RCTL_EN); ew32(RCTL, rctl | E1000_RCTL_EN);
adapter->flags &= ~FLAG_RESTART_NOW; adapter->flags &= ~FLAG_RESTART_NOW;
} }
...@@ -4930,6 +4940,7 @@ static void e1000_watchdog_task(struct work_struct *work) ...@@ -4930,6 +4940,7 @@ static void e1000_watchdog_task(struct work_struct *work)
if ((adapter->flags & FLAG_TARC_SPEED_MODE_BIT) && if ((adapter->flags & FLAG_TARC_SPEED_MODE_BIT) &&
!txb2b) { !txb2b) {
u32 tarc0; u32 tarc0;
tarc0 = er32(TARC(0)); tarc0 = er32(TARC(0));
tarc0 &= ~SPEED_MODE_BIT; tarc0 &= ~SPEED_MODE_BIT;
ew32(TARC(0), tarc0); ew32(TARC(0), tarc0);
...@@ -6209,6 +6220,7 @@ static int __e1000_resume(struct pci_dev *pdev) ...@@ -6209,6 +6220,7 @@ static int __e1000_resume(struct pci_dev *pdev)
e1e_wphy(&adapter->hw, BM_WUS, ~0); e1e_wphy(&adapter->hw, BM_WUS, ~0);
} else { } else {
u32 wus = er32(WUS); u32 wus = er32(WUS);
if (wus) { if (wus) {
e_info("MAC Wakeup cause - %s\n", e_info("MAC Wakeup cause - %s\n",
wus & E1000_WUS_EX ? "Unicast Packet" : wus & E1000_WUS_EX ? "Unicast Packet" :
...@@ -7144,6 +7156,7 @@ static struct pci_driver e1000_driver = { ...@@ -7144,6 +7156,7 @@ static struct pci_driver e1000_driver = {
static int __init e1000_init_module(void) static int __init e1000_init_module(void)
{ {
int ret; int ret;
pr_info("Intel(R) PRO/1000 Network Driver - %s\n", pr_info("Intel(R) PRO/1000 Network Driver - %s\n",
e1000e_driver_version); e1000e_driver_version);
pr_info("Copyright(c) 1999 - 2014 Intel Corporation.\n"); pr_info("Copyright(c) 1999 - 2014 Intel Corporation.\n");
......
...@@ -398,6 +398,7 @@ s32 e1000e_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) ...@@ -398,6 +398,7 @@ s32 e1000e_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
/* Loop to allow for up to whole page write of eeprom */ /* Loop to allow for up to whole page write of eeprom */
while (widx < words) { while (widx < words) {
u16 word_out = data[widx]; u16 word_out = data[widx];
word_out = (word_out >> 8) | (word_out << 8); word_out = (word_out >> 8) | (word_out << 8);
e1000_shift_out_eec_bits(hw, word_out, 16); e1000_shift_out_eec_bits(hw, word_out, 16);
widx++; widx++;
......
...@@ -436,6 +436,7 @@ void e1000e_check_options(struct e1000_adapter *adapter) ...@@ -436,6 +436,7 @@ void e1000e_check_options(struct e1000_adapter *adapter)
if (num_IntMode > bd) { if (num_IntMode > bd) {
unsigned int int_mode = IntMode[bd]; unsigned int int_mode = IntMode[bd];
e1000_validate_option(&int_mode, &opt, adapter); e1000_validate_option(&int_mode, &opt, adapter);
adapter->int_mode = int_mode; adapter->int_mode = int_mode;
} else { } else {
...@@ -457,6 +458,7 @@ void e1000e_check_options(struct e1000_adapter *adapter) ...@@ -457,6 +458,7 @@ void e1000e_check_options(struct e1000_adapter *adapter)
if (num_SmartPowerDownEnable > bd) { if (num_SmartPowerDownEnable > bd) {
unsigned int spd = SmartPowerDownEnable[bd]; unsigned int spd = SmartPowerDownEnable[bd];
e1000_validate_option(&spd, &opt, adapter); e1000_validate_option(&spd, &opt, adapter);
if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN) && spd) if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN) && spd)
adapter->flags |= FLAG_SMART_POWER_DOWN; adapter->flags |= FLAG_SMART_POWER_DOWN;
...@@ -473,6 +475,7 @@ void e1000e_check_options(struct e1000_adapter *adapter) ...@@ -473,6 +475,7 @@ void e1000e_check_options(struct e1000_adapter *adapter)
if (num_CrcStripping > bd) { if (num_CrcStripping > bd) {
unsigned int crc_stripping = CrcStripping[bd]; unsigned int crc_stripping = CrcStripping[bd];
e1000_validate_option(&crc_stripping, &opt, adapter); e1000_validate_option(&crc_stripping, &opt, adapter);
if (crc_stripping == OPTION_ENABLED) { if (crc_stripping == OPTION_ENABLED) {
adapter->flags2 |= FLAG2_CRC_STRIPPING; adapter->flags2 |= FLAG2_CRC_STRIPPING;
...@@ -495,6 +498,7 @@ void e1000e_check_options(struct e1000_adapter *adapter) ...@@ -495,6 +498,7 @@ void e1000e_check_options(struct e1000_adapter *adapter)
if (num_KumeranLockLoss > bd) { if (num_KumeranLockLoss > bd) {
unsigned int kmrn_lock_loss = KumeranLockLoss[bd]; unsigned int kmrn_lock_loss = KumeranLockLoss[bd];
e1000_validate_option(&kmrn_lock_loss, &opt, adapter); e1000_validate_option(&kmrn_lock_loss, &opt, adapter);
enabled = kmrn_lock_loss; enabled = kmrn_lock_loss;
} }
......
...@@ -2896,6 +2896,7 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data, ...@@ -2896,6 +2896,7 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data,
(hw->phy.addr == 2) && (hw->phy.addr == 2) &&
!(MAX_PHY_REG_ADDRESS & reg) && (data & (1 << 11))) { !(MAX_PHY_REG_ADDRESS & reg) && (data & (1 << 11))) {
u16 data2 = 0x7EFF; u16 data2 = 0x7EFF;
ret_val = e1000_access_phy_debug_regs_hv(hw, ret_val = e1000_access_phy_debug_regs_hv(hw,
(1 << 6) | 0x3, (1 << 6) | 0x3,
&data2, false); &data2, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment