summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe/ixgbe_phy.c
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2008-07-30 18:15:18 +0000
committerjfv <jfv@FreeBSD.org>2008-07-30 18:15:18 +0000
commit6cfc47d2bdeb65da7831a9d200a136973967c8f4 (patch)
tree074d02c68ee1ec77108bc790582e1c4eb9b95287 /sys/dev/ixgbe/ixgbe_phy.c
parent7fe3be07e011469d1b4c35c6bb275a7fcff37856 (diff)
downloadFreeBSD-src-6cfc47d2bdeb65da7831a9d200a136973967c8f4.zip
FreeBSD-src-6cfc47d2bdeb65da7831a9d200a136973967c8f4.tar.gz
This updates the ixgbe driver to Intel internal version 1.4.7
Shared code changes, core driver fixes, vlan event/filter support Also Kip Macy's fix to allow any number of queues, thanks Kip!
Diffstat (limited to 'sys/dev/ixgbe/ixgbe_phy.c')
-rw-r--r--sys/dev/ixgbe/ixgbe_phy.c146
1 files changed, 0 insertions, 146 deletions
diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c
index 134e310..37c78eb 100644
--- a/sys/dev/ixgbe/ixgbe_phy.c
+++ b/sys/dev/ixgbe/ixgbe_phy.c
@@ -151,9 +151,6 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
case QT2022_PHY_ID:
phy_type = ixgbe_phy_qt;
break;
- case ATH_PHY_ID:
- phy_type = ixgbe_phy_nl;
- break;
default:
phy_type = ixgbe_phy_unknown;
break;
@@ -526,146 +523,3 @@ s32 ixgbe_get_phy_firmware_version_tnx(struct ixgbe_hw *hw,
return status;
}
-/**
- * ixgbe_reset_phy_nl - Performs a PHY reset
- * @hw: pointer to hardware structure
- **/
-s32 ixgbe_reset_phy_nl(struct ixgbe_hw *hw)
-{
- u16 phy_offset, control, eword, edata, list_crc, block_crc, id, sfp_id;
- bool end_data = FALSE;
- u16 list_offset, data_offset;
- u16 phy_data = 0;
- s32 ret_val = IXGBE_SUCCESS;
- u32 i;
-
- hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_XS_CONTROL,
- IXGBE_MDIO_PHY_XS_DEV_TYPE, &phy_data);
-
- /* reset the PHY and poll for completion */
- hw->phy.ops.write_reg(hw, IXGBE_MDIO_PHY_XS_CONTROL,
- IXGBE_MDIO_PHY_XS_DEV_TYPE,
- (phy_data | IXGBE_MDIO_PHY_XS_RESET));
-
- for (i = 0; i < 100; i++) {
- hw->phy.ops.read_reg(hw, IXGBE_MDIO_PHY_XS_CONTROL,
- IXGBE_MDIO_PHY_XS_DEV_TYPE, &phy_data);
- if ((phy_data & IXGBE_MDIO_PHY_XS_RESET) == 0 )
- break;
- msec_delay(10);
- }
-
- if ((phy_data & IXGBE_MDIO_PHY_XS_RESET) != 0) {
- DEBUGOUT("PHY reset did not complete.\n");
- ret_val = IXGBE_ERR_PHY;
- goto out;
- }
-
- /* read offset to PHY init contents */
- hw->eeprom.ops.read(hw, IXGBE_PHY_INIT_OFFSET_NL, &list_offset);
-
- if ((!list_offset) || (list_offset == 0xFFFF)) {
- ret_val = IXGBE_ERR_PHY;
- goto out;
- }
-
- /* Acquire the CRC */
- hw->eeprom.ops.read(hw, list_offset, &list_crc);
-
- /* Shift offset to first ID word */
- list_offset++;
-
- /* determine the sfp sequence based on device ID */
- switch (hw->device_id) {
- case IXGBE_DEV_ID_82598_DA_DUAL_PORT:
- sfp_id = 0;
- break;
- case IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM:
- sfp_id = 1;
- break;
- default:
- ret_val = IXGBE_ERR_PHY;
- goto out;
- }
-
- /*
- * Find the matching sfp ID in the EEPROM
- * and program the init sequence
- */
- hw->eeprom.ops.read(hw, list_offset, &id);
-
- while (!((id == IXGBE_CONTROL_EOL_NL) || (end_data == TRUE))) {
- if (id == sfp_id) {
- list_offset++;
- hw->eeprom.ops.read(hw, list_offset, &data_offset);
- if ((!data_offset) || (data_offset == 0xFFFF))
- break;
- ret_val = hw->eeprom.ops.read(hw, data_offset,
- &block_crc);
- data_offset++;
- while (!end_data) {
- /*
- * Read control word from PHY init contents
- * offset
- */
- ret_val = hw->eeprom.ops.read(hw, data_offset,
- &eword);
- control = (eword & IXGBE_CONTROL_MASK_NL) >>
- IXGBE_CONTROL_SHIFT_NL;
- edata = eword & IXGBE_DATA_MASK_NL;
- switch (control) {
- case IXGBE_DELAY_NL:
- data_offset++;
- DEBUGOUT1("DELAY: %d MS\n", edata);
- msec_delay(edata);
- break;
- case IXGBE_DATA_NL:
- DEBUGOUT("DATA: \n");
- data_offset++;
- hw->eeprom.ops.read(hw, data_offset++,
- &phy_offset);
- for (i = 0; i < edata; i++) {
- hw->eeprom.ops.read(hw,
- data_offset,
- &eword);
- hw->phy.ops.write_reg(hw,
- phy_offset,
- IXGBE_TWINAX_DEV,
- eword);
- DEBUGOUT2("Wrote %4.4x to %4.4x\n",
- eword, phy_offset);
- data_offset++;
- phy_offset++;
- }
- break;
- case IXGBE_CONTROL_NL:
- data_offset++;
- DEBUGOUT("CONTROL: \n");
- if (edata == IXGBE_CONTROL_EOL_NL) {
- DEBUGOUT("EOL\n");
- end_data = TRUE;
- } else if (edata == IXGBE_CONTROL_SOL_NL) {
- DEBUGOUT("SOL\n");
- } else {
- DEBUGOUT("Bad control value\n");
- ret_val = IXGBE_ERR_PHY;
- goto out;
- }
- break;
- default:
- DEBUGOUT("Bad control type\n");
- ret_val = IXGBE_ERR_PHY;
- goto out;
- }
- }
- } else {
- list_offset += 2;
- ret_val = hw->eeprom.ops.read(hw, list_offset, &id);
- if (ret_val)
- goto out;
- }
- }
-
-out:
- return ret_val;
-}
OpenPOWER on IntegriCloud