> From: Dave Voutila <d...@sisu.io>
> Date: Sun, 12 Feb 2023 12:47:56 -0500
> 
> Noticed on my X1 Carbon gen10 that ichiic(4) complains about a timeout
> while doing a bus scan as part of attach. Traced it down to the fact we
> force polling if the global cold==1 even if the device reports
> supporting interrupts. This fixes the issue and lets the bus scan
> complete without error.
> 
> The line I'm changing goes back 18 years(!) and the commit message
> provided by grange@ doesn't make sense to me either, but maybe I'm
> missing something?
> 
>   "Don't allow slave devices to do polling during autoconf." [1]
> 
> [1] 
> https://github.com/openbsd/src/commit/7ecfa26ef3eb9115fe3e4a564e7030fb789c9c3b.patch
> 
> OK?

nope; during autoconf interrupts don't work, so polling is the right
approach

something else must be wrong with your machine

> diff refs/heads/master refs/heads/ichiic
> commit - 6ee24a5220c5c9d3705bbaad88f90be03e452378
> commit + 3893b74eb3f8993847442ae64d1bf5c509887cb1
> blob - 8fb1221cc3520ddd6feef498e59e062488bb8c0c
> blob + c212f99a96793a02a2ccb6b87e34f598f8b3b6ba
> --- sys/dev/pci/ichiic.c
> +++ sys/dev/pci/ichiic.c
> @@ -258,7 +258,7 @@ ichiic_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t
>       if (st & ICH_SMB_HS_BUSY)
>               return (1);
> 
> -     if (cold || sc->sc_poll)
> +     if (sc->sc_poll)
>               flags |= I2C_F_POLL;
> 
>       if (!I2C_OP_STOP_P(op) || cmdlen > 1 || len > 2)
> 
> 

Reply via email to