lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Feb 2022 15:00:45 -0600
From:   Terry Bowman <Terry.Bowman@....com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Jean Delvare <jdelvare@...e.de>
Cc:     Guenter Roeck <linux@...ck-us.net>, linux-watchdog@...r.kernel.org,
        linux-i2c <linux-i2c@...r.kernel.org>,
        Wolfram Sang <wsa@...nel.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Robert Richter <rrichter@....com>,
        Tom Lendacky <thomas.lendacky@....com>,
        sudheesh.mavila@....com,
        "Shah, Nehal-bakulchandra" <Nehal-bakulchandra.Shah@....com>,
        Basavaraj Natikar <Basavaraj.Natikar@....com>,
        Shyam Sundar S K <Shyam-sundar.S-k@....com>,
        Mario Limonciello <Mario.Limonciello@....com>
Subject: Re: [PATCH v4 9/9] i2c: piix4: Enable EFCH MMIO for Family 17h+

Hi Andy,

On 2/8/22 14:10, Andy Shevchenko wrote:
> On Tue, Feb 8, 2022 at 6:33 PM Jean Delvare <jdelvare@...e.de> wrote:
>> On Sun, 30 Jan 2022 12:41:30 -0600, Terry Bowman wrote:
> 
> ...
> 
>>> +#define AMD_PCI_SMBUS_REVISION_MMIO          0x51
>>
>> I don't think that was worth a define. You only use the value once, in
>> a context where the symbolic name doesn't add much value IMHO.
> 
> I don't remember the code context here, but it would be nice in such a
> case to convert this definition to a comment (if it's not crystal
> clear what this magic number is about).
> 
> 

diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 239df17ce02b..218ed8efb83e 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -229,6 +229,13 @@ static void piix4_sb800_region_release(struct device *dev,
        release_region(SB800_PIIX4_SMB_IDX, SB800_PIIX4_SMB_MAP_SIZE);
 }
 
+static bool piix4_sb800_use_mmio(struct pci_dev *PIIX4_dev)
+{
+       return (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD &&
+               PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
+               PIIX4_dev->revision >= AMD_PCI_SMBUS_REVISION_MMIO);
+}
+
 static int piix4_setup(struct pci_dev *PIIX4_dev,
                       const struct pci_device_id *id)
 {

----

I added the context above. I'll add a comment in v5 to describe what and 
why 0x51 is used.

Regards,
Terry



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