@@ -203,6 +203,18 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue,
203203static inline void netdev_tx_reset_queue (struct netdev_queue * q ) {}
204204#endif
205205
206+ #if LINUX_VERSION_CODE < KERNEL_VERSION (5 ,8 ,0 )
207+ static inline void fsleep (unsigned long usecs )
208+ {
209+ if (usecs <= 10 )
210+ udelay (usecs );
211+ else if (usecs <= 20000 )
212+ usleep_range (usecs , 2 * usecs );
213+ else
214+ msleep (DIV_ROUND_UP (usecs , 1000 ));
215+ }
216+ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */
217+
206218#if LINUX_VERSION_CODE < KERNEL_VERSION (5 ,2 ,0 )
207219#define netdev_xmit_more () (0)
208220#endif
@@ -619,7 +631,7 @@ static inline u32 rtl8126_ethtool_adv_to_mmd_eee_adv_cap2_t(u32 adv)
619631#define RSS_SUFFIX ""
620632#endif
621633
622- #define RTL8126_VERSION "10.014.01 " NAPI_SUFFIX DASH_SUFFIX REALWOW_SUFFIX PTP_SUFFIX RSS_SUFFIX
634+ #define RTL8126_VERSION "10.015.00 " NAPI_SUFFIX DASH_SUFFIX REALWOW_SUFFIX PTP_SUFFIX RSS_SUFFIX
623635#define MODULENAME "r8126"
624636#define PFX MODULENAME ": "
625637
@@ -1637,6 +1649,7 @@ enum RTL8126_register_content {
16371649 RxBufEmpty = 0x01 ,
16381650
16391651 /* Cfg9346Bits */
1652+ Cfg9346_EEM_MASK = 0xC0 ,
16401653 Cfg9346_Lock = 0x00 ,
16411654 Cfg9346_Unlock = 0xC0 ,
16421655 Cfg9346_EEDO = (1 << 0 ),
@@ -1730,8 +1743,11 @@ enum RTL8126_register_content {
17301743
17311744 /* rtl8126_PHYstatus */
17321745 PowerSaveStatus = 0x80 ,
1746+ _1000bpsL = 0x80000 ,
17331747 _5000bpsF = 0x1000 ,
1748+ _5000bpsL = 0x800 ,
17341749 _2500bpsF = 0x400 ,
1750+ _2500bpsL = 0x200 ,
17351751 TxFlowCtrl = 0x40 ,
17361752 RxFlowCtrl = 0x20 ,
17371753 _1000bpsF = 0x10 ,
@@ -2169,6 +2185,7 @@ enum r8126_flag {
21692185 R8126_FLAG_TASK_RESET_PENDING ,
21702186 R8126_FLAG_TASK_ESD_CHECK_PENDING ,
21712187 R8126_FLAG_TASK_LINKCHG_CHECK_PENDING ,
2188+ R8126_FLAG_TASK_LINK_CHECK_PENDING ,
21722189 R8126_FLAG_MAX
21732190};
21742191
@@ -2579,10 +2596,12 @@ struct rtl8126_private {
25792596 struct work_struct reset_task ;
25802597 struct work_struct esd_task ;
25812598 struct work_struct linkchg_task ;
2599+ struct work_struct link_task ;
25822600#else
25832601 struct delayed_work reset_task ;
25842602 struct delayed_work esd_task ;
25852603 struct delayed_work linkchg_task ;
2604+ struct delayed_work link_task ;
25862605#endif
25872606 DECLARE_BITMAP (task_flags , R8126_FLAG_MAX );
25882607 unsigned features ;
@@ -2777,7 +2796,6 @@ struct rtl8126_private {
27772796
27782797 u8 HwSuppPtpVer ;
27792798 u8 EnablePtp ;
2780- u8 ptp_master_mode ;
27812799#ifdef ENABLE_PTP_SUPPORT
27822800 u32 tx_hwtstamp_timeouts ;
27832801 u32 tx_hwtstamp_skipped ;
@@ -2805,6 +2823,8 @@ struct rtl8126_private {
28052823
28062824 u8 HwSuppMacMcuVer ;
28072825 u16 MacMcuPageSize ;
2826+ u64 hw_mcu_patch_code_ver ;
2827+ u64 bin_mcu_patch_code_ver ;
28082828
28092829 u8 HwSuppTcamVer ;
28102830
0 commit comments