52 static const struct pci_device_id ahd_linux_pci_id_table[] = {
81 struct ahd_softc *ahd = pci_get_drvdata(pdev);
84 if ((rc = ahd_suspend(ahd)))
99 ahd_linux_pci_dev_resume(
struct pci_dev *pdev)
101 struct ahd_softc *ahd = pci_get_drvdata(pdev);
109 "failed to enable device after resume (%d)\n", rc);
124 ahd_linux_pci_dev_remove(
struct pci_dev *pdev)
126 struct ahd_softc *ahd = pci_get_drvdata(pdev);
139 ahd_linux_pci_inherit_flags(
struct ahd_softc *ahd)
146 struct ahd_softc *master = pci_get_drvdata(master_pdev);
177 sprintf(buf,
"ahd_pci:%d:%d:%d",
178 ahd_get_pci_bus(pci),
179 ahd_get_pci_slot(pci),
180 ahd_get_pci_function(pci));
220 ahd_linux_pci_inherit_flags(ahd);
222 pci_set_drvdata(pdev, ahd);
228 static struct pci_driver aic79xx_pci_driver = {
230 .probe = ahd_linux_pci_dev_probe,
232 .suspend = ahd_linux_pci_dev_suspend,
233 .resume = ahd_linux_pci_dev_resume,
235 .remove = ahd_linux_pci_dev_remove,
236 .id_table = ahd_linux_pci_id_table
242 return pci_register_driver(&aic79xx_pci_driver);
262 if (*base == 0 || *base2 == 0)
274 ahd_linux_pci_reserve_mem_region(
struct ahd_softc *ahd,
291 base_offset = start - base_page;
298 if (*maddr ==
NULL) {
324 error = ahd_linux_pci_reserve_mem_region(ahd, &base, &maddr);
336 printk(
"aic79xx: PCI Device %d:%d:%d "
337 "failed memory mapped test. Using PIO.\n",
349 printk(
"aic79xx: PCI%d:%d:%d MEM region 0x%llx "
350 "unavailable. Cannot memory map device.\n",
354 (
unsigned long long)base);
360 error = ahd_linux_pci_reserve_io_regions(ahd, &base, &base2);
368 printk(
"aic79xx: PCI%d:%d:%d IO regions 0x%llx and "
369 "0x%llx unavailable. Cannot map device.\n",
373 (
unsigned long long)base,
374 (
unsigned long long)base2);