Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[pandora-kernel.git] / drivers / scsi / arm / cumana_2.c
index 82add77..c9902b5 100644 (file)
@@ -318,7 +318,7 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
 {
        int ret = length;
 
-       if (length >= 11 && strcmp(buffer, "CUMANASCSI2") == 0) {
+       if (length >= 11 && strncmp(buffer, "CUMANASCSI2", 11) == 0) {
                buffer += 11;
                length -= 11;
 
@@ -390,7 +390,8 @@ static struct scsi_host_template cumanascsi2_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                      = "cumanascsi2",
@@ -401,7 +402,6 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
 {
        struct Scsi_Host *host;
        struct cumanascsi2_info *info;
-       unsigned long resbase, reslen;
        void __iomem *base;
        int ret;
 
@@ -409,9 +409,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
        if (ret)
                goto out;
 
-       resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
-       reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
-       base = ioremap(resbase, reslen);
+       base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
        if (!base) {
                ret = -ENOMEM;
                goto out_region;
@@ -421,7 +419,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
                               sizeof(struct cumanascsi2_info));
        if (!host) {
                ret = -ENOMEM;
-               goto out_unmap;
+               goto out_region;
        }
 
        ecard_set_drvdata(ec, host);
@@ -450,8 +448,8 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
 
        ec->irqaddr     = info->base + CUMANASCSI2_STATUS;
        ec->irqmask     = STATUS_INT;
-       ec->irq_data    = info;
-       ec->ops         = &cumanascsi_2_ops;
+
+       ecard_setirq(ec, &cumanascsi_2_ops, info);
 
        ret = fas216_init(host);
        if (ret)
@@ -490,9 +488,6 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
  out_free:
        scsi_host_put(host);
 
- out_unmap:
-       iounmap(base);
-
  out_region:
        ecard_release_resources(ec);
 
@@ -512,8 +507,6 @@ static void __devexit cumanascsi2_remove(struct expansion_card *ec)
                free_dma(info->info.scsi.dma);
        free_irq(ec->irq, info);
 
-       iounmap(info->base);
-
        fas216_release(host);
        scsi_host_put(host);
        ecard_release_resources(ec);