Lines Matching defs:ahc

128 	struct ahc_softc *ahc = pci_get_drvdata(pdev);
131 if ((rc = ahc_suspend(ahc)))
146 struct ahc_softc *ahc = pci_get_drvdata(pdev);
160 ahc_pci_resume(ahc);
162 return (ahc_resume(ahc));
169 struct ahc_softc *ahc = pci_get_drvdata(pdev);
172 if (ahc->platform_data && ahc->platform_data->host)
173 scsi_remove_host(ahc->platform_data->host);
175 ahc_lock(ahc, &s);
176 ahc_intr_enable(ahc, FALSE);
177 ahc_unlock(ahc, &s);
178 ahc_free(ahc);
182 ahc_linux_pci_inherit_flags(struct ahc_softc *ahc)
184 struct pci_dev *pdev = ahc->dev_softc, *master_pdev;
191 ahc->flags &= ~AHC_BIOS_ENABLED;
192 ahc->flags |= master->flags & AHC_BIOS_ENABLED;
194 ahc->flags &= ~AHC_PRIMARY_CHANNEL;
195 ahc->flags |= master->flags & AHC_PRIMARY_CHANNEL;
207 struct ahc_softc *ahc;
231 ahc = ahc_alloc(NULL, name);
232 if (ahc == NULL)
235 ahc_free(ahc);
241 && ahc->features & AHC_LARGE_SCBS
244 ahc->flags |= AHC_39BIT_ADDRESSING;
247 ahc_free(ahc);
252 ahc->dev_softc = pci;
253 error = ahc_pci_config(ahc, entry);
255 ahc_free(ahc);
263 if ((ahc->features & AHC_MULTI_FUNC) && PCI_FUNC(pdev->devfn) != 0)
264 ahc_linux_pci_inherit_flags(ahc);
266 pci_set_drvdata(pdev, ahc);
267 ahc_linux_register_host(ahc, &aic7xxx_driver_template);
346 ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, resource_size_t *base)
351 *base = pci_resource_start(ahc->dev_softc, 0);
360 ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
368 start = pci_resource_start(ahc->dev_softc, 1);
386 ahc_pci_map_registers(struct ahc_softc *ahc)
396 command = ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, 4);
400 error = ahc_linux_pci_reserve_mem_region(ahc, &base, &maddr);
402 ahc->platform_data->mem_busaddr = base;
403 ahc->tag = BUS_SPACE_MEMIO;
404 ahc->bsh.maddr = maddr;
405 ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
412 if (ahc_pci_test_register_access(ahc) != 0) {
416 ahc_get_pci_bus(ahc->dev_softc),
417 ahc_get_pci_slot(ahc->dev_softc),
418 ahc_get_pci_function(ahc->dev_softc));
420 release_mem_region(ahc->platform_data->mem_busaddr,
422 ahc->bsh.maddr = NULL;
429 ahc_get_pci_bus(ahc->dev_softc),
430 ahc_get_pci_slot(ahc->dev_softc),
431 ahc_get_pci_function(ahc->dev_softc),
440 error = ahc_linux_pci_reserve_io_region(ahc, &base);
442 ahc->tag = BUS_SPACE_PIO;
443 ahc->bsh.ioport = (u_long)base;
448 ahc_get_pci_bus(ahc->dev_softc),
449 ahc_get_pci_slot(ahc->dev_softc),
450 ahc_get_pci_function(ahc->dev_softc),
454 ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, command, 4);
459 ahc_pci_map_int(struct ahc_softc *ahc)
463 error = request_irq(ahc->dev_softc->irq, ahc_linux_isr,
464 IRQF_SHARED, "aic7xxx", ahc);
466 ahc->platform_data->irq = ahc->dev_softc->irq;