Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150721
b: refs/heads/master
c: 794caeb
h: refs/heads/master
i:
  150719: f39150c
v: v3
  • Loading branch information
Peter P Waskiewicz Jr authored and David S. Miller committed Jun 7, 2009
1 parent bafd6e5 commit 0cc0677
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae540af18597a441bf17a26389179465ea4b9c36
refs/heads/master: 794caeb259bc5d341bcc80dd37820073147a231c
58 changes: 55 additions & 3 deletions trunk/drivers/net/ixgbe/ixgbe_82599.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ s32 ixgbe_clear_vfta_82599(struct ixgbe_hw *hw);
s32 ixgbe_init_uta_tables_82599(struct ixgbe_hw *hw);
s32 ixgbe_read_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 *val);
s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val);
s32 ixgbe_start_hw_rev_0_82599(struct ixgbe_hw *hw);
s32 ixgbe_identify_phy_82599(struct ixgbe_hw *hw);
s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw);
u32 ixgbe_get_supported_physical_layer_82599(struct ixgbe_hw *hw);
static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw);

void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
{
Expand Down Expand Up @@ -2142,8 +2142,9 @@ s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val)
s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw)
{
u32 q_num;
s32 ret_val;

ixgbe_start_hw_generic(hw);
ret_val = ixgbe_start_hw_generic(hw);

/* Clear the rate limiters */
for (q_num = 0; q_num < hw->mac.max_tx_queues; q_num++) {
Expand All @@ -2155,7 +2156,10 @@ s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw)
/* We need to run link autotry after the driver loads */
hw->mac.autotry_restart = true;

return 0;
if (ret_val == 0)
ret_val = ixgbe_verify_fw_version_82599(hw);

return ret_val;
}

/**
Expand Down Expand Up @@ -2407,6 +2411,54 @@ s32 ixgbe_get_san_mac_addr_82599(struct ixgbe_hw *hw, u8 *san_mac_addr)
return 0;
}

/**
* ixgbe_verify_fw_version_82599 - verify fw version for 82599
* @hw: pointer to hardware structure
*
* Verifies that installed the firmware version is 0.6 or higher
* for SFI devices. All 82599 SFI devices should have version 0.6 or higher.
*
* Returns IXGBE_ERR_EEPROM_VERSION if the FW is not present or
* if the FW version is not supported.
**/
static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw)
{
s32 status = IXGBE_ERR_EEPROM_VERSION;
u16 fw_offset, fw_ptp_cfg_offset;
u16 fw_version = 0;

/* firmware check is only necessary for SFI devices */
if (hw->phy.media_type != ixgbe_media_type_fiber) {
status = 0;
goto fw_version_out;
}

/* get the offset to the Firmware Module block */
hw->eeprom.ops.read(hw, IXGBE_FW_PTR, &fw_offset);

if ((fw_offset == 0) || (fw_offset == 0xFFFF))
goto fw_version_out;

/* get the offset to the Pass Through Patch Configuration block */
hw->eeprom.ops.read(hw, (fw_offset +
IXGBE_FW_PASSTHROUGH_PATCH_CONFIG_PTR),
&fw_ptp_cfg_offset);

if ((fw_ptp_cfg_offset == 0) || (fw_ptp_cfg_offset == 0xFFFF))
goto fw_version_out;

/* get the firmware version */
hw->eeprom.ops.read(hw, (fw_ptp_cfg_offset +
IXGBE_FW_PATCH_VERSION_4),
&fw_version);

if (fw_version > 0x5)
status = 0;

fw_version_out:
return status;
}

static struct ixgbe_mac_operations mac_ops_82599 = {
.init_hw = &ixgbe_init_hw_generic,
.reset_hw = &ixgbe_reset_hw_82599,
Expand Down
12 changes: 8 additions & 4 deletions trunk/drivers/net/ixgbe/ixgbe_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,17 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)
**/
s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw)
{
s32 status;

/* Reset the hardware */
hw->mac.ops.reset_hw(hw);
status = hw->mac.ops.reset_hw(hw);

/* Start the HW */
hw->mac.ops.start_hw(hw);
if (status == 0) {
/* Start the HW */
status = hw->mac.ops.start_hw(hw);
}

return 0;
return status;
}

/**
Expand Down
20 changes: 19 additions & 1 deletion trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2728,6 +2728,15 @@ void ixgbe_reset(struct ixgbe_adapter *adapter)
case IXGBE_ERR_MASTER_REQUESTS_PENDING:
dev_err(&adapter->pdev->dev, "master disable timed out\n");
break;
case IXGBE_ERR_EEPROM_VERSION:
/* We are running on a pre-production device, log a warning */
dev_warn(&adapter->pdev->dev, "This device is a pre-production "
"adapter/LOM. Please be aware there may be issues "
"associated with your hardware. If you are "
"experiencing problems please contact your Intel or "
"hardware representative who provided you with this "
"hardware.\n");
break;
default:
dev_err(&adapter->pdev->dev, "Hardware Error: %d\n", err);
}
Expand Down Expand Up @@ -5608,8 +5617,17 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
hw->eeprom.ops.read(hw, 0x29, &adapter->eeprom_version);

/* reset the hardware with the new settings */
hw->mac.ops.start_hw(hw);
err = hw->mac.ops.start_hw(hw);

if (err == IXGBE_ERR_EEPROM_VERSION) {
/* We are running on a pre-production device, log a warning */
dev_warn(&pdev->dev, "This device is a pre-production "
"adapter/LOM. Please be aware there may be issues "
"associated with your hardware. If you are "
"experiencing problems please contact your Intel or "
"hardware representative who provided you with this "
"hardware.\n");
}
strcpy(netdev->name, "eth%d");
err = register_netdev(netdev);
if (err)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/ixgbe/ixgbe_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,8 @@
#define IXGBE_SAN_MAC_ADDR_PORT1_OFFSET 0x3
#define IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP 0x1
#define IXGBE_DEVICE_CAPS_FCOE_OFFLOADS 0x2
#define IXGBE_FW_PASSTHROUGH_PATCH_CONFIG_PTR 0x4
#define IXGBE_FW_PATCH_VERSION_4 0x7

/* PCI Bus Info */
#define IXGBE_PCI_LINK_STATUS 0xB2
Expand Down Expand Up @@ -2495,6 +2497,7 @@ struct ixgbe_info {
#define IXGBE_ERR_SFP_NOT_PRESENT -20
#define IXGBE_ERR_SFP_NO_INIT_SEQ_PRESENT -21
#define IXGBE_ERR_FDIR_REINIT_FAILED -23
#define IXGBE_ERR_EEPROM_VERSION -24
#define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF

#endif /* _IXGBE_TYPE_H_ */

0 comments on commit 0cc0677

Please sign in to comment.