diff --git a/drivers/net/mctp/mctp-i3c.c b/drivers/net/mctp/mctp-i3c.c index 008e2bb4a0b393..3e2dc03cf64279 100644 --- a/drivers/net/mctp/mctp-i3c.c +++ b/drivers/net/mctp/mctp-i3c.c @@ -412,14 +412,21 @@ static void mctp_i3c_xmit(struct mctp_i3c_bus *mbus, struct sk_buff *skb) data[data_len] = pec; xfer.data.out = data; + + /* add sleep of 1ms before and after the trasmit to give + * time to the slow target devices to empty the previously + * sent requests. Needed especially when the MCTP message + * consists of multiple fragments. + */ + msleep (1); rc = i3c_device_do_priv_xfers(mi->i3c, &xfer, 1); + msleep (1); if (rc == 0) { stats->tx_bytes += data_len; stats->tx_packets++; } else { stats->tx_errors++; } - out: if (mi) mutex_unlock(&mi->lock); diff --git a/net/mctp/route.c b/net/mctp/route.c index 556886bd3636d4..009a4054fc0628 100644 --- a/net/mctp/route.c +++ b/net/mctp/route.c @@ -27,7 +27,7 @@ #include static const unsigned int mctp_message_maxlen = 64 * 1024; -static const unsigned long mctp_key_lifetime = 6 * CONFIG_HZ; +static const unsigned long mctp_key_lifetime = 2 * 6 * CONFIG_HZ; static void mctp_flow_prepare_output(struct sk_buff *skb, struct mctp_dev *dev);