Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103345425
D8071.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
648 B
Referenced Files
None
Subscribers
None
D8071.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8071: use a better method to get BAR type in pci_resource_flags()
Attached
Detach File
Event Timeline
Log In to Comment