a3000.c (96916090f488986a4ebb8e9ffa6a3b50881d5ccd) a3000.c (9387edbe6045f0bde88f0f0ace51e0ead8a318fe)
1#include <linux/types.h>
2#include <linux/mm.h>
3#include <linux/blkdev.h>
4#include <linux/ioport.h>
5#include <linux/init.h>
6#include <linux/spinlock.h>
7#include <linux/interrupt.h>
8

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

20
21#include<linux/stat.h>
22
23#define DMA(ptr) ((a3000_scsiregs *)((ptr)->base))
24#define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)->hostdata))
25
26static struct Scsi_Host *a3000_host = NULL;
27
1#include <linux/types.h>
2#include <linux/mm.h>
3#include <linux/blkdev.h>
4#include <linux/ioport.h>
5#include <linux/init.h>
6#include <linux/spinlock.h>
7#include <linux/interrupt.h>
8

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

20
21#include<linux/stat.h>
22
23#define DMA(ptr) ((a3000_scsiregs *)((ptr)->base))
24#define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)->hostdata))
25
26static struct Scsi_Host *a3000_host = NULL;
27
28static int a3000_release(struct Scsi_Host *instance);
29
28static irqreturn_t a3000_intr (int irq, void *dummy)
29{
30 unsigned long flags;
31 unsigned int status = DMA(a3000_host)->ISTR;
32
33 if (!(status & ISTR_INT_P))
34 return IRQ_NONE;
35 if (status & ISTR_INTS)

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

152 } else {
153 kfree (HDATA(instance)->dma_bounce_buffer);
154 HDATA(instance)->dma_bounce_buffer = NULL;
155 HDATA(instance)->dma_bounce_len = 0;
156 }
157 }
158}
159
30static irqreturn_t a3000_intr (int irq, void *dummy)
31{
32 unsigned long flags;
33 unsigned int status = DMA(a3000_host)->ISTR;
34
35 if (!(status & ISTR_INT_P))
36 return IRQ_NONE;
37 if (status & ISTR_INTS)

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

154 } else {
155 kfree (HDATA(instance)->dma_bounce_buffer);
156 HDATA(instance)->dma_bounce_buffer = NULL;
157 HDATA(instance)->dma_bounce_len = 0;
158 }
159 }
160}
161
160int __init a3000_detect(struct scsi_host_template *tpnt)
162static int __init a3000_detect(struct scsi_host_template *tpnt)
161{
162 wd33c93_regs regs;
163
164 if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(A3000_SCSI))
165 return 0;
166 if (!request_mem_region(0xDD0000, 256, "wd33c93"))
167 return 0;
168

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

227 .sg_tablesize = SG_ALL,
228 .cmd_per_lun = CMD_PER_LUN,
229 .use_clustering = ENABLE_CLUSTERING
230};
231
232
233#include "scsi_module.c"
234
163{
164 wd33c93_regs regs;
165
166 if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(A3000_SCSI))
167 return 0;
168 if (!request_mem_region(0xDD0000, 256, "wd33c93"))
169 return 0;
170

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

229 .sg_tablesize = SG_ALL,
230 .cmd_per_lun = CMD_PER_LUN,
231 .use_clustering = ENABLE_CLUSTERING
232};
233
234
235#include "scsi_module.c"
236
235int a3000_release(struct Scsi_Host *instance)
237static int a3000_release(struct Scsi_Host *instance)
236{
237 wd33c93_release();
238 DMA(instance)->CNTR = 0;
239 release_mem_region(0xDD0000, 256);
240 free_irq(IRQ_AMIGA_PORTS, a3000_intr);
241 return 1;
242}
243
244MODULE_LICENSE("GPL");
238{
239 wd33c93_release();
240 DMA(instance)->CNTR = 0;
241 release_mem_region(0xDD0000, 256);
242 free_irq(IRQ_AMIGA_PORTS, a3000_intr);
243 return 1;
244}
245
246MODULE_LICENSE("GPL");