*
* Copyright (c) 1999 Jari Kirma <kirma@cs.hut.fi>
*
- * 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
*/
/*
}
static int
-aix_bus_open(struct pci_access *a, int bus_number)
+aix_bus_open(struct pci_dev *d)
{
- aix_pci_bus *bp = aix_find_bus(a, bus_number);
+ struct pci_access *a = d->access;
+ aix_pci_bus *bp = aix_find_bus(a, d->bus);
if (bp->bus_fd < 0)
{
snprintf(devbuf, sizeof (devbuf), "/dev/%s", bp->bus_name);
bp->bus_fd = open(devbuf, mode, 0);
if (bp->bus_fd < 0)
- {
- a->error("aix_open_bus: %s open failed", devbuf);
- }
+ a->error("aix_open_bus: %s open failed", devbuf);
}
return bp->bus_fd;
bus_number = pci_buses[i].bus_number;
if (!busmap[bus_number])
{
- pci_generic_scan_bus(a, busmap, bus_number);
+ pci_generic_scan_bus(a, busmap, 0, bus_number);
}
}
}
struct mdio mdio;
int fd;
- if (pos + len > 256)
+ if (d->domain || pos + len > 256)
return 0;
- fd = aix_bus_open(d->access, d->bus);
+ fd = aix_bus_open(d);
mdio.md_addr = (ulong) pos;
mdio.md_size = len;
mdio.md_incr = MV_BYTE;
struct mdio mdio;
int fd;
- if (pos + len > 256)
+ if (d->domain || pos + len > 256)
return 0;
- fd = aix_bus_open(d->access, d->bus);
+ fd = aix_bus_open(d);
mdio.md_addr = (ulong) pos;
mdio.md_size = len;
mdio.md_incr = MV_BYTE;
pci_generic_fill_info,
aix_read,
aix_write,
+ NULL, /* read_vpd */
NULL, /* dev_init */
NULL /* dev_cleanup */
};