|
| 1 | +From 34755569e9c6793e17e6e8eafa8ff33c2e40b15c Mon Sep 17 00:00:00 2001 |
| 2 | +From: Vaishnav Achath <vaishnav.a@ti.com> |
| 3 | +Date: Thu, 15 Dec 2022 22:47:16 +0530 |
| 4 | +Subject: [PATCH 3/3] net: ieee8021541: bcfserial: Increase the number of |
| 5 | + retries for hdlc |
| 6 | + |
| 7 | +During initialization the CC1352 FW will be in a loop |
| 8 | +looking for HDLC ACK and FW response is very slow, but currently |
| 9 | +bcfserial driver expects the CC1352 to respond within 5 ms, but the |
| 10 | +CC1352 takes few 100 ms to complete this operation, thus keep the |
| 11 | +retry count to a high value so that the probe failure does not happen |
| 12 | +due to failling the bcfserial_get_device_capabilities() call.This is |
| 13 | +a one-time setup delay during probe() and does not affect performance. |
| 14 | + |
| 15 | +Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> |
| 16 | +--- |
| 17 | + drivers/net/ieee802154/bcfserial.c | 2 +- |
| 18 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
| 19 | + |
| 20 | +diff --git a/drivers/net/ieee802154/bcfserial.c b/drivers/net/ieee802154/bcfserial.c |
| 21 | +index d8d85d801422..b8d7fa9c7617 100644 |
| 22 | +--- a/drivers/net/ieee802154/bcfserial.c |
| 23 | ++++ b/drivers/net/ieee802154/bcfserial.c |
| 24 | +@@ -232,7 +232,7 @@ static void bcfserial_hdlc_send_ack(struct bcfserial *bcfserial, u8 address, u8 |
| 25 | + |
| 26 | + static int bcfserial_hdlc_receive(struct bcfserial *bcfserial, u8 cmd, void *buffer, size_t count) |
| 27 | + { |
| 28 | +- int retries = 5; |
| 29 | ++ int retries = 80; |
| 30 | + bcfserial->response_size = count; |
| 31 | + bcfserial->response_buffer = (u8*)buffer; |
| 32 | + bcfserial_hdlc_send_cmd(bcfserial, cmd); |
| 33 | +-- |
| 34 | +2.30.2 |
| 35 | + |
0 commit comments