diff options
author | Nico Huber <nico.h@gmx.de> | 2022-08-05 12:58:18 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-08-17 16:29:39 +0000 |
commit | 5ffc2c8a3f38fbb7be2faadf207590acd3999205 (patch) | |
tree | c46ac16e011b35867b67550a66a57ee0a7333b8c /src/drivers/generic | |
parent | d5ab24cd48006022ca60fe35f0f0366f3edce748 (diff) |
pciexp_device: Join pciexp_find_(next_)extended_cap() APIs
Move the `offset` parameter into pciexp_find_extended_cap(). If it's
called with `0`, we start a new search. If it's an existing offset,
we continue the search.
This makes it easier to search for multiple occurences of a capa-
bility in a single loop.
Change-Id: I80115372a82523b90460d97f0fd0fa565c3f56cb
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66453
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/drivers/generic')
-rw-r--r-- | src/drivers/generic/bayhub_lv2/lv2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/generic/bayhub_lv2/lv2.c b/src/drivers/generic/bayhub_lv2/lv2.c index 3a249e0419..b8d4113994 100644 --- a/src/drivers/generic/bayhub_lv2/lv2.c +++ b/src/drivers/generic/bayhub_lv2/lv2.c @@ -23,7 +23,7 @@ static void lv2_enable_ltr(struct device *dev) if (!pciexp_get_ltr_max_latencies(dev, &max_snoop, &max_nosnoop)) return; - const unsigned int ltr_cap = pciexp_find_extended_cap(dev, PCIE_EXT_CAP_LTR_ID); + const unsigned int ltr_cap = pciexp_find_extended_cap(dev, PCIE_EXT_CAP_LTR_ID, 0); if (!ltr_cap) return; |