diff mbox series

[net-next,v11,12/13] net:ethernet:realtek: Update the Makefile and Kconfig in the realtek folder

Message ID 20231115133414.1221480-13-justinlai0215@realtek.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Add Realtek automotive PCIe driver | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1134 this patch: 1134
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 1161 this patch: 1161
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1161 this patch: 1161
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 25 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Justin Lai Nov. 15, 2023, 1:34 p.m. UTC
1. Add the RTASE entry in the Kconfig.
2. Add the CONFIG_RTASE entry in the Makefile.

Signed-off-by: Justin Lai <justinlai0215@realtek.com>
---
 drivers/net/ethernet/realtek/Kconfig  | 17 +++++++++++++++++
 drivers/net/ethernet/realtek/Makefile |  1 +
 2 files changed, 18 insertions(+)

Comments

kernel test robot Nov. 15, 2023, 7:58 p.m. UTC | #1
Hi Justin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Justin-Lai/net-ethernet-realtek-rtase-Add-pci-table-supported-in-this-module/20231115-213811
base:   net-next/main
patch link:    https://lore.kernel.org/r/20231115133414.1221480-13-justinlai0215%40realtek.com
patch subject: [PATCH net-next v11 12/13] net:ethernet:realtek: Update the Makefile and Kconfig in the realtek folder
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20231116/202311160332.4oEPIsQA-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231116/202311160332.4oEPIsQA-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311160332.4oEPIsQA-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/realtek/rtase/rtase_main.c: In function 'rtase_dump_state':
>> drivers/net/ethernet/realtek/rtase/rtase_main.c:1586:44: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
    1586 |         netdev_err(dev, "Tx phyAddr = 0x%llx\n", ring->phy_addr);
         |                                         ~~~^     ~~~~~~~~~~~~~~
         |                                            |         |
         |                                            |         dma_addr_t {aka unsigned int}
         |                                            long long unsigned int
         |                                         %x
   drivers/net/ethernet/realtek/rtase/rtase_main.c:1592:44: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
    1592 |         netdev_err(dev, "Rx phyAddr = 0x%llx\n", ring->phy_addr);
         |                                         ~~~^     ~~~~~~~~~~~~~~
         |                                            |         |
         |                                            |         dma_addr_t {aka unsigned int}
         |                                            long long unsigned int
         |                                         %x


vim +1586 drivers/net/ethernet/realtek/rtase/rtase_main.c

