1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

237 Commits

Author SHA1 Message Date
Joachim Foerster
6a975f3433 modules/mqnic/Makefile: Define CPP symbol DEBUG when environment variable DEBUG is provided
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2023-07-07 00:30:52 -07:00
Joachim Foerster
51d5712982 modules/mqnic: Introduce proper error path on failing to allocate RX buffers
This basically allows the "refilling" of RX buffers to fail. A fail to allocate
RX buffers can occur on bringing a network device up or when changing the number
of RX channels at run-time through `ethtool -L <ndev> rx <num>`.

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2023-07-07 00:30:52 -07:00
Alex Forencich
4d2c2071cc modules/mqnic: Fix kernel version ifdef for netif_napi_add
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-07-03 22:54:34 -07:00
Alex Forencich
82df10a356 modules/mqnic: Add missing priv reference
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-27 00:04:09 -07:00
Ulrich Langenbach
21f5a758c9 modules/mqnic: use unsigned short for I2C addresses
the i2c_client defines i2c addresses as unsigned short so we follow
this style
2023-06-26 12:10:27 -07:00
Ulrich Langenbach
b1f14659d9 modules/mqnic: sfp module eeprom i2c address adjustment for full access
* the optical diagnostics data is provided by the SFP modules
   using another I2C address, which must be set via the I2C client
2023-06-26 12:10:27 -07:00
Ulrich Langenbach
6bd8ae031f modules/mqnic: fix SFP EEPROM readout to support optical module diagnosis
* fix offset check for allowing an offset of exactly 256 Bytes
* fix allowing the I2C address of 0x51 to access the optical SFP modules
  diagnosis information, see SFF8472 rev 12.4 p. 8
