2005-04-17 02:20:36 +04:00
|
|
|
/*
|
|
|
|
* DTC 3180/3280 driver, by
|
|
|
|
* Ray Van Tassle rayvt@comm.mot.com
|
|
|
|
*
|
|
|
|
* taken from ...
|
|
|
|
* Trantor T128/T128F/T228 driver by...
|
|
|
|
*
|
|
|
|
* Drew Eckhardt
|
|
|
|
* Visionary Computing
|
|
|
|
* (Unix and Linux consulting and custom programming)
|
|
|
|
* drew@colorado.edu
|
|
|
|
* +1 (303) 440-4894
|
2014-11-12 08:11:55 +03:00
|
|
|
*/
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The card is detected and initialized in one of several ways :
|
|
|
|
* 1. Autoprobe (default) - since the board is memory mapped,
|
|
|
|
* a BIOS signature is scanned for to locate the registers.
|
|
|
|
* An interrupt is triggered to autoprobe for the interrupt
|
|
|
|
* line.
|
|
|
|
*
|
|
|
|
* 2. With command line overrides - dtc=address,irq may be
|
|
|
|
* used on the LILO command line to override the defaults.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------*/
|
|
|
|
/* the following will set the monitor border color (useful to find
|
|
|
|
where something crashed or gets stuck at */
|
|
|
|
/* 1 = blue
|
|
|
|
2 = green
|
|
|
|
3 = cyan
|
|
|
|
4 = red
|
|
|
|
5 = magenta
|
|
|
|
6 = yellow
|
|
|
|
7 = white
|
|
|
|
*/
|
|
|
|
#if 0
|
|
|
|
#define rtrc(i) {inb(0x3da); outb(0x31, 0x3c0); outb((i), 0x3c0);}
|
|
|
|
#else
|
|
|
|
#define rtrc(i) {}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/blkdev.h>
|
|
|
|
#include <linux/string.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/interrupt.h>
|
2006-10-11 12:22:01 +04:00
|
|
|
#include <linux/io.h>
|
2005-04-17 02:20:36 +04:00
|
|
|
#include <scsi/scsi_host.h>
|
2016-01-03 08:05:46 +03:00
|
|
|
|
2005-04-17 02:20:36 +04:00
|
|
|
#include "dtc.h"
|
|
|
|
#include "NCR5380.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The DTC3180 & 3280 boards are memory mapped.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
*/
|
|
|
|
/* Offset from DTC_5380_OFFSET */
|
|
|
|
#define DTC_CONTROL_REG 0x100 /* rw */
|
|
|
|
#define D_CR_ACCESS 0x80 /* ro set=can access 3280 registers */
|
|
|
|
#define CSR_DIR_READ 0x40 /* rw direction, 1 = read 0 = write */
|
|
|
|
|
|
|
|
#define CSR_RESET 0x80 /* wo Resets 53c400 */
|
|
|
|
#define CSR_5380_REG 0x80 /* ro 5380 registers can be accessed */
|
|
|
|
#define CSR_TRANS_DIR 0x40 /* rw Data transfer direction */
|
|
|
|
#define CSR_SCSI_BUFF_INTR 0x20 /* rw Enable int on transfer ready */
|
|
|
|
#define CSR_5380_INTR 0x10 /* rw Enable 5380 interrupts */
|
|
|
|
#define CSR_SHARED_INTR 0x08 /* rw Interrupt sharing */
|
|
|
|
#define CSR_HOST_BUF_NOT_RDY 0x04 /* ro Host buffer not ready */
|
|
|
|
#define CSR_SCSI_BUF_RDY 0x02 /* ro SCSI buffer ready */
|
|
|
|
#define CSR_GATED_5380_IRQ 0x01 /* ro Last block xferred */
|
|
|
|
#define CSR_INT_BASE (CSR_SCSI_BUFF_INTR | CSR_5380_INTR)
|
|
|
|
|
|
|
|
|
|
|
|
#define DTC_BLK_CNT 0x101 /* rw
|
|
|
|
* # of 128-byte blocks to transfer */
|
|
|
|
|
|
|
|
|
|
|
|
#define D_CR_ACCESS 0x80 /* ro set=can access 3280 registers */
|
|
|
|
|
|
|
|
#define DTC_SWITCH_REG 0x3982 /* ro - DIP switches */
|
|
|
|
#define DTC_RESUME_XFER 0x3982 /* wo - resume data xfer
|
|
|
|
* after disconnect/reconnect*/
|
|
|
|
|
|
|
|
#define DTC_5380_OFFSET 0x3880 /* 8 registers here, see NCR5380.h */
|
|
|
|
|
|
|
|
/*!!!! for dtc, it's a 128 byte buffer at 3900 !!! */
|
|
|
|
#define DTC_DATA_BUF 0x3900 /* rw 128 bytes long */
|
|
|
|
|
|
|
|
static struct override {
|
|
|
|
unsigned int address;
|
|
|
|
int irq;
|
|
|
|
} overrides
|
|
|
|
#ifdef OVERRIDE
|
|
|
|
[] __initdata = OVERRIDE;
|
|
|
|
#else
|
2007-08-11 01:50:41 +04:00
|
|
|
[4] __initdata = {
|
|
|
|
{ 0, IRQ_AUTO }, { 0, IRQ_AUTO }, { 0, IRQ_AUTO }, { 0, IRQ_AUTO }
|
|
|
|
};
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
|
|
|
|
2006-06-09 09:23:48 +04:00
|
|
|
#define NO_OVERRIDES ARRAY_SIZE(overrides)
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
static struct base {
|
|
|
|
unsigned long address;
|
|
|
|
int noauto;
|
2006-06-09 09:23:48 +04:00
|
|
|
} bases[] __initdata = {
|
|
|
|
{ 0xcc000, 0 },
|
|
|
|
{ 0xc8000, 0 },
|
|
|
|
{ 0xdc000, 0 },
|
2005-04-17 02:20:36 +04:00
|
|
|
{ 0xd8000, 0 }
|
|
|
|
};
|
|
|
|
|
2006-06-09 09:23:48 +04:00
|
|
|
#define NO_BASES ARRAY_SIZE(bases)
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
static const struct signature {
|
|
|
|
const char *string;
|
|
|
|
int offset;
|
2006-06-09 09:23:48 +04:00
|
|
|
} signatures[] = {
|
2005-04-17 02:20:36 +04:00
|
|
|
{"DATA TECHNOLOGY CORPORATION BIOS", 0x25},
|
|
|
|
};
|
|
|
|
|
2006-06-09 09:23:48 +04:00
|
|
|
#define NO_SIGNATURES ARRAY_SIZE(signatures)
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
#ifndef MODULE
|
|
|
|
/*
|
|
|
|
* Function : dtc_setup(char *str, int *ints)
|
|
|
|
*
|
|
|
|
* Purpose : LILO command line initialization of the overrides array,
|
2006-06-09 09:23:48 +04:00
|
|
|
*
|
2005-04-17 02:20:36 +04:00
|
|
|
* Inputs : str - unused, ints - array of integer parameters with ints[0]
|
|
|
|
* equal to the number of ints.
|
|
|
|
*
|
2007-08-11 01:50:41 +04:00
|
|
|
*/
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2014-11-12 08:11:49 +03:00
|
|
|
static int __init dtc_setup(char *str)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
2016-01-03 08:05:03 +03:00
|
|
|
static int commandline_current;
|
2005-04-17 02:20:36 +04:00
|
|
|
int i;
|
2014-11-12 08:11:49 +03:00
|
|
|
int ints[10];
|
|
|
|
|
|
|
|
get_options(str, ARRAY_SIZE(ints), ints);
|
2005-04-17 02:20:36 +04:00
|
|
|
if (ints[0] != 2)
|
|
|
|
printk("dtc_setup: usage dtc=address,irq\n");
|
|
|
|
else if (commandline_current < NO_OVERRIDES) {
|
|
|
|
overrides[commandline_current].address = ints[1];
|
|
|
|
overrides[commandline_current].irq = ints[2];
|
|
|
|
for (i = 0; i < NO_BASES; ++i)
|
|
|
|
if (bases[i].address == ints[1]) {
|
|
|
|
bases[i].noauto = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
++commandline_current;
|
|
|
|
}
|
2014-11-12 08:11:49 +03:00
|
|
|
return 1;
|
2005-04-17 02:20:36 +04:00
|
|
|
}
|
2014-11-12 08:11:49 +03:00
|
|
|
|
|
|
|
__setup("dtc=", dtc_setup);
|
2005-04-17 02:20:36 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
2005-10-31 20:31:40 +03:00
|
|
|
* Function : int dtc_detect(struct scsi_host_template * tpnt)
|
2005-04-17 02:20:36 +04:00
|
|
|
*
|
|
|
|
* Purpose : detects and initializes DTC 3180/3280 controllers
|
|
|
|
* that were autoprobed, overridden on the LILO command line,
|
|
|
|
* or specified at compile time.
|
|
|
|
*
|
|
|
|
* Inputs : tpnt - template for this SCSI adapter.
|
|
|
|
*
|
|
|
|
* Returns : 1 if a host adapter was found, 0 if not.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2005-10-31 20:31:40 +03:00
|
|
|
static int __init dtc_detect(struct scsi_host_template * tpnt)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
2016-01-03 08:05:03 +03:00
|
|
|
static int current_override, current_base;
|
2005-04-17 02:20:36 +04:00
|
|
|
struct Scsi_Host *instance;
|
|
|
|
unsigned int addr;
|
|
|
|
void __iomem *base;
|
|
|
|
int sig, count;
|
|
|
|
|
|
|
|
for (count = 0; current_override < NO_OVERRIDES; ++current_override) {
|
|
|
|
addr = 0;
|
|
|
|
base = NULL;
|
|
|
|
|
|
|
|
if (overrides[current_override].address) {
|
|
|
|
addr = overrides[current_override].address;
|
|
|
|
base = ioremap(addr, 0x2000);
|
|
|
|
if (!base)
|
|
|
|
addr = 0;
|
|
|
|
} else
|
|
|
|
for (; !addr && (current_base < NO_BASES); ++current_base) {
|
2016-01-03 08:05:04 +03:00
|
|
|
dprintk(NDEBUG_INIT, "dtc: probing address 0x%08x\n",
|
|
|
|
(unsigned int)bases[current_base].address);
|
2005-04-17 02:20:36 +04:00
|
|
|
if (bases[current_base].noauto)
|
|
|
|
continue;
|
|
|
|
base = ioremap(bases[current_base].address, 0x2000);
|
|
|
|
if (!base)
|
|
|
|
continue;
|
|
|
|
for (sig = 0; sig < NO_SIGNATURES; ++sig) {
|
|
|
|
if (check_signature(base + signatures[sig].offset, signatures[sig].string, strlen(signatures[sig].string))) {
|
|
|
|
addr = bases[current_base].address;
|
2016-01-03 08:05:04 +03:00
|
|
|
dprintk(NDEBUG_INIT, "dtc: detected board\n");
|
2005-04-17 02:20:36 +04:00
|
|
|
goto found;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iounmap(base);
|
|
|
|
}
|
|
|
|
|
2016-01-03 08:05:04 +03:00
|
|
|
dprintk(NDEBUG_INIT, "dtc: addr = 0x%08x\n", addr);
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
if (!addr)
|
|
|
|
break;
|
|
|
|
|
|
|
|
found:
|
|
|
|
instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata));
|
|
|
|
if (instance == NULL)
|
2016-01-03 08:05:21 +03:00
|
|
|
goto out_unmap;
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
instance->base = addr;
|
|
|
|
((struct NCR5380_hostdata *)(instance)->hostdata)->base = base;
|
|
|
|
|
2016-03-23 13:10:19 +03:00
|
|
|
if (NCR5380_init(instance, FLAG_LATE_DMA_SETUP))
|
2016-01-03 08:05:21 +03:00
|
|
|
goto out_unregister;
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2016-01-03 08:05:08 +03:00
|
|
|
NCR5380_maybe_reset_bus(instance);
|
|
|
|
|
2005-04-17 02:20:36 +04:00
|
|
|
NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR); /* Enable int's */
|
|
|
|
if (overrides[current_override].irq != IRQ_AUTO)
|
|
|
|
instance->irq = overrides[current_override].irq;
|
|
|
|
else
|
|
|
|
instance->irq = NCR5380_probe_irq(instance, DTC_IRQS);
|
|
|
|
|
2014-11-12 08:11:56 +03:00
|
|
|
/* Compatibility with documented NCR5380 kernel parameters */
|
|
|
|
if (instance->irq == 255)
|
|
|
|
instance->irq = NO_IRQ;
|
|
|
|
|
2005-04-17 02:20:36 +04:00
|
|
|
/* With interrupts enabled, it will sometimes hang when doing heavy
|
|
|
|
* reads. So better not enable them until I finger it out. */
|
2016-03-23 13:10:27 +03:00
|
|
|
instance->irq = NO_IRQ;
|
|
|
|
|
2014-11-12 08:11:56 +03:00
|
|
|
if (instance->irq != NO_IRQ)
|
2014-03-05 09:09:41 +04:00
|
|
|
if (request_irq(instance->irq, dtc_intr, 0,
|
2007-11-12 03:52:05 +03:00
|
|
|
"dtc", instance)) {
|
2005-04-17 02:20:36 +04:00
|
|
|
printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
|
2014-11-12 08:11:56 +03:00
|
|
|
instance->irq = NO_IRQ;
|
2005-04-17 02:20:36 +04:00
|
|
|
}
|
|
|
|
|
2014-11-12 08:11:56 +03:00
|
|
|
if (instance->irq == NO_IRQ) {
|
2005-04-17 02:20:36 +04:00
|
|
|
printk(KERN_WARNING "scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
|
|
|
|
printk(KERN_WARNING "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
|
|
|
|
}
|
2016-03-23 13:10:27 +03:00
|
|
|
|
2016-01-03 08:05:04 +03:00
|
|
|
dprintk(NDEBUG_INIT, "scsi%d : irq = %d\n",
|
|
|
|
instance->host_no, instance->irq);
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
++current_override;
|
|
|
|
++count;
|
|
|
|
}
|
|
|
|
return count;
|
2016-01-03 08:05:21 +03:00
|
|
|
|
|
|
|
out_unregister:
|
|
|
|
scsi_unregister(instance);
|
|
|
|
out_unmap:
|
|
|
|
iounmap(base);
|
|
|
|
return count;
|
2005-04-17 02:20:36 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Function : int dtc_biosparam(Disk * disk, struct block_device *dev, int *ip)
|
|
|
|
*
|
|
|
|
* Purpose : Generates a BIOS / DOS compatible H-C-S mapping for
|
|
|
|
* the specified device / size.
|
|
|
|
*
|
|
|
|
* Inputs : size = size of device in sectors (512 bytes), dev = block device
|
|
|
|
* major / minor, ip[] = {heads, sectors, cylinders}
|
|
|
|
*
|
|
|
|
* Returns : always 0 (success), initializes ip
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* XXX Most SCSI boards use this mapping, I could be incorrect. Some one
|
|
|
|
* using hard disks on a trantor should verify that this mapping corresponds
|
|
|
|
* to that used by the BIOS / ASPI driver by running the linux fdisk program
|
|
|
|
* and matching the H_C_S coordinates to what DOS uses.
|
|
|
|
*/
|
|
|
|
|
|
|
|
static int dtc_biosparam(struct scsi_device *sdev, struct block_device *dev,
|
|
|
|
sector_t capacity, int *ip)
|
|
|
|
{
|
|
|
|
int size = capacity;
|
|
|
|
|
|
|
|
ip[0] = 64;
|
|
|
|
ip[1] = 32;
|
|
|
|
ip[2] = size >> 11;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/****************************************************************
|
|
|
|
* Function : int NCR5380_pread (struct Scsi_Host *instance,
|
|
|
|
* unsigned char *dst, int len)
|
|
|
|
*
|
|
|
|
* Purpose : Fast 5380 pseudo-dma read function, reads len bytes to
|
|
|
|
* dst
|
|
|
|
*
|
|
|
|
* Inputs : dst = destination, len = length in bytes
|
|
|
|
*
|
|
|
|
* Returns : 0 on success, non zero on a failure such as a watchdog
|
|
|
|
* timeout.
|
|
|
|
*/
|
|
|
|
|
2016-03-23 13:10:17 +03:00
|
|
|
static inline int dtc_pread(struct Scsi_Host *instance,
|
|
|
|
unsigned char *dst, int len)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
|
|
|
unsigned char *d = dst;
|
|
|
|
int i; /* For counting time spent in the poll-loop */
|
2014-11-12 08:11:59 +03:00
|
|
|
struct NCR5380_hostdata *hostdata = shost_priv(instance);
|
2005-04-17 02:20:36 +04:00
|
|
|
|
|
|
|
i = 0;
|
2014-11-12 08:11:56 +03:00
|
|
|
if (instance->irq == NO_IRQ)
|
2005-04-17 02:20:36 +04:00
|
|
|
NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ);
|
|
|
|
else
|
|
|
|
NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ | CSR_INT_BASE);
|
|
|
|
NCR5380_write(DTC_BLK_CNT, len >> 7); /* Block count */
|
|
|
|
rtrc(1);
|
|
|
|
while (len > 0) {
|
|
|
|
rtrc(2);
|
|
|
|
while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY)
|
|
|
|
++i;
|
|
|
|
rtrc(3);
|
2016-01-03 08:05:06 +03:00
|
|
|
memcpy_fromio(d, hostdata->base + DTC_DATA_BUF, 128);
|
2005-04-17 02:20:36 +04:00
|
|
|
d += 128;
|
|
|
|
len -= 128;
|
|
|
|
rtrc(7);
|
|
|
|
/*** with int's on, it sometimes hangs after here.
|
|
|
|
* Looks like something makes HBNR go away. */
|
|
|
|
}
|
|
|
|
rtrc(4);
|
|
|
|
while (!(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
|
|
|
|
++i;
|
|
|
|
rtrc(0);
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************
|
|
|
|
* Function : int NCR5380_pwrite (struct Scsi_Host *instance,
|
|
|
|
* unsigned char *src, int len)
|
|
|
|
*
|
|
|
|
* Purpose : Fast 5380 pseudo-dma write function, transfers len bytes from
|
|
|
|
* src
|
|
|
|
*
|
|
|
|
* Inputs : src = source, len = length in bytes
|
|
|
|
*
|
|
|
|
* Returns : 0 on success, non zero on a failure such as a watchdog
|
|
|
|
* timeout.
|
|
|
|
*/
|
|
|
|
|
2016-03-23 13:10:17 +03:00
|
|
|
static inline int dtc_pwrite(struct Scsi_Host *instance,
|
|
|
|
unsigned char *src, int len)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
|
|
|
int i;
|
2014-11-12 08:11:59 +03:00
|
|
|
struct NCR5380_hostdata *hostdata = shost_priv(instance);
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2014-11-12 08:11:56 +03:00
|
|
|
if (instance->irq == NO_IRQ)
|
2005-04-17 02:20:36 +04:00
|
|
|
NCR5380_write(DTC_CONTROL_REG, 0);
|
|
|
|
else
|
|
|
|
NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR);
|
|
|
|
NCR5380_write(DTC_BLK_CNT, len >> 7); /* Block count */
|
|
|
|
for (i = 0; len > 0; ++i) {
|
|
|
|
rtrc(5);
|
|
|
|
/* Poll until the host buffer can accept data. */
|
|
|
|
while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY)
|
|
|
|
++i;
|
|
|
|
rtrc(3);
|
2016-01-03 08:05:06 +03:00
|
|
|
memcpy_toio(hostdata->base + DTC_DATA_BUF, src, 128);
|
2005-04-17 02:20:36 +04:00
|
|
|
src += 128;
|
|
|
|
len -= 128;
|
|
|
|
}
|
|
|
|
rtrc(4);
|
|
|
|
while (!(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
|
|
|
|
++i;
|
|
|
|
rtrc(6);
|
|
|
|
/* Wait until the last byte has been sent to the disk */
|
|
|
|
while (!(NCR5380_read(TARGET_COMMAND_REG) & TCR_LAST_BYTE_SENT))
|
|
|
|
++i;
|
|
|
|
rtrc(7);
|
|
|
|
/* Check for parity error here. fixme. */
|
|
|
|
rtrc(0);
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
2016-01-03 08:05:25 +03:00
|
|
|
static int dtc_dma_xfer_len(struct scsi_cmnd *cmd)
|
|
|
|
{
|
|
|
|
int transfersize = cmd->transfersize;
|
|
|
|
|
|
|
|
/* Limit transfers to 32K, for xx400 & xx406
|
|
|
|
* pseudoDMA that transfers in 128 bytes blocks.
|
|
|
|
*/
|
|
|
|
if (transfersize > 32 * 1024 && cmd->SCp.this_residual &&
|
|
|
|
!(cmd->SCp.this_residual % transfersize))
|
|
|
|
transfersize = 32 * 1024;
|
|
|
|
|
|
|
|
return transfersize;
|
|
|
|
}
|
|
|
|
|
2005-04-17 02:20:36 +04:00
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
|
|
|
|
#include "NCR5380.c"
|
|
|
|
|
|
|
|
static int dtc_release(struct Scsi_Host *shost)
|
|
|
|
{
|
2016-01-03 08:05:06 +03:00
|
|
|
struct NCR5380_hostdata *hostdata = shost_priv(shost);
|
|
|
|
|
2014-11-12 08:11:56 +03:00
|
|
|
if (shost->irq != NO_IRQ)
|
2007-11-12 03:52:05 +03:00
|
|
|
free_irq(shost->irq, shost);
|
2005-04-17 02:20:36 +04:00
|
|
|
NCR5380_exit(shost);
|
|
|
|
scsi_unregister(shost);
|
2016-01-03 08:05:06 +03:00
|
|
|
iounmap(hostdata->base);
|
2005-04-17 02:20:36 +04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-10-31 20:31:40 +03:00
|
|
|
static struct scsi_host_template driver_template = {
|
2016-01-03 08:05:48 +03:00
|
|
|
.name = "DTC 3180/3280",
|
|
|
|
.detect = dtc_detect,
|
|
|
|
.release = dtc_release,
|
|
|
|
.proc_name = "dtc3x80",
|
|
|
|
.info = dtc_info,
|
|
|
|
.queuecommand = dtc_queue_command,
|
|
|
|
.eh_abort_handler = dtc_abort,
|
|
|
|
.eh_bus_reset_handler = dtc_bus_reset,
|
|
|
|
.bios_param = dtc_biosparam,
|
|
|
|
.can_queue = 32,
|
|
|
|
.this_id = 7,
|
|
|
|
.sg_tablesize = SG_ALL,
|
|
|
|
.cmd_per_lun = 2,
|
|
|
|
.use_clustering = DISABLE_CLUSTERING,
|
2016-01-03 08:05:58 +03:00
|
|
|
.cmd_size = NCR5380_CMD_SIZE,
|
2016-01-03 08:06:07 +03:00
|
|
|
.max_sectors = 128,
|
2005-04-17 02:20:36 +04:00
|
|
|
};
|
|
|
|
#include "scsi_module.c"
|