RE: [PATCH net-next v2 1/1] i40e: add support for PTP external synchronization clock
From: Kwapulinski, Piotr <hidden>
Date: 2021-07-22 12:54:36
From: Richard Cochran <richardcochran@gmail.com> Sent: Thursday, July 22, 2021 1:47 PMquoted
On Tue, Jul 20, 2021 at 04:23:48PM -0700, Tony Nguyen wrote:quoted
+/** + * i40e_set_subsystem_device_id - set subsystem device id + * @hw: pointer to the hardware info + * + * Set PCI subsystem device id either from a pci_dev structure or + * a specific FW register. + **/ +static inline void i40e_set_subsystem_device_id(struct i40e_hw *hw) { + struct pci_dev *pdev = ((struct i40e_pf *)hw->back)->pdev; + + hw->subsystem_device_id = pdev->subsystem_device ? + pdev->subsystem_device : + (ushort)(rd32(hw, I40E_PFPCI_SUBSYSID) & USHRT_MAX); } + /** * i40e_probe - Device initialization routine * @pdev: PCI device information struct @@ -15262,7 +15281,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) hw->device_id = pdev->device; pci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id); hw->subsystem_vendor_id = pdev->subsystem_vendor; - hw->subsystem_device_id = pdev->subsystem_device; + i40e_set_subsystem_device_id(hw);What does this have to do with $SUBJECT? Nothing, AFAICT.
It is required to properly handle the pin settings on PF other than 0. Regards, Piotr