X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Farm%2Feesox.c;h=d8435132f46157774559e26a59af0347c2441304;hb=22b61a11fd4e6d7a48d694ce350331bebc0394ed;hp=d4136524fc46aafc3f794a5f3a37975177535636;hpb=4935361766cc73949fe032cd157d314f288922ba;p=linux-2.6-omap-h63xx.git diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index d4136524fc4..d8435132f46 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c @@ -175,10 +175,10 @@ eesoxscsi_dma_setup(struct Scsi_Host *host, struct scsi_pointer *SCp, map_dir = DMA_FROM_DEVICE, dma_dir = DMA_MODE_READ; - dma_map_sg(dev, info->sg, bufs + 1, map_dir); + dma_map_sg(dev, info->sg, bufs, map_dir); disable_dma(dmach); - set_dma_sg(dmach, info->sg, bufs + 1); + set_dma_sg(dmach, info->sg, bufs); set_dma_mode(dmach, dma_dir); enable_dma(dmach); return fasdma_real_all; @@ -508,7 +508,8 @@ static struct scsi_host_template eesox_template = { .eh_abort_handler = fas216_eh_abort, .can_queue = 1, .this_id = 7, - .sg_tablesize = SG_ALL, + .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, + .dma_boundary = IOMD_DMA_BOUNDARY, .cmd_per_lun = 1, .use_clustering = DISABLE_CLUSTERING, .proc_name = "eesox", @@ -519,7 +520,6 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) { struct Scsi_Host *host; struct eesoxscsi_info *info; - unsigned long resbase, reslen; void __iomem *base; int ret; @@ -527,9 +527,7 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) if (ret) goto out; - resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST); - reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST); - base = ioremap(resbase, reslen); + base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); if (!base) { ret = -ENOMEM; goto out_region; @@ -539,7 +537,7 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) sizeof(struct eesoxscsi_info)); if (!host) { ret = -ENOMEM; - goto out_unmap; + goto out_region; } ecard_set_drvdata(ec, host); @@ -569,8 +567,8 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) ec->irqaddr = base + EESOX_DMASTAT; ec->irqmask = EESOX_STAT_INTR; - ec->irq_data = info; - ec->ops = &eesoxscsi_ops; + + ecard_setirq(ec, &eesoxscsi_ops, info); device_create_file(&ec->dev, &dev_attr_bus_term); @@ -612,9 +610,6 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) device_remove_file(&ec->dev, &dev_attr_bus_term); scsi_host_put(host); - out_unmap: - iounmap(base); - out_region: ecard_release_resources(ec); @@ -636,8 +631,6 @@ static void __devexit eesoxscsi_remove(struct expansion_card *ec) device_remove_file(&ec->dev, &dev_attr_bus_term); - iounmap(info->base); - fas216_release(host); scsi_host_put(host); ecard_release_resources(ec);