Source
x
/* SPDX-License-Identifier: GPL-2.0 */
/* -*- mode: c; c-basic-offset: 8 -*- */
/* Driver for 53c700 and 53c700-66 chips from NCR and Symbios
*
* Copyright (C) 2001 by James.Bottomley@HansenPartnership.com
*/
/* Turn on for general debugging---too verbose for normal use */
/* Debug the tag queues, checking hash queue allocation and deallocation
* and search for duplicate tags */
/* The number of available command slots */
/* The maximum number of Scatter Gathers we allow */
/* The maximum number of luns (make this of the form 2^n) */
/* Maximum number of tags the driver ever allows per device */
/* Tag depth the driver starts out with (can be altered in sysfs) */
/* This is the default number of commands per LUN in the untagged case.
* two is a good value because it means we can have one command active and
* one command fully prepared and waiting
*/
/* magic byte identifying an internally generated REQUEST_SENSE command */
struct NCR_700_Host_Parameters;
/* These are the externally used routines */
struct Scsi_Host *NCR_700_detect(struct scsi_host_template *,
struct NCR_700_Host_Parameters *, struct device *);
int NCR_700_release(struct Scsi_Host *host);
irqreturn_t NCR_700_intr(int, void *);
enum NCR_700_Host_State {
NCR_700_HOST_BUSY,
NCR_700_HOST_FREE,
};
struct NCR_700_SG_List {
/* The following is a script fragment to move the buffer onto the
* bus and then link the next fragment or return */
__u32 ins;
__u32 pAddr;
};
struct NCR_700_Device_Parameters {
/* space for creating a request sense command. Really, except
* for the annoying SCSI-2 requirement for LUN information in
* cmnd[1], this could be in static storage */
unsigned char cmnd[MAX_COMMAND_SIZE];
__u8 depth;
struct scsi_cmnd *current_cmnd; /* currently active command */
};
/* The SYNC negotiation sequence looks like:
*
* If DEV_NEGOTIATED_SYNC not set, tack and SDTR message on to the