[SCSI] WD33C93: let platform stub override no_sync/fast/dma_mode
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 21 Mar 2008 21:25:43 +0000 (22:25 +0100)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:19:01 +0000 (12:19 -0500)
SGI machines with WD33C93 allow usage of burst mode DMA, which increases
performance noticable. To make this selectable by the sgiwd93 stub,
setting the values for no_sync, fast and dma_mode has been moved to the
individual platform stubs.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/a2091.c
drivers/scsi/a3000.c
drivers/scsi/gvp11.c
drivers/scsi/mvme147.c
drivers/scsi/sgiwd93.c
drivers/scsi/wd33c93.c

index 5ac3a3e8dfafcb57020edf4855690f0961550703..1d1bb2516172a3a5bd0d41bc9e7c8b6d3e95df15 100644 (file)
@@ -179,6 +179,9 @@ int __init a2091_detect(struct scsi_host_template *tpnt)
        DMA(instance)->DAWR = DAWR_A2091;
        regs.SASR = &(DMA(instance)->SASR);
        regs.SCMD = &(DMA(instance)->SCMD);
+       HDATA(a3000_host)->no_sync = 0xff;
+       HDATA(a3000_host)->fast = 0;
+       HDATA(a3000_host)->dma_mode = CTRL_DMA;
        wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
        request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI",
                    instance);
index 3aeec963940bd7e386c0f2e0cc22939df31dd06f..8b449d8acacdb4f249cfa80480a94c9e8cff4cc3 100644 (file)
@@ -178,6 +178,9 @@ int __init a3000_detect(struct scsi_host_template *tpnt)
     DMA(a3000_host)->DAWR = DAWR_A3000;
     regs.SASR = &(DMA(a3000_host)->SASR);
     regs.SCMD = &(DMA(a3000_host)->SCMD);
+    HDATA(a3000_host)->no_sync = 0xff;
+    HDATA(a3000_host)->fast = 0;
+    HDATA(a3000_host)->dma_mode = CTRL_DMA;
     wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15);
     if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, IRQF_SHARED, "A3000 SCSI",
                    a3000_intr))
index 91f85226d08fc352ec7bbfe7cecaf585dae63cf7..e75a7ba57a3a2aaa67553834d99b41dd23b9ef63 100644 (file)
@@ -322,6 +322,9 @@ int __init gvp11_detect(struct scsi_host_template *tpnt)
         */
        regs.SASR = &(DMA(instance)->SASR);
        regs.SCMD = &(DMA(instance)->SCMD);
+       HDATA(a3000_host)->no_sync = 0xff;
+       HDATA(a3000_host)->fast = 0;
+       HDATA(a3000_host)->dma_mode = CTRL_DMA;
        wd33c93_init(instance, regs, dma_setup, dma_stop,
                     (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10
                                             : WD33C93_FS_12_15);
index be41aadccae569918dd7259c5290133bd1cf3997..6a8cf179a1f1004af71d489823ca97d9f77d2177 100644 (file)
@@ -82,6 +82,9 @@ int mvme147_detect(struct scsi_host_template *tpnt)
     mvme147_host->irq = MVME147_IRQ_SCSI_PORT;
     regs.SASR = (volatile unsigned char *)0xfffe4000;
     regs.SCMD = (volatile unsigned char *)0xfffe4001;
+    HDATA(a3000_host)->no_sync = 0xff;
+    HDATA(a3000_host)->fast = 0;
+    HDATA(a3000_host)->dma_mode = CTRL_DMA;
     wd33c93_init(mvme147_host, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
 
     if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0, "MVME147 SCSI PORT", mvme147_intr))
index 26cfc56c7091e6d5cf388eba98c456cc1a6ab8c8..03e359670506cf1403463616a1c410d72a709fab 100644 (file)
@@ -263,10 +263,11 @@ static int __init sgiwd93_probe(struct platform_device *pdev)
        regs.SASR = wdregs + 3;
        regs.SCMD = wdregs + 7;
 
-       wd33c93_init(host, regs, dma_setup, dma_stop, WD33C93_FS_MHZ(20));
+       hdata->wh.no_sync = 0;
+       hdata->wh.fast = 1;
+       hdata->wh.dma_mode = CTRL_BURST;
 
-       if (hdata->wh.no_sync == 0xff)
-               hdata->wh.no_sync = 0;
+       wd33c93_init(host, regs, dma_setup, dma_stop, WD33C93_FS_MHZ(20));
 
        err = request_irq(irq, sgiwd93_intr, 0, "SGI WD93", host);
        if (err) {
index f286c37da7e0dfb51fc44435c4c54d0a6120ba28..5fda881c2470aa6c08cb670b470583d7e756f571 100644 (file)
@@ -1973,10 +1973,7 @@ wd33c93_init(struct Scsi_Host *instance, const wd33c93_regs regs,
        hostdata->incoming_ptr = 0;
        hostdata->outgoing_len = 0;
        hostdata->default_sx_per = DEFAULT_SX_PER;
-       hostdata->no_sync = 0xff;       /* sync defaults to off */
        hostdata->no_dma = 0;   /* default is DMA enabled */
-       hostdata->fast = 0;     /* default is Fast SCSI transfers disabled */
-       hostdata->dma_mode = CTRL_DMA;  /* default is Single Byte DMA */
 
 #ifdef PROC_INTERFACE
        hostdata->proc = PR_VERSION | PR_INFO | PR_STATISTICS |