Lines Matching +full:message +full:- +full:handling +full:- +full:unit
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * of PCI-SCSI IO processors.
6 * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr>
9 * Copyright (C) 1998-2000 Gerard Roudier
12 * a port of the FreeBSD ncr driver to Linux-1.2.13.
16 * Stefan Esser <se@mi.Uni-Koeln.de>
24 *-----------------------------------------------------------------------------
75 #define sym_verbose (np->verbose)
96 #error "more than 256 tags per logical unit not allowed."
131 * Asynchronous pre-scaler (ns). Shall be 40 for
153 #define SYM_MEM_CLUSTER_MASK (SYM_MEM_CLUSTER_SIZE-1)
165 #define SYM_CONF_MAX_START (SYM_CONF_MAX_QUEUE-2)
172 #define SYM_CONF_MAX_START (SYM_CONF_MAX_QUEUE-2)
176 * For this one, we want a short name :-)
184 #define INB_OFF(np, o) ioread8(np->s.ioaddr + (o))
185 #define INW_OFF(np, o) ioread16(np->s.ioaddr + (o))
186 #define INL_OFF(np, o) ioread32(np->s.ioaddr + (o))
188 #define OUTB_OFF(np, o, val) iowrite8((val), np->s.ioaddr + (o))
189 #define OUTW_OFF(np, o, val) iowrite16((val), np->s.ioaddr + (o))
190 #define OUTL_OFF(np, o, val) iowrite32((val), np->s.ioaddr + (o))
295 #define CCB_HASH_MASK (CCB_HASH_SIZE-1)
306 * 16 segments registers -> up to 64 GB addressable.
310 #define SYM_DMAP_MASK (SYM_DMAP_SIZE-1)
359 * LUN #0 is a special case, since multi-lun devices are rare,
360 * and we we want to speed-up the general case and not waste
370 /*0*/ u_char uval; /* -> SCNTL4 register */
371 /*1*/ u_char sval; /* -> SXFER io register */
373 /*3*/ u_char wval; /* -> SCNTL3 io register */
449 * SCRIPTS that deal with bad LU handling (must be at
467 * Logical Unit Control Block
542 * error handling action to perform from SCRIPTS.
568 #define sym_lp(tp, lun) (!lun) ? (tp)->lun0p : NULL
571 (!lun) ? (tp)->lun0p : (tp)->lunmp ? (tp)->lunmp[((u8)lun)] : NULL
645 * It's written on reception of a SAVE_DATA_POINTER message.
659 * We must distinguish between the LOAD/STORE-based SCRIPTS
660 * that use directly the header in the CCB, and the NCR-GENERIC
666 if (np->features & FE_LDSTR) \
667 cp->phys.head.lastp = cpu_to_scr(dp); \
669 np->ccb_head.lastp = cpu_to_scr(dp); \
672 scr_to_cpu((np->features & FE_LDSTR) ? \
673 cp->phys.head.lastp : np->ccb_head.lastp)
677 cp->phys.head.lastp = cpu_to_scr(dp); \
680 #define sym_get_script_dp(np, cp) (cp->phys.head.lastp)
740 unsigned char odd_byte_adjustment; /* odd-sized req on wide bus */
747 * Message areas.
748 * We prepare a message to be sent after selection.
753 * a SDTR or WDTR message is appended.
790 #define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl))
829 * Bit 32-63 of the on-chip RAM bus address in LE format.
882 * 'script' is loaded in the on-chip RAM if present.
884 * 53C895A, 53C896 and 53C1010 that provide 8K on-chip RAM.
945 * Miscellaneous buffers accessed by the scripts-processor.
949 u_char msgout[8]; /* Buffer for MESSAGE OUT */
950 u_char msgin [8]; /* Buffer for MESSAGE IN */
951 u32 lastmsg; /* Last SCSI message sent */
970 * During error handling and/or recovery,
1000 * Command abort handling.
1004 u_char abrt_msg[4]; /* Message to send buffer */
1010 * 64 bit DMA handling.
1025 #define use_dac(np) (np)->use_dac
1026 #define set_dac(np) (np)->use_dac = 1
1029 #define HCB_BA(np, lbl) (np->hcb_ba + offsetof(struct sym_hcb, lbl))
1067 * to provide bus address bits 32-39 to the SCRIPTS processor.
1075 (data)->addr = cpu_to_scr(badd); \
1076 (data)->size = cpu_to_scr(len); \
1082 (data)->addr = cpu_to_scr(badd); \
1083 (data)->size = cpu_to_scr((((badd) >> 8) & 0xff000000) + len); \
1094 if (h != np->dmap_bah[s]) in sym_build_sge()
1097 (data)->addr = cpu_to_scr(badd); in sym_build_sge()
1098 (data)->size = cpu_to_scr((s<<24) + len); in sym_build_sge()
1137 #define VTOB_HASH_MASK (VTOB_HASH_SIZE-1)
1156 #define M_GET_MEM_CLUSTER() mp->get_mem_cluster(mp)
1157 #define M_FREE_MEM_CLUSTER(p) mp->free_mem_cluster(mp, p)
1161 struct sym_m_link h[SYM_MEM_CLUSTER_SHIFT - SYM_MEM_SHIFT + 1];
1173 * Verbs used by the driver code for DMAable memory handling.
1179 #define _sym_calloc_dma(np, l, n) __sym_calloc_dma(np->bus_dmat, l, n)
1181 __sym_mfree_dma(np->bus_dmat, _uvptv_(p), l, n)
1184 #define vtobus(p) __vtobus(np->bus_dmat, _uvptv_(p))
1198 vaddr = dma_alloc_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, &baddr, in sym_m_get_dma_mem_cluster()
1201 vbp->vaddr = vaddr; in sym_m_get_dma_mem_cluster()
1202 vbp->baddr = baddr; in sym_m_get_dma_mem_cluster()
1209 dma_free_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, vbp->vaddr, in sym_m_free_dma_mem_cluster()
1210 vbp->baddr); in sym_m_free_dma_mem_cluster()