hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/net/ethernet/freescale/fec.h
....@@ -379,8 +379,7 @@
379379 #define FEC_ENET_TS_AVAIL ((uint)0x00010000)
380380 #define FEC_ENET_TS_TIMER ((uint)0x00008000)
381381
382
-#define FEC_DEFAULT_IMASK (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII)
383
-#define FEC_NAPI_IMASK FEC_ENET_MII
382
+#define FEC_DEFAULT_IMASK (FEC_ENET_TXF | FEC_ENET_RXF)
384383 #define FEC_RX_DISABLED_IMASK (FEC_DEFAULT_IMASK & (~FEC_ENET_RXF))
385384
386385 /* ENET interrupt coalescing macro define */
....@@ -460,6 +459,12 @@
460459 */
461460 #define FEC_QUIRK_HAS_FRREG (1 << 16)
462461
462
+/* Some FEC hardware blocks need the MMFR cleared at setup time to avoid
463
+ * the generation of an MII event. This must be avoided in the older
464
+ * FEC blocks where it will stop MII events being generated.
465
+ */
466
+#define FEC_QUIRK_CLEAR_SETUP_MII (1 << 17)
467
+
463468 struct bufdesc_prop {
464469 int qid;
465470 /* Address of Rx and Tx buffers */
....@@ -529,25 +534,18 @@
529534 unsigned int total_tx_ring_size;
530535 unsigned int total_rx_ring_size;
531536
532
- unsigned long work_tx;
533
- unsigned long work_rx;
534
- unsigned long work_ts;
535
- unsigned long work_mdio;
536
-
537537 struct platform_device *pdev;
538538
539539 int dev_id;
540540
541541 /* Phylib and MDIO interface */
542542 struct mii_bus *mii_bus;
543
- int mii_timeout;
544543 uint phy_speed;
545544 phy_interface_t phy_interface;
546545 struct device_node *phy_node;
547546 int link;
548547 int full_duplex;
549548 int speed;
550
- struct completion mdio_done;
551549 int irq[FEC_IRQ_NUM];
552550 bool bufdesc_ex;
553551 int pause_flag;
....@@ -595,12 +593,13 @@
595593 int pps_enable;
596594 unsigned int next_counter;
597595
598
- u64 ethtool_stats[0];
596
+ u64 ethtool_stats[];
599597 };
600598
601599 void fec_ptp_init(struct platform_device *pdev, int irq_idx);
602600 void fec_ptp_stop(struct platform_device *pdev);
603601 void fec_ptp_start_cyclecounter(struct net_device *ndev);
602
+void fec_ptp_disable_hwts(struct net_device *ndev);
604603 int fec_ptp_set(struct net_device *ndev, struct ifreq *ifr);
605604 int fec_ptp_get(struct net_device *ndev, struct ifreq *ifr);
606605