X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lspci.c;h=071cc117bc682c11917e57d6392a987c6a50d528;hb=0ce6ff4aafb36a7923511a8da6bbbebb642e3109;hp=0a96260829d891392a1bca6efbf178e7eeb07bdd;hpb=ee0d3272eb5df84055c117ebf81b3383aa474cc4;p=pciutils.git diff --git a/lspci.c b/lspci.c index 0a96260..071cc11 100644 --- a/lspci.c +++ b/lspci.c @@ -3,7 +3,9 @@ * * Copyright (c) 1997--2020 Martin Mares * - * Can be freely distributed and used under the terms of the GNU GPL. + * Can be freely distributed and used under the terms of the GNU GPL v2+. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ #include @@ -105,6 +107,7 @@ config_fetch(struct device *d, unsigned int pos, unsigned int len) d->config = xrealloc(d->config, d->config_bufsize); d->present = xrealloc(d->present, d->config_bufsize); memset(d->present + orig_size, 0, d->config_bufsize - orig_size); + pci_setup_cache(d->dev, d->config, d->dev->cache_len); } result = pci_read_block(d->dev, pos, d->config + pos, len); if (result)