ee13d5d822aea2 Justin Lai 2023-11-15  1572  
ee13d5d822aea2 Justin Lai 2023-11-15  1573  static void rtase_dump_state(const struct net_device *dev)
ee13d5d822aea2 Justin Lai 2023-11-15  1574  {
ee13d5d822aea2 Justin Lai 2023-11-15  1575  	const struct rtase_private *tp = netdev_priv(dev);
ee13d5d822aea2 Justin Lai 2023-11-15  1576  	const struct rtase_counters *counters;
ee13d5d822aea2 Justin Lai 2023-11-15  1577  	int max_reg_size = RTASE_PCI_REGS_SIZE;
ee13d5d822aea2 Justin Lai 2023-11-15  1578  	const struct rtase_ring *ring;
ee13d5d822aea2 Justin Lai 2023-11-15  1579  	u32 dword_rd;
ee13d5d822aea2 Justin Lai 2023-11-15  1580  	int n = 0;
ee13d5d822aea2 Justin Lai 2023-11-15  1581  
ee13d5d822aea2 Justin Lai 2023-11-15  1582  	ring = &tp->tx_ring[0];
ee13d5d822aea2 Justin Lai 2023-11-15  1583  	netdev_err(dev, "Tx descriptor info:\n");
ee13d5d822aea2 Justin Lai 2023-11-15  1584  	netdev_err(dev, "Tx curIdx = 0x%x\n", ring->cur_idx);
ee13d5d822aea2 Justin Lai 2023-11-15  1585  	netdev_err(dev, "Tx dirtyIdx = 0x%x\n", ring->dirty_idx);
ee13d5d822aea2 Justin Lai 2023-11-15 @1586  	netdev_err(dev, "Tx phyAddr = 0x%llx\n", ring->phy_addr);
ee13d5d822aea2 Justin Lai 2023-11-15  1587  
ee13d5d822aea2 Justin Lai 2023-11-15  1588  	ring = &tp->rx_ring[0];
ee13d5d822aea2 Justin Lai 2023-11-15  1589  	netdev_err(dev, "Rx descriptor info:\n");
ee13d5d822aea2 Justin Lai 2023-11-15  1590  	netdev_err(dev, "Rx curIdx = 0x%x\n", ring->cur_idx);
ee13d5d822aea2 Justin Lai 2023-11-15  1591  	netdev_err(dev, "Rx dirtyIdx = 0x%x\n", ring->dirty_idx);
ee13d5d822aea2 Justin Lai 2023-11-15  1592  	netdev_err(dev, "Rx phyAddr = 0x%llx\n", ring->phy_addr);
ee13d5d822aea2 Justin Lai 2023-11-15  1593  
ee13d5d822aea2 Justin Lai 2023-11-15  1594  	netdev_err(dev, "Device Registers:\n");
ee13d5d822aea2 Justin Lai 2023-11-15  1595  	netdev_err(dev, "Chip Command = 0x%02x\n", rtase_r8(tp, RTASE_CHIP_CMD));
ee13d5d822aea2 Justin Lai 2023-11-15  1596  	netdev_err(dev, "IMR = %08x\n", rtase_r32(tp, RTASE_IMR0));
ee13d5d822aea2 Justin Lai 2023-11-15  1597  	netdev_err(dev, "ISR = %08x\n", rtase_r32(tp, RTASE_ISR0));
ee13d5d822aea2 Justin Lai 2023-11-15  1598  	netdev_err(dev, "Boot Ctrl Reg(0xE004) = %04x\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1599  		   rtase_r16(tp, RTASE_BOOT_CTL));
ee13d5d822aea2 Justin Lai 2023-11-15  1600  	netdev_err(dev, "EPHY ISR(0xE014) = %04x\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1601  		   rtase_r16(tp, RTASE_EPHY_ISR));
ee13d5d822aea2 Justin Lai 2023-11-15  1602  	netdev_err(dev, "EPHY IMR(0xE016) = %04x\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1603  		   rtase_r16(tp, RTASE_EPHY_IMR));
ee13d5d822aea2 Justin Lai 2023-11-15  1604  	netdev_err(dev, "CLKSW SET REG(0xE018) = %04x\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1605  		   rtase_r16(tp, RTASE_CLKSW_SET));
ee13d5d822aea2 Justin Lai 2023-11-15  1606  
ee13d5d822aea2 Justin Lai 2023-11-15  1607  	netdev_err(dev, "Dump PCI Registers:\n");
ee13d5d822aea2 Justin Lai 2023-11-15  1608  
ee13d5d822aea2 Justin Lai 2023-11-15  1609  	while (n < max_reg_size) {
ee13d5d822aea2 Justin Lai 2023-11-15  1610  		if ((n % RTASE_DWORD_MOD) == 0)
ee13d5d822aea2 Justin Lai 2023-11-15  1611  			netdev_err(tp->dev, "0x%03x:\n", n);
ee13d5d822aea2 Justin Lai 2023-11-15  1612  
ee13d5d822aea2 Justin Lai 2023-11-15  1613  		pci_read_config_dword(tp->pdev, n, &dword_rd);
ee13d5d822aea2 Justin Lai 2023-11-15  1614  		netdev_err(tp->dev, "%08x\n", dword_rd);
ee13d5d822aea2 Justin Lai 2023-11-15  1615  		n += 4;
ee13d5d822aea2 Justin Lai 2023-11-15  1616  	}
ee13d5d822aea2 Justin Lai 2023-11-15  1617  
ee13d5d822aea2 Justin Lai 2023-11-15  1618  	netdev_err(dev, "Dump tally counter:\n");
ee13d5d822aea2 Justin Lai 2023-11-15  1619  	counters = tp->tally_vaddr;
ee13d5d822aea2 Justin Lai 2023-11-15  1620  	rtase_dump_tally_counter(tp);
ee13d5d822aea2 Justin Lai 2023-11-15  1621  
ee13d5d822aea2 Justin Lai 2023-11-15  1622  	netdev_err(dev, "tx_packets %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1623  		   le64_to_cpu(counters->tx_packets));
ee13d5d822aea2 Justin Lai 2023-11-15  1624  	netdev_err(dev, "rx_packets %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1625  		   le64_to_cpu(counters->rx_packets));
ee13d5d822aea2 Justin Lai 2023-11-15  1626  	netdev_err(dev, "tx_errors %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1627  		   le64_to_cpu(counters->tx_errors));
ee13d5d822aea2 Justin Lai 2023-11-15  1628  	netdev_err(dev, "rx_missed %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1629  		   le64_to_cpu(counters->rx_missed));
ee13d5d822aea2 Justin Lai 2023-11-15  1630  	netdev_err(dev, "align_errors %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1631  		   le64_to_cpu(counters->align_errors));
ee13d5d822aea2 Justin Lai 2023-11-15  1632  	netdev_err(dev, "tx_one_collision %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1633  		   le64_to_cpu(counters->tx_one_collision));
ee13d5d822aea2 Justin Lai 2023-11-15  1634  	netdev_err(dev, "tx_multi_collision %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1635  		   le64_to_cpu(counters->tx_multi_collision));
ee13d5d822aea2 Justin Lai 2023-11-15  1636  	netdev_err(dev, "rx_unicast %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1637  		   le64_to_cpu(counters->rx_unicast));
ee13d5d822aea2 Justin Lai 2023-11-15  1638  	netdev_err(dev, "rx_broadcast %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1639  		   le64_to_cpu(counters->rx_broadcast));
ee13d5d822aea2 Justin Lai 2023-11-15  1640  	netdev_err(dev, "rx_multicast %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1641  		   le64_to_cpu(counters->rx_multicast));
ee13d5d822aea2 Justin Lai 2023-11-15  1642  	netdev_err(dev, "tx_aborted %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1643  		   le64_to_cpu(counters->tx_aborted));
ee13d5d822aea2 Justin Lai 2023-11-15  1644  	netdev_err(dev, "tx_underun %lld\n",
ee13d5d822aea2 Justin Lai 2023-11-15  1645  		   le64_to_cpu(counters->tx_underun));
ee13d5d822aea2 Justin Lai 2023-11-15  1646  }
ee13d5d822aea2 Justin Lai 2023-11-15  1647
kernel test robot Nov. 21, 2023, 10 a.m. UTC | #2
Hi Justin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Justin-Lai/net-ethernet-realtek-rtase-Add-pci-table-supported-in-this-module/20231115-213811
base:   net-next/main
patch link:    https://lore.kernel.org/r/20231115133414.1221480-13-justinlai0215%40realtek.com
patch subject: [PATCH net-next v11 12/13] net:ethernet:realtek: Update the Makefile and Kconfig in the realtek folder
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20231121/202311211750.4FwMt8rx-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231121/202311211750.4FwMt8rx-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211750.4FwMt8rx-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/realtek/rtase/rtase_main.c:1243:2: warning: variable 'csum_cmd' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
    1243 |         default:
         |         ^~~~~~~
   drivers/net/ethernet/realtek/rtase/rtase_main.c:1255:2: note: uninitialized use occurs here
    1255 |         csum_cmd |= u32_encode_bits(skb_transport_offset(skb), TCPHO_MASK);
         |         ^~~~~~~~
   drivers/net/ethernet/realtek/rtase/rtase_main.c:1230:14: note: initialize the variable 'csum_cmd' to silence this warning
    1230 |         u32 csum_cmd;
         |                     ^
         |                      = 0
>> drivers/net/ethernet/realtek/rtase/rtase_main.c:1268:6: warning: variable 'pkt_len_cnt' set but not used [-Wunused-but-set-variable]
    1268 |         u64 pkt_len_cnt = 0;
         |             ^
   In file included from drivers/net/ethernet/realtek/rtase/rtase_main.c:47:
   In file included from include/linux/delay.h:23:
   In file included from include/linux/sched.h:14:
   In file included from include/linux/pid.h:5:
   In file included from include/linux/rculist.h:11:
   In file included from include/linux/rcupdate.h:26:
   In file included from include/linux/irqflags.h:17:
   In file included from arch/arm64/include/asm/irqflags.h:10:
   In file included from arch/arm64/include/asm/ptrace.h:11:
   In file included from arch/arm64/include/asm/cpufeature.h:26:
   In file included from include/linux/cpumask.h:12:
   In file included from include/linux/bitmap.h:12:
   In file included from include/linux/string.h:295:
   include/linux/fortify-string.h:588:4: warning: call to '__read_overflow2_field' declared with 'warning' attribute: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning]
     588 |                         __read_overflow2_field(q_size_field, size);
         |                         ^
   3 warnings generated.


vim +/csum_cmd +1243 drivers/net/ethernet/realtek/rtase/rtase_main.c

7f5e83b995e2f8 Justin Lai 2023-11-15  1226  
7f5e83b995e2f8 Justin Lai 2023-11-15  1227  static u32 rtase_tx_csum(struct sk_buff *skb, const struct net_device *dev)
7f5e83b995e2f8 Justin Lai 2023-11-15  1228  {
7f5e83b995e2f8 Justin Lai 2023-11-15  1229  	u8 ip_protocol;
7f5e83b995e2f8 Justin Lai 2023-11-15  1230  	u32 csum_cmd;
7f5e83b995e2f8 Justin Lai 2023-11-15  1231  
7f5e83b995e2f8 Justin Lai 2023-11-15  1232  	switch (vlan_get_protocol(skb)) {
7f5e83b995e2f8 Justin Lai 2023-11-15  1233  	case htons(ETH_P_IP):
7f5e83b995e2f8 Justin Lai 2023-11-15  1234  		csum_cmd = TX_IPCS_C;
7f5e83b995e2f8 Justin Lai 2023-11-15  1235  		ip_protocol = ip_hdr(skb)->protocol;
7f5e83b995e2f8 Justin Lai 2023-11-15  1236  		break;
7f5e83b995e2f8 Justin Lai 2023-11-15  1237  
7f5e83b995e2f8 Justin Lai 2023-11-15  1238  	case htons(ETH_P_IPV6):
7f5e83b995e2f8 Justin Lai 2023-11-15  1239  		csum_cmd = TX_IPV6F_C;
7f5e83b995e2f8 Justin Lai 2023-11-15  1240  		ip_protocol = ipv6_hdr(skb)->nexthdr;
7f5e83b995e2f8 Justin Lai 2023-11-15  1241  		break;
7f5e83b995e2f8 Justin Lai 2023-11-15  1242  
7f5e83b995e2f8 Justin Lai 2023-11-15 @1243  	default:
7f5e83b995e2f8 Justin Lai 2023-11-15  1244  		ip_protocol = IPPROTO_RAW;
7f5e83b995e2f8 Justin Lai 2023-11-15  1245  		break;
7f5e83b995e2f8 Justin Lai 2023-11-15  1246  	}
7f5e83b995e2f8 Justin Lai 2023-11-15  1247  
7f5e83b995e2f8 Justin Lai 2023-11-15  1248  	if (ip_protocol == IPPROTO_TCP)
7f5e83b995e2f8 Justin Lai 2023-11-15  1249  		csum_cmd |= TX_TCPCS_C;
7f5e83b995e2f8 Justin Lai 2023-11-15  1250  	else if (ip_protocol == IPPROTO_UDP)
7f5e83b995e2f8 Justin Lai 2023-11-15  1251  		csum_cmd |= TX_UDPCS_C;
7f5e83b995e2f8 Justin Lai 2023-11-15  1252  	else
7f5e83b995e2f8 Justin Lai 2023-11-15  1253  		WARN_ON_ONCE(1);
7f5e83b995e2f8 Justin Lai 2023-11-15  1254  
7f5e83b995e2f8 Justin Lai 2023-11-15  1255  	csum_cmd |= u32_encode_bits(skb_transport_offset(skb), TCPHO_MASK);
7f5e83b995e2f8 Justin Lai 2023-11-15  1256  
7f5e83b995e2f8 Justin Lai 2023-11-15  1257  	return csum_cmd;
7f5e83b995e2f8 Justin Lai 2023-11-15  1258  }
7f5e83b995e2f8 Justin Lai 2023-11-15  1259  
7f5e83b995e2f8 Justin Lai 2023-11-15  1260  static int rtase_xmit_frags(struct rtase_ring *ring, struct sk_buff *skb,
7f5e83b995e2f8 Justin Lai 2023-11-15  1261  			    u32 opts1, u32 opts2)
7f5e83b995e2f8 Justin Lai 2023-11-15  1262  {
7f5e83b995e2f8 Justin Lai 2023-11-15  1263  	const struct skb_shared_info *info = skb_shinfo(skb);
7f5e83b995e2f8 Justin Lai 2023-11-15  1264  	const struct rtase_private *tp = ring->ivec->tp;
7f5e83b995e2f8 Justin Lai 2023-11-15  1265  	const u8 nr_frags = info->nr_frags;
7f5e83b995e2f8 Justin Lai 2023-11-15  1266  	struct tx_desc *txd = NULL;
7f5e83b995e2f8 Justin Lai 2023-11-15  1267  	u32 cur_frag, entry;
7f5e83b995e2f8 Justin Lai 2023-11-15 @1268  	u64 pkt_len_cnt = 0;
7f5e83b995e2f8 Justin Lai 2023-11-15  1269  
7f5e83b995e2f8 Justin Lai 2023-11-15  1270  	entry = ring->cur_idx;
7f5e83b995e2f8 Justin Lai 2023-11-15  1271  	for (cur_frag = 0; cur_frag < nr_frags; cur_frag++) {
7f5e83b995e2f8 Justin Lai 2023-11-15  1272  		const skb_frag_t *frag = &info->frags[cur_frag];
7f5e83b995e2f8 Justin Lai 2023-11-15  1273  		dma_addr_t mapping;
7f5e83b995e2f8 Justin Lai 2023-11-15  1274  		u32 status, len;
7f5e83b995e2f8 Justin Lai 2023-11-15  1275  		void *addr;
7f5e83b995e2f8 Justin Lai 2023-11-15  1276  
7f5e83b995e2f8 Justin Lai 2023-11-15  1277  		entry = (entry + 1) % NUM_DESC;
7f5e83b995e2f8 Justin Lai 2023-11-15  1278  
7f5e83b995e2f8 Justin Lai 2023-11-15  1279  		txd = ring->desc + sizeof(struct tx_desc) * entry;
7f5e83b995e2f8 Justin Lai 2023-11-15  1280  		len = skb_frag_size(frag);
7f5e83b995e2f8 Justin Lai 2023-11-15  1281  		addr = skb_frag_address(frag);
7f5e83b995e2f8 Justin Lai 2023-11-15  1282  		mapping = dma_map_single(&tp->pdev->dev, addr, len,
7f5e83b995e2f8 Justin Lai 2023-11-15  1283  					 DMA_TO_DEVICE);
7f5e83b995e2f8 Justin Lai 2023-11-15  1284  
7f5e83b995e2f8 Justin Lai 2023-11-15  1285  		if (unlikely(dma_mapping_error(&tp->pdev->dev, mapping))) {
7f5e83b995e2f8 Justin Lai 2023-11-15  1286  			if (unlikely(net_ratelimit()))
7f5e83b995e2f8 Justin Lai 2023-11-15  1287  				netdev_err(tp->dev,
7f5e83b995e2f8 Justin Lai 2023-11-15  1288  					   "Failed to map TX fragments DMA!\n");
7f5e83b995e2f8 Justin Lai 2023-11-15  1289  
7f5e83b995e2f8 Justin Lai 2023-11-15  1290  			goto err_out;
7f5e83b995e2f8 Justin Lai 2023-11-15  1291  		}
7f5e83b995e2f8 Justin Lai 2023-11-15  1292  
7f5e83b995e2f8 Justin Lai 2023-11-15  1293  		if (((entry + 1) % NUM_DESC) == 0)
7f5e83b995e2f8 Justin Lai 2023-11-15  1294  			status = (opts1 | len | RING_END);
7f5e83b995e2f8 Justin Lai 2023-11-15  1295  		else
7f5e83b995e2f8 Justin Lai 2023-11-15  1296  			status = opts1 | len;
7f5e83b995e2f8 Justin Lai 2023-11-15  1297  
7f5e83b995e2f8 Justin Lai 2023-11-15  1298  		if (cur_frag == (nr_frags - 1)) {
7f5e83b995e2f8 Justin Lai 2023-11-15  1299  			ring->skbuff[entry] = skb;
7f5e83b995e2f8 Justin Lai 2023-11-15  1300  			status |= TX_LAST_FRAG;
7f5e83b995e2f8 Justin Lai 2023-11-15  1301  		}
7f5e83b995e2f8 Justin Lai 2023-11-15  1302  
7f5e83b995e2f8 Justin Lai 2023-11-15  1303  		ring->mis.len[entry] = len;
7f5e83b995e2f8 Justin Lai 2023-11-15  1304  		txd->addr = cpu_to_le64(mapping);
7f5e83b995e2f8 Justin Lai 2023-11-15  1305  		txd->opts2 = cpu_to_le32(opts2);
7f5e83b995e2f8 Justin Lai 2023-11-15  1306  
7f5e83b995e2f8 Justin Lai 2023-11-15  1307  		/* make sure the operating fields have been updated */
7f5e83b995e2f8 Justin Lai 2023-11-15  1308  		wmb();
7f5e83b995e2f8 Justin Lai 2023-11-15  1309  		txd->opts1 = cpu_to_le32(status);
7f5e83b995e2f8 Justin Lai 2023-11-15  1310  		pkt_len_cnt += len;
7f5e83b995e2f8 Justin Lai 2023-11-15  1311  	}
7f5e83b995e2f8 Justin Lai 2023-11-15  1312  
7f5e83b995e2f8 Justin Lai 2023-11-15  1313  	return cur_frag;
7f5e83b995e2f8 Justin Lai 2023-11-15  1314  
7f5e83b995e2f8 Justin Lai 2023-11-15  1315  err_out:
7f5e83b995e2f8 Justin Lai 2023-11-15  1316  	rtase_tx_clear_range(ring, ring->cur_idx + 1, cur_frag);
7f5e83b995e2f8 Justin Lai 2023-11-15  1317  	return -EIO;
7f5e83b995e2f8 Justin Lai 2023-11-15  1318  }
7f5e83b995e2f8 Justin Lai 2023-11-15  1319
diff mbox series

Patch

diff --git a/drivers/net/ethernet/realtek/Kconfig b/drivers/net/ethernet/realtek/Kconfig
index 93d9df55b361..57ef924deebd 100644
--- a/drivers/net/ethernet/realtek/Kconfig
+++ b/drivers/net/ethernet/realtek/Kconfig
@@ -113,4 +113,21 @@  config R8169
 	  To compile this driver as a module, choose M here: the module
 	  will be called r8169.  This is recommended.
 
+config RTASE
+	tristate "Realtek Automotive Switch 9054/9068/9072/9075/9068/9071 PCIe Interface support"
+	depends on PCI
+	select CRC32
+	help
+	  Say Y here if you have a Realtek Ethernet adapter belonging to
+	  the following families:
+	  RTL9054 5GBit Ethernet
+	  RTL9068 5GBit Ethernet
+	  RTL9072 5GBit Ethernet
+	  RTL9075 5GBit Ethernet
+	  RTL9068 5GBit Ethernet
+	  RTL9071 5GBit Ethernet
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called rtase. This is recommended.
+
 endif # NET_VENDOR_REALTEK
diff --git a/drivers/net/ethernet/realtek/Makefile b/drivers/net/ethernet/realtek/Makefile
index 2e1d78b106b0..0c1c16f63e9a 100644
--- a/drivers/net/ethernet/realtek/Makefile
+++ b/drivers/net/ethernet/realtek/Makefile
@@ -8,3 +8,4 @@  obj-$(CONFIG_8139TOO) += 8139too.o
 obj-$(CONFIG_ATP) += atp.o
 r8169-objs += r8169_main.o r8169_firmware.o r8169_phy_config.o
 obj-$(CONFIG_R8169) += r8169.o
+obj-$(CONFIG_RTASE) += rtase/