|
|
@@ -861,8 +861,8 @@ int
|
|
|
ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr,
|
|
|
int flags, bus_dmamap_t *mapp)
|
|
|
{
|
|
|
- *vaddr = pci_alloc_consistent(ahc->dev_softc,
|
|
|
- dmat->maxsize, mapp);
|
|
|
+ /* XXX: check if we really need the GFP_ATOMIC and unwind this mess! */
|
|
|
+ *vaddr = dma_alloc_coherent(ahc->dev, dmat->maxsize, mapp, GFP_ATOMIC);
|
|
|
if (*vaddr == NULL)
|
|
|
return ENOMEM;
|
|
|
return 0;
|
|
|
@@ -872,8 +872,7 @@ void
|
|
|
ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat,
|
|
|
void* vaddr, bus_dmamap_t map)
|
|
|
{
|
|
|
- pci_free_consistent(ahc->dev_softc, dmat->maxsize,
|
|
|
- vaddr, map);
|
|
|
+ dma_free_coherent(ahc->dev, dmat->maxsize, vaddr, map);
|
|
|
}
|
|
|
|
|
|
int
|
|
|
@@ -1124,8 +1123,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
|
|
|
|
|
|
host->transportt = ahc_linux_transport_template;
|
|
|
|
|
|
- retval = scsi_add_host(host,
|
|
|
- (ahc->dev_softc ? &ahc->dev_softc->dev : NULL));
|
|
|
+ retval = scsi_add_host(host, ahc->dev);
|
|
|
if (retval) {
|
|
|
printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n");
|
|
|
scsi_host_put(host);
|