Commit 03f83041 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Garzik

ixgb: format all if( to be if (

this patch is trivial but because I want to have everything be nice and
tidy I'm updating it.
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 7490d71a
...@@ -108,7 +108,7 @@ ixgb_shift_out_bits(struct ixgb_hw *hw, ...@@ -108,7 +108,7 @@ ixgb_shift_out_bits(struct ixgb_hw *hw,
*/ */
eecd_reg &= ~IXGB_EECD_DI; eecd_reg &= ~IXGB_EECD_DI;
if(data & mask) if (data & mask)
eecd_reg |= IXGB_EECD_DI; eecd_reg |= IXGB_EECD_DI;
IXGB_WRITE_REG(hw, EECD, eecd_reg); IXGB_WRITE_REG(hw, EECD, eecd_reg);
...@@ -159,7 +159,7 @@ ixgb_shift_in_bits(struct ixgb_hw *hw) ...@@ -159,7 +159,7 @@ ixgb_shift_in_bits(struct ixgb_hw *hw)
eecd_reg = IXGB_READ_REG(hw, EECD); eecd_reg = IXGB_READ_REG(hw, EECD);
eecd_reg &= ~(IXGB_EECD_DI); eecd_reg &= ~(IXGB_EECD_DI);
if(eecd_reg & IXGB_EECD_DO) if (eecd_reg & IXGB_EECD_DO)
data |= 1; data |= 1;
ixgb_lower_clock(hw, &eecd_reg); ixgb_lower_clock(hw, &eecd_reg);
...@@ -300,7 +300,7 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw) ...@@ -300,7 +300,7 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw)
for(i = 0; i < 200; i++) { for(i = 0; i < 200; i++) {
eecd_reg = IXGB_READ_REG(hw, EECD); eecd_reg = IXGB_READ_REG(hw, EECD);
if(eecd_reg & IXGB_EECD_DO) if (eecd_reg & IXGB_EECD_DO)
return (true); return (true);
udelay(50); udelay(50);
...@@ -331,7 +331,7 @@ ixgb_validate_eeprom_checksum(struct ixgb_hw *hw) ...@@ -331,7 +331,7 @@ ixgb_validate_eeprom_checksum(struct ixgb_hw *hw)
for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++)
checksum += ixgb_read_eeprom(hw, i); checksum += ixgb_read_eeprom(hw, i);
if(checksum == (u16) EEPROM_SUM) if (checksum == (u16) EEPROM_SUM)
return (true); return (true);
else else
return (false); return (false);
......
...@@ -95,7 +95,7 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ...@@ -95,7 +95,7 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
ecmd->port = PORT_FIBRE; ecmd->port = PORT_FIBRE;
ecmd->transceiver = XCVR_EXTERNAL; ecmd->transceiver = XCVR_EXTERNAL;
if(netif_carrier_ok(adapter->netdev)) { if (netif_carrier_ok(adapter->netdev)) {
ecmd->speed = SPEED_10000; ecmd->speed = SPEED_10000;
ecmd->duplex = DUPLEX_FULL; ecmd->duplex = DUPLEX_FULL;
} else { } else {
...@@ -122,11 +122,11 @@ ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ...@@ -122,11 +122,11 @@ ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
{ {
struct ixgb_adapter *adapter = netdev_priv(netdev); struct ixgb_adapter *adapter = netdev_priv(netdev);
if(ecmd->autoneg == AUTONEG_ENABLE || if (ecmd->autoneg == AUTONEG_ENABLE ||
ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL)
return -EINVAL; return -EINVAL;
if(netif_running(adapter->netdev)) { if (netif_running(adapter->netdev)) {
ixgb_down(adapter, true); ixgb_down(adapter, true);
ixgb_reset(adapter); ixgb_reset(adapter);
ixgb_up(adapter); ixgb_up(adapter);
...@@ -146,11 +146,11 @@ ixgb_get_pauseparam(struct net_device *netdev, ...@@ -146,11 +146,11 @@ ixgb_get_pauseparam(struct net_device *netdev,
pause->autoneg = AUTONEG_DISABLE; pause->autoneg = AUTONEG_DISABLE;
if(hw->fc.type == ixgb_fc_rx_pause) if (hw->fc.type == ixgb_fc_rx_pause)
pause->rx_pause = 1; pause->rx_pause = 1;
else if(hw->fc.type == ixgb_fc_tx_pause) else if (hw->fc.type == ixgb_fc_tx_pause)
pause->tx_pause = 1; pause->tx_pause = 1;
else if(hw->fc.type == ixgb_fc_full) { else if (hw->fc.type == ixgb_fc_full) {
pause->rx_pause = 1; pause->rx_pause = 1;
pause->tx_pause = 1; pause->tx_pause = 1;
} }
...@@ -163,19 +163,19 @@ ixgb_set_pauseparam(struct net_device *netdev, ...@@ -163,19 +163,19 @@ ixgb_set_pauseparam(struct net_device *netdev,
struct ixgb_adapter *adapter = netdev_priv(netdev); struct ixgb_adapter *adapter = netdev_priv(netdev);
struct ixgb_hw *hw = &adapter->hw; struct ixgb_hw *hw = &adapter->hw;
if(pause->autoneg == AUTONEG_ENABLE) if (pause->autoneg == AUTONEG_ENABLE)
return -EINVAL; return -EINVAL;
if(pause->rx_pause && pause->tx_pause) if (pause->rx_pause && pause->tx_pause)
hw->fc.type = ixgb_fc_full; hw->fc.type = ixgb_fc_full;
else if(pause->rx_pause && !pause->tx_pause) else if (pause->rx_pause && !pause->tx_pause)
hw->fc.type = ixgb_fc_rx_pause; hw->fc.type = ixgb_fc_rx_pause;
else if(!pause->rx_pause && pause->tx_pause) else if (!pause->rx_pause && pause->tx_pause)
hw->fc.type = ixgb_fc_tx_pause; hw->fc.type = ixgb_fc_tx_pause;
else if(!pause->rx_pause && !pause->tx_pause) else if (!pause->rx_pause && !pause->tx_pause)
hw->fc.type = ixgb_fc_none; hw->fc.type = ixgb_fc_none;
if(netif_running(adapter->netdev)) { if (netif_running(adapter->netdev)) {
ixgb_down(adapter, true); ixgb_down(adapter, true);
ixgb_up(adapter); ixgb_up(adapter);
ixgb_set_speed_duplex(netdev); ixgb_set_speed_duplex(netdev);
...@@ -200,7 +200,7 @@ ixgb_set_rx_csum(struct net_device *netdev, u32 data) ...@@ -200,7 +200,7 @@ ixgb_set_rx_csum(struct net_device *netdev, u32 data)
adapter->rx_csum = data; adapter->rx_csum = data;
if(netif_running(netdev)) { if (netif_running(netdev)) {
ixgb_down(adapter, true); ixgb_down(adapter, true);
ixgb_up(adapter); ixgb_up(adapter);
ixgb_set_speed_duplex(netdev); ixgb_set_speed_duplex(netdev);
...@@ -229,7 +229,7 @@ ixgb_set_tx_csum(struct net_device *netdev, u32 data) ...@@ -229,7 +229,7 @@ ixgb_set_tx_csum(struct net_device *netdev, u32 data)
static int static int
ixgb_set_tso(struct net_device *netdev, u32 data) ixgb_set_tso(struct net_device *netdev, u32 data)
{ {
if(data) if (data)
netdev->features |= NETIF_F_TSO; netdev->features |= NETIF_F_TSO;
else else
netdev->features &= ~NETIF_F_TSO; netdev->features &= ~NETIF_F_TSO;
...@@ -415,7 +415,7 @@ ixgb_get_eeprom(struct net_device *netdev, ...@@ -415,7 +415,7 @@ ixgb_get_eeprom(struct net_device *netdev,
int i, max_len, first_word, last_word; int i, max_len, first_word, last_word;
int ret_val = 0; int ret_val = 0;
if(eeprom->len == 0) { if (eeprom->len == 0) {
ret_val = -EINVAL; ret_val = -EINVAL;
goto geeprom_error; goto geeprom_error;
} }
...@@ -424,12 +424,12 @@ ixgb_get_eeprom(struct net_device *netdev, ...@@ -424,12 +424,12 @@ ixgb_get_eeprom(struct net_device *netdev,
max_len = ixgb_get_eeprom_len(netdev); max_len = ixgb_get_eeprom_len(netdev);
if(eeprom->offset > eeprom->offset + eeprom->len) { if (eeprom->offset > eeprom->offset + eeprom->len) {
ret_val = -EINVAL; ret_val = -EINVAL;
goto geeprom_error; goto geeprom_error;
} }
if((eeprom->offset + eeprom->len) > max_len) if ((eeprom->offset + eeprom->len) > max_len)
eeprom->len = (max_len - eeprom->offset); eeprom->len = (max_len - eeprom->offset);
first_word = eeprom->offset >> 1; first_word = eeprom->offset >> 1;
...@@ -437,7 +437,7 @@ ixgb_get_eeprom(struct net_device *netdev, ...@@ -437,7 +437,7 @@ ixgb_get_eeprom(struct net_device *netdev,
eeprom_buff = kmalloc(sizeof(__le16) * eeprom_buff = kmalloc(sizeof(__le16) *
(last_word - first_word + 1), GFP_KERNEL); (last_word - first_word + 1), GFP_KERNEL);
if(!eeprom_buff) if (!eeprom_buff)
return -ENOMEM; return -ENOMEM;
/* note the eeprom was good because the driver loaded */ /* note the eeprom was good because the driver loaded */
...@@ -464,35 +464,35 @@ ixgb_set_eeprom(struct net_device *netdev, ...@@ -464,35 +464,35 @@ ixgb_set_eeprom(struct net_device *netdev,
int max_len, first_word, last_word; int max_len, first_word, last_word;
u16 i; u16 i;
if(eeprom->len == 0) if (eeprom->len == 0)
return -EINVAL; return -EINVAL;
if(eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16)))
return -EFAULT; return -EFAULT;
max_len = ixgb_get_eeprom_len(netdev); max_len = ixgb_get_eeprom_len(netdev);
if(eeprom->offset > eeprom->offset + eeprom->len) if (eeprom->offset > eeprom->offset + eeprom->len)
return -EINVAL; return -EINVAL;
if((eeprom->offset + eeprom->len) > max_len) if ((eeprom->offset + eeprom->len) > max_len)
eeprom->len = (max_len - eeprom->offset); eeprom->len = (max_len - eeprom->offset);
first_word = eeprom->offset >> 1; first_word = eeprom->offset >> 1;
last_word = (eeprom->offset + eeprom->len - 1) >> 1; last_word = (eeprom->offset + eeprom->len - 1) >> 1;
eeprom_buff = kmalloc(max_len, GFP_KERNEL); eeprom_buff = kmalloc(max_len, GFP_KERNEL);
if(!eeprom_buff) if (!eeprom_buff)
return -ENOMEM; return -ENOMEM;
ptr = (void *)eeprom_buff; ptr = (void *)eeprom_buff;
if(eeprom->offset & 1) { if (eeprom->offset & 1) {
/* need read/modify/write of first changed EEPROM word */ /* need read/modify/write of first changed EEPROM word */
/* only the second byte of the word is being modified */ /* only the second byte of the word is being modified */
eeprom_buff[0] = ixgb_read_eeprom(hw, first_word); eeprom_buff[0] = ixgb_read_eeprom(hw, first_word);
ptr++; ptr++;
} }
if((eeprom->offset + eeprom->len) & 1) { if ((eeprom->offset + eeprom->len) & 1) {
/* need read/modify/write of last changed EEPROM word */ /* need read/modify/write of last changed EEPROM word */
/* only the first byte of the word is being modified */ /* only the first byte of the word is being modified */
eeprom_buff[last_word - first_word] eeprom_buff[last_word - first_word]
...@@ -504,7 +504,7 @@ ixgb_set_eeprom(struct net_device *netdev, ...@@ -504,7 +504,7 @@ ixgb_set_eeprom(struct net_device *netdev,
ixgb_write_eeprom(hw, first_word + i, eeprom_buff[i]); ixgb_write_eeprom(hw, first_word + i, eeprom_buff[i]);
/* Update the checksum over the first part of the EEPROM if needed */ /* Update the checksum over the first part of the EEPROM if needed */
if(first_word <= EEPROM_CHECKSUM_REG) if (first_word <= EEPROM_CHECKSUM_REG)
ixgb_update_eeprom_checksum(hw); ixgb_update_eeprom_checksum(hw);
kfree(eeprom_buff); kfree(eeprom_buff);
...@@ -557,10 +557,10 @@ ixgb_set_ringparam(struct net_device *netdev, ...@@ -557,10 +557,10 @@ ixgb_set_ringparam(struct net_device *netdev,
tx_old = adapter->tx_ring; tx_old = adapter->tx_ring;
rx_old = adapter->rx_ring; rx_old = adapter->rx_ring;
if((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
return -EINVAL; return -EINVAL;
if(netif_running(adapter->netdev)) if (netif_running(adapter->netdev))
ixgb_down(adapter, true); ixgb_down(adapter, true);
rxdr->count = max(ring->rx_pending,(u32)MIN_RXD); rxdr->count = max(ring->rx_pending,(u32)MIN_RXD);
...@@ -571,11 +571,11 @@ ixgb_set_ringparam(struct net_device *netdev, ...@@ -571,11 +571,11 @@ ixgb_set_ringparam(struct net_device *netdev,
txdr->count = min(txdr->count,(u32)MAX_TXD); txdr->count = min(txdr->count,(u32)MAX_TXD);
txdr->count = ALIGN(txdr->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); txdr->count = ALIGN(txdr->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE);
if(netif_running(adapter->netdev)) { if (netif_running(adapter->netdev)) {
/* Try to get new resources before deleting old */ /* Try to get new resources before deleting old */
if((err = ixgb_setup_rx_resources(adapter))) if ((err = ixgb_setup_rx_resources(adapter)))
goto err_setup_rx; goto err_setup_rx;
if((err = ixgb_setup_tx_resources(adapter))) if ((err = ixgb_setup_tx_resources(adapter)))
goto err_setup_tx; goto err_setup_tx;
/* save the new, restore the old in order to free it, /* save the new, restore the old in order to free it,
...@@ -589,7 +589,7 @@ ixgb_set_ringparam(struct net_device *netdev, ...@@ -589,7 +589,7 @@ ixgb_set_ringparam(struct net_device *netdev,
ixgb_free_tx_resources(adapter); ixgb_free_tx_resources(adapter);
adapter->rx_ring = rx_new; adapter->rx_ring = rx_new;
adapter->tx_ring = tx_new; adapter->tx_ring = tx_new;
if((err = ixgb_up(adapter))) if ((err = ixgb_up(adapter)))
return err; return err;
ixgb_set_speed_duplex(netdev); ixgb_set_speed_duplex(netdev);
} }
...@@ -615,7 +615,7 @@ ixgb_led_blink_callback(unsigned long data) ...@@ -615,7 +615,7 @@ ixgb_led_blink_callback(unsigned long data)
{ {
struct ixgb_adapter *adapter = (struct ixgb_adapter *)data; struct ixgb_adapter *adapter = (struct ixgb_adapter *)data;
if(test_and_change_bit(IXGB_LED_ON, &adapter->led_status)) if (test_and_change_bit(IXGB_LED_ON, &adapter->led_status))
ixgb_led_off(&adapter->hw); ixgb_led_off(&adapter->hw);
else else
ixgb_led_on(&adapter->hw); ixgb_led_on(&adapter->hw);
...@@ -631,7 +631,7 @@ ixgb_phys_id(struct net_device *netdev, u32 data) ...@@ -631,7 +631,7 @@ ixgb_phys_id(struct net_device *netdev, u32 data)
if (!data) if (!data)
data = INT_MAX; data = INT_MAX;
if(!adapter->blink_timer.function) { if (!adapter->blink_timer.function) {
init_timer(&adapter->blink_timer); init_timer(&adapter->blink_timer);
adapter->blink_timer.function = ixgb_led_blink_callback; adapter->blink_timer.function = ixgb_led_blink_callback;
adapter->blink_timer.data = (unsigned long)adapter; adapter->blink_timer.data = (unsigned long)adapter;
......
...@@ -125,7 +125,7 @@ ixgb_adapter_stop(struct ixgb_hw *hw) ...@@ -125,7 +125,7 @@ ixgb_adapter_stop(struct ixgb_hw *hw)
/* If we are stopped or resetting exit gracefully and wait to be /* If we are stopped or resetting exit gracefully and wait to be
* started again before accessing the hardware. * started again before accessing the hardware.
*/ */
if(hw->adapter_stopped) { if (hw->adapter_stopped) {
DEBUGOUT("Exiting because the adapter is already stopped!!!\n"); DEBUGOUT("Exiting because the adapter is already stopped!!!\n");
return false; return false;
} }
...@@ -482,7 +482,7 @@ ixgb_mc_addr_list_update(struct ixgb_hw *hw, ...@@ -482,7 +482,7 @@ ixgb_mc_addr_list_update(struct ixgb_hw *hw,
/* Place this multicast address in the RAR if there is room, * /* Place this multicast address in the RAR if there is room, *
* else put it in the MTA * else put it in the MTA
*/ */
if(rar_used_count < IXGB_RAR_ENTRIES) { if (rar_used_count < IXGB_RAR_ENTRIES) {
ixgb_rar_set(hw, ixgb_rar_set(hw,
mc_addr_list + mc_addr_list +
(i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad)), (i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad)),
...@@ -719,9 +719,8 @@ ixgb_setup_fc(struct ixgb_hw *hw) ...@@ -719,9 +719,8 @@ ixgb_setup_fc(struct ixgb_hw *hw)
/* Write the new settings */ /* Write the new settings */
IXGB_WRITE_REG(hw, CTRL0, ctrl_reg); IXGB_WRITE_REG(hw, CTRL0, ctrl_reg);
if (pap_reg != 0) { if (pap_reg != 0)
IXGB_WRITE_REG(hw, PAP, pap_reg); IXGB_WRITE_REG(hw, PAP, pap_reg);
}
/* Set the flow control receive threshold registers. Normally, /* Set the flow control receive threshold registers. Normally,
* these registers will be set to a default threshold that may be * these registers will be set to a default threshold that may be
...@@ -729,14 +728,14 @@ ixgb_setup_fc(struct ixgb_hw *hw) ...@@ -729,14 +728,14 @@ ixgb_setup_fc(struct ixgb_hw *hw)
* ability to transmit pause frames in not enabled, then these * ability to transmit pause frames in not enabled, then these
* registers will be set to 0. * registers will be set to 0.
*/ */
if(!(hw->fc.type & ixgb_fc_tx_pause)) { if (!(hw->fc.type & ixgb_fc_tx_pause)) {
IXGB_WRITE_REG(hw, FCRTL, 0); IXGB_WRITE_REG(hw, FCRTL, 0);
IXGB_WRITE_REG(hw, FCRTH, 0); IXGB_WRITE_REG(hw, FCRTH, 0);
} else { } else {
/* We need to set up the Receive Threshold high and low water /* We need to set up the Receive Threshold high and low water
* marks as well as (optionally) enabling the transmission of XON * marks as well as (optionally) enabling the transmission of XON
* frames. */ * frames. */
if(hw->fc.send_xon) { if (hw->fc.send_xon) {
IXGB_WRITE_REG(hw, FCRTL, IXGB_WRITE_REG(hw, FCRTL,
(hw->fc.low_water | IXGB_FCRTL_XONE)); (hw->fc.low_water | IXGB_FCRTL_XONE));
} else { } else {
...@@ -1007,7 +1006,7 @@ ixgb_clear_hw_cntrs(struct ixgb_hw *hw) ...@@ -1007,7 +1006,7 @@ ixgb_clear_hw_cntrs(struct ixgb_hw *hw)
DEBUGFUNC("ixgb_clear_hw_cntrs"); DEBUGFUNC("ixgb_clear_hw_cntrs");
/* if we are stopped or resetting exit gracefully */ /* if we are stopped or resetting exit gracefully */
if(hw->adapter_stopped) { if (hw->adapter_stopped) {
DEBUGOUT("Exiting because the adapter is stopped!!!\n"); DEBUGOUT("Exiting because the adapter is stopped!!!\n");
return; return;
} }
......
This diff is collapsed.
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#undef ASSERT #undef ASSERT
#define ASSERT(x) if(!(x)) BUG() #define ASSERT(x) if (!(x)) BUG()
#define MSGOUT(S, A, B) printk(KERN_DEBUG S "\n", A, B) #define MSGOUT(S, A, B) printk(KERN_DEBUG S "\n", A, B)
#ifdef DBG #ifdef DBG
......
...@@ -200,7 +200,7 @@ struct ixgb_option { ...@@ -200,7 +200,7 @@ struct ixgb_option {
static int __devinit static int __devinit
ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt) ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt)
{ {
if(*value == OPTION_UNSET) { if (*value == OPTION_UNSET) {
*value = opt->def; *value = opt->def;
return 0; return 0;
} }
...@@ -217,7 +217,7 @@ ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt) ...@@ -217,7 +217,7 @@ ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt)
} }
break; break;
case range_option: case range_option:
if(*value >= opt->arg.r.min && *value <= opt->arg.r.max) { if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) {
printk(KERN_INFO "%s set to %i\n", opt->name, *value); printk(KERN_INFO "%s set to %i\n", opt->name, *value);
return 0; return 0;
} }
...@@ -228,8 +228,8 @@ ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt) ...@@ -228,8 +228,8 @@ ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt)
for(i = 0; i < opt->arg.l.nr; i++) { for(i = 0; i < opt->arg.l.nr; i++) {
ent = &opt->arg.l.p[i]; ent = &opt->arg.l.p[i];
if(*value == ent->i) { if (*value == ent->i) {
if(ent->str[0] != '\0') if (ent->str[0] != '\0')
printk(KERN_INFO "%s\n", ent->str); printk(KERN_INFO "%s\n", ent->str);
return 0; return 0;
} }
...@@ -260,7 +260,7 @@ void __devinit ...@@ -260,7 +260,7 @@ void __devinit
ixgb_check_options(struct ixgb_adapter *adapter) ixgb_check_options(struct ixgb_adapter *adapter)
{ {
int bd = adapter->bd_number; int bd = adapter->bd_number;
if(bd >= IXGB_MAX_NIC) { if (bd >= IXGB_MAX_NIC) {
printk(KERN_NOTICE printk(KERN_NOTICE
"Warning: no configuration for board #%i\n", bd); "Warning: no configuration for board #%i\n", bd);
printk(KERN_NOTICE "Using defaults for all values\n"); printk(KERN_NOTICE "Using defaults for all values\n");
...@@ -277,7 +277,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -277,7 +277,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
}; };
struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; struct ixgb_desc_ring *tx_ring = &adapter->tx_ring;
if(num_TxDescriptors > bd) { if (num_TxDescriptors > bd) {
tx_ring->count = TxDescriptors[bd]; tx_ring->count = TxDescriptors[bd];
ixgb_validate_option(&tx_ring->count, &opt); ixgb_validate_option(&tx_ring->count, &opt);
} else { } else {
...@@ -296,7 +296,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -296,7 +296,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
}; };
struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; struct ixgb_desc_ring *rx_ring = &adapter->rx_ring;
if(num_RxDescriptors > bd) { if (num_RxDescriptors > bd) {
rx_ring->count = RxDescriptors[bd]; rx_ring->count = RxDescriptors[bd];
ixgb_validate_option(&rx_ring->count, &opt); ixgb_validate_option(&rx_ring->count, &opt);
} else { } else {
...@@ -312,7 +312,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -312,7 +312,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
.def = OPTION_ENABLED .def = OPTION_ENABLED
}; };
if(num_XsumRX > bd) { if (num_XsumRX > bd) {
unsigned int rx_csum = XsumRX[bd]; unsigned int rx_csum = XsumRX[bd];
ixgb_validate_option(&rx_csum, &opt); ixgb_validate_option(&rx_csum, &opt);
adapter->rx_csum = rx_csum; adapter->rx_csum = rx_csum;
...@@ -338,7 +338,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -338,7 +338,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
.p = fc_list }} .p = fc_list }}
}; };
if(num_FlowControl > bd) { if (num_FlowControl > bd) {
unsigned int fc = FlowControl[bd]; unsigned int fc = FlowControl[bd];
ixgb_validate_option(&fc, &opt); ixgb_validate_option(&fc, &opt);
adapter->hw.fc.type = fc; adapter->hw.fc.type = fc;
...@@ -356,7 +356,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -356,7 +356,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
.max = MAX_FCRTH}} .max = MAX_FCRTH}}
}; };
if(num_RxFCHighThresh > bd) { if (num_RxFCHighThresh > bd) {
adapter->hw.fc.high_water = RxFCHighThresh[bd]; adapter->hw.fc.high_water = RxFCHighThresh[bd];
ixgb_validate_option(&adapter->hw.fc.high_water, &opt); ixgb_validate_option(&adapter->hw.fc.high_water, &opt);
} else { } else {
...@@ -376,7 +376,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -376,7 +376,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
.max = MAX_FCRTL}} .max = MAX_FCRTL}}
}; };
if(num_RxFCLowThresh > bd) { if (num_RxFCLowThresh > bd) {
adapter->hw.fc.low_water = RxFCLowThresh[bd]; adapter->hw.fc.low_water = RxFCLowThresh[bd];
ixgb_validate_option(&adapter->hw.fc.low_water, &opt); ixgb_validate_option(&adapter->hw.fc.low_water, &opt);
} else { } else {
...@@ -396,7 +396,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -396,7 +396,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
.max = MAX_FCPAUSE}} .max = MAX_FCPAUSE}}
}; };
if(num_FCReqTimeout > bd) { if (num_FCReqTimeout > bd) {
unsigned int pause_time = FCReqTimeout[bd]; unsigned int pause_time = FCReqTimeout[bd];
ixgb_validate_option(&pause_time, &opt); ixgb_validate_option(&pause_time, &opt);
adapter->hw.fc.pause_time = pause_time; adapter->hw.fc.pause_time = pause_time;
...@@ -429,7 +429,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -429,7 +429,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
.max = MAX_RDTR}} .max = MAX_RDTR}}
}; };
if(num_RxIntDelay > bd) { if (num_RxIntDelay > bd) {
adapter->rx_int_delay = RxIntDelay[bd]; adapter->rx_int_delay = RxIntDelay[bd];
ixgb_validate_option(&adapter->rx_int_delay, &opt); ixgb_validate_option(&adapter->rx_int_delay, &opt);
} else { } else {
...@@ -446,7 +446,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -446,7 +446,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
.max = MAX_TIDV}} .max = MAX_TIDV}}
}; };
if(num_TxIntDelay > bd) { if (num_TxIntDelay > bd) {
adapter->tx_int_delay = TxIntDelay[bd]; adapter->tx_int_delay = TxIntDelay[bd];
ixgb_validate_option(&adapter->tx_int_delay, &opt); ixgb_validate_option(&adapter->tx_int_delay, &opt);
} else { } else {
...@@ -462,7 +462,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -462,7 +462,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
.def = OPTION_ENABLED .def = OPTION_ENABLED
}; };
if(num_IntDelayEnable > bd) { if (num_IntDelayEnable > bd) {
unsigned int ide = IntDelayEnable[bd]; unsigned int ide = IntDelayEnable[bd];
ixgb_validate_option(&ide, &opt); ixgb_validate_option(&ide, &opt);
adapter->tx_int_delay_enable = ide; adapter->tx_int_delay_enable = ide;
......
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