Page MenuHomeFreeBSD

D8071.diff
No OneTemporary

D8071.diff

Index: head/sys/compat/linuxkpi/common/include/linux/pci.h
===================================================================
--- head/sys/compat/linuxkpi/common/include/linux/pci.h
+++ head/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -233,11 +233,16 @@
static inline int
pci_resource_type(struct pci_dev *pdev, int bar)
{
- struct resource_list_entry *rle;
+ struct pci_map *pm;
- if ((rle = _pci_get_bar(pdev, bar)) == NULL)
+ pm = pci_find_bar(pdev->dev.bsddev, PCIR_BAR(bar));
+ if (!pm)
return (-1);
- return (rle->type);
+
+ if (PCI_BAR_IO(pm->pm_value))
+ return (SYS_RES_IOPORT);
+ else
+ return (SYS_RES_MEMORY);
}
/*

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 8:35 PM (21 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14827649
Default Alt Text
D8071.diff (648 B)

Event Timeline