2023-06-26 12:10:27 -07:00
Alex Forencich
448fa8eb4c Use SPDX
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-26 11:44:57 -07:00
Alex Forencich
6ca5fbfd82 Merge PR #153
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-25 18:51:12 -07:00
Joachim Foerster
12a90c6b71 modules/mqnic: Export existing dropped_packets counter per TX ring to netdev statistics
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
2023-06-22 11:19:11 +02:00
Alex Forencich
902df50c96 modules/mqnic: Add RCB to debug info
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-12 23:52:52 -07:00
Alex Forencich
71c6f3167c modules/mqnic: Request I2C mux kernel module when necessary
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-12 15:36:43 -07:00
Alex Forencich
2c8b1d0e29 fpga/mqnic/520N_MX: Add 25G mqnic design for BittWare 520N-MX
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-12 15:36:26 -07:00
Alex Forencich
9f808c65b2 fpga/mqnic/DK_DEV_1SMX_H_A: Add virtual I2C switch to control modsel pins
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-11 02:05:37 -07:00
Alex Forencich
5099e4a3d5 fpga/mqnic/DK_DEV_AGF014EA: Add virtual I2C switch to control modsel pins
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-11 00:37:50 -07:00
Alex Forencich
a3e7cc4c77 modules/mqnic: Update board config in driver for ADM-PCIE-9V3, Nexus K35P-S, and Nexus K3P-S to support optical module communication
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-10 20:26:33 -07:00
Alex Forencich
397ea57cbd modules/mqnic: software_node struct must be static, just set I2C mux props for all clients instead of attempting to do something dynamic
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-10 20:14:29 -07:00
Alex Forencich
f553be3b65 modules/mqnic: Assert reset during probe of platform device, if connected
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-06-01 23:17:54 -07:00
Alex Forencich
aef62af18c modules/mqnic: Associate messages with netdev
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 22:24:19 -07:00
Alex Forencich
335c731ef0 modules/mqnic: Implement ethtool reg dump API
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 17:44:14 -07:00
Alex Forencich
e76bc8128c modules/mqnic: Implement ethtool rxfh API
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 16:54:37 -07:00
Alex Forencich
32db67b066 modules/mqnic: Improve indirection table handling
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 16:50:59 -07:00
Alex Forencich
eecaef6e6f modules/mqnic: Add some additional range enforcement
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 16:49:28 -07:00
Alex Forencich
7cd40a8e1e modules/mqnic: Minor cleanup
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 16:48:26 -07:00
Alex Forencich
eaceb0bfc7 modules/mqnic: More sensible default queue counts
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:38:23 -07:00
Alex Forencich
8faefe19cd modules/mqnic: Only allocate netdev queue resources for what is supported in HW
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:35:46 -07:00
Alex Forencich
a6da3a41cb modules/mqnic: Implement ethtool channels API
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:35:01 -07:00
Alex Forencich
3302c1f832 modules/mqnic: Implement ethtool ringparam API
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:22:12 -07:00
Alex Forencich
21b8d164cf modules/mqnic: Make mqnic_start_port/mqnic_stop_port non-static so they can be called from mqnic_ethtool
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-03 01:20:07 -07:00
Alex Forencich
3c995dc8e0 Implement dynamic queue allocation in testbench and driver
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-02 21:23:30 -07:00
Alex Forencich
d82f37b3b4 modules/mqnic: Rework teardown sequence
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-02 01:19:30 -07:00
Alex Forencich
9834f8365c Rework resource management in testbenches, driver, and utils
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-05-01 22:04:43 -07:00
Alex Forencich
1c7ae0ee73 modules/mqnic: Return pointers directly and use ERR_PTR during object creation
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-30 21:57:32 -07:00
Alex Forencich
66f5b9fcc1 Clean up naming in testbenches, driver, and utils
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-30 21:48:34 -07:00
Alex Forencich
01680f2ff5 modules/mqnic: Implement I2C interface for fb4CGg3@VU09P
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-30 13:57:29 -07:00
Alex Forencich
3d8bbc4b1c modules/mqnic: Add I2C code for Intel dev kits
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-22 21:58:56 -07:00
Alex Forencich
d1546c0f8e modules/mqnic: Update device IDs
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-22 21:56:08 -07:00
Alex Forencich
bb158d568f Add RX indirection table
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-10 15:05:32 -07:00
Alex Forencich
30379cd8a3 Add phase tag to events and completions to avoid queue pointer reads
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-06 20:43:13 -07:00
Alex Forencich
a8feaf2383 Advance TX/RX queue pointers based on completion records instead of MMIO reads
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-04 22:12:32 -07:00
Alex Forencich
1a8adb646f modules/mqnic: Add ifdefs for kernel API changes related to netif_napi_add/netif_tx_napi_add
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2023-04-04 01:15:50 -07:00
Alex Forencich
66f305c46c modules/mqnic: Added helper methods for converting cycle counts to/from time
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-11-24 01:41:31 -08:00
Alex Forencich
979b7b6030 modules/mqnic: Add statistics counter read support to mqnic kernel module
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-11-23 17:49:38 -08:00
Alex Forencich
051dca3601 modules/mqnic: Add clock info support to mqnic kernel module
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-11-23 17:49:14 -08:00
Alex Forencich
d3942da875 fpga: Add clock info register block
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-10-15 19:45:02 -07:00
Alex Forencich
c5efd8ff0a modules/mqnic: Clean up ring allocation error handling
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-08-15 23:50:36 -07:00
Alex Forencich
693809ab97 modules/mqnic: Use DMA_TO/FROM_DEVICE macros instead of the PCI versions
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-08-06 01:27:19 -07:00
Alex Forencich
03a49d7bc6 Add 25G mqnic design for DE10-Agilex
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-07-19 23:43:22 -07:00
Alex Forencich
debf36a01e modules/mqnic: Add driver support for 250-SoC
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-07-18 22:26:39 -07:00
Alex Forencich
21b0f014a5 Switch to MSI-X
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2022-06-02 23:58:29 -07:00