a3000.c (05668381140309088443bf5dc53add4104610fbb) a3000.c (65396410af63db90d6428c678ff84aa652c3c1ec)
1#include <linux/types.h>
2#include <linux/mm.h>
3#include <linux/blkdev.h>
4#include <linux/sched.h>
5#include <linux/ioport.h>
6#include <linux/init.h>
7#include <linux/spinlock.h>
8#include <linux/interrupt.h>

--- 30 unchanged lines hidden (view full) ---

39 wd33c93_intr (a3000_host);
40 spin_unlock_irqrestore(a3000_host->host_lock, flags);
41 return IRQ_HANDLED;
42 }
43 printk("Non-serviced A3000 SCSI-interrupt? ISTR = %02x\n", status);
44 return IRQ_NONE;
45}
46
1#include <linux/types.h>
2#include <linux/mm.h>
3#include <linux/blkdev.h>
4#include <linux/sched.h>
5#include <linux/ioport.h>
6#include <linux/init.h>
7#include <linux/spinlock.h>
8#include <linux/interrupt.h>

--- 30 unchanged lines hidden (view full) ---

39 wd33c93_intr (a3000_host);
40 spin_unlock_irqrestore(a3000_host->host_lock, flags);
41 return IRQ_HANDLED;
42 }
43 printk("Non-serviced A3000 SCSI-interrupt? ISTR = %02x\n", status);
44 return IRQ_NONE;
45}
46
47static int dma_setup (Scsi_Cmnd *cmd, int dir_in)
47static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
48{
49 unsigned short cntr = CNTR_PDMD | CNTR_INTEN;
50 unsigned long addr = virt_to_bus(cmd->SCp.ptr);
51
52 /*
53 * if the physical address has the wrong alignment, or if
54 * physical address is bad, or if it is a write and at the
55 * end of a physical memory chunk, then allocate a bounce

--- 49 unchanged lines hidden (view full) ---

105 mb(); /* make sure setup is completed */
106 DMA(a3000_host)->ST_DMA = 1;
107 mb(); /* make sure DMA has started before next IO */
108
109 /* return success */
110 return 0;
111}
112
48{
49 unsigned short cntr = CNTR_PDMD | CNTR_INTEN;
50 unsigned long addr = virt_to_bus(cmd->SCp.ptr);
51
52 /*
53 * if the physical address has the wrong alignment, or if
54 * physical address is bad, or if it is a write and at the
55 * end of a physical memory chunk, then allocate a bounce

--- 49 unchanged lines hidden (view full) ---

105 mb(); /* make sure setup is completed */
106 DMA(a3000_host)->ST_DMA = 1;
107 mb(); /* make sure DMA has started before next IO */
108
109 /* return success */
110 return 0;
111}
112
113static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
114 int status)
113static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt,
114 int status)
115{
116 /* disable SCSI interrupts */
117 unsigned short cntr = CNTR_PDMD;
118
119 if (!HDATA(instance)->dma_dir)
120 cntr |= CNTR_DDIR;
121
122 DMA(instance)->CNTR = cntr;

--- 77 unchanged lines hidden (view full) ---

200fail_irq:
201 wd33c93_release();
202 scsi_unregister(a3000_host);
203fail_register:
204 release_mem_region(0xDD0000, 256);
205 return 0;
206}
207
115{
116 /* disable SCSI interrupts */
117 unsigned short cntr = CNTR_PDMD;
118
119 if (!HDATA(instance)->dma_dir)
120 cntr |= CNTR_DDIR;
121
122 DMA(instance)->CNTR = cntr;

--- 77 unchanged lines hidden (view full) ---

200fail_irq:
201 wd33c93_release();
202 scsi_unregister(a3000_host);
203fail_register:
204 release_mem_region(0xDD0000, 256);
205 return 0;
206}
207
208static int a3000_bus_reset(Scsi_Cmnd *cmd)
208static int a3000_bus_reset(struct scsi_cmnd *cmd)
209{
210 /* FIXME perform bus-specific reset */
211
212 /* FIXME 2: kill this entire function, which should
213 cause mid-layer to call wd33c93_host_reset anyway? */
214
215 spin_lock_irq(cmd->device->host->host_lock);
216 wd33c93_host_reset(cmd);

--- 36 unchanged lines hidden ---
209{
210 /* FIXME perform bus-specific reset */
211
212 /* FIXME 2: kill this entire function, which should
213 cause mid-layer to call wd33c93_host_reset anyway? */
214
215 spin_lock_irq(cmd->device->host->host_lock);
216 wd33c93_host_reset(cmd);

--- 36 unchanged lines hidden ---