Lines Matching full:adapter
28 #define LAN743X_CSR_READ_OP(offset) lan743x_csr_read(adapter, offset)
30 static int lan743x_otp_power_up(struct lan743x_adapter *adapter) in lan743x_otp_power_up() argument
34 reg_value = lan743x_csr_read(adapter, OTP_PWR_DN); in lan743x_otp_power_up()
39 lan743x_csr_write(adapter, OTP_PWR_DN, reg_value); in lan743x_otp_power_up()
47 static void lan743x_otp_power_down(struct lan743x_adapter *adapter) in lan743x_otp_power_down() argument
51 reg_value = lan743x_csr_read(adapter, OTP_PWR_DN); in lan743x_otp_power_down()
55 lan743x_csr_write(adapter, OTP_PWR_DN, reg_value); in lan743x_otp_power_down()
59 static void lan743x_otp_set_address(struct lan743x_adapter *adapter, in lan743x_otp_set_address() argument
62 lan743x_csr_write(adapter, OTP_ADDR_HIGH, (address >> 8) & 0x03); in lan743x_otp_set_address()
63 lan743x_csr_write(adapter, OTP_ADDR_LOW, address & 0xFF); in lan743x_otp_set_address()
66 static void lan743x_otp_read_go(struct lan743x_adapter *adapter) in lan743x_otp_read_go() argument
68 lan743x_csr_write(adapter, OTP_FUNC_CMD, OTP_FUNC_CMD_READ_); in lan743x_otp_read_go()
69 lan743x_csr_write(adapter, OTP_CMD_GO, OTP_CMD_GO_GO_); in lan743x_otp_read_go()
72 static int lan743x_otp_wait_till_not_busy(struct lan743x_adapter *adapter) in lan743x_otp_wait_till_not_busy() argument
80 netif_warn(adapter, drv, adapter->netdev, in lan743x_otp_wait_till_not_busy()
85 reg_val = lan743x_csr_read(adapter, OTP_STATUS); in lan743x_otp_wait_till_not_busy()
91 static int lan743x_otp_read(struct lan743x_adapter *adapter, u32 offset, in lan743x_otp_read() argument
100 ret = lan743x_otp_power_up(adapter); in lan743x_otp_read()
104 ret = lan743x_otp_wait_till_not_busy(adapter); in lan743x_otp_read()
109 lan743x_otp_set_address(adapter, offset + i); in lan743x_otp_read()
111 lan743x_otp_read_go(adapter); in lan743x_otp_read()
112 ret = lan743x_otp_wait_till_not_busy(adapter); in lan743x_otp_read()
115 data[i] = lan743x_csr_read(adapter, OTP_READ_DATA); in lan743x_otp_read()
118 lan743x_otp_power_down(adapter); in lan743x_otp_read()
123 static int lan743x_otp_write(struct lan743x_adapter *adapter, u32 offset, in lan743x_otp_write() argument
132 ret = lan743x_otp_power_up(adapter); in lan743x_otp_write()
136 ret = lan743x_otp_wait_till_not_busy(adapter); in lan743x_otp_write()
141 lan743x_csr_write(adapter, OTP_PRGM_MODE, OTP_PRGM_MODE_BYTE_); in lan743x_otp_write()
144 lan743x_otp_set_address(adapter, offset + i); in lan743x_otp_write()
146 lan743x_csr_write(adapter, OTP_PRGM_DATA, data[i]); in lan743x_otp_write()
147 lan743x_csr_write(adapter, OTP_TST_CMD, OTP_TST_CMD_PRGVRFY_); in lan743x_otp_write()
148 lan743x_csr_write(adapter, OTP_CMD_GO, OTP_CMD_GO_GO_); in lan743x_otp_write()
150 ret = lan743x_otp_wait_till_not_busy(adapter); in lan743x_otp_write()
155 lan743x_otp_power_down(adapter); in lan743x_otp_write()
160 int lan743x_hs_syslock_acquire(struct lan743x_adapter *adapter, in lan743x_hs_syslock_acquire() argument
167 spin_lock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_acquire()
168 if (adapter->eth_syslock_acquire_cnt == 0) { in lan743x_hs_syslock_acquire()
169 lan743x_csr_write(adapter, ETH_SYSTEM_SYS_LOCK_REG, in lan743x_hs_syslock_acquire()
171 val = lan743x_csr_read(adapter, in lan743x_hs_syslock_acquire()
174 adapter->eth_syslock_acquire_cnt++; in lan743x_hs_syslock_acquire()
175 WARN_ON(adapter->eth_syslock_acquire_cnt == 0); in lan743x_hs_syslock_acquire()
176 spin_unlock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_acquire()
180 adapter->eth_syslock_acquire_cnt++; in lan743x_hs_syslock_acquire()
181 WARN_ON(adapter->eth_syslock_acquire_cnt == 0); in lan743x_hs_syslock_acquire()
182 spin_unlock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_acquire()
186 spin_unlock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_acquire()
197 void lan743x_hs_syslock_release(struct lan743x_adapter *adapter) in lan743x_hs_syslock_release() argument
201 spin_lock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_release()
202 WARN_ON(adapter->eth_syslock_acquire_cnt == 0); in lan743x_hs_syslock_release()
204 if (adapter->eth_syslock_acquire_cnt) { in lan743x_hs_syslock_release()
205 adapter->eth_syslock_acquire_cnt--; in lan743x_hs_syslock_release()
206 if (adapter->eth_syslock_acquire_cnt == 0) { in lan743x_hs_syslock_release()
207 lan743x_csr_write(adapter, ETH_SYSTEM_SYS_LOCK_REG, 0); in lan743x_hs_syslock_release()
208 val = lan743x_csr_read(adapter, in lan743x_hs_syslock_release()
214 spin_unlock(&adapter->eth_syslock_spinlock); in lan743x_hs_syslock_release()
217 static void lan743x_hs_otp_power_up(struct lan743x_adapter *adapter) in lan743x_hs_otp_power_up() argument
221 reg_value = lan743x_csr_read(adapter, HS_OTP_PWR_DN); in lan743x_hs_otp_power_up()
224 lan743x_csr_write(adapter, HS_OTP_PWR_DN, reg_value); in lan743x_hs_otp_power_up()
228 lan743x_csr_read(adapter, HS_OTP_PWR_DN); in lan743x_hs_otp_power_up()
233 static void lan743x_hs_otp_power_down(struct lan743x_adapter *adapter) in lan743x_hs_otp_power_down() argument
237 reg_value = lan743x_csr_read(adapter, HS_OTP_PWR_DN); in lan743x_hs_otp_power_down()
240 lan743x_csr_write(adapter, HS_OTP_PWR_DN, reg_value); in lan743x_hs_otp_power_down()
244 lan743x_csr_read(adapter, HS_OTP_PWR_DN); in lan743x_hs_otp_power_down()
249 static void lan743x_hs_otp_set_address(struct lan743x_adapter *adapter, in lan743x_hs_otp_set_address() argument
252 lan743x_csr_write(adapter, HS_OTP_ADDR_HIGH, (address >> 8) & 0x03); in lan743x_hs_otp_set_address()
253 lan743x_csr_write(adapter, HS_OTP_ADDR_LOW, address & 0xFF); in lan743x_hs_otp_set_address()
256 static void lan743x_hs_otp_read_go(struct lan743x_adapter *adapter) in lan743x_hs_otp_read_go() argument
258 lan743x_csr_write(adapter, HS_OTP_FUNC_CMD, OTP_FUNC_CMD_READ_); in lan743x_hs_otp_read_go()
259 lan743x_csr_write(adapter, HS_OTP_CMD_GO, OTP_CMD_GO_GO_); in lan743x_hs_otp_read_go()
262 static int lan743x_hs_otp_cmd_cmplt_chk(struct lan743x_adapter *adapter) in lan743x_hs_otp_cmd_cmplt_chk() argument
271 static int lan743x_hs_otp_read(struct lan743x_adapter *adapter, u32 offset, in lan743x_hs_otp_read() argument
280 ret = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_otp_read()
284 lan743x_hs_otp_power_up(adapter); in lan743x_hs_otp_read()
286 ret = lan743x_hs_otp_cmd_cmplt_chk(adapter); in lan743x_hs_otp_read()
290 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_read()
293 ret = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_otp_read()
298 lan743x_hs_otp_set_address(adapter, offset + i); in lan743x_hs_otp_read()
300 lan743x_hs_otp_read_go(adapter); in lan743x_hs_otp_read()
301 ret = lan743x_hs_otp_cmd_cmplt_chk(adapter); in lan743x_hs_otp_read()
305 data[i] = lan743x_csr_read(adapter, HS_OTP_READ_DATA); in lan743x_hs_otp_read()
307 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_read()
310 ret = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_otp_read()
316 lan743x_hs_otp_power_down(adapter); in lan743x_hs_otp_read()
317 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_read()
322 static int lan743x_hs_otp_write(struct lan743x_adapter *adapter, u32 offset, in lan743x_hs_otp_write() argument
331 ret = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_otp_write()
335 lan743x_hs_otp_power_up(adapter); in lan743x_hs_otp_write()
337 ret = lan743x_hs_otp_cmd_cmplt_chk(adapter); in lan743x_hs_otp_write()
342 lan743x_csr_write(adapter, HS_OTP_PRGM_MODE, OTP_PRGM_MODE_BYTE_); in lan743x_hs_otp_write()
344 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_write()
347 ret = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_otp_write()
352 lan743x_hs_otp_set_address(adapter, offset + i); in lan743x_hs_otp_write()
354 lan743x_csr_write(adapter, HS_OTP_PRGM_DATA, data[i]); in lan743x_hs_otp_write()
355 lan743x_csr_write(adapter, HS_OTP_TST_CMD, in lan743x_hs_otp_write()
357 lan743x_csr_write(adapter, HS_OTP_CMD_GO, OTP_CMD_GO_GO_); in lan743x_hs_otp_write()
359 ret = lan743x_hs_otp_cmd_cmplt_chk(adapter); in lan743x_hs_otp_write()
363 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_write()
366 ret = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_otp_write()
371 lan743x_hs_otp_power_down(adapter); in lan743x_hs_otp_write()
372 lan743x_hs_syslock_release(adapter); in lan743x_hs_otp_write()
377 static int lan743x_eeprom_wait(struct lan743x_adapter *adapter) in lan743x_eeprom_wait() argument
383 val = lan743x_csr_read(adapter, E2P_CMD); in lan743x_eeprom_wait()
392 netif_warn(adapter, drv, adapter->netdev, in lan743x_eeprom_wait()
400 static int lan743x_eeprom_confirm_not_busy(struct lan743x_adapter *adapter) in lan743x_eeprom_confirm_not_busy() argument
406 val = lan743x_csr_read(adapter, E2P_CMD); in lan743x_eeprom_confirm_not_busy()
414 netif_warn(adapter, drv, adapter->netdev, "EEPROM is busy\n"); in lan743x_eeprom_confirm_not_busy()
418 static int lan743x_eeprom_read(struct lan743x_adapter *adapter, in lan743x_eeprom_read() argument
428 retval = lan743x_eeprom_confirm_not_busy(adapter); in lan743x_eeprom_read()
435 lan743x_csr_write(adapter, E2P_CMD, val); in lan743x_eeprom_read()
437 retval = lan743x_eeprom_wait(adapter); in lan743x_eeprom_read()
441 val = lan743x_csr_read(adapter, E2P_DATA); in lan743x_eeprom_read()
449 static int lan743x_eeprom_write(struct lan743x_adapter *adapter, in lan743x_eeprom_write() argument
459 retval = lan743x_eeprom_confirm_not_busy(adapter); in lan743x_eeprom_write()
465 lan743x_csr_write(adapter, E2P_CMD, val); in lan743x_eeprom_write()
467 retval = lan743x_eeprom_wait(adapter); in lan743x_eeprom_write()
474 lan743x_csr_write(adapter, E2P_DATA, val); in lan743x_eeprom_write()
479 lan743x_csr_write(adapter, E2P_CMD, val); in lan743x_eeprom_write()
481 retval = lan743x_eeprom_wait(adapter); in lan743x_eeprom_write()
491 static int lan743x_hs_eeprom_cmd_cmplt_chk(struct lan743x_adapter *adapter) in lan743x_hs_eeprom_cmd_cmplt_chk() argument
501 static int lan743x_hs_eeprom_read(struct lan743x_adapter *adapter, in lan743x_hs_eeprom_read() argument
511 retval = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_eeprom_read()
515 retval = lan743x_hs_eeprom_cmd_cmplt_chk(adapter); in lan743x_hs_eeprom_read()
516 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_read()
521 retval = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_eeprom_read()
528 lan743x_csr_write(adapter, HS_E2P_CMD, val); in lan743x_hs_eeprom_read()
529 retval = lan743x_hs_eeprom_cmd_cmplt_chk(adapter); in lan743x_hs_eeprom_read()
531 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_read()
535 val = lan743x_csr_read(adapter, HS_E2P_DATA); in lan743x_hs_eeprom_read()
537 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_read()
546 static int lan743x_hs_eeprom_write(struct lan743x_adapter *adapter, in lan743x_hs_eeprom_write() argument
556 retval = lan743x_hs_syslock_acquire(adapter, LOCK_TIMEOUT_MAX_CNT); in lan743x_hs_eeprom_write()
560 retval = lan743x_hs_eeprom_cmd_cmplt_chk(adapter); in lan743x_hs_eeprom_write()
561 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_write()
566 retval = lan743x_hs_syslock_acquire(adapter, in lan743x_hs_eeprom_write()
573 lan743x_csr_write(adapter, HS_E2P_DATA, val); in lan743x_hs_eeprom_write()
578 lan743x_csr_write(adapter, HS_E2P_CMD, val); in lan743x_hs_eeprom_write()
580 retval = lan743x_hs_eeprom_cmd_cmplt_chk(adapter); in lan743x_hs_eeprom_write()
581 lan743x_hs_syslock_release(adapter); in lan743x_hs_eeprom_write()
594 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_drvinfo() local
598 pci_name(adapter->pdev), sizeof(info->bus_info)); in lan743x_ethtool_get_drvinfo()
603 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_msglevel() local
605 return adapter->msg_enable; in lan743x_ethtool_get_msglevel()
611 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_msglevel() local
613 adapter->msg_enable = msglevel; in lan743x_ethtool_set_msglevel()
618 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_eeprom_len() local
620 if (adapter->flags & LAN743X_ADAPTER_FLAG_OTP) in lan743x_ethtool_get_eeprom_len()
621 return adapter->is_pci11x1x ? MAX_HS_OTP_SIZE : MAX_OTP_SIZE; in lan743x_ethtool_get_eeprom_len()
623 return adapter->is_pci11x1x ? MAX_HS_EEPROM_SIZE : MAX_EEPROM_SIZE; in lan743x_ethtool_get_eeprom_len()
629 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_eeprom() local
632 if (adapter->flags & LAN743X_ADAPTER_FLAG_OTP) { in lan743x_ethtool_get_eeprom()
633 if (adapter->is_pci11x1x) in lan743x_ethtool_get_eeprom()
634 ret = lan743x_hs_otp_read(adapter, ee->offset, in lan743x_ethtool_get_eeprom()
637 ret = lan743x_otp_read(adapter, ee->offset, in lan743x_ethtool_get_eeprom()
640 if (adapter->is_pci11x1x) in lan743x_ethtool_get_eeprom()
641 ret = lan743x_hs_eeprom_read(adapter, ee->offset, in lan743x_ethtool_get_eeprom()
644 ret = lan743x_eeprom_read(adapter, ee->offset, in lan743x_ethtool_get_eeprom()
654 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_eeprom() local
657 if (adapter->flags & LAN743X_ADAPTER_FLAG_OTP) { in lan743x_ethtool_set_eeprom()
660 if (adapter->is_pci11x1x) in lan743x_ethtool_set_eeprom()
661 ret = lan743x_hs_otp_write(adapter, ee->offset, in lan743x_ethtool_set_eeprom()
664 ret = lan743x_otp_write(adapter, ee->offset, in lan743x_ethtool_set_eeprom()
669 if (adapter->is_pci11x1x) in lan743x_ethtool_set_eeprom()
670 ret = lan743x_hs_eeprom_write(adapter, in lan743x_ethtool_set_eeprom()
674 ret = lan743x_eeprom_write(adapter, ee->offset, in lan743x_ethtool_set_eeprom()
818 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_strings() local
831 if (adapter->is_pci11x1x) { in lan743x_ethtool_get_strings()
850 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_ethtool_stats() local
858 buf = lan743x_csr_read(adapter, lan743x_set0_hw_cnt_addr[i]); in lan743x_ethtool_get_ethtool_stats()
861 for (i = 0; i < ARRAY_SIZE(adapter->rx); i++) in lan743x_ethtool_get_ethtool_stats()
862 data[data_index++] = (u64)(adapter->rx[i].frame_count); in lan743x_ethtool_get_ethtool_stats()
864 buf = lan743x_csr_read(adapter, lan743x_set2_hw_cnt_addr[i]); in lan743x_ethtool_get_ethtool_stats()
867 if (adapter->is_pci11x1x) { in lan743x_ethtool_get_ethtool_stats()
868 for (i = 0; i < ARRAY_SIZE(adapter->tx); i++) { in lan743x_ethtool_get_ethtool_stats()
869 pkt_cnt = (u64)(adapter->tx[i].frame_count); in lan743x_ethtool_get_ethtool_stats()
879 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_priv_flags() local
881 return adapter->flags; in lan743x_ethtool_get_priv_flags()
886 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_priv_flags() local
888 adapter->flags = flags; in lan743x_ethtool_set_priv_flags()
895 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_sset_count() local
905 if (adapter->is_pci11x1x) in lan743x_ethtool_get_sset_count()
959 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_rxfh() local
967 lan743x_csr_read(adapter, RFE_INDX(dw_index)); in lan743x_ethtool_get_rxfh()
986 lan743x_csr_read(adapter, in lan743x_ethtool_get_rxfh()
1008 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_rxfh() local
1028 lan743x_csr_write(adapter, RFE_INDX(dword_index), in lan743x_ethtool_set_rxfh()
1044 lan743x_csr_write(adapter, RFE_HASH_KEY(dword_index), in lan743x_ethtool_set_rxfh()
1054 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_ts_info() local
1061 if (adapter->ptp.ptp_clock) in lan743x_ethtool_get_ts_info()
1062 ts_info->phc_index = ptp_clock_index(adapter->ptp.ptp_clock); in lan743x_ethtool_get_ts_info()
1076 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_eee() local
1078 return phylink_ethtool_get_eee(adapter->phylink, eee); in lan743x_ethtool_get_eee()
1084 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_eee() local
1086 return phylink_ethtool_set_eee(adapter->phylink, eee); in lan743x_ethtool_set_eee()
1093 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_link_ksettings() local
1095 return phylink_ethtool_ksettings_set(adapter->phylink, cmd); in lan743x_ethtool_set_link_ksettings()
1102 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_link_ksettings() local
1104 return phylink_ethtool_ksettings_get(adapter->phylink, cmd); in lan743x_ethtool_get_link_ksettings()
1111 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_get_wol() local
1116 phylink_ethtool_get_wol(adapter->phylink, wol); in lan743x_ethtool_get_wol()
1118 if (wol->supported != adapter->phy_wol_supported) in lan743x_ethtool_get_wol()
1119 netif_warn(adapter, drv, adapter->netdev, in lan743x_ethtool_get_wol()
1121 adapter->phy_wol_supported, wol->supported); in lan743x_ethtool_get_wol()
1125 if (adapter->is_pci11x1x) in lan743x_ethtool_get_wol()
1128 wol->wolopts |= adapter->wolopts; in lan743x_ethtool_get_wol()
1129 if (adapter->wolopts & WAKE_MAGICSECURE) in lan743x_ethtool_get_wol()
1130 memcpy(wol->sopass, adapter->sopass, sizeof(wol->sopass)); in lan743x_ethtool_get_wol()
1136 struct lan743x_adapter *adapter = netdev_priv(netdev); in lan743x_ethtool_set_wol() local
1148 phy_wol.wolopts = wol->wolopts & adapter->phy_wol_supported; in lan743x_ethtool_set_wol()
1154 !(adapter->phy_wol_supported & WAKE_MAGICSECURE)) in lan743x_ethtool_set_wol()
1157 ret = phylink_ethtool_set_wol(adapter->phylink, wol); in lan743x_ethtool_set_wol()
1162 adapter->phy_wolopts = 0; in lan743x_ethtool_set_wol()
1164 adapter->phy_wolopts = phy_wol.wolopts; in lan743x_ethtool_set_wol()
1166 adapter->phy_wolopts = 0; in lan743x_ethtool_set_wol()
1169 adapter->wolopts = 0; in lan743x_ethtool_set_wol()
1170 wol->wolopts &= ~adapter->phy_wolopts; in lan743x_ethtool_set_wol()
1172 adapter->wolopts |= WAKE_UCAST; in lan743x_ethtool_set_wol()
1174 adapter->wolopts |= WAKE_MCAST; in lan743x_ethtool_set_wol()
1176 adapter->wolopts |= WAKE_BCAST; in lan743x_ethtool_set_wol()
1178 adapter->wolopts |= WAKE_MAGIC; in lan743x_ethtool_set_wol()
1180 adapter->wolopts |= WAKE_PHY; in lan743x_ethtool_set_wol()
1182 adapter->wolopts |= WAKE_ARP; in lan743x_ethtool_set_wol()
1185 memcpy(adapter->sopass, wol->sopass, sizeof(wol->sopass)); in lan743x_ethtool_set_wol()
1186 adapter->wolopts |= WAKE_MAGICSECURE; in lan743x_ethtool_set_wol()
1188 memset(adapter->sopass, 0, sizeof(u8) * SOPASS_MAX); in lan743x_ethtool_set_wol()
1191 wol->wolopts = adapter->wolopts | adapter->phy_wolopts; in lan743x_ethtool_set_wol()
1192 device_set_wakeup_enable(&adapter->pdev->dev, (bool)wol->wolopts); in lan743x_ethtool_set_wol()
1200 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_common_regs() local
1205 rb[ETH_PRIV_FLAGS] = adapter->flags; in lan743x_common_regs()
1206 rb[ETH_ID_REV] = lan743x_csr_read(adapter, ID_REV); in lan743x_common_regs()
1207 rb[ETH_FPGA_REV] = lan743x_csr_read(adapter, FPGA_REV); in lan743x_common_regs()
1208 rb[ETH_STRAP_READ] = lan743x_csr_read(adapter, STRAP_READ); in lan743x_common_regs()
1209 rb[ETH_INT_STS] = lan743x_csr_read(adapter, INT_STS); in lan743x_common_regs()
1210 rb[ETH_HW_CFG] = lan743x_csr_read(adapter, HW_CFG); in lan743x_common_regs()
1211 rb[ETH_PMT_CTL] = lan743x_csr_read(adapter, PMT_CTL); in lan743x_common_regs()
1212 rb[ETH_E2P_CMD] = lan743x_csr_read(adapter, E2P_CMD); in lan743x_common_regs()
1213 rb[ETH_E2P_DATA] = lan743x_csr_read(adapter, E2P_DATA); in lan743x_common_regs()
1214 rb[ETH_MAC_CR] = lan743x_csr_read(adapter, MAC_CR); in lan743x_common_regs()
1215 rb[ETH_MAC_RX] = lan743x_csr_read(adapter, MAC_RX); in lan743x_common_regs()
1216 rb[ETH_MAC_TX] = lan743x_csr_read(adapter, MAC_TX); in lan743x_common_regs()
1217 rb[ETH_FLOW] = lan743x_csr_read(adapter, MAC_FLOW); in lan743x_common_regs()
1218 rb[ETH_MII_ACC] = lan743x_csr_read(adapter, MAC_MII_ACC); in lan743x_common_regs()
1219 rb[ETH_MII_DATA] = lan743x_csr_read(adapter, MAC_MII_DATA); in lan743x_common_regs()
1220 rb[ETH_EEE_TX_LPI_REQ_DLY] = lan743x_csr_read(adapter, in lan743x_common_regs()
1222 rb[ETH_WUCSR] = lan743x_csr_read(adapter, MAC_WUCSR); in lan743x_common_regs()
1223 rb[ETH_WK_SRC] = lan743x_csr_read(adapter, MAC_WK_SRC); in lan743x_common_regs()
1312 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_get_regs_len() local
1315 if (adapter->is_sgmii_en) in lan743x_get_regs_len()
1324 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_get_regs() local
1336 if (adapter->is_sgmii_en) { in lan743x_get_regs()
1345 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_get_pauseparam() local
1347 phylink_ethtool_get_pauseparam(adapter->phylink, pause); in lan743x_get_pauseparam()
1353 struct lan743x_adapter *adapter = netdev_priv(dev); in lan743x_set_pauseparam() local
1355 return phylink_ethtool_set_pauseparam(adapter->phylink, pause); in lan743x_set_pauseparam()