/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Device driver for the SYMBIOS/LSILOGIC 53C8XX and 53C1010 family * of PCI-SCSI IO processors. * * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr> * * This driver is derived from the Linux sym53c8xx driver. * Copyright (C) 1998-2000 Gerard Roudier * * The sym53c8xx driver is derived from the ncr53c8xx driver that had been * a port of the FreeBSD ncr driver to Linux-1.2.13. * * The original ncr driver has been written for 386bsd and FreeBSD by * Wolfgang Stanglmeier <wolf@cologne.de> * Stefan Esser <se@mi.Uni-Koeln.de> * Copyright (C) 1994 Wolfgang Stanglmeier * * Other major contributions: * * NVRAM detection and reading. * Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk> * *-----------------------------------------------------------------------------
*/
/* * A 'read barrier' flushes any data that have been prefetched * by the processor due to out of order execution. Such a barrier * must notably be inserted prior to looking at data that have * been DMAed, assuming that program does memory READs in proper * order and that the device ensured proper ordering of WRITEs. * * A 'write barrier' prevents any previous WRITEs to pass further * WRITEs. Such barriers must be inserted each time another agent * relies on ordering of WRITEs. * * Note that, due to posting of PCI memory writes, we also must * insert dummy PCI read transactions when some ordering involving * both directions over the PCI does matter. PCI transactions are * fully ordered in each direction.
*/
#ifdef SYM_CONF_CHIP_BIG_ENDIAN #error"Chips in BIG ENDIAN addressing mode are not (yet) supported" #endif
/* * If the CPU and the chip use same endian-ness addressing, * no byte reordering is needed for script patching. * Macro cpu_to_scr() is to be used for script patching. * Macro scr_to_cpu() is to be used for getting a DWORD * from the script.
*/
/* * These ones are used as return code from * error recovery handlers under Linux.
*/ #define SCSI_SUCCESS SUCCESS #define SCSI_FAILED FAILED
/* * System specific target data structure. * None for now, under Linux.
*/ /* #define SYM_HAVE_STCB */
/* * System specific lun data structure.
*/ #define SYM_HAVE_SLCB struct sym_slcb {
u_short reqtags; /* Number of tags requested by user */
u_short scdev_depth; /* Queue depth set in select_queue_depth() */
};
/* * System specific command data structure. * Not needed under Linux.
*/ /* struct sym_sccb */
/* * System specific host data structure.
*/ struct sym_shcb { /* * Chip and controller identification.
*/ int unit; char inst_name[16]; char chip_name[8];
/* * Set the status field of a CAM CCB.
*/ staticinlinevoid
sym_set_cam_status(struct scsi_cmnd *cmd, int status)
{
cmd->result &= ~(0xff << 16);
cmd->result |= (status << 16);
}
/* * Get the status field of a CAM CCB.
*/ staticinlineint
sym_get_cam_status(struct scsi_cmnd *cmd)
{ return host_byte(cmd->result);
}
/* * Build CAM result for a successful IO and for a failed IO.
*/ staticinlinevoid sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid)
{
scsi_set_resid(cmd, resid);
cmd->result = (DID_OK << 16) | (cp->ssss_status & 0x7f);
} void sym_set_cam_result_error(struct sym_hcb *np, struct sym_ccb *cp, int resid);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.