480 #include <linux/string.h>
481 #include <linux/kernel.h>
487 #include <linux/stat.h>
488 #include <linux/pci.h>
490 #include <linux/ctype.h>
493 #include <linux/slab.h>
494 #include <asm/byteorder.h>
499 #include <scsi/scsi.h>
507 static int eata2x_release(
struct Scsi_Host *);
509 static int eata2x_eh_abort(
struct scsi_cmnd *);
510 static int eata2x_eh_host_reset(
struct scsi_cmnd *);
513 static int eata2x_slave_configure(
struct scsi_device *);
516 .name =
"EATA/DMA 2.0x rev. 8.10.00 ",
517 .detect = eata2x_detect,
518 .release = eata2x_release,
519 .queuecommand = eata2x_queuecommand,
520 .eh_abort_handler = eata2x_eh_abort,
521 .eh_host_reset_handler = eata2x_eh_host_reset,
522 .bios_param = eata2x_bios_param,
523 .slave_configure = eata2x_slave_configure,
525 .unchecked_isa_dma = 1,
529 #if !defined(__BIG_ENDIAN_BITFIELD) && !defined(__LITTLE_ENDIAN_BITFIELD)
530 #error "Adjust your <asm/byteorder.h> defines"
539 #undef DEBUG_LINKED_COMMANDS
541 #undef DEBUG_PCI_DETECT
542 #undef DEBUG_INTERRUPT
544 #undef DEBUG_GENERATE_ERRORS
545 #undef DEBUG_GENERATE_ABORTS
546 #undef DEBUG_GEOMETRY
552 #define MAX_BOARDS (MAX_ISA + MAX_VESA + MAX_EISA + MAX_PCI)
553 #define MAX_CHANNEL 4
555 #define MAX_TARGET 32
556 #define MAX_MAILBOXES 64
557 #define MAX_SGLIST 64
558 #define MAX_LARGE_SGLIST 122
559 #define MAX_INTERNAL_RETRIES 64
560 #define MAX_CMD_PER_LUN 2
561 #define MAX_TAGGED_CMD_PER_LUN (MAX_MAILBOXES - MAX_CMD_PER_LUN)
563 #define SKIP ULONG_MAX
572 #define MAXLOOP 10000
573 #define TAG_DISABLED 0
575 #define TAG_ORDERED 2
579 #define REG_AUX_STATUS 8
587 #define REGION_SIZE 9UL
588 #define MAX_ISA_ADDR 0x03ff
589 #define MIN_EISA_ADDR 0x1c88
590 #define MAX_EISA_ADDR 0xfc88
591 #define BSY_ASSERTED 0x80
592 #define DRQ_ASSERTED 0x08
593 #define ABSY_ASSERTED 0x01
594 #define IRQ_ASSERTED 0x02
595 #define READ_CONFIG_PIO 0xf0
596 #define SET_CONFIG_PIO 0xf1
597 #define SEND_CP_PIO 0xf2
598 #define RECEIVE_SP_PIO 0xf3
599 #define TRUNCATE_XFR_PIO 0xf4
600 #define RESET_PIO 0xf9
601 #define READ_CONFIG_DMA 0xfd
602 #define SET_CONFIG_DMA 0xfe
603 #define SEND_CP_DMA 0xff
607 #define YESNO(a) ((a) ? 'y' : 'n')
608 #define TLDEV(type) ((type) == TYPE_DISK || (type) == TYPE_ROM)
611 #define EATA_SIG_BE 0x45415441
614 #define EATA_2_0A_SIZE 28
615 #define EATA_2_0B_SIZE 30
616 #define EATA_2_0C_SIZE 34
623 #if defined(__BIG_ENDIAN_BITFIELD)
655 #if defined(__BIG_ENDIAN_BITFIELD)
710 #if defined(__BIG_ENDIAN_BITFIELD)
728 #if defined(__BIG_ENDIAN_BITFIELD)
749 #if defined(__BIG_ENDIAN_BITFIELD)
814 #define CP_TAIL_SIZE (sizeof(struct sglist *) + sizeof(dma_addr_t))
845 static unsigned long io_port[] = {
859 0x1c88, 0x2c88, 0x3c88, 0x4c88, 0x5c88, 0x6c88, 0x7c88, 0x8c88,
860 0x9c88, 0xac88, 0xbc88, 0xcc88, 0xdc88, 0xec88, 0xfc88,
870 #define H2DEV(x) cpu_to_be32(x)
871 #define DEV2H(x) be32_to_cpu(x)
872 #define H2DEV16(x) cpu_to_be16(x)
873 #define DEV2H16(x) be16_to_cpu(x)
876 #define REG2H(x) le16_to_cpu(x)
878 static irqreturn_t do_interrupt_handler(
int,
void *);
881 static int do_trace = 0;
882 static int setup_done = 0;
884 static int ext_tran = 0;
885 static int rev_scan = 1;
887 #if defined(CONFIG_SCSI_EATA_TAGGED_QUEUE)
893 #if defined(CONFIG_SCSI_EATA_LINKED_COMMANDS)
894 static int linked_comm = 1;
896 static int linked_comm = 0;
899 #if defined(CONFIG_SCSI_EATA_MAX_TAGS)
905 #if defined(CONFIG_ISA)
906 static int isa_probe = 1;
908 static int isa_probe = 0;
911 #if defined(CONFIG_EISA)
912 static int eisa_probe = 1;
914 static int eisa_probe = 0;
917 #if defined(CONFIG_PCI)
923 #define MAX_INT_PARAM 10
924 #define MAX_BOOT_OPTIONS_SIZE 256
928 #include <linux/module.h>
932 MODULE_PARM_DESC(eata,
" equivalent to the \"eata=...\" kernel boot option."
933 " Example: modprobe eata \"eata=0x7410,0x230,lc:y,tm:0,mq:4,ep:n\"");
943 char *tag_suffix, *link_suffix;
951 tag_suffix =
", simple tags";
954 tag_suffix =
", ordered tags";
957 tag_suffix =
", no tags";
959 }
else if (
TLDEV(dev->
type) && linked_comm) {
961 tag_suffix =
", untagged";
968 link_suffix =
", sorted";
970 link_suffix =
", unsorted";
975 "cmds/lun %d%s%s.\n",
981 static int wait_on_busy(
unsigned long iobase,
unsigned int loop)
991 static int do_dma(
unsigned long iobase,
unsigned long addr,
unchar cmd)
993 unsigned char *byaddr;
994 unsigned long devaddr;
1000 devaddr =
H2DEV(addr);
1001 byaddr = (
unsigned char *)&devaddr;
1017 for (p = start; p <=
end; p++) {
1030 static struct pci_dev *get_pci_dev(
unsigned long port_base)
1032 #if defined(CONFIG_PCI)
1039 #if defined(DEBUG_PCI_DETECT)
1040 printk(
"%s: get_pci_dev, bus %d, devfn 0x%x, addr 0x%x.\n",
1056 static void enable_pci_ports(
void)
1058 #if defined(CONFIG_PCI)
1062 #if defined(DEBUG_PCI_DETECT)
1063 printk(
"%s: enable_pci_ports, bus %d, devfn 0x%x.\n",
1069 (
"%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n",
1076 static int port_detect(
unsigned long port_base,
unsigned int j,
1080 unsigned char protocol_rev;
1085 unsigned char dma_channel_table[4] = { 5, 6, 7, 0 };
1093 #if defined(DEBUG_DETECT)
1094 printk(
"%s: address 0x%03lx in use, skipping probe.\n", name,
1100 spin_lock_irq(&driver_lock);
1103 #if defined(DEBUG_DETECT)
1104 printk(
"%s: detect, do_dma failed at 0x%03lx.\n", name,
1112 #if defined(DEBUG_DETECT)
1113 printk(
"%s: detect, read_pio failed at 0x%03lx.\n", name,
1129 #if defined(DEBUG_DETECT)
1130 printk(
"%s: signature 0x%04x discarded.\n", name,
info.sign);
1137 (
"%s: config structure size (%d bytes) too short, detaching.\n",
1138 name,
info.data_len);
1147 if (protocol_rev !=
'A' &&
info.forcaddr) {
1148 printk(
"%s: warning, port address has been forced.\n", name);
1153 || (protocol_rev ==
'C' &&
info.pci)) {
1158 || (protocol_rev ==
'C' &&
info.eisa)) {
1161 }
else if (protocol_rev ==
'C' && !
info.eisa && !
info.pci) {
1175 (
"%s: address 0x%03lx, unusable %s board (%d%d), detaching.\n",
1176 name, port_base, bus_type,
info.haaval,
info.ata);
1181 if (subversion ==
ESA)
1182 printk(
"%s: warning, weird %s board using DMA.\n", name,
1186 dma_channel = dma_channel_table[3 -
info.drqx];
1188 if (subversion ==
ISA)
1189 printk(
"%s: warning, weird %s board not using DMA.\n",
1197 printk(
"%s: warning, DMA protocol support not asserted.\n",
1202 if (subversion ==
ESA && !
info.irq_tr)
1204 (
"%s: warning, LEVEL triggering is suggested for IRQ %u.\n",
1208 pdev = get_pci_dev(port_base);
1211 (
"%s: warning, failed to get pci_dev structure.\n",
1216 if (pdev && (irq != pdev->
irq)) {
1217 printk(
"%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq,
1226 printk(
"%s: unable to allocate IRQ %u, detaching.\n", name,
1232 printk(
"%s: unable to allocate DMA channel %u, detaching.\n",
1236 #if defined(FORCE_CONFIG)
1246 (
"%s: config, pci_alloc_consistent failed, detaching.\n",
1258 (
"%s: busy timeout sending configuration, detaching.\n",
1268 spin_unlock_irq(&driver_lock);
1270 spin_lock_irq(&driver_lock);
1272 if (shost ==
NULL) {
1273 printk(
"%s: unable to register host, detaching.\n", name);
1287 ha = (
struct hostdata *)shost->hostdata;
1299 unsigned long flags;
1304 clear_dma_ff(dma_channel);
1315 printk(
"%s: detect, wrong n. of SG lists %d, fixed.\n",
1322 printk(
"%s: detect, wrong n. of mbox %d, fixed.\n",
1327 if (protocol_rev !=
'A') {
1338 if (protocol_rev ==
'C') {
1343 if (dma_channel ==
NO_DMA)
1344 sprintf(dma_name,
"%s",
"BMST");
1346 sprintf(dma_name,
"DMA %u", dma_channel);
1348 spin_unlock_irq(&driver_lock);
1351 ha->
cp[i].cp_dma_addr = pci_map_single(ha->
pdev,
1353 sizeof(
struct mscp),
1356 for (i = 0; i < shost->
can_queue; i++) {
1360 if (!ha->
cp[i].sglist) {
1362 (
"%s: kmalloc SGlist failed, mbox %d, detaching.\n",
1369 sizeof(
struct mssp),
1386 (
"EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio.\n");
1388 (
"%s config options -> tm:%d, lc:%c, mq:%d, rs:%c, et:%c, "
1395 printk(
"%s: 2.0%c, %s 0x%03lx, IRQ %u, %s, SG %d, MB %d.\n",
1397 (
unsigned long)shost->
io_port, shost->
irq, dma_name,
1402 (
"%s: wide SCSI support enabled, max_id %u, max_lun %u.\n",
1406 printk(
"%s: SCSI channel %u enabled, host target ID %d.\n",
1409 #if defined(DEBUG_DETECT)
1410 printk(
"%s: Vers. 0x%x, ocs %u, tar %u, trnxfr %u, more %u, SYNC 0x%x, "
1411 "sec. %u, infol %d, cpl %d spl %d.\n", name,
info.version,
1415 if (protocol_rev ==
'B' || protocol_rev ==
'C')
1416 printk(
"%s: isaena %u, forcaddr %u, max_id %u, max_chan %u, "
1417 "large_sg %u, res1 %u.\n", name,
info.isaena,
1421 if (protocol_rev ==
'C')
1422 printk(
"%s: max_lun %u, m1 %u, idquest %u, pci %u, eisa %u, "
1423 "raidnum %u.\n", name,
info.max_lun,
info.m1,
1430 printk(
"%s: warning, pci_set_dma_mask failed.\n",
1437 if (subversion ==
ISA)
1442 spin_unlock_irq(&driver_lock);
1448 eata2x_release(shost);
1452 static void internal_setup(
char *
str,
int *ints)
1454 int i,
argc = ints[0];
1461 for (i = 0; i <
argc; i++)
1468 while (cur && (pc =
strchr(cur,
':'))) {
1471 if (
c ==
'n' ||
c ==
'N')
1473 else if (
c ==
'y' ||
c ==
'Y')
1480 else if (!
strncmp(cur,
"tm:", 3))
1482 else if (!
strncmp(cur,
"tc:", 3))
1484 else if (!
strncmp(cur,
"mq:", 3))
1486 else if (!
strncmp(cur,
"ls:", 3))
1488 else if (!
strncmp(cur,
"et:", 3))
1490 else if (!
strncmp(cur,
"rs:", 3))
1492 else if (!
strncmp(cur,
"ip:", 3))
1494 else if (!
strncmp(cur,
"ep:", 3))
1496 else if (!
strncmp(cur,
"pp:", 3))
1499 if ((cur =
strchr(cur,
',')))
1520 internal_setup(cur, ints);
1524 static void add_pci_ports(
void)
1526 #if defined(CONFIG_PCI)
1527 unsigned int addr,
k;
1530 for (k = 0; k <
MAX_PCI; k++) {
1536 #if defined(DEBUG_PCI_DETECT)
1538 (
"%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n",
1547 #if defined(DEBUG_PCI_DETECT)
1548 printk(
"%s: detect, seq. %d, bus %d, devfn 0x%x, addr 0x%x.\n",
1563 unsigned int j = 0,
k;
1567 if (
strlen(boot_options))
1610 static void map_dma(
unsigned int i,
struct hostdata *ha)
1612 unsigned int k, pci_dir;
1629 if (!scsi_sg_count(SCpnt)) {
1634 count = pci_map_sg(ha->
pdev, scsi_sglist(SCpnt), scsi_sg_count(SCpnt),
1645 scsi_sg_count(SCpnt) *
1651 static void unmap_dma(
unsigned int i,
struct hostdata *ha)
1653 unsigned int pci_dir;
1665 if (scsi_sg_count(SCpnt))
1666 pci_unmap_sg(ha->
pdev, scsi_sglist(SCpnt), scsi_sg_count(SCpnt),
1677 static void sync_dma(
unsigned int i,
struct hostdata *ha)
1679 unsigned int pci_dir;
1692 if (scsi_sg_count(SCpnt))
1693 pci_dma_sync_sg_for_cpu(ha->
pdev, scsi_sglist(SCpnt),
1694 scsi_sg_count(SCpnt), pci_dir);
1700 pci_dma_sync_single_for_cpu(ha->
pdev,
1705 static void scsi_to_dev_dir(
unsigned int i,
struct hostdata *ha)
1709 static const unsigned char data_out_cmds[] = {
1710 0x0a, 0x2a, 0x15, 0x55, 0x04, 0x07, 0x18, 0x1d, 0x24, 0x2e,
1711 0x30, 0x31, 0x32, 0x38, 0x39, 0x3a, 0x3b, 0x3d, 0x3f, 0x40,
1712 0x41, 0x4c, 0xaa, 0xae, 0xb0, 0xb1, 0xb2, 0xb6, 0xea, 0x1b, 0x5d
1715 static const unsigned char data_none_cmds[] = {
1716 0x01, 0x0b, 0x10, 0x11, 0x13, 0x16, 0x17, 0x19, 0x2b, 0x1e,
1717 0x2c, 0xac, 0x2f, 0xaf, 0x33, 0xb3, 0x35, 0x36, 0x45, 0x47,
1718 0x48, 0x49, 0xa9, 0x4b, 0xa5, 0xa6, 0xb5, 0x00
1742 panic(
"%s: qcomm, invalid SCpnt->sc_data_direction.\n",
1745 for (k = 0; k <
ARRAY_SIZE(data_out_cmds); k++)
1746 if (SCpnt->
cmnd[0] == data_out_cmds[k]) {
1752 for (k = 0; k <
ARRAY_SIZE(data_none_cmds); k++)
1753 if (SCpnt->
cmnd[0] == data_none_cmds[k]) {
1760 static int eata2x_queuecommand_lck(
struct scsi_cmnd *SCpnt,
1769 panic(
"%s: qcomm, SCpnt %p already active.\n",
1776 for (k = 0; k < shost->
can_queue; k++, i++) {
1804 "qcomm, mbox %d.\n", i);
1820 scsi_to_dev_dir(i, ha);
1825 if (linked_comm && SCpnt->
device->queue_depth > 2
1828 flush_dev(SCpnt->
device, blk_rq_pos(SCpnt->
request), ha, 0);
1848 struct Scsi_Host *shost = SCarg->device->host;
1852 if (SCarg->host_scribble ==
NULL) {
1857 i = *(
unsigned int *)SCarg->host_scribble;
1863 if (wait_on_busy(shost->
io_port, MAXLOOP)) {
1876 if (SCarg != ha->
cp[i].SCpnt)
1877 panic(
"%s: abort, mbox %d, SCarg %p, cp SCpnt %p.\n",
1881 printk(
"%s: abort, mbox %d, interrupt pending.\n",
1900 SCarg->host_scribble =
NULL;
1902 printk(
"%s, abort, mbox %d ready, DID_ABORT, done.\n",
1904 SCarg->scsi_done(SCarg);
1911 static int eata2x_eh_host_reset(
struct scsi_cmnd *SCarg)
1932 if (wait_on_busy(shost->
io_port, MAXLOOP)) {
1941 for (k = 0; k < shost->
max_id; k++) {
1946 for (i = 0; i < shost->
can_queue; i++) {
1953 printk(
"%s: reset, locked mbox %d forced free.\n",
1958 if (!(SCpnt = ha->
cp[i].SCpnt))
1963 printk(
"%s: reset, mbox %d aborting.\n",
1969 printk(
"%s: reset, mbox %d in reset.\n",
1980 panic(
"%s: reset, mbox %d, SCpnt->scsi_done == NULL.\n",
1993 printk(
"%s: reset, board reset done, enabling interrupts.\n", ha->
board_name);
1995 #if defined(DEBUG_RESET)
2005 while ((jiffies - time) < (10 *
HZ) && limit++ < 200000)
2010 printk(
"%s: reset, interrupts disabled, loops %d.\n", ha->
board_name, limit);
2012 for (i = 0; i < shost->
can_queue; i++) {
2015 SCpnt = ha->
cp[
i].SCpnt;
2024 (
"%s, reset, mbox %d locked, DID_RESET, done.\n",
2029 SCpnt = ha->
cp[
i].SCpnt;
2038 (
"%s, reset, mbox %d aborting, DID_RESET, done.\n",
2069 dkinfo[2] = size / (dkinfo[0] * dkinfo[1]);
2071 #if defined (DEBUG_GEOMETRY)
2073 dkinfo[0], dkinfo[1], dkinfo[2]);
2079 static void sort(
unsigned long sk[],
unsigned int da[],
unsigned int n,
2082 unsigned int i,
j,
k,
y;
2085 for (i = 0; i < n - 1; i++) {
2088 for (j = k + 1; j <
n; j++)
2111 unsigned int ihdlr,
unsigned int il[],
unsigned int n_ready)
2116 unsigned int rev = 0,
s = 1,
r = 1;
2117 unsigned int input_only = 1, overlap = 0;
2118 unsigned long sl[n_ready],
pl[n_ready], ll[n_ready];
2119 unsigned long maxsec = 0, minsec =
ULONG_MAX,
seek = 0, iseek = 0;
2120 unsigned long ioseek = 0;
2122 static unsigned int flushcount = 0, batchcount = 0, sortcount = 0;
2123 static unsigned int readycount = 0, ovlcount = 0, inputcount = 0;
2124 static unsigned int readysorted = 0, revcount = 0;
2125 static unsigned long seeksorted = 0, seeknosort = 0;
2128 printk(
"fc %d bc %d ic %d oc %d rc %d rs %d sc %d re %d"
2129 " av %ldK as %ldK.\n", flushcount, batchcount,
2130 inputcount, ovlcount, readycount, readysorted, sortcount,
2131 revcount, seeknosort / (readycount + 1),
2132 seeksorted / (readycount + 1));
2137 for (n = 0; n < n_ready; n++) {
2145 if (blk_rq_pos(SCpnt->
request) < minsec)
2146 minsec = blk_rq_pos(SCpnt->
request);
2147 if (blk_rq_pos(SCpnt->
request) > maxsec)
2148 maxsec = blk_rq_pos(SCpnt->
request);
2150 sl[
n] = blk_rq_pos(SCpnt->
request);
2151 ioseek += blk_rq_sectors(SCpnt->
request);
2156 if (sl[n] < sl[n - 1])
2158 if (sl[n] > sl[n - 1])
2161 if (link_statistics) {
2162 if (sl[n] > sl[n - 1])
2163 seek += sl[
n] - sl[n - 1];
2165 seek += sl[n - 1] - sl[
n];
2170 if (link_statistics) {
2172 seek += cursec - sl[0];
2174 seek += sl[0] - cursec;
2177 if (cursec > ((maxsec + minsec) / 2))
2180 if (ioseek > ((maxsec - minsec) / 2))
2183 if (!((rev &&
r) || (!rev &&
s)))
2184 sort(sl, il, n_ready, rev);
2187 for (n = 0; n < n_ready; n++) {
2191 ll[
n] = blk_rq_sectors(SCpnt->
request);
2197 if ((sl[n] == sl[n - 1])
2198 || (!rev && ((sl[n - 1] + ll[n - 1]) > sl[n]))
2199 || (rev && ((sl[n] + ll[n]) > sl[n - 1])))
2204 sort(pl, il, n_ready, 0);
2206 if (link_statistics) {
2208 iseek = cursec - sl[0];
2210 iseek = sl[0] - cursec;
2212 readycount += n_ready;
2213 seeknosort += seek / 1024;
2218 seeksorted += iseek / 1024;
2220 seeksorted += (iseek + maxsec - minsec) / 1024;
2223 readysorted += n_ready;
2227 readysorted += n_ready;
2230 #if defined(DEBUG_LINKED_COMMANDS)
2231 if (link_statistics && (overlap || !(flushcount % link_statistics)))
2232 for (n = 0; n < n_ready; n++) {
2237 "%s mb %d fc %d nr %d sec %ld ns %u"
2238 " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
2239 (ihdlr ?
"ihdlr" :
"qcomm"),
2241 n_ready, blk_rq_pos(SCpnt->
request),
2250 static void flush_dev(
struct scsi_device *dev,
unsigned long cursec,
2251 struct hostdata *ha,
unsigned int ihdlr)
2257 for (k = 0; k < dev->
host->can_queue; k++) {
2265 if (SCpnt->
device != dev)
2274 if (
reorder(ha, cursec, ihdlr, il, n_ready))
2277 for (n = 0; n < n_ready; n++) {
2284 "%s, mbox %d, adapter"
2285 " busy, will abort.\n",
2286 (ihdlr ?
"ihdlr" :
"qcomm"),
2303 int irq = shost->
irq;
2316 if (wait_on_busy(shost->
io_port, 20 * MAXLOOP)) {
2319 (
"%s: ihdlr, busy timeout error, irq %d, reg 0x%x, count %d.\n",
2335 #if defined (DEBUG_INTERRUPT)
2337 unsigned char *bytesp;
2339 bytesp = (
unsigned char *)spp;
2342 for (cnt = 0; cnt < 15; cnt++)
2343 printk(
" 0x%x", bytesp[cnt]);
2352 (
"%s: ihdlr, spp->eoc == 0, irq %d, reg 0x%x, count %d.\n",
2356 (
"%s: ihdlr, bad spp->cpp_index %d, irq %d, reg 0x%x, count %d.\n",
2367 #if defined(DEBUG_GENERATE_ABORTS)
2387 panic(
"%s: ihdlr, mbox %d, invalid cp_stat: %d.\n",
2401 panic(
"%s: ihdlr, mbox %d, index mismatch %d.\n",
2407 if (linked_comm && SCpnt->
device->queue_depth > 2
2409 flush_dev(SCpnt->
device, blk_rq_pos(SCpnt->
request), ha, 1);
2413 #if defined(DEBUG_GENERATE_ERRORS)
2441 if (tstatus ==
GOOD)
2448 printk(
"%s: ihdlr, target %d.%d:%d, "
2449 "target_status 0x%x, sense key 0x%x.\n",
2479 for (k = 0; k < shost->
max_id; k++)
2485 #if defined(DID_SOFT_ERROR)
2512 #if defined(DEBUG_INTERRUPT)
2513 if (SCpnt->
result || do_trace)
2521 " reg 0x%x, count %d.\n",
2546 unsigned long spin_flags;
2550 if ((j = (
unsigned int)((
char *)shap - sha)) >= num_boards)
2556 spin_unlock_irqrestore(shost->
host_lock, spin_flags);
2560 static int eata2x_release(
struct Scsi_Host *shost)
2569 pci_unmap_single(ha->
pdev, ha->
cp[i].cp_dma_addr,