Skip to content

Commit eb25df8

Browse files
committed
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-01-10 (ixgbe, igc, iavf) This series contains updates to ixgbe, igc, and iavf drivers. Yang Yingliang adds calls to pci_dev_put() for proper ref count tracking on ixgbe. Christopher adds setting of Toggle on Target Time bits for proper pulse per second (PPS) synchronization for igc. Daniil Tatianin fixes, likely, copy/paste issue that misreported destination instead of source for IP mask for iavf error. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf/iavf_main: actually log ->src mask when talking about it igc: Fix PPS delta between two synchronized end-points ixgbe: fix pci device refcount leak ==================== Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Alexander Duyck <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 97f5e03 + 6650c8e commit eb25df8

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3850,7 +3850,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
38503850
field_flags |= IAVF_CLOUD_FIELD_IIP;
38513851
} else {
38523852
dev_err(&adapter->pdev->dev, "Bad ip src mask 0x%08x\n",
3853-
be32_to_cpu(match.mask->dst));
3853+
be32_to_cpu(match.mask->src));
38543854
return -EINVAL;
38553855
}
38563856
}

drivers/net/ethernet/intel/igc/igc_defines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,9 @@
475475
#define IGC_TSAUXC_EN_TT0 BIT(0) /* Enable target time 0. */
476476
#define IGC_TSAUXC_EN_TT1 BIT(1) /* Enable target time 1. */
477477
#define IGC_TSAUXC_EN_CLK0 BIT(2) /* Enable Configurable Frequency Clock 0. */
478+
#define IGC_TSAUXC_ST0 BIT(4) /* Start Clock 0 Toggle on Target Time 0. */
478479
#define IGC_TSAUXC_EN_CLK1 BIT(5) /* Enable Configurable Frequency Clock 1. */
480+
#define IGC_TSAUXC_ST1 BIT(7) /* Start Clock 1 Toggle on Target Time 1. */
479481
#define IGC_TSAUXC_EN_TS0 BIT(8) /* Enable hardware timestamp 0. */
480482
#define IGC_TSAUXC_AUTT0 BIT(9) /* Auxiliary Timestamp Taken. */
481483
#define IGC_TSAUXC_EN_TS1 BIT(10) /* Enable hardware timestamp 0. */

drivers/net/ethernet/intel/igc/igc_ptp.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int igc_ptp_feature_enable_i225(struct ptp_clock_info *ptp,
322322
ts = ns_to_timespec64(ns);
323323
if (rq->perout.index == 1) {
324324
if (use_freq) {
325-
tsauxc_mask = IGC_TSAUXC_EN_CLK1;
325+
tsauxc_mask = IGC_TSAUXC_EN_CLK1 | IGC_TSAUXC_ST1;
326326
tsim_mask = 0;
327327
} else {
328328
tsauxc_mask = IGC_TSAUXC_EN_TT1;
@@ -333,7 +333,7 @@ static int igc_ptp_feature_enable_i225(struct ptp_clock_info *ptp,
333333
freqout = IGC_FREQOUT1;
334334
} else {
335335
if (use_freq) {
336-
tsauxc_mask = IGC_TSAUXC_EN_CLK0;
336+
tsauxc_mask = IGC_TSAUXC_EN_CLK0 | IGC_TSAUXC_ST0;
337337
tsim_mask = 0;
338338
} else {
339339
tsauxc_mask = IGC_TSAUXC_EN_TT0;
@@ -347,10 +347,12 @@ static int igc_ptp_feature_enable_i225(struct ptp_clock_info *ptp,
347347
tsauxc = rd32(IGC_TSAUXC);
348348
tsim = rd32(IGC_TSIM);
349349
if (rq->perout.index == 1) {
350-
tsauxc &= ~(IGC_TSAUXC_EN_TT1 | IGC_TSAUXC_EN_CLK1);
350+
tsauxc &= ~(IGC_TSAUXC_EN_TT1 | IGC_TSAUXC_EN_CLK1 |
351+
IGC_TSAUXC_ST1);
351352
tsim &= ~IGC_TSICR_TT1;
352353
} else {
353-
tsauxc &= ~(IGC_TSAUXC_EN_TT0 | IGC_TSAUXC_EN_CLK0);
354+
tsauxc &= ~(IGC_TSAUXC_EN_TT0 | IGC_TSAUXC_EN_CLK0 |
355+
IGC_TSAUXC_ST0);
354356
tsim &= ~IGC_TSICR_TT0;
355357
}
356358
if (on) {

drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -855,9 +855,11 @@ static struct pci_dev *ixgbe_get_first_secondary_devfn(unsigned int devfn)
855855
rp_pdev = pci_get_domain_bus_and_slot(0, 0, devfn);
856856
if (rp_pdev && rp_pdev->subordinate) {
857857
bus = rp_pdev->subordinate->number;
858+
pci_dev_put(rp_pdev);
858859
return pci_get_domain_bus_and_slot(0, bus, 0);
859860
}
860861

862+
pci_dev_put(rp_pdev);
861863
return NULL;
862864
}
863865

@@ -874,6 +876,7 @@ static bool ixgbe_x550em_a_has_mii(struct ixgbe_hw *hw)
874876
struct ixgbe_adapter *adapter = hw->back;
875877
struct pci_dev *pdev = adapter->pdev;
876878
struct pci_dev *func0_pdev;
879+
bool has_mii = false;
877880

878881
/* For the C3000 family of SoCs (x550em_a) the internal ixgbe devices
879882
* are always downstream of root ports @ 0000:00:16.0 & 0000:00:17.0
@@ -884,15 +887,16 @@ static bool ixgbe_x550em_a_has_mii(struct ixgbe_hw *hw)
884887
func0_pdev = ixgbe_get_first_secondary_devfn(PCI_DEVFN(0x16, 0));
885888
if (func0_pdev) {
886889
if (func0_pdev == pdev)
887-
return true;
888-
else
889-
return false;
890+
has_mii = true;
891+
goto out;
890892
}
891893
func0_pdev = ixgbe_get_first_secondary_devfn(PCI_DEVFN(0x17, 0));
892894
if (func0_pdev == pdev)
893-
return true;
895+
has_mii = true;
894896

895-
return false;
897+
out:
898+
pci_dev_put(func0_pdev);
899+
return has_mii;
896900
}
897901

898902
/**

0 commit comments

Comments
 (0)