[bug report] i3c: master: svc: Add Silvaco I3C master driver

Miquel Raynal miquel.raynal at bootlin.com
Mon Jul 26 01:48:58 PDT 2021


Hi Dan,

Dan Carpenter <dan.carpenter at oracle.com> wrote on Mon, 26 Jul 2021
10:33:19 +0300:

> Hello Miquel Raynal,
> 
> The patch dd3c52846d59: "i3c: master: svc: Add Silvaco I3C master
> driver" from Jan 21, 2021, leads to the following static checker
> warning:
> 
> 	drivers/i3c/master/svc-i3c-master.c:690 svc_i3c_master_do_daa_locked()
> 	warn: sleeping in atomic context
> 
> drivers/i3c/master/svc-i3c-master.c
>     670 static int svc_i3c_master_do_daa_locked(struct svc_i3c_master *master,
>     671 					u8 *addrs, unsigned int *count)
>     672 {
>     673 	u64 prov_id[SVC_I3C_MAX_DEVS] = {}, nacking_prov_id = 0;
>     674 	unsigned int dev_nb = 0, last_addr = 0;
>     675 	u32 reg;
>     676 	int ret, i;
>     677 
>     678 	while (true) {
>     679 		/* Enter/proceed with DAA */
>     680 		writel(SVC_I3C_MCTRL_REQUEST_PROC_DAA |
>     681 		       SVC_I3C_MCTRL_TYPE_I3C |
>     682 		       SVC_I3C_MCTRL_IBIRESP_NACK |
>     683 		       SVC_I3C_MCTRL_DIR(SVC_I3C_MCTRL_DIR_WRITE),
>     684 		       master->regs + SVC_I3C_MCTRL);
>     685 
>     686 		/*
>     687 		 * Either one slave will send its ID, or the assignment process
>     688 		 * is done.
>     689 		 */
> --> 690 		ret = readl_poll_timeout(master->regs + SVC_I3C_MSTATUS, reg,  
>     691 					 SVC_I3C_MSTATUS_RXPEND(reg) |
>     692 					 SVC_I3C_MSTATUS_MCTRLDONE(reg),
>     693 					 1, 1000);
>                                                  ^
> This is called with a lock held and the code is doing a 1 us sleep.

Yes, there is a pending patch for this:
https://lore.kernel.org/patchwork/patch/1461520/

Thanks anyway for the report!

Thanks,
Miquèl



More information about the linux-i3c mailing list