| 8ea6e51e | 09-May-2025 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Simplify mse102x_rx_pkt_spi
The function mse102x_rx_pkt_spi is used in two cases: * initial polling to re-arm RX interrupt * level based RX interrupt handler
Both of them d
net: vertexcom: mse102x: Simplify mse102x_rx_pkt_spi
The function mse102x_rx_pkt_spi is used in two cases: * initial polling to re-arm RX interrupt * level based RX interrupt handler
Both of them doesn't need an open-coded retry mechanism. In the first case the function can be called again, if the return code is IRQ_NONE. This keeps the error behavior during netdev open.
In the second case the proper retry would be handled implicit by the SPI interrupt. So drop the retry code and simplify the receive path.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Link: https://patch.msgid.link/20250509120435.43646-7-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 4ecf56f4 | 09-May-2025 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Return code for mse102x_rx_pkt_spi
The MSE102x doesn't provide any interrupt register, so the only way to handle the level interrupt is to fetch the whole packet from the MS
net: vertexcom: mse102x: Return code for mse102x_rx_pkt_spi
The MSE102x doesn't provide any interrupt register, so the only way to handle the level interrupt is to fetch the whole packet from the MSE102x internal buffer via SPI. So in cases the interrupt handler fails to do this, it should return IRQ_NONE. This allows the core to disable the interrupt in case the issue persists and prevent an interrupt storm.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Link: https://patch.msgid.link/20250509120435.43646-6-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 6ce93484 | 09-May-2025 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Implement flag for valid CMD
After removal of the invalid command counter only a relevant debug message is left, which can be cumbersome. So add a new flag to debugfs, which
net: vertexcom: mse102x: Implement flag for valid CMD
After removal of the invalid command counter only a relevant debug message is left, which can be cumbersome. So add a new flag to debugfs, which indicates whether the driver has ever received a valid CMD. This helps to differentiate between general and temporary receive issues.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250509120435.43646-5-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| aeb90c40 | 09-May-2025 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Drop invalid cmd stats
There are several reasons for an invalid command response by the MSE102x: * SPI line interferences * MSE102x is in reset or has no firmware * MSE102x
net: vertexcom: mse102x: Drop invalid cmd stats
There are several reasons for an invalid command response by the MSE102x: * SPI line interferences * MSE102x is in reset or has no firmware * MSE102x is busy * no packet in MSE102x receive buffer
So the counter for invalid command isn't very helpful without further context. So drop the confusing statistics counter, but keep the debug messages about "unexpected response" in order to debug possible hardware issues.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250509120435.43646-4-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| ee512922 | 30-Apr-2025 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Fix RX error handling
In case the CMD_RTS got corrupted by interferences, the MSE102x doesn't allow a retransmission of the command. Instead the Ethernet frame must be shift
net: vertexcom: mse102x: Fix RX error handling
In case the CMD_RTS got corrupted by interferences, the MSE102x doesn't allow a retransmission of the command. Instead the Ethernet frame must be shifted out of the SPI FIFO. Since the actual length is unknown, assume the maximum possible value.
Fixes: 2f207cbf0dd4 ("net: vertexcom: Add MSE102x SPI support") Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250430133043.7722-5-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| d4dda902 | 30-Apr-2025 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Add range check for CMD_RTS
Since there is no protection in the SPI protocol against electrical interferences, the driver shouldn't blindly trust the length payload of CMD_R
net: vertexcom: mse102x: Add range check for CMD_RTS
Since there is no protection in the SPI protocol against electrical interferences, the driver shouldn't blindly trust the length payload of CMD_RTS. So introduce a bounds check for incoming frames.
Fixes: 2f207cbf0dd4 ("net: vertexcom: Add MSE102x SPI support") Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250430133043.7722-4-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 74987089 | 30-Apr-2025 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Fix LEN_MASK
The LEN_MASK for CMD_RTS doesn't cover the whole parameter mask. The Bit 11 is reserved, so adjust LEN_MASK accordingly.
Fixes: 2f207cbf0dd4 ("net: vertexcom:
net: vertexcom: mse102x: Fix LEN_MASK
The LEN_MASK for CMD_RTS doesn't cover the whole parameter mask. The Bit 11 is reserved, so adjust LEN_MASK accordingly.
Fixes: 2f207cbf0dd4 ("net: vertexcom: Add MSE102x SPI support") Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250430133043.7722-3-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| bc682b80 | 27-Aug-2024 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Use ETH_ZLEN
There is already a define for minimum Ethernet frame length without FCS. So used this instead of the magic number.
Signed-off-by: Stefan Wahren <wahrenst@gmx.n
net: vertexcom: mse102x: Use ETH_ZLEN
There is already a define for minimum Ethernet frame length without FCS. So used this instead of the magic number.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240827191000.3244-6-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 7f37d209 | 27-Aug-2024 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Drop log message on remove
This message is a leftover from initial development. It's unnecessary now and can be dropped.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Rev
net: vertexcom: mse102x: Drop log message on remove
This message is a leftover from initial development. It's unnecessary now and can be dropped.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240827191000.3244-5-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| d3a41dc7 | 27-Aug-2024 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Fix random MAC address log
At the time of MAC address assignment the netdev is not registered yet, so netdev log functions won't work as expected. While we are at this downg
net: vertexcom: mse102x: Fix random MAC address log
At the time of MAC address assignment the netdev is not registered yet, so netdev log functions won't work as expected. While we are at this downgrade the log level to a warning, because a random MAC address is not a real error.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240827191000.3244-4-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 0069716d | 27-Aug-2024 |
Stefan Wahren <wahrenst@gmx.net> |
net: vertexcom: mse102x: Silence TX timeout
As long as the MSE102x is not operational, every packet transmission will run into a TX timeout and flood the kernel log. So log only the first TX timeout
net: vertexcom: mse102x: Silence TX timeout
As long as the MSE102x is not operational, every packet transmission will run into a TX timeout and flood the kernel log. So log only the first TX timeout and a user is at least informed about this issue. The amount of timeouts are still available via netstat.
Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240827191000.3244-3-wahrenst@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|