summaryrefslogtreecommitdiffstats
path: root/sys/dev/cardbus
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-03-18 05:19:50 +0000
committerimp <imp@FreeBSD.org>2005-03-18 05:19:50 +0000
commit7e9a7073ef377ae41f09b4dfb21c34a4a6b3a12c (patch)
treeda2c3750864cc53bd818a0507a4f549420b82c39 /sys/dev/cardbus
parent52e8c7d46a9820283781fda9233bdf609931135f (diff)
downloadFreeBSD-src-7e9a7073ef377ae41f09b4dfb21c34a4a6b3a12c.zip
FreeBSD-src-7e9a7073ef377ae41f09b4dfb21c34a4a6b3a12c.tar.gz
Use STAILQ in preference to SLIST for the resources. Insert new resources
last in the list rather than first. This makes the resouces print in the 4.x order rather than the 5.x order (eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This also means that the pci code will once again print the resources in BAR ascending order.
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r--sys/dev/cardbus/cardbus.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c
index 6514396..be90c88 100644
--- a/sys/dev/cardbus/cardbus.c
+++ b/sys/dev/cardbus/cardbus.c
@@ -107,7 +107,7 @@ cardbus_add_map(device_t cbdev, device_t child, int reg)
uint32_t testval;
int type;
- SLIST_FOREACH(rle, &dinfo->pci.resources, link) {
+ STAILQ_FOREACH(rle, &dinfo->pci.resources, link) {
if (rle->rid == reg)
return;
}
@@ -179,7 +179,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child)
int rid, flags;
count = 0;
- SLIST_FOREACH(rle, &dinfo->pci.resources, link) {
+ STAILQ_FOREACH(rle, &dinfo->pci.resources, link) {
count++;
}
if (count == 0)
@@ -187,7 +187,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child)
barlist = malloc(sizeof(struct resource_list_entry*) * count, M_DEVBUF,
M_WAITOK);
count = 0;
- SLIST_FOREACH(rle, &dinfo->pci.resources, link) {
+ STAILQ_FOREACH(rle, &dinfo->pci.resources, link) {
barlist[count] = rle;
if (rle->type == SYS_RES_IOPORT) {
io_size += rle->count;
@@ -561,7 +561,7 @@ cardbus_release_all_resources(device_t cbdev, struct cardbus_devinfo *dinfo)
struct resource_list_entry *rle;
/* Free all allocated resources */
- SLIST_FOREACH(rle, &dinfo->pci.resources, link) {
+ STAILQ_FOREACH(rle, &dinfo->pci.resources, link) {
if (rle->res) {
if (rman_get_device(rle->res) != cbdev)
device_printf(cbdev, "release_all_resource: "
OpenPOWER on IntegriCloud