]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/nbsd-libpci.c
lspci: Decode PCIe DevCtl2 ID-Based Ordering Enables
[pciutils.git] / lib / nbsd-libpci.c
index f57d133d932b3c360fb3f4684e56e9b3a37ef7b5..0f9f27b0f11b89747df9b8309bee4416ea4ee038 100644 (file)
@@ -6,7 +6,9 @@
  *      Copyright (c) 2002 Quentin Garnier <cube@cubidou.net>
  *     Copyright (c) 2002 Martin Mares <mj@ucw.cz>
  *
  *      Copyright (c) 2002 Quentin Garnier <cube@cubidou.net>
  *     Copyright (c) 2002 Martin Mares <mj@ucw.cz>
  *
- *     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
  */
 
 /*
  */
 
 /*
@@ -71,7 +73,7 @@ nbsd_read(struct pci_dev *d, int pos, byte *buf, int len)
   if (!(len == 1 || len == 2 || len == 4))
     return pci_generic_block_read(d, pos, buf, len);
 
   if (!(len == 1 || len == 2 || len == 4))
     return pci_generic_block_read(d, pos, buf, len);
 
-  if (pos >= 4096)
+  if (d->domain || pos >= 4096)
     return 0;
 
   shift = 8*(pos % 4);
     return 0;
 
   shift = 8*(pos % 4);
@@ -104,7 +106,7 @@ nbsd_write(struct pci_dev *d, int pos, byte *buf, int len)
   if (!(len == 1 || len == 2 || len == 4))
     return pci_generic_block_write(d, pos, buf, len);
 
   if (!(len == 1 || len == 2 || len == 4))
     return pci_generic_block_write(d, pos, buf, len);
 
-  if (pos >= 256)
+  if (d->domain || pos >= 256)
     return 0;
 
   /*
     return 0;
 
   /*