On Thu, Jul 27, 2023 at 01:59:38PM +0800, Kevin Hao wrote:
> After the merge of stable v5.15.122 stable kernel (commit 4900bde55da2),
> two blocks to handle the BNB (bus not busy) interrupt were introduced.
> One was added by SDK commit 622176d24add ("i2c: xiic: Fix Tx Interrupt
> path for grouped messages"), and the other was added by stable commit
> 9eaef43fef90 ("i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in
> xiic_process()"). So drop the codes introduced by the SDK commit and
> also restore a bug fix in the original code introduced by SDK commit
> 19d54cfd5ccb ("i2c: xiic: Add smbus_block_read functionality").
> 
> Signed-off-by: Kevin Hao <[email protected]>

Please ignore this, I should sent it with my gmail.

Thanks,
Kevin

> ---
> Hi Bruce,
> 
> Please help me merge this into the following two branches:
>   v5.15/standard/sdkv5.15/xlnx-soc
>   v5.15/standard/preempt-rt/sdkv5.15/xlnx-soc
> 
>  drivers/i2c/busses/i2c-xiic.c | 29 ++++++-----------------------
>  1 file changed, 6 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> index c63cd2e50e13..c490f0ee250e 100644
> --- a/drivers/i2c/busses/i2c-xiic.c
> +++ b/drivers/i2c/busses/i2c-xiic.c
> @@ -700,6 +700,12 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
>               /* The bus is not busy, disable BusNotBusy interrupt */
>               xiic_irq_dis(i2c, XIIC_INTR_BNB_MASK);
>  
> +             if (i2c->tx_msg && i2c->smbus_block_read) {
> +                     i2c->smbus_block_read = false;
> +                     /* Set requested message len=1 to indicate STATE_DONE */
> +                     i2c->tx_msg->len = 1;
> +             }
> +
>               if (!i2c->tx_msg)
>                       goto out;
>  
> @@ -751,29 +757,6 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
>                       xiic_irq_dis(i2c, XIIC_INTR_TX_HALF_MASK);
>       }
>  
> -     if (pend & XIIC_INTR_BNB_MASK) {
> -             /* IIC bus has transitioned to not busy */
> -             clr |= XIIC_INTR_BNB_MASK;
> -
> -             /* The bus is not busy, disable BusNotBusy interrupt */
> -             xiic_irq_dis(i2c, XIIC_INTR_BNB_MASK);
> -
> -             if (i2c->tx_msg && i2c->smbus_block_read) {
> -                     i2c->smbus_block_read = false;
> -                     /* Set requested message len=1 to indicate STATE_DONE */
> -                     i2c->tx_msg->len = 1;
> -             }
> -
> -             if (!i2c->tx_msg)
> -                     goto out;
> -
> -             if (i2c->nmsgs == 1 && !i2c->rx_msg &&
> -                 xiic_tx_space(i2c) == 0)
> -                     xiic_wakeup(i2c, STATE_DONE);
> -             else
> -                     xiic_wakeup(i2c, STATE_ERROR);
> -     }
> -
>  out:
>       dev_dbg(i2c->adap.dev.parent, "%s clr: 0x%x\n", __func__, clr);
>  
> -- 
> 2.39.2
> 

Attachment: signature.asc
Description: PGP signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12895): 
https://lists.yoctoproject.org/g/linux-yocto/message/12895
Mute This Topic: https://lists.yoctoproject.org/mt/100385712/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to