Lines Matching full:adapter
26 #define LAN743X_CSR_READ_OP(offset) lan743x_csr_read(adapter, offset)
28 static int lan743x_otp_power_up(struct lan743x_adapter *adapter) in lan743x_otp_power_up() argument
32 reg_value = lan743x_csr_read(adapter, OTP_PWR_DN); in lan743x_otp_power_up()
37 lan743x_csr_write(adapter, OTP_PWR_DN, reg_value); in lan743x_otp_power_up()
45 static void lan743x_otp_power_down(struct lan743x_adapter *adapter) in lan743x_otp_power_down() argument
49 reg_value = lan743x_csr_read(adapter, OTP_PWR_DN); in lan743x_otp_power_down()
53 lan743x_csr_write(adapter, OTP_PWR_DN, reg_value); in lan743x_otp_power_down()
57 static void lan743x_otp_set_address(struct lan743x_adapter *adapter, in lan743x_otp_set_address() argument
60 lan743x_csr_write(adapter, OTP_ADDR_HIGH, (address >> 8) & 0x03); in lan743x_otp_set_address()
61 lan743x_csr_write(adapter, OTP_ADDR_LOW, address & 0xFF); in lan743x_otp_set_address()
64 static void lan743x_otp_read_go(struct lan743x_adapter *adapter) in lan743x_otp_read_go() argument
66 lan743x_csr_write(adapter, OTP_FUNC_CMD, OTP_FUNC_CMD_READ_); in lan743x_otp_read_go()
67 lan743x_csr_write(adapter, OTP_CMD_GO, OTP_CMD_GO_GO_); in lan743x_otp_read_go()
70 static int lan743x_otp_wait_till_not_busy(struct lan743x_adapter *adapter) in lan743x_otp_wait_till_not_busy() argument
78 netif_warn(adapter, drv, adapter->netdev, in lan743x_otp_wait_till_not_busy()
83 reg_val = lan743x_csr_read(adapter, OTP_STATUS); in lan743x_otp_wait_till_not_busy()
89 static int lan743x_otp_read(struct lan743x_adapter *adapter, u32 offset, in lan743x_otp_read() argument
98 ret = lan743x_otp_power_up(adapter); in lan743x_otp_read()
102 ret = lan743x_otp_wait_till_not_busy(adapter); in lan743x_otp_read()
107 lan743x_otp_set_address(adapter, offset + i); in lan743x_otp_read()
109 lan743x_otp_read_go(adapter); in lan743x_otp_read()
110 ret = lan743x_otp_wait_till_not_busy(adapter); in lan743x_otp_read()
113 data[i] = lan743x_csr_read(adapter, OTP_READ_DATA); in lan743x_otp_read()
116 lan743x_otp_power_down(adapter); in lan743x_otp_read()
121 static int lan743x_otp_write(struct lan743x_adapter *adapter, u32 offset, in lan743x_otp_write() argument
130 ret = lan743x_otp_power_up(adapter); in lan743x_otp_write()
134 ret = lan743x_otp_wait_till_not_busy(adapter); in lan743x_otp_write()
139 lan743x_csr_write(adapter, OTP_PRGM_MODE, OTP_PRGM_MODE_BYTE_); in lan743x_otp_write()
142 lan743x_otp_set_address(adapter, offset + i); in lan743x_otp_write()
144 lan743x_csr_write(adapter, OTP_PRGM_DATA, data[i]); in lan743x_otp_write()
145 lan743x_csr_write(adapter, OTP_TST_CMD, OTP_TST_CMD_PRGVRFY_); in lan743x_otp_write()
146 lan743x_csr_write(adapter, OTP_CMD_GO, OTP_CMD_GO_GO_); in lan743x_otp_write()
148 ret = lan743x_otp_wait_till_not_busy(adapter); in lan743x_otp_write()
153 lan743x_otp_power_down(adapter); in lan743x_otp_write()
158 int lan743x_hs_syslock_acquire(struct lan743x_adapter *adapter, in lan743x_hs_syslock_acquire() argument
165 spin_lock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_acquire()
166 if (adapter->eth_syslock_acquire_cnt == 0) { in lan743x_hs_syslock_acquire()
167 lan743x_csr_write(adapter, ETH_SYSTEM_SYS_LOCK_REG, in lan743x_hs_syslock_acquire()
169 val = lan743x_csr_read(adapter, in lan743x_hs_syslock_acquire()
172 adapter->eth_syslock_acquire_cnt++; in lan743x_hs_syslock_acquire()
173 WARN_ON(adapter->eth_syslock_acquire_cnt == 0); in lan743x_hs_syslock_acquire()
174 spin_unlock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_acquire()
178 adapter->eth_syslock_acquire_cnt++; in lan743x_hs_syslock_acquire()
179 WARN_ON(adapter->eth_syslock_acquire_cnt == 0); in lan743x_hs_syslock_acquire()
180 spin_unlock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_acquire()
184 spin_unlock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_acquire()
195 void lan743x_hs_syslock_release(struct lan743x_adapter *adapter) in lan743x_hs_syslock_release() argument
199 spin_lock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_release()
200 WARN_ON(adapter->eth_syslock_acquire_cnt == 0); in lan743x_hs_syslock_release()
202 if (adapter->eth_syslock_acquire_cnt) { in lan743x_hs_syslock_release()
203 adapter->eth_syslock_acquire_cnt--; in lan743x_hs_syslock_release()
204 if (adapter->eth_syslock_acquire_cnt == 0) { in lan743x_hs_syslock_release()
205 lan743x_csr_write(adapter, ETH_SYSTEM_SYS_LOCK_REG, 0); in lan743x_hs_syslock_release()
206 val = lan743x_csr_read(adapter, in lan743x_hs_syslock_release()
212 spin_unlock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_release()
215 static void lan743x_hs_otp_power_up(struct lan743x_adapter *adapter) in lan743x_hs_otp_power_up() argument
219 reg_value = lan743x_csr_read(adapter, HS_OTP_PWR_DN); in lan743x_hs_otp_power_up()
222 lan743x_csr_write(adapter, HS_OTP_PWR_DN, reg_value); in lan743x_hs_otp_power_up()
226 lan743x_csr_read(adapter, HS_OTP_PWR_DN); in lan743x_hs_otp_power_up()
231 static void lan743x_hs_otp_power_down(struct lan743x_adapter *adapter) in lan743x_hs_otp_power_down() argument
235 reg_value = lan743x_csr_read(adapter, HS_OTP_PWR_DN); in lan743x_hs_otp_power_down()
238 lan743x_csr_write(adapter, HS_OTP_PWR_DN, reg_value); in lan743x_hs_otp_power_down()
242 lan743x_csr_read(adapter, HS_OTP_PWR_DN); in lan743x_hs_otp_power_down()
247 static void lan743x_hs_otp_set_address(struct lan743x_adapter *adapter, in lan743x_hs_otp_set_address() argument
250 lan743x_csr_write(adapter, HS_OTP_ADDR_HIGH, (address >> 8) & 0x03); in lan743x_hs_otp_set_address()
251 lan743x_csr_write(adapter, HS_OTP_ADDR_LOW, address & 0xFF); in lan743x_hs_otp_set_address()
254 static void lan743x_hs_otp_read_go(struct lan743x_adapter *adapter) in lan743x_hs_otp_read_go() argument
256 lan743x_csr_write(adapter, HS_OTP_FUNC_CMD, OTP_FUNC_CMD_READ_); in lan743x_hs_otp_read_go()
257 lan743x_csr_write(adapter, HS_OTP_CMD_GO, OTP_CMD_GO_GO_); in lan743x_hs_otp_read_go()
260 static int lan743x_hs_otp_cmd_cmplt_chk(struct lan743x_adapter *adapter) in lan743x_hs_otp_cmd_cmplt_chk() argument
269 static int lan743x_hs_otp_read(struct lan743x_adapter *adapter, u32 offset, in lan743x_hs_otp_read() argument
275 ret = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_otp_read()
279 lan743x_hs_otp_power_up(adapter); in lan743x_hs_otp_read()
281 ret = lan743x_hs_otp_cmd_cmplt_chk(adapter); in lan743x_hs_otp_read()
285 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_read()
288 ret = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_otp_read()
293 lan743x_hs_otp_set_address(adapter, offset + i); in lan743x_hs_otp_read()
295 lan743x_hs_otp_read_go(adapter); in lan743x_hs_otp_read()
296 ret = lan743x_hs_otp_cmd_cmplt_chk(adapter); in lan743x_hs_otp_read()
300 data[i] = lan743x_csr_read(adapter, HS_OTP_READ_DATA); in lan743x_hs_otp_read()
302 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_read()
305 ret = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_otp_read()
311 lan743x_hs_otp_power_down(adapter); in lan743x_hs_otp_read()
312 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_read()
317 static int lan743x_hs_otp_write(struct lan743x_adapter *adapter, u32 offset, in lan743x_hs_otp_write() argument
323 ret = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_otp_write()
327 lan743x_hs_otp_power_up(adapter); in lan743x_hs_otp_write()
329 ret = lan743x_hs_otp_cmd_cmplt_chk(adapter); in lan743x_hs_otp_write()
334 lan743x_csr_write(adapter, HS_OTP_PRGM_MODE, OTP_PRGM_MODE_BYTE_); in lan743x_hs_otp_write()
336 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_write()
339 ret = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_otp_write()
344 lan743x_hs_otp_set_address(adapter, offset + i); in lan743x_hs_otp_write()
346 lan743x_csr_write(adapter, HS_OTP_PRGM_DATA, data[i]); in lan743x_hs_otp_write()
347 lan743x_csr_write(adapter, HS_OTP_TST_CMD, in lan743x_hs_otp_write()
349 lan743x_csr_write(adapter, HS_OTP_CMD_GO, OTP_CMD_GO_GO_); in lan743x_hs_otp_write()
351 ret = lan743x_hs_otp_cmd_cmplt_chk(adapter); in lan743x_hs_otp_write()
355 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_write()
358 ret = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_otp_write()
363 lan743x_hs_otp_power_down(adapter); in lan743x_hs_otp_write()
364 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_write()
369 static int lan743x_eeprom_wait(struct lan743x_adapter *adapter) in lan743x_eeprom_wait() argument
375 val = lan743x_csr_read(adapter, E2P_CMD); in lan743x_eeprom_wait()
384 netif_warn(adapter, drv, adapter->netdev, in lan743x_eeprom_wait()
392 static int lan743x_eeprom_confirm_not_busy(struct lan743x_adapter *adapter) in lan743x_eeprom_confirm_not_busy() argument
398 val = lan743x_csr_read(adapter, E2P_CMD); in lan743x_eeprom_confirm_not_busy()
406 netif_warn(adapter, drv, adapter->netdev, "EEPROM is busy\n"); in lan743x_eeprom_confirm_not_busy()
410 static int lan743x_eeprom_read(struct lan743x_adapter *adapter, in lan743x_eeprom_read() argument
420 retval = lan743x_eeprom_confirm_not_busy(adapter); in lan743x_eeprom_read()
427 lan743x_csr_write(adapter, E2P_CMD, val); in lan743x_eeprom_read()
429 retval = lan743x_eeprom_wait(adapter); in lan743x_eeprom_read()
433 val = lan743x_csr_read(adapter, E2P_DATA); in lan743x_eeprom_read()
441 static int lan743x_eeprom_write(struct lan743x_adapter *adapter, in lan743x_eeprom_write() argument
451 retval = lan743x_eeprom_confirm_not_busy(adapter); in lan743x_eeprom_write()
457 lan743x_csr_write(adapter, E2P_CMD, val); in lan743x_eeprom_write()
459 retval = lan743x_eeprom_wait(adapter); in lan743x_eeprom_write()
466 lan743x_csr_write(adapter, E2P_DATA, val); in lan743x_eeprom_write()
471 lan743x_csr_write(adapter, E2P_CMD, val); in lan743x_eeprom_write()
473 retval = lan743x_eeprom_wait(adapter); in lan743x_eeprom_write()
483 static int lan743x_hs_eeprom_cmd_cmplt_chk(struct lan743x_adapter *adapter) in lan743x_hs_eeprom_cmd_cmplt_chk() argument
493 static int lan743x_hs_eeprom_read(struct lan743x_adapter *adapter, in lan743x_hs_eeprom_read() argument
500 retval = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_eeprom_read()
504 retval = lan743x_hs_eeprom_cmd_cmplt_chk(adapter); in lan743x_hs_eeprom_read()
505 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_read()
510 retval = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_eeprom_read()
517 lan743x_csr_write(adapter, HS_E2P_CMD, val); in lan743x_hs_eeprom_read()
518 retval = lan743x_hs_eeprom_cmd_cmplt_chk(adapter); in lan743x_hs_eeprom_read()
520 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_read()
524 val = lan743x_csr_read(adapter, HS_E2P_DATA); in lan743x_hs_eeprom_read()
526 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_read()
535 static int lan743x_hs_eeprom_write(struct lan743x_adapter *adapter, in lan743x_hs_eeprom_write() argument
542 retval = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_eeprom_write()
546 retval = lan743x_hs_eeprom_cmd_cmplt_chk(adapter); in lan743x_hs_eeprom_write()
547 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_write()
552 retval = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_eeprom_write()
559 lan743x_csr_write(adapter, HS_E2P_DATA, val); in lan743x_hs_eeprom_write()
564 lan743x_csr_write(adapter, HS_E2P_CMD, val); in lan743x_hs_eeprom_write()
566 retval = lan743x_hs_eeprom_cmd_cmplt_chk(adapter); in lan743x_hs_eeprom_write()
567 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_write()
580 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_drvinfo() local
584 pci_name(adapter->pdev), sizeof(info->bus_info)); in lan743x_ethtool_get_drvinfo()
589 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_msglevel() local
591 return adapter->msg_enable; in lan743x_ethtool_get_msglevel()
597 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_msglevel() local
599 adapter->msg_enable = msglevel; in lan743x_ethtool_set_msglevel()
604 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_eeprom_len() local
606 if (adapter->flags & LAN743X_ADAPTER_FLAG_OTP) in lan743x_ethtool_get_eeprom_len()
615 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_eeprom() local
618 if (adapter->flags & LAN743X_ADAPTER_FLAG_OTP) { in lan743x_ethtool_get_eeprom()
619 if (adapter->is_pci11x1x) in lan743x_ethtool_get_eeprom()
620 ret = lan743x_hs_otp_read(adapter, ee->offset, in lan743x_ethtool_get_eeprom()
623 ret = lan743x_otp_read(adapter, ee->offset, in lan743x_ethtool_get_eeprom()
626 if (adapter->is_pci11x1x) in lan743x_ethtool_get_eeprom()
627 ret = lan743x_hs_eeprom_read(adapter, ee->offset, in lan743x_ethtool_get_eeprom()
630 ret = lan743x_eeprom_read(adapter, ee->offset, in lan743x_ethtool_get_eeprom()
640 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_eeprom() local
643 if (adapter->flags & LAN743X_ADAPTER_FLAG_OTP) { in lan743x_ethtool_set_eeprom()
646 if (adapter->is_pci11x1x) in lan743x_ethtool_set_eeprom()
647 ret = lan743x_hs_otp_write(adapter, ee->offset, in lan743x_ethtool_set_eeprom()
650 ret = lan743x_otp_write(adapter, ee->offset, in lan743x_ethtool_set_eeprom()
655 if (adapter->is_pci11x1x) in lan743x_ethtool_set_eeprom()
656 ret = lan743x_hs_eeprom_write(adapter, in lan743x_ethtool_set_eeprom()
660 ret = lan743x_eeprom_write(adapter, ee->offset, in lan743x_ethtool_set_eeprom()
804 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_strings() local
817 if (adapter->is_pci11x1x) { in lan743x_ethtool_get_strings()
836 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_ethtool_stats() local
844 buf = lan743x_csr_read(adapter, lan743x_set0_hw_cnt_addr[i]); in lan743x_ethtool_get_ethtool_stats()
847 for (i = 0; i < ARRAY_SIZE(adapter->rx); i++) in lan743x_ethtool_get_ethtool_stats()
848 data[data_index++] = (u64)(adapter->rx[i].frame_count); in lan743x_ethtool_get_ethtool_stats()
850 buf = lan743x_csr_read(adapter, lan743x_set2_hw_cnt_addr[i]); in lan743x_ethtool_get_ethtool_stats()
853 if (adapter->is_pci11x1x) { in lan743x_ethtool_get_ethtool_stats()
854 for (i = 0; i < ARRAY_SIZE(adapter->tx); i++) { in lan743x_ethtool_get_ethtool_stats()
855 pkt_cnt = (u64)(adapter->tx[i].frame_count); in lan743x_ethtool_get_ethtool_stats()
865 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_priv_flags() local
867 return adapter->flags; in lan743x_ethtool_get_priv_flags()
872 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_priv_flags() local
874 adapter->flags = flags; in lan743x_ethtool_set_priv_flags()
881 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_sset_count() local
891 if (adapter->is_pci11x1x) in lan743x_ethtool_get_sset_count()
939 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_rxfh() local
947 lan743x_csr_read(adapter, RFE_INDX(dw_index)); in lan743x_ethtool_get_rxfh()
966 lan743x_csr_read(adapter, in lan743x_ethtool_get_rxfh()
988 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_rxfh() local
1008 lan743x_csr_write(adapter, RFE_INDX(dword_index), in lan743x_ethtool_set_rxfh()
1024 lan743x_csr_write(adapter, RFE_HASH_KEY(dword_index), in lan743x_ethtool_set_rxfh()
1034 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_ts_info() local
1041 if (adapter->ptp.ptp_clock) in lan743x_ethtool_get_ts_info()
1042 ts_info->phc_index = ptp_clock_index(adapter->ptp.ptp_clock); in lan743x_ethtool_get_ts_info()
1056 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_eee() local
1058 eee->tx_lpi_timer = lan743x_csr_read(adapter, in lan743x_ethtool_get_eee()
1061 return phylink_ethtool_get_eee(adapter->phylink, eee); in lan743x_ethtool_get_eee()
1067 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_eee() local
1070 tx_lpi_timer = lan743x_csr_read(adapter, MAC_EEE_TX_LPI_REQ_DLY_CNT); in lan743x_ethtool_set_eee()
1072 u32 mac_cr = lan743x_csr_read(adapter, MAC_CR); in lan743x_ethtool_set_eee()
1079 lan743x_mac_eee_enable(adapter, false); in lan743x_ethtool_set_eee()
1080 lan743x_csr_write(adapter, MAC_EEE_TX_LPI_REQ_DLY_CNT, in lan743x_ethtool_set_eee()
1084 lan743x_mac_eee_enable(adapter, true); in lan743x_ethtool_set_eee()
1087 return phylink_ethtool_set_eee(adapter->phylink, eee); in lan743x_ethtool_set_eee()
1094 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_link_ksettings() local
1096 return phylink_ethtool_ksettings_set(adapter->phylink, cmd); in lan743x_ethtool_set_link_ksettings()
1103 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_link_ksettings() local
1105 return phylink_ethtool_ksettings_get(adapter->phylink, cmd); in lan743x_ethtool_get_link_ksettings()
1112 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_wol() local
1117 phylink_ethtool_get_wol(adapter->phylink, wol); in lan743x_ethtool_get_wol()
1119 if (wol->supported != adapter->phy_wol_supported) in lan743x_ethtool_get_wol()
1120 netif_warn(adapter, drv, adapter->netdev, in lan743x_ethtool_get_wol()
1122 adapter->phy_wol_supported, wol->supported); in lan743x_ethtool_get_wol()
1126 if (adapter->is_pci11x1x) in lan743x_ethtool_get_wol()
1129 wol->wolopts |= adapter->wolopts; in lan743x_ethtool_get_wol()
1130 if (adapter->wolopts & WAKE_MAGICSECURE) in lan743x_ethtool_get_wol()
1131 memcpy(wol->sopass, adapter->sopass, sizeof(wol->sopass)); in lan743x_ethtool_get_wol()
1137 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_wol() local
1149 phy_wol.wolopts = wol->wolopts & adapter->phy_wol_supported; in lan743x_ethtool_set_wol()
1155 !(adapter->phy_wol_supported & WAKE_MAGICSECURE)) in lan743x_ethtool_set_wol()
1158 ret = phylink_ethtool_set_wol(adapter->phylink, wol); in lan743x_ethtool_set_wol()
1163 adapter->phy_wolopts = 0; in lan743x_ethtool_set_wol()
1165 adapter->phy_wolopts = phy_wol.wolopts; in lan743x_ethtool_set_wol()
1167 adapter->phy_wolopts = 0; in lan743x_ethtool_set_wol()
1170 adapter->wolopts = 0; in lan743x_ethtool_set_wol()
1171 wol->wolopts &= ~adapter->phy_wolopts; in lan743x_ethtool_set_wol()
1173 adapter->wolopts |= WAKE_UCAST; in lan743x_ethtool_set_wol()
1175 adapter->wolopts |= WAKE_MCAST; in lan743x_ethtool_set_wol()
1177 adapter->wolopts |= WAKE_BCAST; in lan743x_ethtool_set_wol()
1179 adapter->wolopts |= WAKE_MAGIC; in lan743x_ethtool_set_wol()
1181 adapter->wolopts |= WAKE_PHY; in lan743x_ethtool_set_wol()
1183 adapter->wolopts |= WAKE_ARP; in lan743x_ethtool_set_wol()
1186 memcpy(adapter->sopass, wol->sopass, sizeof(wol->sopass)); in lan743x_ethtool_set_wol()
1187 adapter->wolopts |= WAKE_MAGICSECURE; in lan743x_ethtool_set_wol()
1189 memset(adapter->sopass, 0, sizeof(u8) * SOPASS_MAX); in lan743x_ethtool_set_wol()
1192 wol->wolopts = adapter->wolopts | adapter->phy_wolopts; in lan743x_ethtool_set_wol()
1193 device_set_wakeup_enable(&adapter->pdev->dev, (bool)wol->wolopts); in lan743x_ethtool_set_wol()
1201 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_common_regs() local
1206 rb[ETH_PRIV_FLAGS] = adapter->flags; in lan743x_common_regs()
1207 rb[ETH_ID_REV] = lan743x_csr_read(adapter, ID_REV); in lan743x_common_regs()
1208 rb[ETH_FPGA_REV] = lan743x_csr_read(adapter, FPGA_REV); in lan743x_common_regs()
1209 rb[ETH_STRAP_READ] = lan743x_csr_read(adapter, STRAP_READ); in lan743x_common_regs()
1210 rb[ETH_INT_STS] = lan743x_csr_read(adapter, INT_STS); in lan743x_common_regs()
1211 rb[ETH_HW_CFG] = lan743x_csr_read(adapter, HW_CFG); in lan743x_common_regs()
1212 rb[ETH_PMT_CTL] = lan743x_csr_read(adapter, PMT_CTL); in lan743x_common_regs()
1213 rb[ETH_E2P_CMD] = lan743x_csr_read(adapter, E2P_CMD); in lan743x_common_regs()
1214 rb[ETH_E2P_DATA] = lan743x_csr_read(adapter, E2P_DATA); in lan743x_common_regs()
1215 rb[ETH_MAC_CR] = lan743x_csr_read(adapter, MAC_CR); in lan743x_common_regs()
1216 rb[ETH_MAC_RX] = lan743x_csr_read(adapter, MAC_RX); in lan743x_common_regs()
1217 rb[ETH_MAC_TX] = lan743x_csr_read(adapter, MAC_TX); in lan743x_common_regs()
1218 rb[ETH_FLOW] = lan743x_csr_read(adapter, MAC_FLOW); in lan743x_common_regs()
1219 rb[ETH_MII_ACC] = lan743x_csr_read(adapter, MAC_MII_ACC); in lan743x_common_regs()
1220 rb[ETH_MII_DATA] = lan743x_csr_read(adapter, MAC_MII_DATA); in lan743x_common_regs()
1221 rb[ETH_EEE_TX_LPI_REQ_DLY] = lan743x_csr_read(adapter, in lan743x_common_regs()
1223 rb[ETH_WUCSR] = lan743x_csr_read(adapter, MAC_WUCSR); in lan743x_common_regs()
1224 rb[ETH_WK_SRC] = lan743x_csr_read(adapter, MAC_WK_SRC); in lan743x_common_regs()
1313 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_get_regs_len() local
1316 if (adapter->is_sgmii_en) in lan743x_get_regs_len()
1325 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_get_regs() local
1337 if (adapter->is_sgmii_en) { in lan743x_get_regs()
1346 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_get_pauseparam() local
1348 phylink_ethtool_get_pauseparam(adapter->phylink, pause); in lan743x_get_pauseparam()
1354 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_set_pauseparam() local
1356 return phylink_ethtool_set_pauseparam(adapter->phylink, pause); in lan743x_set_pauseparam()