Message ID | 50f333a1-2f62-4a2d-5527-7a17eb49ec68@gmail.com |
---|---|
State | New |
Headers | show |
Series | i2c: i801: Series with minor improvements | expand |
On Mon, 19 Dec 2022 19:15:25 +0100, Heiner Kallweit wrote: > According to the datasheet the block process call requires block > buffer mode. The user may disable block buffer mode by module > parameter disable_features, in such a case we have to clear > FEATURE_BLOCK_PROC. > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> > --- > v2: > - add a commit message part as comment to the code > --- > drivers/i2c/busses/i2c-i801.c | 4 ++++ > 1 file changed, 4 insertions(+) > (...) Reviewed-by: Jean Delvare <jdelvare@suse.de>
On Mon, Dec 19, 2022 at 07:15:25PM +0100, Heiner Kallweit wrote: > According to the datasheet the block process call requires block > buffer mode. The user may disable block buffer mode by module > parameter disable_features, in such a case we have to clear > FEATURE_BLOCK_PROC. > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Applied to for-next, thanks!
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 45c2ebe40..2e9c5856a 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1658,6 +1658,10 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) } priv->features &= ~disable_features; + /* The block process call uses block buffer mode */ + if (!(priv->features & FEATURE_BLOCK_BUFFER)) + priv->features &= ~FEATURE_BLOCK_PROC; + err = pcim_enable_device(dev); if (err) { dev_err(&dev->dev, "Failed to enable SMBus PCI device (%d)\n",
According to the datasheet the block process call requires block buffer mode. The user may disable block buffer mode by module parameter disable_features, in such a case we have to clear FEATURE_BLOCK_PROC. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- v2: - add a commit message part as comment to the code --- drivers/i2c/busses/i2c-i801.c | 4 ++++ 1 file changed, 4 insertions(+)