Re: [PATCH] i2c: piix4: Fix request_region size

From: Jean Delvare
Date: Sat Jan 28 2017 - 03:36:44 EST


Hi Ricardo,

On ven., 2017-01-27 at 15:59 +0100, Ricardo Ribalda Delgado wrote:
> Since '701dc207bf55 ("i2c: piix4: Avoid race conditions with IMC")'
> we
> are using the SMBSLVCNT register at offset 0x8. We need to request
> it.
>
> Fixes: 701dc207bf55 ("i2c: piix4: Avoid race conditions with IMC")
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx>
> ---
> Please note, not tested on hardware.
> Âdrivers/i2c/busses/i2c-piix4.c | 2 +-
> Â1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-
> piix4.c
> index e34d82e79b98..73cc6799cc59 100644
> --- a/drivers/i2c/busses/i2c-piix4.c
> +++ b/drivers/i2c/busses/i2c-piix4.c
> @@ -58,7 +58,7 @@
> Â#define SMBSLVDAT (0xC + piix4_smba)
> Â
> Â/* count for request_region */
> -#define SMBIOSIZE 8
> +#define SMBIOSIZE 9
>

Are you certain that all supported devices have this extra register?

> Â
> Â/* PCI Address Constants */
> Â#define SMBBA 0x090

--Â
Jean Delvare
SUSE L3 Support