From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: kernel@pengutronix.de, netdev@vger.kernel.org,
linux-can@vger.kernel.org,
Thomas Kopp <thomas.kopp@microchip.com>,
kuba@kernel.org, davem@davemloft.net
Subject: Re: [net 21/27] can: mcp251xfd: mcp251xfd_regmap_crc_read(): increase severity of CRC read error messages
Date: Fri, 6 Nov 2020 09:35:05 +0100 [thread overview]
Message-ID: <91259ce4-173e-a4fa-b28a-ace99e7ca004@pengutronix.de> (raw)
In-Reply-To: <20201105181453.GJ7308@work>
[-- Attachment #1.1: Type: text/plain, Size: 3281 bytes --]
On 11/5/20 7:14 PM, Manivannan Sadhasivam wrote:
> On Thu, Nov 05, 2020 at 05:39:31PM +0100, Marc Kleine-Budde wrote:
>> On 11/5/20 5:24 PM, Manivannan Sadhasivam wrote:
>>> Hi Marc,
>>>
>>> On Tue, Nov 03, 2020 at 11:06:30PM +0100, Marc Kleine-Budde wrote:
>>>> During debugging it turned out that some people have setups where the SPI
>>>> communication is more prone to CRC errors.
>>>>
>>>> Increase the severity of both the transfer retry and transfer failure message
>>>> to give users feedback without the need to recompile the driver with debug
>>>> enabled.
>>>>
>>>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>>>> Cc: Thomas Kopp <thomas.kopp@microchip.com>
>>>> Link: http://lore.kernel.org/r/20201019190524.1285319-15-mkl@pengutronix.de
>>>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>>>> ---
>>>> drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c | 16 ++++++++--------
>>>> 1 file changed, 8 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c
>>>> index ba25902dd78c..c9ffc5ea2b25 100644
>>>> --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c
>>>> +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c
>>>> @@ -330,17 +330,17 @@ mcp251xfd_regmap_crc_read(void *context,
>>>> goto out;
>>>> }
>>>>
>>>> - netdev_dbg(priv->ndev,
>>>> - "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x) retrying.\n",
>>>> - reg, val_len, (int)val_len, buf_rx->data,
>>>> - get_unaligned_be16(buf_rx->data + val_len));
>>>> - }
>>>> -
>>>> - if (err) {
>>>> netdev_info(priv->ndev,
>>>> - "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x).\n",
>>>> + "CRC read error at address 0x%04x (length=%zd, data=%*ph, CRC=0x%04x) retrying.\n",
>>>> reg, val_len, (int)val_len, buf_rx->data,
>>>> get_unaligned_be16(buf_rx->data + val_len));
>>>
>>> I'm not finding this inner debug log useful. Does the user really care
>>> about the iterations it took to read a register? Just throwing the error
>>> after max try seems better to me.
>>
>> Bitflips on the SPI should not happen, at least not regularly. Even with my
>> breadboard setup and max SPI frequency, I don't see any SPI CRC errors, unless
>> there is bad cabling. Then a retry most of the times helps and the user doesn't
>> notice. This drops performance...Yes logging drop performance, too, but at least
>> someone will notice.
>>
>> My rationale was to give the user feedback and not cover a potential problem.
>> The driver is new and probably not widely used and I have no idea how often it
>> runs into read-CRC problems in production use.
>>
>
> Okay. Let's see if anyone complain ;)
>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
The patch is part of my pull request and has already been merged by Jakub to
net/master.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-11-06 8:35 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 22:06 pull-request: can 2020-11-03 Marc Kleine-Budde
2020-11-03 22:06 ` [net 01/27] dt-bindings: can: add can-controller.yaml Marc Kleine-Budde
2020-11-03 22:06 ` [net 02/27] dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml Marc Kleine-Budde
2020-11-03 22:06 ` [net 03/27] can: proc: can_remove_proc(): silence remove_proc_entry warning Marc Kleine-Budde
2020-11-03 22:06 ` [net 04/27] can: rx-offload: don't call kfree_skb() from IRQ context Marc Kleine-Budde
2020-11-03 22:06 ` [net 05/27] can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard " Marc Kleine-Budde
2020-11-04 1:21 ` Jakub Kicinski
2020-11-04 4:29 ` Vincent MAILHOL
2020-11-04 8:16 ` Eric Dumazet
2020-11-04 14:59 ` Oliver Hartkopp
2020-11-04 16:02 ` Jakub Kicinski
2020-11-04 17:46 ` Oliver Hartkopp
2020-11-05 4:47 ` Vincent MAILHOL
2020-11-05 7:44 ` Marc Kleine-Budde
2020-11-03 22:06 ` [net 06/27] can: dev: __can_get_echo_skb(): fix real payload length return value for RTR frames Marc Kleine-Budde
2020-11-03 22:06 ` [net 07/27] can: can_create_echo_skb(): fix echo skb generation: always use skb_clone() Marc Kleine-Budde
2020-11-03 22:06 ` [net 08/27] can: j1939: rename jacd tool Marc Kleine-Budde
2020-11-03 22:06 ` [net 09/27] can: j1939: fix syntax and spelling Marc Kleine-Budde
2020-11-03 22:06 ` [net 10/27] can: j1939: swap addr and pgn in the send example Marc Kleine-Budde
2020-11-03 22:06 ` [net 11/27] can: j1939: use backquotes for code samples Marc Kleine-Budde
2020-11-03 22:06 ` [net 12/27] can: j1939: j1939_sk_bind(): return failure if netdev is down Marc Kleine-Budde
2020-11-03 22:06 ` [net 13/27] can: isotp: Explain PDU in CAN_ISOTP help text Marc Kleine-Budde
2020-11-03 22:06 ` [net 14/27] can: isotp: isotp_rcv_cf(): enable RX timeout handling in listen-only mode Marc Kleine-Budde
2020-11-03 22:06 ` [net 15/27] can: isotp: padlen(): make const array static, makes object smaller Marc Kleine-Budde
2020-11-03 22:06 ` [net 16/27] can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path Marc Kleine-Budde
2020-11-03 22:06 ` [net 17/27] can: xilinx_can: handle failure cases of pm_runtime_get_sync Marc Kleine-Budde
2020-11-03 22:06 ` [net 18/27] can: peak_usb: add range checking in decode operations Marc Kleine-Budde
2020-11-03 22:06 ` [net 19/27] can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping Marc Kleine-Budde
2020-11-03 22:06 ` [net 20/27] can: peak_canfd: pucan_handle_can_rx(): fix echo management when loopback is on Marc Kleine-Budde
2020-11-03 22:06 ` [net 21/27] can: mcp251xfd: mcp251xfd_regmap_crc_read(): increase severity of CRC read error messages Marc Kleine-Budde
2020-11-05 16:24 ` Manivannan Sadhasivam
2020-11-05 16:39 ` Marc Kleine-Budde
2020-11-05 18:14 ` Manivannan Sadhasivam
2020-11-06 8:35 ` Marc Kleine-Budde [this message]
2020-11-03 22:06 ` [net 22/27] can: mcp251xfd: mcp251xfd_regmap_nocrc_read(): fix semicolon.cocci warnings Marc Kleine-Budde
2020-11-03 22:06 ` [net 23/27] can: mcp251xfd: remove unneeded break Marc Kleine-Budde
2020-11-03 22:06 ` [net 24/27] can: flexcan: remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A Marc Kleine-Budde
2020-11-03 22:06 ` [net 25/27] can: flexcan: add ECC initialization for LX2160A Marc Kleine-Budde
2020-11-03 22:06 ` [net 26/27] can: flexcan: add ECC initialization for VF610 Marc Kleine-Budde
2020-11-03 22:06 ` [net 27/27] can: flexcan: flexcan_remove(): disable wakeup completely Marc Kleine-Budde
2020-11-04 18:43 ` pull-request: can 2020-11-03 Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91259ce4-173e-a4fa-b28a-ace99e7ca004@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=thomas.kopp@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).