aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/mvme147.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/mvme147.c b/drivers/scsi/mvme147.c
index b236d72850d1..716d1785cda7 100644
--- a/drivers/scsi/mvme147.c
+++ b/drivers/scsi/mvme147.c
@@ -16,8 +16,6 @@
16#include <linux/stat.h> 16#include <linux/stat.h>
17 17
18 18
19#define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)->hostdata))
20
21static struct Scsi_Host *mvme147_host = NULL; 19static struct Scsi_Host *mvme147_host = NULL;
22 20
23static irqreturn_t mvme147_intr(int irq, void *dummy) 21static irqreturn_t mvme147_intr(int irq, void *dummy)
@@ -31,6 +29,7 @@ static irqreturn_t mvme147_intr(int irq, void *dummy)
31 29
32static int dma_setup(struct scsi_cmnd *cmd, int dir_in) 30static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
33{ 31{
32 struct WD33C93_hostdata *hdata = shost_priv(mvme147_host);
34 unsigned char flags = 0x01; 33 unsigned char flags = 0x01;
35 unsigned long addr = virt_to_bus(cmd->SCp.ptr); 34 unsigned long addr = virt_to_bus(cmd->SCp.ptr);
36 35
@@ -39,7 +38,7 @@ static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
39 flags |= 0x04; 38 flags |= 0x04;
40 39
41 /* remember direction */ 40 /* remember direction */
42 HDATA(mvme147_host)->dma_dir = dir_in; 41 hdata->dma_dir = dir_in;
43 42
44 if (dir_in) { 43 if (dir_in) {
45 /* invalidate any cache */ 44 /* invalidate any cache */
@@ -68,6 +67,7 @@ int mvme147_detect(struct scsi_host_template *tpnt)
68{ 67{
69 static unsigned char called = 0; 68 static unsigned char called = 0;
70 wd33c93_regs regs; 69 wd33c93_regs regs;
70 struct WD33C93_hostdata *hdata;
71 71
72 if (!MACH_IS_MVME147 || called) 72 if (!MACH_IS_MVME147 || called)
73 return 0; 73 return 0;
@@ -84,9 +84,10 @@ int mvme147_detect(struct scsi_host_template *tpnt)
84 mvme147_host->irq = MVME147_IRQ_SCSI_PORT; 84 mvme147_host->irq = MVME147_IRQ_SCSI_PORT;
85 regs.SASR = (volatile unsigned char *)0xfffe4000; 85 regs.SASR = (volatile unsigned char *)0xfffe4000;
86 regs.SCMD = (volatile unsigned char *)0xfffe4001; 86 regs.SCMD = (volatile unsigned char *)0xfffe4001;
87 HDATA(mvme147_host)->no_sync = 0xff; 87 hdata = shost_priv(mvme147_host);
88 HDATA(mvme147_host)->fast = 0; 88 hdata->no_sync = 0xff;
89 HDATA(mvme147_host)->dma_mode = CTRL_DMA; 89 hdata->fast = 0;
90 hdata->dma_mode = CTRL_DMA;
90 wd33c93_init(mvme147_host, regs, dma_setup, dma_stop, WD33C93_FS_8_10); 91 wd33c93_init(mvme147_host, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
91 92
92 if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0, 93 if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0,