Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'convert-drivers-to-use-ndo_hwtstamp-callbacks-part-3'

Vadim Fedorenko says:

====================
convert drivers to use ndo_hwtstamp callbacks part 3 [part]

This patchset converts the rest of ethernet drivers to use ndo callbacks
instead ioctl to configure and report time stamping. The drivers in part
3 originally implemented only SIOCSHWTSTAMP command, but converted to
also provide configuration back to users.
====================

Link: https://patch.msgid.link/20251103150952.3538205-1-vadim.fedorenko@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+119 -124
+20 -30
drivers/net/ethernet/cavium/liquidio/lio_main.c
··· 2107 2107 lstats->tx_fifo_errors; 2108 2108 } 2109 2109 2110 - /** 2111 - * hwtstamp_ioctl - Handler for SIOCSHWTSTAMP ioctl 2112 - * @netdev: network device 2113 - * @ifr: interface request 2114 - */ 2115 - static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr) 2110 + static int liquidio_hwtstamp_set(struct net_device *netdev, 2111 + struct kernel_hwtstamp_config *conf, 2112 + struct netlink_ext_ack *extack) 2116 2113 { 2117 - struct hwtstamp_config conf; 2118 2114 struct lio *lio = GET_LIO(netdev); 2119 2115 2120 - if (copy_from_user(&conf, ifr->ifr_data, sizeof(conf))) 2121 - return -EFAULT; 2116 + if (!lio->oct_dev->ptp_enable) 2117 + return -EOPNOTSUPP; 2122 2118 2123 - switch (conf.tx_type) { 2119 + switch (conf->tx_type) { 2124 2120 case HWTSTAMP_TX_ON: 2125 2121 case HWTSTAMP_TX_OFF: 2126 2122 break; ··· 2124 2128 return -ERANGE; 2125 2129 } 2126 2130 2127 - switch (conf.rx_filter) { 2131 + switch (conf->rx_filter) { 2128 2132 case HWTSTAMP_FILTER_NONE: 2129 2133 break; 2130 2134 case HWTSTAMP_FILTER_ALL: ··· 2142 2146 case HWTSTAMP_FILTER_PTP_V2_SYNC: 2143 2147 case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: 2144 2148 case HWTSTAMP_FILTER_NTP_ALL: 2145 - conf.rx_filter = HWTSTAMP_FILTER_ALL; 2149 + conf->rx_filter = HWTSTAMP_FILTER_ALL; 2146 2150 break; 2147 2151 default: 2148 2152 return -ERANGE; 2149 2153 } 2150 2154 2151 - if (conf.rx_filter == HWTSTAMP_FILTER_ALL) 2155 + if (conf->rx_filter == HWTSTAMP_FILTER_ALL) 2152 2156 ifstate_set(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED); 2153 2157 2154 2158 else 2155 2159 ifstate_reset(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED); 2156 2160 2157 - return copy_to_user(ifr->ifr_data, &conf, sizeof(conf)) ? -EFAULT : 0; 2161 + return 0; 2158 2162 } 2159 2163 2160 - /** 2161 - * liquidio_ioctl - ioctl handler 2162 - * @netdev: network device 2163 - * @ifr: interface request 2164 - * @cmd: command 2165 - */ 2166 - static int liquidio_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) 2164 + static int liquidio_hwtstamp_get(struct net_device *netdev, 2165 + struct kernel_hwtstamp_config *conf) 2167 2166 { 2168 2167 struct lio *lio = GET_LIO(netdev); 2169 2168 2170 - switch (cmd) { 2171 - case SIOCSHWTSTAMP: 2172 - if (lio->oct_dev->ptp_enable) 2173 - return hwtstamp_ioctl(netdev, ifr); 2174 - fallthrough; 2175 - default: 2176 - return -EOPNOTSUPP; 2177 - } 2169 + /* TX timestamping is technically always on */ 2170 + conf->tx_type = HWTSTAMP_TX_ON; 2171 + conf->rx_filter = ifstate_check(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED) ? 2172 + HWTSTAMP_FILTER_ALL : HWTSTAMP_FILTER_NONE; 2173 + 2174 + return 0; 2178 2175 } 2179 2176 2180 2177 /** ··· 3216 3227 .ndo_vlan_rx_add_vid = liquidio_vlan_rx_add_vid, 3217 3228 .ndo_vlan_rx_kill_vid = liquidio_vlan_rx_kill_vid, 3218 3229 .ndo_change_mtu = liquidio_change_mtu, 3219 - .ndo_eth_ioctl = liquidio_ioctl, 3220 3230 .ndo_fix_features = liquidio_fix_features, 3221 3231 .ndo_set_features = liquidio_set_features, 3222 3232 .ndo_set_vf_mac = liquidio_set_vf_mac, ··· 3226 3238 .ndo_set_vf_link_state = liquidio_set_vf_link_state, 3227 3239 .ndo_get_vf_stats = liquidio_get_vf_stats, 3228 3240 .ndo_get_port_parent_id = liquidio_get_port_parent_id, 3241 + .ndo_hwtstamp_get = liquidio_hwtstamp_get, 3242 + .ndo_hwtstamp_set = liquidio_hwtstamp_set, 3229 3243 }; 3230 3244 3231 3245 /**
+19 -29
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
··· 1236 1236 lstats->tx_carrier_errors; 1237 1237 } 1238 1238 1239 - /** 1240 - * hwtstamp_ioctl - Handler for SIOCSHWTSTAMP ioctl 1241 - * @netdev: network device 1242 - * @ifr: interface request 1243 - */ 1244 - static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr) 1239 + static int liquidio_hwtstamp_set(struct net_device *netdev, 1240 + struct kernel_hwtstamp_config *conf, 1241 + struct netlink_ext_ack *extack) 1245 1242 { 1246 1243 struct lio *lio = GET_LIO(netdev); 1247 - struct hwtstamp_config conf; 1248 1244 1249 - if (copy_from_user(&conf, ifr->ifr_data, sizeof(conf))) 1250 - return -EFAULT; 1251 - 1252 - switch (conf.tx_type) { 1245 + switch (conf->tx_type) { 1253 1246 case HWTSTAMP_TX_ON: 1254 1247 case HWTSTAMP_TX_OFF: 1255 1248 break; ··· 1250 1257 return -ERANGE; 1251 1258 } 1252 1259 1253 - switch (conf.rx_filter) { 1260 + switch (conf->rx_filter) { 1254 1261 case HWTSTAMP_FILTER_NONE: 1255 1262 break; 1256 1263 case HWTSTAMP_FILTER_ALL: ··· 1268 1275 case HWTSTAMP_FILTER_PTP_V2_SYNC: 1269 1276 case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: 1270 1277 case HWTSTAMP_FILTER_NTP_ALL: 1271 - conf.rx_filter = HWTSTAMP_FILTER_ALL; 1278 + conf->rx_filter = HWTSTAMP_FILTER_ALL; 1272 1279 break; 1273 1280 default: 1274 1281 return -ERANGE; 1275 1282 } 1276 1283 1277 - if (conf.rx_filter == HWTSTAMP_FILTER_ALL) 1284 + if (conf->rx_filter == HWTSTAMP_FILTER_ALL) 1278 1285 ifstate_set(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED); 1279 1286 1280 1287 else 1281 1288 ifstate_reset(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED); 1282 1289 1283 - return copy_to_user(ifr->ifr_data, &conf, sizeof(conf)) ? -EFAULT : 0; 1290 + return 0; 1284 1291 } 1285 1292 1286 - /** 1287 - * liquidio_ioctl - ioctl handler 1288 - * @netdev: network device 1289 - * @ifr: interface request 1290 - * @cmd: command 1291 - */ 1292 - static int liquidio_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) 1293 + static int liquidio_hwtstamp_get(struct net_device *netdev, 1294 + struct kernel_hwtstamp_config *conf) 1293 1295 { 1294 - switch (cmd) { 1295 - case SIOCSHWTSTAMP: 1296 - return hwtstamp_ioctl(netdev, ifr); 1297 - default: 1298 - return -EOPNOTSUPP; 1299 - } 1296 + struct lio *lio = GET_LIO(netdev); 1297 + 1298 + /* TX timestamping is techically always on */ 1299 + conf->tx_type = HWTSTAMP_TX_ON; 1300 + conf->rx_filter = ifstate_check(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED) ? 1301 + HWTSTAMP_FILTER_ALL : HWTSTAMP_FILTER_NONE; 1302 + return 0; 1300 1303 } 1301 1304 1302 1305 static void handle_timestamp(struct octeon_device *oct, u32 status, void *buf) ··· 1870 1881 .ndo_vlan_rx_add_vid = liquidio_vlan_rx_add_vid, 1871 1882 .ndo_vlan_rx_kill_vid = liquidio_vlan_rx_kill_vid, 1872 1883 .ndo_change_mtu = liquidio_change_mtu, 1873 - .ndo_eth_ioctl = liquidio_ioctl, 1874 1884 .ndo_fix_features = liquidio_fix_features, 1875 1885 .ndo_set_features = liquidio_set_features, 1886 + .ndo_hwtstamp_get = liquidio_hwtstamp_get, 1887 + .ndo_hwtstamp_set = liquidio_hwtstamp_set, 1876 1888 }; 1877 1889 1878 1890 static int lio_nic_info(struct octeon_recv_info *recv_info, void *buf)
+32 -30
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
··· 690 690 return IRQ_HANDLED; 691 691 } 692 692 693 - static int octeon_mgmt_ioctl_hwtstamp(struct net_device *netdev, 694 - struct ifreq *rq, int cmd) 693 + static int octeon_mgmt_hwtstamp_set(struct net_device *netdev, 694 + struct kernel_hwtstamp_config *config, 695 + struct netlink_ext_ack *extack) 695 696 { 696 697 struct octeon_mgmt *p = netdev_priv(netdev); 697 - struct hwtstamp_config config; 698 - union cvmx_mio_ptp_clock_cfg ptp; 699 698 union cvmx_agl_gmx_rxx_frm_ctl rxx_frm_ctl; 699 + union cvmx_mio_ptp_clock_cfg ptp; 700 700 bool have_hw_timestamps = false; 701 701 702 - if (copy_from_user(&config, rq->ifr_data, sizeof(config))) 703 - return -EFAULT; 704 - 705 - /* Check the status of hardware for tiemstamps */ 702 + /* Check the status of hardware for timestamps */ 706 703 if (OCTEON_IS_MODEL(OCTEON_CN6XXX)) { 707 704 /* Get the current state of the PTP clock */ 708 705 ptp.u64 = cvmx_read_csr(CVMX_MIO_PTP_CLOCK_CFG); ··· 730 733 have_hw_timestamps = true; 731 734 } 732 735 733 - if (!have_hw_timestamps) 736 + if (!have_hw_timestamps) { 737 + NL_SET_ERR_MSG_MOD(extack, "HW doesn't support timestamping"); 734 738 return -EINVAL; 739 + } 735 740 736 - switch (config.tx_type) { 741 + switch (config->tx_type) { 737 742 case HWTSTAMP_TX_OFF: 738 743 case HWTSTAMP_TX_ON: 739 744 break; ··· 743 744 return -ERANGE; 744 745 } 745 746 746 - switch (config.rx_filter) { 747 + switch (config->rx_filter) { 747 748 case HWTSTAMP_FILTER_NONE: 748 749 p->has_rx_tstamp = false; 749 750 rxx_frm_ctl.u64 = cvmx_read_csr(p->agl + AGL_GMX_RX_FRM_CTL); ··· 765 766 case HWTSTAMP_FILTER_PTP_V2_SYNC: 766 767 case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: 767 768 case HWTSTAMP_FILTER_NTP_ALL: 768 - p->has_rx_tstamp = have_hw_timestamps; 769 - config.rx_filter = HWTSTAMP_FILTER_ALL; 770 - if (p->has_rx_tstamp) { 771 - rxx_frm_ctl.u64 = cvmx_read_csr(p->agl + AGL_GMX_RX_FRM_CTL); 772 - rxx_frm_ctl.s.ptp_mode = 1; 773 - cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_CTL, rxx_frm_ctl.u64); 774 - } 769 + p->has_rx_tstamp = true; 770 + config->rx_filter = HWTSTAMP_FILTER_ALL; 771 + rxx_frm_ctl.u64 = cvmx_read_csr(p->agl + AGL_GMX_RX_FRM_CTL); 772 + rxx_frm_ctl.s.ptp_mode = 1; 773 + cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_CTL, rxx_frm_ctl.u64); 775 774 break; 776 775 default: 777 776 return -ERANGE; 778 777 } 779 778 780 - if (copy_to_user(rq->ifr_data, &config, sizeof(config))) 781 - return -EFAULT; 782 - 783 779 return 0; 784 780 } 785 781 786 - static int octeon_mgmt_ioctl(struct net_device *netdev, 787 - struct ifreq *rq, int cmd) 782 + static int octeon_mgmt_hwtstamp_get(struct net_device *netdev, 783 + struct kernel_hwtstamp_config *config) 788 784 { 789 - switch (cmd) { 790 - case SIOCSHWTSTAMP: 791 - return octeon_mgmt_ioctl_hwtstamp(netdev, rq, cmd); 792 - default: 793 - return phy_do_ioctl(netdev, rq, cmd); 794 - } 785 + struct octeon_mgmt *p = netdev_priv(netdev); 786 + 787 + /* Check the status of hardware for timestamps */ 788 + if (!OCTEON_IS_MODEL(OCTEON_CN6XXX)) 789 + return -EINVAL; 790 + 791 + config->tx_type = HWTSTAMP_TX_ON; 792 + config->rx_filter = p->has_rx_tstamp ? 793 + HWTSTAMP_FILTER_ALL : 794 + HWTSTAMP_FILTER_NONE; 795 + 796 + return 0; 795 797 } 796 798 797 799 static void octeon_mgmt_disable_link(struct octeon_mgmt *p) ··· 1370 1370 .ndo_start_xmit = octeon_mgmt_xmit, 1371 1371 .ndo_set_rx_mode = octeon_mgmt_set_rx_filtering, 1372 1372 .ndo_set_mac_address = octeon_mgmt_set_mac_address, 1373 - .ndo_eth_ioctl = octeon_mgmt_ioctl, 1373 + .ndo_eth_ioctl = phy_do_ioctl, 1374 1374 .ndo_change_mtu = octeon_mgmt_change_mtu, 1375 1375 #ifdef CONFIG_NET_POLL_CONTROLLER 1376 1376 .ndo_poll_controller = octeon_mgmt_poll_controller, 1377 1377 #endif 1378 + .ndo_hwtstamp_get = octeon_mgmt_hwtstamp_get, 1379 + .ndo_hwtstamp_set = octeon_mgmt_hwtstamp_set, 1378 1380 }; 1379 1381 1380 1382 static int octeon_mgmt_probe(struct platform_device *pdev)
+25 -20
drivers/net/ethernet/cavium/thunder/nicvf_main.c
··· 1899 1899 } 1900 1900 } 1901 1901 1902 - static int nicvf_config_hwtstamp(struct net_device *netdev, struct ifreq *ifr) 1902 + static int nicvf_hwtstamp_set(struct net_device *netdev, 1903 + struct kernel_hwtstamp_config *config, 1904 + struct netlink_ext_ack *extack) 1903 1905 { 1904 - struct hwtstamp_config config; 1905 1906 struct nicvf *nic = netdev_priv(netdev); 1906 1907 1907 - if (!nic->ptp_clock) 1908 + if (!nic->ptp_clock) { 1909 + NL_SET_ERR_MSG_MOD(extack, "HW timestamping is not supported"); 1908 1910 return -ENODEV; 1911 + } 1909 1912 1910 - if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) 1911 - return -EFAULT; 1912 - 1913 - switch (config.tx_type) { 1913 + switch (config->tx_type) { 1914 1914 case HWTSTAMP_TX_OFF: 1915 1915 case HWTSTAMP_TX_ON: 1916 1916 break; ··· 1918 1918 return -ERANGE; 1919 1919 } 1920 1920 1921 - switch (config.rx_filter) { 1921 + switch (config->rx_filter) { 1922 1922 case HWTSTAMP_FILTER_NONE: 1923 1923 nic->hw_rx_tstamp = false; 1924 1924 break; ··· 1937 1937 case HWTSTAMP_FILTER_PTP_V2_SYNC: 1938 1938 case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: 1939 1939 nic->hw_rx_tstamp = true; 1940 - config.rx_filter = HWTSTAMP_FILTER_ALL; 1940 + config->rx_filter = HWTSTAMP_FILTER_ALL; 1941 1941 break; 1942 1942 default: 1943 1943 return -ERANGE; ··· 1946 1946 if (netif_running(netdev)) 1947 1947 nicvf_config_hw_rx_tstamp(nic, nic->hw_rx_tstamp); 1948 1948 1949 - if (copy_to_user(ifr->ifr_data, &config, sizeof(config))) 1950 - return -EFAULT; 1951 - 1952 1949 return 0; 1953 1950 } 1954 1951 1955 - static int nicvf_ioctl(struct net_device *netdev, struct ifreq *req, int cmd) 1952 + static int nicvf_hwtstamp_get(struct net_device *netdev, 1953 + struct kernel_hwtstamp_config *config) 1956 1954 { 1957 - switch (cmd) { 1958 - case SIOCSHWTSTAMP: 1959 - return nicvf_config_hwtstamp(netdev, req); 1960 - default: 1961 - return -EOPNOTSUPP; 1962 - } 1955 + struct nicvf *nic = netdev_priv(netdev); 1956 + 1957 + if (!nic->ptp_clock) 1958 + return -ENODEV; 1959 + 1960 + /* TX timestamping is technically always on */ 1961 + config->tx_type = HWTSTAMP_TX_ON; 1962 + config->rx_filter = nic->hw_rx_tstamp ? 1963 + HWTSTAMP_FILTER_ALL : 1964 + HWTSTAMP_FILTER_NONE; 1965 + 1966 + return 0; 1963 1967 } 1964 1968 1965 1969 static void __nicvf_set_rx_mode_task(u8 mode, struct xcast_addr_list *mc_addrs, ··· 2085 2081 .ndo_fix_features = nicvf_fix_features, 2086 2082 .ndo_set_features = nicvf_set_features, 2087 2083 .ndo_bpf = nicvf_xdp, 2088 - .ndo_eth_ioctl = nicvf_ioctl, 2089 2084 .ndo_set_rx_mode = nicvf_set_rx_mode, 2085 + .ndo_hwtstamp_get = nicvf_hwtstamp_get, 2086 + .ndo_hwtstamp_set = nicvf_hwtstamp_set, 2090 2087 }; 2091 2088 2092 2089 static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+23 -15
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
··· 198 198 pch_ch_event_write(pdev, TX_SNAPSHOT_LOCKED); 199 199 } 200 200 201 - static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) 201 + static int pch_gbe_hwtstamp_set(struct net_device *netdev, 202 + struct kernel_hwtstamp_config *cfg, 203 + struct netlink_ext_ack *extack) 202 204 { 203 - struct hwtstamp_config cfg; 204 205 struct pch_gbe_adapter *adapter = netdev_priv(netdev); 205 206 struct pci_dev *pdev; 206 207 u8 station[20]; 207 208 208 - if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg))) 209 - return -EFAULT; 210 - 211 209 /* Get ieee1588's dev information */ 212 210 pdev = adapter->ptp_pdev; 213 211 214 - if (cfg.tx_type != HWTSTAMP_TX_OFF && cfg.tx_type != HWTSTAMP_TX_ON) 212 + if (cfg->tx_type != HWTSTAMP_TX_OFF && cfg->tx_type != HWTSTAMP_TX_ON) 215 213 return -ERANGE; 216 214 217 - switch (cfg.rx_filter) { 215 + switch (cfg->rx_filter) { 218 216 case HWTSTAMP_FILTER_NONE: 219 217 adapter->hwts_rx_en = 0; 220 218 break; ··· 221 223 pch_ch_control_write(pdev, SLAVE_MODE | CAP_MODE0); 222 224 break; 223 225 case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ: 224 - adapter->hwts_rx_en = 1; 226 + adapter->hwts_rx_en = cfg->rx_filter; 225 227 pch_ch_control_write(pdev, MASTER_MODE | CAP_MODE0); 226 228 break; 227 229 case HWTSTAMP_FILTER_PTP_V2_L4_EVENT: 228 - adapter->hwts_rx_en = 1; 230 + adapter->hwts_rx_en = cfg->rx_filter; 229 231 pch_ch_control_write(pdev, V2_MODE | CAP_MODE2); 230 232 strcpy(station, PTP_L4_MULTICAST_SA); 231 233 pch_set_station_address(station, pdev); 232 234 break; 233 235 case HWTSTAMP_FILTER_PTP_V2_L2_EVENT: 234 - adapter->hwts_rx_en = 1; 236 + adapter->hwts_rx_en = cfg->rx_filter; 235 237 pch_ch_control_write(pdev, V2_MODE | CAP_MODE2); 236 238 strcpy(station, PTP_L2_MULTICAST_SA); 237 239 pch_set_station_address(station, pdev); ··· 240 242 return -ERANGE; 241 243 } 242 244 243 - adapter->hwts_tx_en = cfg.tx_type == HWTSTAMP_TX_ON; 245 + adapter->hwts_tx_en = cfg->tx_type == HWTSTAMP_TX_ON; 244 246 245 247 /* Clear out any old time stamps. */ 246 248 pch_ch_event_write(pdev, TX_SNAPSHOT_LOCKED | RX_SNAPSHOT_LOCKED); 247 249 248 - return copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg)) ? -EFAULT : 0; 250 + return 0; 251 + } 252 + 253 + static int pch_gbe_hwtstamp_get(struct net_device *netdev, 254 + struct kernel_hwtstamp_config *cfg) 255 + { 256 + struct pch_gbe_adapter *adapter = netdev_priv(netdev); 257 + 258 + cfg->tx_type = adapter->hwts_tx_en ? HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF; 259 + cfg->rx_filter = adapter->hwts_rx_en; 260 + 261 + return 0; 249 262 } 250 263 251 264 static inline void pch_gbe_mac_load_mac_addr(struct pch_gbe_hw *hw) ··· 2243 2234 2244 2235 netdev_dbg(netdev, "cmd : 0x%04x\n", cmd); 2245 2236 2246 - if (cmd == SIOCSHWTSTAMP) 2247 - return hwtstamp_ioctl(netdev, ifr, cmd); 2248 - 2249 2237 return generic_mii_ioctl(&adapter->mii, if_mii(ifr), cmd, NULL); 2250 2238 } 2251 2239 ··· 2334 2328 #ifdef CONFIG_NET_POLL_CONTROLLER 2335 2329 .ndo_poll_controller = pch_gbe_netpoll, 2336 2330 #endif 2331 + .ndo_hwtstamp_get = pch_gbe_hwtstamp_get, 2332 + .ndo_hwtstamp_set = pch_gbe_hwtstamp_set, 2337 2333 }; 2338 2334 2339 2335 static pci_ers_result_t pch_gbe_io_error_detected(struct pci_dev *pdev,