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:   Mon, 13 Mar 2023 12:29:50 +0200
From:   Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To:     Mario Limonciello <mario.limonciello@....com>,
        Jan Dąbroś <jsd@...ihalf.com>,
        Grzegorz Bernacki <gjb@...ihalf.com>, Rijo-john.Thomas@....com,
        Thomas.Lendacky@....com, herbert@...dor.apana.org.au,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     Felix.Held@....com, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 8/8] i2c: designware: Add doorbell support for Skyrim

On 3/10/23 23:19, Mario Limonciello wrote:
> Skyrim and later platform don't use the platform feature mailbox for
> communication for I2C arbitration, they rely upon ringing a doorbell.
> 
> Detect the platform by the device ID of the root port and choose the
> appropriate method.
> 
> Link: https://lore.kernel.org/linux-i2c/20220916131854.687371-3-jsd@semihalf.com/
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
> v3->v4:
>   * Adjust to use PCI device ID and function pointers instead
> v2->v3:
>   * Use CPU ID rather than ACPI ID, this will be pushed to a later patch
> v1->v2:
>   * New patch
> ---
>   drivers/i2c/busses/i2c-designware-amdpsp.c | 40 ++++++++++++++++------
>   1 file changed, 30 insertions(+), 10 deletions(-)
> 
...

> @@ -276,6 +289,13 @@ int i2c_dw_amdpsp_probe_lock_support(struct dw_i2c_dev *dev)
>   	if (psp_i2c_dev)
>   		return -EEXIST;
>   
> +	/* Cezanne uses platform mailbox, Skyrim and later use doorbell */
> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
> +	if (rdev->device == 0x1630)
> +		_psp_send_i2c_req = psp_send_i2c_req_cezanne;
> +	else
> +		_psp_send_i2c_req = psp_send_i2c_req_skyrim;
> +

Is there any possibility pci_get_domain_bus_and_slot() returns NULL? Or 
is 00:00.0 always present?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