1 #include <linux/types.h>
5 #include <linux/slab.h>
8 #include <linux/module.h>
11 #include <asm/pgtable.h>
39 spin_unlock_irqrestore(instance->
host_lock, flags);
43 static int gvp11_xfer_mask = 0;
47 gvp11_xfer_mask = ints[1];
59 static int scsi_alloc_out_of_range = 0;
65 if (!scsi_alloc_out_of_range) {
71 if (scsi_alloc_out_of_range ||
75 "GVP II SCSI Bounce Buffer");
92 scsi_alloc_out_of_range = 1;
99 "GVP II SCSI Bounce Buffer");
113 cmd->
SCp.this_residual);
137 regs->
BANK = bank_mask & (addr >> 18);
162 SCpnt->
SCp.this_residual);
174 static int gvp11_bus_reset(
struct scsi_cmnd *cmd)
193 .name =
"GVP Series II SCSI",
195 .proc_name =
"GVP11",
198 .eh_bus_reset_handler = gvp11_bus_reset,
210 volatile unsigned char *sasr_3393, *scmd_3393;
211 unsigned char save_sasr;
225 sasr_3393 = ®s->
SASR;
226 scmd_3393 = ®s->
SCMD;
227 save_sasr = *sasr_3393;
236 *sasr_3393 = save_sasr;
239 if (*sasr_3393 != q) {
240 *sasr_3393 = save_sasr;
270 if (qq != q || qq != 0xff)
280 if (qq != (~q & 0xff))
287 static int __devinit gvp11_probe(
struct zorro_dev *z,
294 unsigned int default_dma_xfer_mask;
306 if (zorro_resource_len(z) != 0x10000)
309 address = z->resource.start;
315 error = check_wd33c93(regs);
317 goto fail_check_or_alloc;
323 goto fail_check_or_alloc;
340 hdata = shost_priv(instance);
342 hdata->
wh.dma_xfer_mask = gvp11_xfer_mask;
344 hdata->
wh.dma_xfer_mask = default_dma_xfer_mask;
346 hdata->
wh.no_sync = 0xff;
354 epc = *(
unsigned short *)(
ZTWO_VADDR(address) + 0x8000);
360 "GVP11 SCSI", instance);
366 error = scsi_add_host(instance,
NULL);
370 zorro_set_drvdata(z, instance);
383 static void __devexit gvp11_remove(
struct zorro_dev *z)
385 struct Scsi_Host *instance = zorro_get_drvdata(z);
388 hdata->
regs->CNTR = 0;
413 static struct zorro_driver gvp11_driver = {
415 .id_table = gvp11_zorro_tbl,
416 .probe = gvp11_probe,
420 static int __init gvp11_init(
void)
426 static void __exit gvp11_exit(
void)