Lines Matching defs:ahc
127 struct ahc_softc *ahc = dev_get_drvdata(dev);
129 return ahc_suspend(ahc);
135 struct ahc_softc *ahc = dev_get_drvdata(dev);
137 ahc_pci_resume(ahc);
139 return (ahc_resume(ahc));
145 struct ahc_softc *ahc = pci_get_drvdata(pdev);
148 if (ahc->platform_data && ahc->platform_data->host)
149 scsi_remove_host(ahc->platform_data->host);
151 ahc_lock(ahc, &s);
152 ahc_intr_enable(ahc, FALSE);
153 ahc_unlock(ahc, &s);
154 ahc_free(ahc);
158 ahc_linux_pci_inherit_flags(struct ahc_softc *ahc)
160 struct pci_dev *pdev = ahc->dev_softc, *master_pdev;
167 ahc->flags &= ~AHC_BIOS_ENABLED;
168 ahc->flags |= master->flags & AHC_BIOS_ENABLED;
170 ahc->flags &= ~AHC_PRIMARY_CHANNEL;
171 ahc->flags |= master->flags & AHC_PRIMARY_CHANNEL;
183 struct ahc_softc *ahc;
207 ahc = ahc_alloc(NULL, name);
208 if (ahc == NULL)
211 ahc_free(ahc);
217 && ahc->features & AHC_LARGE_SCBS
220 ahc->flags |= AHC_39BIT_ADDRESSING;
223 ahc_free(ahc);
228 ahc->dev_softc = pci;
229 ahc->dev = &pci->dev;
230 error = ahc_pci_config(ahc, entry);
232 ahc_free(ahc);
240 if ((ahc->features & AHC_MULTI_FUNC) && PCI_FUNC(pdev->devfn) != 0)
241 ahc_linux_pci_inherit_flags(ahc);
243 pci_set_drvdata(pdev, ahc);
244 ahc_linux_register_host(ahc, &aic7xxx_driver_template);
323 ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, resource_size_t *base)
328 *base = pci_resource_start(ahc->dev_softc, 0);
337 ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
345 start = pci_resource_start(ahc->dev_softc, 1);
363 ahc_pci_map_registers(struct ahc_softc *ahc)
373 command = ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, 4);
377 error = ahc_linux_pci_reserve_mem_region(ahc, &base, &maddr);
379 ahc->platform_data->mem_busaddr = base;
380 ahc->tag = BUS_SPACE_MEMIO;
381 ahc->bsh.maddr = maddr;
382 ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
389 if (ahc_pci_test_register_access(ahc) != 0) {
393 ahc_get_pci_bus(ahc->dev_softc),
394 ahc_get_pci_slot(ahc->dev_softc),
395 ahc_get_pci_function(ahc->dev_softc));
397 release_mem_region(ahc->platform_data->mem_busaddr,
399 ahc->bsh.maddr = NULL;
406 ahc_get_pci_bus(ahc->dev_softc),
407 ahc_get_pci_slot(ahc->dev_softc),
408 ahc_get_pci_function(ahc->dev_softc),
417 error = ahc_linux_pci_reserve_io_region(ahc, &base);
419 ahc->tag = BUS_SPACE_PIO;
420 ahc->bsh.ioport = (u_long)base;
425 ahc_get_pci_bus(ahc->dev_softc),
426 ahc_get_pci_slot(ahc->dev_softc),
427 ahc_get_pci_function(ahc->dev_softc),
431 ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, command, 4);
436 ahc_pci_map_int(struct ahc_softc *ahc)
440 error = request_irq(ahc->dev_softc->irq, ahc_linux_isr,
441 IRQF_SHARED, "aic7xxx", ahc);
443 ahc->platform_data->irq = ahc->dev_softc->irq;