Projects
home:bitstreamout:Essentials
r8168
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 12
View file
r8168.changes
Changed
@@ -1,8 +1,14 @@ ------------------------------------------------------------------- +Mon Feb 10 11:38:00 UTC 2020 - Werner Fink <werner@suse.de> + +- Update to new version 8.048.00 +- Modify patch r8168-kernel_version.patch as upstream now supports 5.4 + +------------------------------------------------------------------- Tue Nov 26 10:08:11 UTC 2019 - Werner Fink <werner@suse.de> - Update to new version 8.047.05 -- Motify patch r8168-kernel_version.patch to let it build with 5.4 +- Modify patch r8168-kernel_version.patch to let it build with 5.4 ------------------------------------------------------------------- Thu Oct 24 05:49:20 UTC 2019 - Werner Fink <werner@suse.de>
View file
r8168.spec
Changed
@@ -18,7 +18,7 @@ #!BuildIgnore: enough-build-resources Name: r8168 -Version: 8.047.05 +Version: 8.048.00 Release: 0 Summary: Device driver for RealTek Gigabit Ethernet controllers License: GPL-2.0-or-later
View file
r8168-kernel_version.patch
Changed
@@ -1,10 +1,10 @@ --- src/r8168.h | 4 ++++ - src/r8168_n.c | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) + src/r8168_n.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) --- src/r8168.h -+++ src/r8168.h 2019-11-26 10:20:59.180216676 +0000 ++++ src/r8168.h 2020-02-10 11:32:37.788832833 +0000 @@ -116,6 +116,10 @@ do { \ } while (0) #endif //LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) @@ -17,17 +17,8 @@ #if defined(skb_vlan_tag_present) && !defined(vlan_tx_tag_present) #define vlan_tx_tag_present skb_vlan_tag_present --- src/r8168_n.c -+++ src/r8168_n.c 2019-11-26 10:22:05.270987378 +0000 -@@ -56,7 +56,7 @@ - #include <linux/rtnetlink.h> - #include <linux/completion.h> - --#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)) - #include <linux/pci-aspm.h> - #endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,37) -@@ -28476,7 +28476,7 @@ process_pkt: ++++ src/r8168_n.c 2020-02-10 11:32:37.788832833 +0000 +@@ -28535,7 +28535,7 @@ process_pkt: if (rtl8168_rx_vlan_skb(tp, desc, skb) < 0) rtl8168_rx_skb(tp, skb);
View file
r8168-8.047.05.tar.bz2/src/Makefile -> r8168-8.048.00.tar.bz2/src/Makefile
Changed
@@ -38,7 +38,7 @@ CONFIG_ASPM = y ENABLE_S5WOL = y ENABLE_S5_KEEP_CURR_MAC = n -ENABLE_EEE = n +ENABLE_EEE = y ENABLE_S0_MAGIC_PACKET = n ifneq ($(KERNELRELEASE),)
View file
r8168-8.047.05.tar.bz2/src/r8168.h -> r8168-8.048.00.tar.bz2/src/r8168.h
Changed
@@ -250,6 +250,14 @@ #define SUPPORTED_Asym_Pause (1 << 14) #endif +#ifndef MDIO_EEE_100TX +#define MDIO_EEE_100TX 0x0002 +#endif + +#ifndef MDIO_EEE_1000T +#define MDIO_EEE_1000T 0x0004 +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) #ifdef CONFIG_NET_POLL_CONTROLLER #define RTL_NET_POLL_CONTROLLER dev->poll_controller=rtl8168_netpoll @@ -327,7 +335,7 @@ #define DASH_SUFFIX "" #endif -#define RTL8168_VERSION "8.047.05" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX +#define RTL8168_VERSION "8.048.00" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX #define MODULENAME "r8168" #define PFX MODULENAME ": " @@ -430,12 +438,12 @@ #define SHORT_PACKET_PADDING_BUF_SIZE 256 /* write/read MMIO register */ -#define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) -#define RTL_W16(reg, val16) writew ((val16), ioaddr + (reg)) -#define RTL_W32(reg, val32) writel ((val32), ioaddr + (reg)) -#define RTL_R8(reg) readb (ioaddr + (reg)) -#define RTL_R16(reg) readw (ioaddr + (reg)) -#define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg))) +#define RTL_W8(tp, reg, val8) writeb((val8), tp->mmio_addr + (reg)) +#define RTL_W16(tp, reg, val16) writew((val16), tp->mmio_addr + (reg)) +#define RTL_W32(tp, reg, val32) writel((val32), tp->mmio_addr + (reg)) +#define RTL_R8(tp, reg) readb(tp->mmio_addr + (reg)) +#define RTL_R16(tp, reg) readw(tp->mmio_addr + (reg)) +#define RTL_R32(tp, reg) ((unsigned long) readl(tp->mmio_addr + (reg))) #ifndef DMA_64BIT_MASK #define DMA_64BIT_MASK 0xffffffffffffffffULL @@ -1564,6 +1572,8 @@ u32 HwFiberStat; u8 HwSwitchMdiToFiber; + u8 HwSuppPhyOcpVer; + u16 NicCustLedValue; u8 HwSuppMagicPktVer; @@ -1716,6 +1726,7 @@ CFG_METHOD_30, CFG_METHOD_31, CFG_METHOD_32, + CFG_METHOD_33, CFG_METHOD_MAX, CFG_METHOD_DEFAULT = 0xFF }; @@ -1767,7 +1778,7 @@ u32 rtl8168_mdio_read(struct rtl8168_private *tp, u32 RegAddr); u32 rtl8168_mdio_prot_read(struct rtl8168_private *tp, u32 RegAddr); u32 rtl8168_mdio_prot_direct_read_phy_ocp(struct rtl8168_private *tp, u32 RegAddr); -void rtl8168_ephy_write(void __iomem *ioaddr, int RegAddr, int value); +void rtl8168_ephy_write(struct rtl8168_private *tp, int RegAddr, int value); void rtl8168_mac_ocp_write(struct rtl8168_private *tp, u16 reg_addr, u16 value); u16 rtl8168_mac_ocp_read(struct rtl8168_private *tp, u16 reg_addr); void rtl8168_clear_eth_phy_bit(struct rtl8168_private *tp, u8 addr, u16 mask); @@ -1775,16 +1786,16 @@ void rtl8168_ocp_write(struct rtl8168_private *tp, u16 addr, u8 len, u32 data); void rtl8168_oob_notify(struct rtl8168_private *tp, u8 cmd); void rtl8168_init_ring_indexes(struct rtl8168_private *tp); -int rtl8168_eri_write(void __iomem *ioaddr, int addr, int len, u32 value, int type); +int rtl8168_eri_write(struct rtl8168_private *tp, int addr, int len, u32 value, int type); void rtl8168_oob_mutex_lock(struct rtl8168_private *tp); u32 rtl8168_mdio_read(struct rtl8168_private *tp, u32 RegAddr); u32 rtl8168_ocp_read(struct rtl8168_private *tp, u16 addr, u8 len); u32 rtl8168_ocp_read_with_oob_base_address(struct rtl8168_private *tp, u16 addr, u8 len, u32 base_address); u32 rtl8168_ocp_write_with_oob_base_address(struct rtl8168_private *tp, u16 addr, u8 len, u32 value, u32 base_address); -u32 rtl8168_eri_read(void __iomem *ioaddr, int addr, int len, int type); -u32 rtl8168_eri_read_with_oob_base_address(void __iomem *ioaddr, int addr, int len, int type, u32 base_address); -int rtl8168_eri_write_with_oob_base_address(void __iomem *ioaddr, int addr, int len, u32 value, int type, u32 base_address); -u16 rtl8168_ephy_read(void __iomem *ioaddr, int RegAddr); +u32 rtl8168_eri_read(struct rtl8168_private *tp, int addr, int len, int type); +u32 rtl8168_eri_read_with_oob_base_address(struct rtl8168_private *tp, int addr, int len, int type, u32 base_address); +int rtl8168_eri_write_with_oob_base_address(struct rtl8168_private *tp, int addr, int len, u32 value, int type, u32 base_address); +u16 rtl8168_ephy_read(struct rtl8168_private *tp, int RegAddr); void rtl8168_wait_txrx_fifo_empty(struct net_device *dev); void rtl8168_wait_ll_share_fifo_ready(struct net_device *dev); void rtl8168_enable_now_is_oob(struct rtl8168_private *tp);
View file
r8168-8.047.05.tar.bz2/src/r8168_asf.c -> r8168-8.048.00.tar.bz2/src/r8168_asf.c
Changed
@@ -57,7 +57,6 @@ struct ifreq *ifr) { struct rtl8168_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->mmio_addr; void *user_data = ifr->ifr_data; struct asf_ioctl_struct asf_usrdata; unsigned long flags; @@ -72,126 +71,127 @@ switch (asf_usrdata.offset) { case HBPeriod: - rtl8168_asf_hbperiod(ioaddr, asf_usrdata.arg, asf_usrdata.u.data); + rtl8168_asf_hbperiod(tp, asf_usrdata.arg, asf_usrdata.u.data); break; case WD8Timer: break; case WD16Rst: - rtl8168_asf_wd16rst(ioaddr, asf_usrdata.arg, asf_usrdata.u.data); + rtl8168_asf_wd16rst(tp, asf_usrdata.arg, asf_usrdata.u.data); break; case WD8Rst: - rtl8168_asf_time_period(ioaddr, asf_usrdata.arg, WD8Rst, asf_usrdata.u.data); + rtl8168_asf_time_period(tp, asf_usrdata.arg, WD8Rst, asf_usrdata.u.data); break; case LSnsrPollCycle: - rtl8168_asf_time_period(ioaddr, asf_usrdata.arg, LSnsrPollCycle, asf_usrdata.u.data); + rtl8168_asf_time_period(tp, asf_usrdata.arg, LSnsrPollCycle, asf_usrdata.u.data); break; case ASFSnsrPollPrd: - rtl8168_asf_time_period(ioaddr, asf_usrdata.arg, ASFSnsrPollPrd, asf_usrdata.u.data); + rtl8168_asf_time_period(tp, asf_usrdata.arg, ASFSnsrPollPrd, asf_usrdata.u.data); break; case AlertReSendItvl: - rtl8168_asf_time_period(ioaddr, asf_usrdata.arg, AlertReSendItvl, asf_usrdata.u.data); + rtl8168_asf_time_period(tp, asf_usrdata.arg, AlertReSendItvl, asf_usrdata.u.data); break; case SMBAddr: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, SMBAddr, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, SMBAddr, RW_ONE_BYTE, asf_usrdata.u.data); break; case ASFConfigR0: - rtl8168_asf_config_regs(ioaddr, asf_usrdata.arg, ASFConfigR0, asf_usrdata.u.data); + rtl8168_asf_config_regs(tp, asf_usrdata.arg, ASFConfigR0, asf_usrdata.u.data); break; case ASFConfigR1: - rtl8168_asf_config_regs(ioaddr, asf_usrdata.arg, ASFConfigR1, asf_usrdata.u.data); + rtl8168_asf_config_regs(tp, asf_usrdata.arg, ASFConfigR1, asf_usrdata.u.data); break; case ConsoleMA: rtl8168_asf_console_mac(tp, asf_usrdata.arg, asf_usrdata.u.data); break; case ConsoleIP: - rtl8168_asf_ip_address(ioaddr, asf_usrdata.arg, ConsoleIP, asf_usrdata.u.data); + rtl8168_asf_ip_address(tp, asf_usrdata.arg, ConsoleIP, asf_usrdata.u.data); break; case IPAddr: rtl8168_asf_ip_address(tp, asf_usrdata.arg, IPAddr, asf_usrdata.u.data); break; case UUID: - rtl8168_asf_rw_uuid(ioaddr, asf_usrdata.arg, asf_usrdata.u.data); + rtl8168_asf_rw_uuid(tp, asf_usrdata.arg, asf_usrdata.u.data); break; case IANA: - rtl8168_asf_rw_iana(ioaddr, asf_usrdata.arg, asf_usrdata.u.data); + rtl8168_asf_rw_iana(tp, asf_usrdata.arg, asf_usrdata.u.data); break; case SysID: - rtl8168_asf_rw_systemid(ioaddr, asf_usrdata.arg, asf_usrdata.u.data); + rtl8168_asf_rw_systemid(tp, asf_usrdata.arg, asf_usrdata.u.data); break; case Community: - rtl8168_asf_community_string(ioaddr, asf_usrdata.arg, asf_usrdata.u.string); + rtl8168_asf_community_string(tp, asf_usrdata.arg, asf_usrdata.u.string); break; case StringLength: - rtl8168_asf_community_string_len(ioaddr, asf_usrdata.arg, asf_usrdata.u.data); + rtl8168_asf_community_string_len(tp, asf_usrdata.arg, asf_usrdata.u.data); break; case FmCapMsk: - rtl8168_asf_capability_masks(ioaddr, asf_usrdata.arg, FmCapMsk, asf_usrdata.u.data); + rtl8168_asf_capability_masks(tp, asf_usrdata.arg, FmCapMsk, asf_usrdata.u.data); break; case SpCMDMsk: - rtl8168_asf_capability_masks(ioaddr, asf_usrdata.arg, SpCMDMsk, asf_usrdata.u.data); + rtl8168_asf_capability_masks(tp, asf_usrdata.arg, SpCMDMsk, asf_usrdata.u.data); break; case SysCapMsk: - rtl8168_asf_capability_masks(ioaddr, asf_usrdata.arg, SysCapMsk, asf_usrdata.u.data); + rtl8168_asf_capability_masks(tp, asf_usrdata.arg, SysCapMsk, asf_usrdata.u.data); break; case RmtRstAddr: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtRstAddr, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtRstAddr, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtRstCmd: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtRstCmd, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtRstCmd, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtRstData: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtRstData, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtRstData, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPwrOffAddr: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPwrOffAddr, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPwrOffAddr, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPwrOffCmd: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPwrOffCmd, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPwrOffCmd, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPwrOffData: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPwrOffData, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPwrOffData, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPwrOnAddr: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPwrOnAddr, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPwrOnAddr, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPwrOnCmd: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPwrOnCmd, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPwrOnCmd, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPwrOnData: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPwrOnData, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPwrOnData, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPCRAddr: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPCRAddr, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPCRAddr, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPCRCmd: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPCRCmd, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPCRCmd, RW_ONE_BYTE, asf_usrdata.u.data); break; case RmtPCRData: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, RmtPCRData, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, RmtPCRData, RW_ONE_BYTE, asf_usrdata.u.data); break; case ASFSnsr0Addr: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, ASFSnsr0Addr, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, ASFSnsr0Addr, RW_ONE_BYTE, asf_usrdata.u.data); break; case LSnsrAddr0: - rtl8168_asf_rw_hexadecimal(ioaddr, asf_usrdata.arg, LSnsrAddr0, RW_ONE_BYTE, asf_usrdata.u.data); + rtl8168_asf_rw_hexadecimal(tp, asf_usrdata.arg, LSnsrAddr0, RW_ONE_BYTE, asf_usrdata.u.data); break; case KO: /* Get/Set Key Operation */ - rtl8168_asf_key_access(ioaddr, asf_usrdata.arg, KO, asf_usrdata.u.data); + rtl8168_asf_key_access(tp, asf_usrdata.arg, KO, asf_usrdata.u.data); break; case KA: /* Get/Set Key Administrator */ - rtl8168_asf_key_access(ioaddr, asf_usrdata.arg, KA, asf_usrdata.u.data); + rtl8168_asf_key_access(tp, asf_usrdata.arg, KA, asf_usrdata.u.data); break; case KG: /* Get/Set Key Generation */ - rtl8168_asf_key_access(ioaddr, asf_usrdata.arg, KG, asf_usrdata.u.data); + rtl8168_asf_key_access(tp, asf_usrdata.arg, KG, asf_usrdata.u.data); break; case KR: /* Get/Set Key Random */ rtl8168_asf_key_access(tp, asf_usrdata.arg, KR, asf_usrdata.u.data); break; default: + spin_unlock_irqrestore(&tp->lock, flags); return -EOPNOTSUPP; } @@ -203,32 +203,31 @@ return 0; } -void rtl8168_asf_hbperiod(void __iomem *ioaddr, int arg, unsigned int *data) +void rtl8168_asf_hbperiod(struct rtl8168_private *tp, int arg, unsigned int *data) { if (arg == ASF_GET) - data[ASFHBPERIOD] = rtl8168_eri_read(ioaddr, HBPeriod, RW_TWO_BYTES, ERIAR_ASF); + data[ASFHBPERIOD] = rtl8168_eri_read(tp, HBPeriod, RW_TWO_BYTES, ERIAR_ASF); else if (arg == ASF_SET) { - rtl8168_eri_write(ioaddr, HBPeriod, RW_TWO_BYTES, data[ASFHBPERIOD], ERIAR_ASF); - rtl8168_eri_write(ioaddr, 0x1EC, RW_ONE_BYTE, 0x07, ERIAR_ASF); + rtl8168_eri_write(tp, HBPeriod, RW_TWO_BYTES, data[ASFHBPERIOD], ERIAR_ASF); + rtl8168_eri_write(tp, 0x1EC, RW_ONE_BYTE, 0x07, ERIAR_ASF); } } -void rtl8168_asf_wd16rst(void __iomem *ioaddr, int arg, unsigned int *data) +void rtl8168_asf_wd16rst(struct rtl8168_private *tp, int arg, unsigned int *data) { - data[ASFWD16RST] = rtl8168_eri_read(ioaddr, WD16Rst, RW_TWO_BYTES, ERIAR_ASF); + data[ASFWD16RST] = rtl8168_eri_read(tp, WD16Rst, RW_TWO_BYTES, ERIAR_ASF); } void rtl8168_asf_console_mac(struct rtl8168_private *tp, int arg, unsigned int *data) { - void __iomem *ioaddr=tp->mmio_addr; int i;
View file
r8168-8.047.05.tar.bz2/src/r8168_asf.h -> r8168-8.048.00.tar.bz2/src/r8168_asf.h
Changed
@@ -277,18 +277,18 @@ }; int rtl8168_asf_ioctl(struct net_device *dev, struct ifreq *ifr); -void rtl8168_asf_hbperiod(void __iomem *ioaddr, int arg, unsigned int *data); -void rtl8168_asf_wd16rst(void __iomem *ioaddr, int arg, unsigned int *data); +void rtl8168_asf_hbperiod(struct rtl8168_private *tp, int arg, unsigned int *data); +void rtl8168_asf_wd16rst(struct rtl8168_private *tp, int arg, unsigned int *data); void rtl8168_asf_console_mac(struct rtl8168_private *, int arg, unsigned int *data); void rtl8168_asf_ip_address(struct rtl8168_private *, int arg, int offset, unsigned int *data); -void rtl8168_asf_config_regs(void __iomem *ioaddr, int arg, int offset, unsigned int *data); -void rtl8168_asf_capability_masks(void __iomem *ioaddr, int arg, int offset, unsigned int *data); -void rtl8168_asf_community_string(void __iomem *ioaddr, int arg, char *string); -void rtl8168_asf_community_string_len(void __iomem *ioaddr, int arg, unsigned int *data); -void rtl8168_asf_alert_resend_interval(void __iomem *ioaddr, int arg, unsigned int *data); -void rtl8168_asf_time_period(void __iomem *ioaddr, int arg, int offset, unsigned int *data); +void rtl8168_asf_config_regs(struct rtl8168_private *tp, int arg, int offset, unsigned int *data); +void rtl8168_asf_capability_masks(struct rtl8168_private *tp, int arg, int offset, unsigned int *data); +void rtl8168_asf_community_string(struct rtl8168_private *tp, int arg, char *string); +void rtl8168_asf_community_string_len(struct rtl8168_private *tp, int arg, unsigned int *data); +void rtl8168_asf_alert_resend_interval(struct rtl8168_private *tp, int arg, unsigned int *data); +void rtl8168_asf_time_period(struct rtl8168_private *tp, int arg, int offset, unsigned int *data); void rtl8168_asf_key_access(struct rtl8168_private *, int arg, int offset, unsigned int *data); -void rtl8168_asf_rw_hexadecimal(void __iomem *ioaddr, int arg, int offset, int len, unsigned int *data); -void rtl8168_asf_rw_iana(void __iomem *ioaddr, int arg, unsigned int *data); -void rtl8168_asf_rw_uuid(void __iomem *ioaddr, int arg, unsigned int *data); -void rtl8168_asf_rw_systemid(void __iomem *ioaddr, int arg, unsigned int *data); +void rtl8168_asf_rw_hexadecimal(struct rtl8168_private *tp, int arg, int offset, int len, unsigned int *data); +void rtl8168_asf_rw_iana(struct rtl8168_private *tp, int arg, unsigned int *data); +void rtl8168_asf_rw_uuid(struct rtl8168_private *tp, int arg, unsigned int *data); +void rtl8168_asf_rw_systemid(struct rtl8168_private *tp, int arg, unsigned int *data);
View file
r8168-8.047.05.tar.bz2/src/r8168_dash.h -> r8168-8.048.00.tar.bz2/src/r8168_dash.h
Changed
@@ -172,10 +172,10 @@ #define OCP_REG_CONFIG0_DRV_WAIT_OOB BIT_8 #define OCP_REG_CONFIG0_TLSEN BIT_7 -#define HW_DASH_SUPPORT_DASH(_M) ((_M)->HwSuppDashVer > 0 ) -#define HW_DASH_SUPPORT_TYPE_1(_M) ((_M)->HwSuppDashVer == 1 ) -#define HW_DASH_SUPPORT_TYPE_2(_M) ((_M)->HwSuppDashVer == 2 ) -#define HW_DASH_SUPPORT_TYPE_3(_M) ((_M)->HwSuppDashVer == 3 ) +#define HW_DASH_SUPPORT_DASH(_M) ((_M)->HwSuppDashVer > 0) +#define HW_DASH_SUPPORT_TYPE_1(_M) ((_M)->HwSuppDashVer == 1) +#define HW_DASH_SUPPORT_TYPE_2(_M) ((_M)->HwSuppDashVer == 2) +#define HW_DASH_SUPPORT_TYPE_3(_M) ((_M)->HwSuppDashVer == 3) #define RECV_FROM_FW_BUF_SIZE (1520) #define SEND_TO_FW_BUF_SIZE (1520) @@ -241,12 +241,12 @@ #define CMAC_TXDESC_OFFSET 0x98 //TX: 0x98 - 0x9F /* cmac write/read MMIO register */ -#define RTL_CMAC_W8(reg, val8) writeb ((val8), tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_W16(reg, val16) writew ((val16), tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_W32(reg, val32) writel ((val32), tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_R8(reg) readb (tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_R16(reg) readw (tp->cmac_ioaddr + (reg)) -#define RTL_CMAC_R32(reg) ((unsigned long) readl (tp->cmac_ioaddr + (reg))) +#define RTL_CMAC_W8(tp, reg, val8) writeb ((val8), tp->cmac_ioaddr + (reg)) +#define RTL_CMAC_W16(tp, reg, val16) writew ((val16), tp->cmac_ioaddr + (reg)) +#define RTL_CMAC_W32(tp, reg, val32) writel ((val32), tp->cmac_ioaddr + (reg)) +#define RTL_CMAC_R8(tp, reg) readb (tp->cmac_ioaddr + (reg)) +#define RTL_CMAC_R16(tp, reg) readw (tp->cmac_ioaddr + (reg)) +#define RTL_CMAC_R32(tp, reg) ((unsigned long) readl (tp->cmac_ioaddr + (reg))) int rtl8168_dash_ioctl(struct net_device *dev, struct ifreq *ifr); void HandleDashInterrupt(struct net_device *dev);
View file
r8168-8.047.05.tar.bz2/src/r8168_n.c -> r8168-8.048.00.tar.bz2/src/r8168_n.c
Changed
@@ -35,6 +35,10 @@ * This driver is modified from r8169.c in Linux kernel 2.6.18 */ +/* In Linux 5.4 asm_inline was introduced, but it's not supported by clang. + * Redefine it to just asm to enable successful compilation. + */ + #include <linux/module.h> #include <linux/version.h> #include <linux/pci.h> @@ -57,8 +61,10 @@ #include <linux/completion.h> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) #include <linux/pci-aspm.h> #endif +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,37) #include <linux/prefetch.h> #endif @@ -293,6 +299,12 @@ 0xff7e5880, Jumbo_Frame_9k), + _R("RTL8168FP/8111FP", + CFG_METHOD_33, + RxCfg_128_int_en | RxEarly_off_V2 | Rx_Single_fetch_V2 | (RX_DMA_BURST << RxCfgDMAShift), + 0xff7e5880, + Jumbo_Frame_9k), + _R("Unknown", CFG_METHOD_DEFAULT, (RX_DMA_BURST << RxCfgDMAShift), @@ -446,7 +458,7 @@ static void rtl8168_set_rx_mode(struct net_device *dev); static void rtl8168_tx_timeout(struct net_device *dev); static struct net_device_stats *rtl8168_get_stats(struct net_device *dev); -static int rtl8168_rx_interrupt(struct net_device *, struct rtl8168_private *, void __iomem *, napi_budget); +static int rtl8168_rx_interrupt(struct net_device *, struct rtl8168_private *, napi_budget); static int rtl8168_change_mtu(struct net_device *dev, int new_mtu); static void rtl8168_down(struct net_device *dev); @@ -882,7 +894,7 @@ seq_printf(m, "aspm\t0x%x\n", aspm); seq_printf(m, "s5wol\t0x%x\n", s5wol); seq_printf(m, "s5_keep_curr_mac\t0x%x\n", s5_keep_curr_mac); - seq_printf(m, "eee_enable\t0x%x\n", eee_enable); + seq_printf(m, "eee_enable\t0x%x\n", tp->eee_enabled); seq_printf(m, "hwoptimize\t0x%lx\n", hwoptimize); seq_printf(m, "proc_init_num\t0x%x\n", proc_init_num); seq_printf(m, "s0_magic_packet\t0x%x\n", s0_magic_packet); @@ -906,7 +918,6 @@ { struct net_device *dev = m->private; struct rtl8168_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->mmio_addr; struct rtl8168_counters *counters; dma_addr_t paddr; u32 cmd; @@ -925,13 +936,13 @@ } spin_lock_irqsave(&tp->lock, flags); - RTL_W32(CounterAddrHigh, (u64)paddr >> 32); + RTL_W32(tp, CounterAddrHigh, (u64)paddr >> 32); cmd = (u64)paddr & DMA_BIT_MASK(32); - RTL_W32(CounterAddrLow, cmd); - RTL_W32(CounterAddrLow, cmd | CounterDump); + RTL_W32(tp, CounterAddrLow, cmd); + RTL_W32(tp, CounterAddrLow, cmd | CounterDump); WaitCnt = 0; - while (RTL_R32(CounterAddrLow) & CounterDump) { + while (RTL_R32(tp, CounterAddrLow) & CounterDump) { udelay(10); WaitCnt++; @@ -991,7 +1002,6 @@ int i, n, max = R8168_EPHY_REGS_SIZE/2; u16 word_rd; struct rtl8168_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->mmio_addr; unsigned long flags; seq_puts(m, "\nDump PCIE PHY\n"); @@ -1002,7 +1012,7 @@ seq_printf(m, "\n0x%02x:\t", n); for (i = 0; i < 8 && n < max; i++, n++) { - word_rd = rtl8168_ephy_read(ioaddr, n); + word_rd = rtl8168_ephy_read(tp, n); seq_printf(m, "%04x ", word_rd); } } @@ -1046,7 +1056,6 @@ int i, n, max = R8168_ERI_REGS_SIZE; u32 dword_rd; struct rtl8168_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->mmio_addr; unsigned long flags; switch (tp->mcfg) { @@ -1066,7 +1075,7 @@ seq_printf(m, "\n0x%02x:\t", n); for (i = 0; i < 4 && n < max; i++, n+=4) { - dword_rd = rtl8168_eri_read(ioaddr, n, 4, ERIAR_ExGMAC); + dword_rd = rtl8168_eri_read(tp, n, 4, ERIAR_ExGMAC); seq_printf(m, "%08x ", dword_rd); } } @@ -1274,7 +1283,7 @@ aspm, s5wol, s5_keep_curr_mac, - eee_enable, + tp->eee_enabled, hwoptimize, proc_init_num, s0_magic_packet, @@ -1303,7 +1312,6 @@ { struct net_device *dev = data; struct rtl8168_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->mmio_addr; struct rtl8168_counters *counters; dma_addr_t paddr; u32 cmd; @@ -1325,13 +1333,13 @@ } spin_lock_irqsave(&tp->lock, flags); - RTL_W32(CounterAddrHigh, (u64)paddr >> 32); + RTL_W32(tp, CounterAddrHigh, (u64)paddr >> 32); cmd = (u64)paddr & DMA_BIT_MASK(32); - RTL_W32(CounterAddrLow, cmd); - RTL_W32(CounterAddrLow, cmd | CounterDump); + RTL_W32(tp, CounterAddrLow, cmd); + RTL_W32(tp, CounterAddrLow, cmd | CounterDump); WaitCnt = 0; - while (RTL_R32(CounterAddrLow) & CounterDump) { + while (RTL_R32(tp, CounterAddrLow) & CounterDump) { udelay(10); WaitCnt++; @@ -1421,7 +1429,6 @@ int i, n, max = R8168_EPHY_REGS_SIZE/2; u16 word_rd; struct rtl8168_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->mmio_addr; unsigned long flags; int len = 0; @@ -1436,7 +1443,7 @@ n); for (i = 0; i < 8 && n < max; i++, n++) { - word_rd = rtl8168_ephy_read(ioaddr, n); + word_rd = rtl8168_ephy_read(tp, n); len += snprintf(page + len, count - len, "%04x ", word_rd); @@ -1497,7 +1504,6 @@ int i, n, max = R8168_ERI_REGS_SIZE; u32 dword_rd; struct rtl8168_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->mmio_addr; unsigned long flags; int len = 0; @@ -1523,7 +1529,7 @@ n); for (i = 0; i < 4 && n < max; i++, n+=4) { - dword_rd = rtl8168_eri_read(ioaddr, n, 4, ERIAR_ExGMAC); + dword_rd = rtl8168_eri_read(tp, n, 4, ERIAR_ExGMAC); len += snprintf(page + len, count - len, "%08x ", dword_rd); @@ -1750,10 +1756,11 @@ u32 RegAddr, u32 value) { - void __iomem *ioaddr = tp->mmio_addr; u32 data32; int i; + if (tp->HwSuppPhyOcpVer == 0) goto out; + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) WARN_ON_ONCE(RegAddr % 2); #endif @@ -1761,13 +1768,15 @@ data32 <<= OCPR_Addr_Reg_shift; data32 |= OCPR_Write | value; - RTL_W32(PHYOCP, data32);
View file
r8168-8.047.05.tar.bz2/src/rtl_eeprom.c -> r8168-8.048.00.tar.bz2/src/rtl_eeprom.c
Changed
@@ -52,18 +52,17 @@ //------------------------------------------------------------------- void rtl8168_eeprom_type(struct rtl8168_private *tp) { - void __iomem *ioaddr=tp->mmio_addr; u16 magic = 0; if (tp->mcfg == CFG_METHOD_DEFAULT) goto out_no_eeprom; - if(RTL_R8(0xD2)&0x04) { + if(RTL_R8(tp, 0xD2)&0x04) { //not support //tp->eeprom_type = EEPROM_TWSI; //tp->eeprom_len = 256; goto out_no_eeprom; - } else if(RTL_R32(RxConfig) & RxCfg_9356SEL) { + } else if(RTL_R32(tp, RxConfig) & RxCfg_9356SEL) { tp->eeprom_type = EEPROM_TYPE_93C56; tp->eeprom_len = 256; } else { @@ -80,28 +79,28 @@ } } -void rtl8168_eeprom_cleanup(void __iomem *ioaddr) +void rtl8168_eeprom_cleanup(struct rtl8168_private *tp) { u8 x; - x = RTL_R8(Cfg9346); + x = RTL_R8(tp, Cfg9346); x &= ~(Cfg9346_EEDI | Cfg9346_EECS); - RTL_W8(Cfg9346, x); + RTL_W8(tp, Cfg9346, x); - rtl8168_raise_clock(&x, ioaddr); - rtl8168_lower_clock(&x, ioaddr); + rtl8168_raise_clock(tp, &x); + rtl8168_lower_clock(tp, &x); } -int rtl8168_eeprom_cmd_done(void __iomem *ioaddr) +int rtl8168_eeprom_cmd_done(struct rtl8168_private *tp) { u8 x; int i; - rtl8168_stand_by(ioaddr); + rtl8168_stand_by(tp); for (i = 0; i < 50000; i++) { - x = RTL_R8(Cfg9346); + x = RTL_R8(tp, Cfg9346); if (x & Cfg9346_EEDO) { udelay(RTL_CLOCK_RATE * 2 * 3); @@ -119,7 +118,6 @@ //------------------------------------------------------------------- u16 rtl8168_eeprom_read_sc(struct rtl8168_private *tp, u16 reg) { - void __iomem *ioaddr=tp->mmio_addr; int addr_sz = 6; u8 x; u16 data; @@ -134,16 +132,16 @@ addr_sz = 8; x = Cfg9346_EEM1 | Cfg9346_EECS; - RTL_W8(Cfg9346, x); + RTL_W8(tp, Cfg9346, x); - rtl8168_shift_out_bits(RTL_EEPROM_READ_OPCODE, 3, ioaddr); - rtl8168_shift_out_bits(reg, addr_sz, ioaddr); + rtl8168_shift_out_bits(tp, RTL_EEPROM_READ_OPCODE, 3); + rtl8168_shift_out_bits(tp, reg, addr_sz); - data = rtl8168_shift_in_bits(ioaddr); + data = rtl8168_shift_in_bits(tp); - rtl8168_eeprom_cleanup(ioaddr); + rtl8168_eeprom_cleanup(tp); - RTL_W8(Cfg9346, 0); + RTL_W8(tp, Cfg9346, 0); return data; } @@ -154,7 +152,6 @@ //------------------------------------------------------------------- void rtl8168_eeprom_write_sc(struct rtl8168_private *tp, u16 reg, u16 data) { - void __iomem *ioaddr=tp->mmio_addr; u8 x; int addr_sz = 6; int w_dummy_addr = 4; @@ -172,56 +169,56 @@ } x = Cfg9346_EEM1 | Cfg9346_EECS; - RTL_W8(Cfg9346, x); + RTL_W8(tp, Cfg9346, x); - rtl8168_shift_out_bits(RTL_EEPROM_EWEN_OPCODE, 5, ioaddr); - rtl8168_shift_out_bits(reg, w_dummy_addr, ioaddr); - rtl8168_stand_by(ioaddr); + rtl8168_shift_out_bits(tp, RTL_EEPROM_EWEN_OPCODE, 5); + rtl8168_shift_out_bits(tp, reg, w_dummy_addr); + rtl8168_stand_by(tp); - rtl8168_shift_out_bits(RTL_EEPROM_ERASE_OPCODE, 3, ioaddr); - rtl8168_shift_out_bits(reg, addr_sz, ioaddr); - if (rtl8168_eeprom_cmd_done(ioaddr) < 0) { + rtl8168_shift_out_bits(tp, RTL_EEPROM_ERASE_OPCODE, 3); + rtl8168_shift_out_bits(tp, reg, addr_sz); + if (rtl8168_eeprom_cmd_done(tp) < 0) { return; } - rtl8168_stand_by(ioaddr); + rtl8168_stand_by(tp); - rtl8168_shift_out_bits(RTL_EEPROM_WRITE_OPCODE, 3, ioaddr); - rtl8168_shift_out_bits(reg, addr_sz, ioaddr); - rtl8168_shift_out_bits(data, 16, ioaddr); - if (rtl8168_eeprom_cmd_done(ioaddr) < 0) { + rtl8168_shift_out_bits(tp, RTL_EEPROM_WRITE_OPCODE, 3); + rtl8168_shift_out_bits(tp, reg, addr_sz); + rtl8168_shift_out_bits(tp, data, 16); + if (rtl8168_eeprom_cmd_done(tp) < 0) { return; } - rtl8168_stand_by(ioaddr); + rtl8168_stand_by(tp); - rtl8168_shift_out_bits(RTL_EEPROM_EWDS_OPCODE, 5, ioaddr); - rtl8168_shift_out_bits(reg, w_dummy_addr, ioaddr); + rtl8168_shift_out_bits(tp, RTL_EEPROM_EWDS_OPCODE, 5); + rtl8168_shift_out_bits(tp, reg, w_dummy_addr); - rtl8168_eeprom_cleanup(ioaddr); - RTL_W8(Cfg9346, 0); + rtl8168_eeprom_cleanup(tp); + RTL_W8(tp, Cfg9346, 0); } -void rtl8168_raise_clock(u8 *x, void __iomem *ioaddr) +void rtl8168_raise_clock(struct rtl8168_private *tp, u8 *x) { *x = *x | Cfg9346_EESK; - RTL_W8(Cfg9346, *x); + RTL_W8(tp, Cfg9346, *x); udelay(RTL_CLOCK_RATE); } -void rtl8168_lower_clock(u8 *x, void __iomem *ioaddr) +void rtl8168_lower_clock(struct rtl8168_private *tp, u8 *x) { *x = *x & ~Cfg9346_EESK; - RTL_W8(Cfg9346, *x); + RTL_W8(tp, Cfg9346, *x); udelay(RTL_CLOCK_RATE); } -void rtl8168_shift_out_bits(int data, int count, void __iomem *ioaddr) +void rtl8168_shift_out_bits(struct rtl8168_private *tp, int data, int count) { u8 x; int mask; mask = 0x01 << (count - 1); - x = RTL_R8(Cfg9346); + x = RTL_R8(tp, Cfg9346); x &= ~(Cfg9346_EEDI | Cfg9346_EEDO); do { @@ -230,62 +227,62 @@ else x &= ~Cfg9346_EEDI; - RTL_W8(Cfg9346, x); + RTL_W8(tp, Cfg9346, x); udelay(RTL_CLOCK_RATE); - rtl8168_raise_clock(&x, ioaddr); - rtl8168_lower_clock(&x, ioaddr); + rtl8168_raise_clock(tp, &x); + rtl8168_lower_clock(tp, &x); mask = mask >> 1; } while(mask); x &= ~Cfg9346_EEDI; - RTL_W8(Cfg9346, x); + RTL_W8(tp, Cfg9346, x); } -u16 rtl8168_shift_in_bits(void __iomem *ioaddr) +u16 rtl8168_shift_in_bits(struct rtl8168_private *tp) { u8 x;
View file
r8168-8.047.05.tar.bz2/src/rtl_eeprom.h -> r8168-8.048.00.tar.bz2/src/rtl_eeprom.h
Changed
@@ -41,15 +41,15 @@ #define RTL_CLOCK_RATE 3 void rtl8168_eeprom_type(struct rtl8168_private *tp); -void rtl8168_eeprom_cleanup(void __iomem *ioaddr); +void rtl8168_eeprom_cleanup(struct rtl8168_private *tp); u16 rtl8168_eeprom_read_sc(struct rtl8168_private *tp, u16 reg); void rtl8168_eeprom_write_sc(struct rtl8168_private *tp, u16 reg, u16 data); -void rtl8168_shift_out_bits(int data, int count, void __iomem *ioaddr); -u16 rtl8168_shift_in_bits(void __iomem *ioaddr); -void rtl8168_raise_clock(u8 *x, void __iomem *ioaddr); -void rtl8168_lower_clock(u8 *x, void __iomem *ioaddr); -void rtl8168_stand_by(void __iomem *ioaddr); -void rtl8168_set_eeprom_sel_low(void __iomem *ioaddr); +void rtl8168_shift_out_bits(struct rtl8168_private *tp, int data, int count); +u16 rtl8168_shift_in_bits(struct rtl8168_private *tp); +void rtl8168_raise_clock(struct rtl8168_private *tp, u8 *x); +void rtl8168_lower_clock(struct rtl8168_private *tp, u8 *x); +void rtl8168_stand_by(struct rtl8168_private *tp); +void rtl8168_set_eeprom_sel_low(struct rtl8168_private *tp);
View file
r8168-8.047.05.tar.bz2/src/rtltool.c -> r8168-8.048.00.tar.bz2/src/rtltool.c
Changed
@@ -121,7 +121,7 @@ return -EPERM; spin_lock_irqsave(&tp->lock, flags); - my_cmd.data = rtl8168_ephy_read(tp->mmio_addr, my_cmd.offset); + my_cmd.data = rtl8168_ephy_read(tp, my_cmd.offset); spin_unlock_irqrestore(&tp->lock, flags); if (copy_to_user(ifr->ifr_data, &my_cmd, sizeof(my_cmd))) { @@ -136,7 +136,7 @@ return -EPERM; spin_lock_irqsave(&tp->lock, flags); - rtl8168_ephy_write(tp->mmio_addr, my_cmd.offset, my_cmd.data); + rtl8168_ephy_write(tp, my_cmd.offset, my_cmd.data); spin_unlock_irqrestore(&tp->lock, flags); break; @@ -144,7 +144,7 @@ my_cmd.data = 0; if (my_cmd.len==1 || my_cmd.len==2 || my_cmd.len==4) { spin_lock_irqsave(&tp->lock, flags); - my_cmd.data = rtl8168_eri_read(tp->mmio_addr, my_cmd.offset, my_cmd.len, ERIAR_ExGMAC); + my_cmd.data = rtl8168_eri_read(tp, my_cmd.offset, my_cmd.len, ERIAR_ExGMAC); spin_unlock_irqrestore(&tp->lock, flags); } else { ret = -EOPNOTSUPP; @@ -167,7 +167,7 @@ if (my_cmd.len==1 || my_cmd.len==2 || my_cmd.len==4) { spin_lock_irqsave(&tp->lock, flags); - rtl8168_eri_write(tp->mmio_addr, my_cmd.offset, my_cmd.len, my_cmd.data, ERIAR_ExGMAC); + rtl8168_eri_write(tp, my_cmd.offset, my_cmd.len, my_cmd.data, ERIAR_ExGMAC); spin_unlock_irqrestore(&tp->lock, flags); } else { ret = -EOPNOTSUPP;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.