Commit d8d96caa authored by Ganesh Venkatesan's avatar Ganesh Venkatesan Committed by Jeff Garzik

[PATCH] ixgb: White space corrections

Signed-off-by: default avatarGanesh Venkatesan <ganesh.venkatesan@intel.com>
parent 0acd99c0
This diff is collapsed.
...@@ -103,7 +103,7 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ...@@ -103,7 +103,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 {
...@@ -119,7 +119,7 @@ static int ...@@ -119,7 +119,7 @@ static int
ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
{ {
struct ixgb_adapter *adapter = netdev->priv; struct ixgb_adapter *adapter = netdev->priv;
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;
...@@ -469,7 +469,7 @@ ixgb_set_eeprom(struct net_device *netdev, ...@@ -469,7 +469,7 @@ ixgb_set_eeprom(struct net_device *netdev,
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]
...@@ -481,7 +481,7 @@ ixgb_set_eeprom(struct net_device *netdev, ...@@ -481,7 +481,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);
...@@ -586,11 +586,12 @@ ixgb_set_ringparam(struct net_device *netdev, ...@@ -586,11 +586,12 @@ ixgb_set_ringparam(struct net_device *netdev,
/* bit defines for adapter->led_status */ /* bit defines for adapter->led_status */
#define IXGB_LED_ON 0 #define IXGB_LED_ON 0
static void ixgb_led_blink_callback(unsigned long data) static void
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);
......
This diff is collapsed.
...@@ -789,32 +789,39 @@ extern void ixgb_check_for_link(struct ixgb_hw *hw); ...@@ -789,32 +789,39 @@ extern void ixgb_check_for_link(struct ixgb_hw *hw);
extern boolean_t ixgb_check_for_bad_link(struct ixgb_hw *hw); extern boolean_t ixgb_check_for_bad_link(struct ixgb_hw *hw);
extern boolean_t ixgb_setup_fc(struct ixgb_hw *hw); extern boolean_t ixgb_setup_fc(struct ixgb_hw *hw);
extern void ixgb_clear_hw_cntrs(struct ixgb_hw *hw); extern void ixgb_clear_hw_cntrs(struct ixgb_hw *hw);
extern boolean_t mac_addr_valid(uint8_t * mac_addr); extern boolean_t mac_addr_valid(uint8_t *mac_addr);
extern uint16_t ixgb_read_phy_reg(struct ixgb_hw *hw, extern uint16_t ixgb_read_phy_reg(struct ixgb_hw *hw,
uint32_t reg_addr, uint32_t reg_addr,
uint32_t phy_addr, uint32_t device_type); uint32_t phy_addr,
uint32_t device_type);
extern void ixgb_write_phy_reg(struct ixgb_hw *hw, extern void ixgb_write_phy_reg(struct ixgb_hw *hw,
uint32_t reg_addr, uint32_t reg_addr,
uint32_t phy_addr, uint32_t phy_addr,
uint32_t device_type, uint16_t data); uint32_t device_type,
uint16_t data);
extern void ixgb_rar_set(struct ixgb_hw *hw,
uint8_t *addr,
uint32_t index);
extern void ixgb_rar_set(struct ixgb_hw *hw, uint8_t * addr, uint32_t index);
/* Filters (multicast, vlan, receive) */ /* Filters (multicast, vlan, receive) */
extern void ixgb_mc_addr_list_update(struct ixgb_hw *hw, extern void ixgb_mc_addr_list_update(struct ixgb_hw *hw,
uint8_t * mc_addr_list, uint8_t *mc_addr_list,
uint32_t mc_addr_count, uint32_t pad); uint32_t mc_addr_count,
uint32_t pad);
/* Vfta functions */ /* Vfta functions */
extern void ixgb_write_vfta(struct ixgb_hw *hw, extern void ixgb_write_vfta(struct ixgb_hw *hw,
uint32_t offset, uint32_t value); uint32_t offset,
uint32_t value);
extern void ixgb_clear_vfta(struct ixgb_hw *hw); extern void ixgb_clear_vfta(struct ixgb_hw *hw);
/* Access functions to eeprom data */ /* Access functions to eeprom data */
void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t * mac_addr); void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t *mac_addr);
uint16_t ixgb_get_ee_compatibility(struct ixgb_hw *hw); uint16_t ixgb_get_ee_compatibility(struct ixgb_hw *hw);
uint32_t ixgb_get_ee_pba_number(struct ixgb_hw *hw); uint32_t ixgb_get_ee_pba_number(struct ixgb_hw *hw);
uint16_t ixgb_get_ee_init_ctrl_reg_1(struct ixgb_hw *hw); uint16_t ixgb_get_ee_init_ctrl_reg_1(struct ixgb_hw *hw);
...@@ -832,6 +839,9 @@ uint16_t ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index); ...@@ -832,6 +839,9 @@ uint16_t ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index);
/* Everything else */ /* Everything else */
void ixgb_led_on(struct ixgb_hw *hw); void ixgb_led_on(struct ixgb_hw *hw);
void ixgb_led_off(struct ixgb_hw *hw); void ixgb_led_off(struct ixgb_hw *hw);
void ixgb_write_pci_cfg(struct ixgb_hw *hw, uint32_t reg, uint16_t * value); void ixgb_write_pci_cfg(struct ixgb_hw *hw,
uint32_t reg,
uint16_t * value);
#endif /* _IXGB_HW_H_ */ #endif /* _IXGB_HW_H_ */
...@@ -36,19 +36,13 @@ ...@@ -36,19 +36,13 @@
#define INTEL_VENDOR_ID 0x8086 #define INTEL_VENDOR_ID 0x8086
#define INTEL_SUBVENDOR_ID 0x8086 #define INTEL_SUBVENDOR_ID 0x8086
#define IXGB_DEVICE_ID_82597EX 0x1048 #define IXGB_DEVICE_ID_82597EX 0x1048
#define IXGB_DEVICE_ID_82597EX_SR 0x1A48 #define IXGB_DEVICE_ID_82597EX_SR 0x1A48
#define IXGB_DEVICE_ID_82597EX_LR 0x1B48
#define IXGB_SUBDEVICE_ID_A11F 0xA11F #define IXGB_SUBDEVICE_ID_A11F 0xA11F
#define IXGB_SUBDEVICE_ID_A01F 0xA01F #define IXGB_SUBDEVICE_ID_A01F 0xA01F
#define IXGB_SUBDEVICE_ID_A15F 0xA15F
#define IXGB_SUBDEVICE_ID_A05F 0xA05F
#define IXGB_SUBDEVICE_ID_A12F 0xA12F
#define IXGB_SUBDEVICE_ID_A02F 0xA02F
#define IXGB_DEVICE_ID_82597EX_LR 0x1B48
#endif /* #ifndef _IXGB_IDS_H_ */ #endif /* #ifndef _IXGB_IDS_H_ */
/* End of File */ /* End of File */
This diff is collapsed.
...@@ -198,9 +198,10 @@ struct ixgb_option { ...@@ -198,9 +198,10 @@ struct ixgb_option {
} arg; } arg;
}; };
static int __devinit ixgb_validate_option(int *value, struct ixgb_option *opt) static int __devinit
ixgb_validate_option(int *value, struct ixgb_option *opt)
{ {
if (*value == OPTION_UNSET) { if(*value == OPTION_UNSET) {
*value = opt->def; *value = opt->def;
return 0; return 0;
} }
...@@ -217,21 +218,20 @@ static int __devinit ixgb_validate_option(int *value, struct ixgb_option *opt) ...@@ -217,21 +218,20 @@ static int __devinit ixgb_validate_option(int *value, 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;
} }
break; break;
case list_option:{ case list_option: {
int i; int i;
struct ixgb_opt_list *ent; struct ixgb_opt_list *ent;
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", printk(KERN_INFO "%s\n", ent->str);
ent->str);
return 0; return 0;
} }
} }
...@@ -259,14 +259,14 @@ static int __devinit ixgb_validate_option(int *value, struct ixgb_option *opt) ...@@ -259,14 +259,14 @@ static int __devinit ixgb_validate_option(int *value, struct ixgb_option *opt)
* in a variable in the adapter structure. * in a variable in the adapter structure.
**/ **/
void __devinit ixgb_check_options(struct ixgb_adapter *adapter) void __devinit
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");
bd = IXGB_MAX_NIC;
} }
{ /* Transmit Descriptor Count */ { /* Transmit Descriptor Count */
...@@ -275,7 +275,7 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -275,7 +275,7 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
.name = "Transmit Descriptors", .name = "Transmit Descriptors",
.err = "using default of " __MODULE_STRING(DEFAULT_TXD), .err = "using default of " __MODULE_STRING(DEFAULT_TXD),
.def = DEFAULT_TXD, .def = DEFAULT_TXD,
.arg = {.r = {.min = MIN_TXD, .arg = { .r = { .min = MIN_TXD,
.max = MAX_TXD}} .max = MAX_TXD}}
}; };
struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; struct ixgb_desc_ring *tx_ring = &adapter->tx_ring;
...@@ -294,7 +294,7 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -294,7 +294,7 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
.name = "Receive Descriptors", .name = "Receive Descriptors",
.err = "using default of " __MODULE_STRING(DEFAULT_RXD), .err = "using default of " __MODULE_STRING(DEFAULT_RXD),
.def = DEFAULT_RXD, .def = DEFAULT_RXD,
.arg = {.r = {.min = MIN_RXD, .arg = { .r = { .min = MIN_RXD,
.max = MAX_RXD}} .max = MAX_RXD}}
}; };
struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; struct ixgb_desc_ring *rx_ring = &adapter->rx_ring;
...@@ -326,20 +326,19 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -326,20 +326,19 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
{ /* Flow Control */ { /* Flow Control */
struct ixgb_opt_list fc_list[] = struct ixgb_opt_list fc_list[] =
{ {ixgb_fc_none, "Flow Control Disabled"}, {{ ixgb_fc_none, "Flow Control Disabled" },
{ixgb_fc_rx_pause, "Flow Control Receive Only"}, { ixgb_fc_rx_pause,"Flow Control Receive Only" },
{ixgb_fc_tx_pause, "Flow Control Transmit Only"}, { ixgb_fc_tx_pause,"Flow Control Transmit Only" },
{ixgb_fc_full, "Flow Control Enabled"}, { ixgb_fc_full, "Flow Control Enabled" },
{ixgb_fc_default, "Flow Control Hardware Default"} { ixgb_fc_default, "Flow Control Hardware Default" }};
};
struct ixgb_option opt = { struct ixgb_option opt = {
.type = list_option, .type = list_option,
.name = "Flow Control", .name = "Flow Control",
.err = "reading default settings from EEPROM", .err = "reading default settings from EEPROM",
.def = ixgb_fc_full, .def = ixgb_fc_full,
.arg = {.l = {.nr = LIST_LEN(fc_list), .arg = { .l = { .nr = LIST_LEN(fc_list),
.p = fc_list}} .p = fc_list }}
}; };
if(num_FlowControl > bd) { if(num_FlowControl > bd) {
...@@ -354,10 +353,9 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -354,10 +353,9 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
struct ixgb_option opt = { struct ixgb_option opt = {
.type = range_option, .type = range_option,
.name = "Rx Flow Control High Threshold", .name = "Rx Flow Control High Threshold",
.err = .err = "using default of " __MODULE_STRING(DEFAULT_FCRTH),
"using default of " __MODULE_STRING(DEFAULT_FCRTH),
.def = DEFAULT_FCRTH, .def = DEFAULT_FCRTH,
.arg = {.r = {.min = MIN_FCRTH, .arg = { .r = { .min = MIN_FCRTH,
.max = MAX_FCRTH}} .max = MAX_FCRTH}}
}; };
...@@ -375,10 +373,9 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -375,10 +373,9 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
struct ixgb_option opt = { struct ixgb_option opt = {
.type = range_option, .type = range_option,
.name = "Rx Flow Control Low Threshold", .name = "Rx Flow Control Low Threshold",
.err = .err = "using default of " __MODULE_STRING(DEFAULT_FCRTL),
"using default of " __MODULE_STRING(DEFAULT_FCRTL),
.def = DEFAULT_FCRTL, .def = DEFAULT_FCRTL,
.arg = {.r = {.min = MIN_FCRTL, .arg = { .r = { .min = MIN_FCRTL,
.max = MAX_FCRTL}} .max = MAX_FCRTL}}
}; };
...@@ -392,15 +389,13 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -392,15 +389,13 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
printk (KERN_INFO printk (KERN_INFO
"Ignoring RxFCLowThresh when no RxFC\n"); "Ignoring RxFCLowThresh when no RxFC\n");
} }
{ /* Flow Control Pause Time Request */ { /* Flow Control Pause Time Request*/
struct ixgb_option opt = { struct ixgb_option opt = {
.type = range_option, .type = range_option,
.name = "Flow Control Pause Time Request", .name = "Flow Control Pause Time Request",
.err = .err = "using default of "__MODULE_STRING(DEFAULT_FCPAUSE),
"using default of "
__MODULE_STRING(DEFAULT_FCPAUSE),
.def = DEFAULT_FCPAUSE, .def = DEFAULT_FCPAUSE,
.arg = {.r = {.min = MIN_FCPAUSE, .arg = { .r = { .min = MIN_FCPAUSE,
.max = MAX_FCPAUSE}} .max = MAX_FCPAUSE}}
}; };
...@@ -420,7 +415,7 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -420,7 +415,7 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
/* high must be greater than low */ /* high must be greater than low */
if (adapter->hw.fc.high_water < (adapter->hw.fc.low_water + 8)) { if (adapter->hw.fc.high_water < (adapter->hw.fc.low_water + 8)) {
/* set defaults */ /* set defaults */
printk(KERN_INFO printk (KERN_INFO
"RxFCHighThresh must be >= (RxFCLowThresh + 8), " "RxFCHighThresh must be >= (RxFCLowThresh + 8), "
"Using Defaults\n"); "Using Defaults\n");
adapter->hw.fc.high_water = DEFAULT_FCRTH; adapter->hw.fc.high_water = DEFAULT_FCRTH;
...@@ -431,10 +426,9 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -431,10 +426,9 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
struct ixgb_option opt = { struct ixgb_option opt = {
.type = range_option, .type = range_option,
.name = "Receive Interrupt Delay", .name = "Receive Interrupt Delay",
.err = .err = "using default of " __MODULE_STRING(DEFAULT_RDTR),
"using default of " __MODULE_STRING(DEFAULT_RDTR),
.def = DEFAULT_RDTR, .def = DEFAULT_RDTR,
.arg = {.r = {.min = MIN_RDTR, .arg = { .r = { .min = MIN_RDTR,
.max = MAX_RDTR}} .max = MAX_RDTR}}
}; };
...@@ -449,10 +443,9 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter) ...@@ -449,10 +443,9 @@ void __devinit ixgb_check_options(struct ixgb_adapter *adapter)
struct ixgb_option opt = { struct ixgb_option opt = {
.type = range_option, .type = range_option,
.name = "Transmit Interrupt Delay", .name = "Transmit Interrupt Delay",
.err = .err = "using default of " __MODULE_STRING(DEFAULT_TIDV),
"using default of " __MODULE_STRING(DEFAULT_TIDV),
.def = DEFAULT_TIDV, .def = DEFAULT_TIDV,
.arg = {.r = {.min = MIN_TIDV, .arg = { .r = { .min = MIN_TIDV,
.max = MAX_TIDV}} .max = MAX_TIDV}}
}; };
......
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