Lines Matching defs:wx

18  *  @wx: pointer to hardware structure
23 int txgbe_disable_sec_tx_path(struct wx *wx)
27 wr32m(wx, WX_TSC_CTL, WX_TSC_CTL_TX_DIS, WX_TSC_CTL_TX_DIS);
29 1000, 20000, false, wx, WX_TSC_ST);
34 * @wx: pointer to hardware structure
38 void txgbe_enable_sec_tx_path(struct wx *wx)
40 wr32m(wx, WX_TSC_CTL, WX_TSC_CTL_TX_DIS, 0);
41 WX_WRITE_FLUSH(wx);
46 * @wx: pointer to hardware structure
51 static void txgbe_init_thermal_sensor_thresh(struct wx *wx)
53 struct wx_thermal_sensor_data *data = &wx->mac.sensor;
58 if (wx->bus.func)
61 wr32(wx, TXGBE_TS_CTL, TXGBE_TS_CTL_EVAL_MD);
63 wr32(wx, WX_TS_INT_EN,
65 wr32(wx, WX_TS_EN, WX_TS_EN_ENA);
68 wr32(wx, WX_TS_ALARM_THRE, 677);
70 wr32(wx, WX_TS_DALARM_THRE, 614);
75 * @wx: pointer to hardware structure
80 static int txgbe_calc_eeprom_checksum(struct wx *wx, u16 *checksum)
87 wx_init_eeprom_params(wx);
94 status = wx_read_ee_hostif_buffer(wx, 0, TXGBE_EEPROM_LAST_WORD, eeprom_ptrs);
96 wx_err(wx, "Failed to read EEPROM image\n");
103 if (i != wx->eeprom.sw_region_offset + TXGBE_EEPROM_CHECKSUM)
116 * @wx: pointer to hardware structure
122 int txgbe_validate_eeprom_checksum(struct wx *wx, u16 *checksum_val)
132 status = wx_read_ee_hostif(wx, 0, &checksum);
134 wx_err(wx, "EEPROM read failed\n");
139 status = txgbe_calc_eeprom_checksum(wx, &checksum);
143 status = wx_read_ee_hostif(wx, wx->eeprom.sw_region_offset +
153 wx_err(wx, "Invalid EEPROM checksum\n");
163 static void txgbe_reset_misc(struct wx *wx)
165 wx_reset_misc(wx);
166 txgbe_init_thermal_sensor_thresh(wx);
171 * @wx: pointer to wx structure
177 int txgbe_reset_hw(struct wx *wx)
182 status = wx_stop_adapter(wx);
186 if (wx->media_type != sp_media_copper) {
189 val = WX_MIS_RST_LAN_RST(wx->bus.func);
190 wr32(wx, WX_MIS_RST, val | rd32(wx, WX_MIS_RST));
191 WX_WRITE_FLUSH(wx);
195 status = wx_check_flash_load(wx, TXGBE_SPI_ILDR_STATUS_LAN_SW_RST(wx->bus.func));
199 txgbe_reset_misc(wx);
201 wx_clear_hw_cntrs(wx);
204 wx_get_mac_addr(wx, wx->mac.perm_addr);
210 wx->mac.num_rar_entries = TXGBE_SP_RAR_ENTRIES;
211 wx_init_rx_addrs(wx);
213 pci_set_master(wx->pdev);