patch-2.2.18 linux/drivers/acorn/scsi/fas216.h

Next file: linux/drivers/acorn/scsi/msgqueue.c
Previous file: linux/drivers/acorn/scsi/fas216.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/acorn/scsi/fas216.h linux/drivers/acorn/scsi/fas216.h
@@ -40,6 +40,7 @@
 #define CMD_TRANSFERINFO	0x10
 #define CMD_INITCMDCOMPLETE	0x11
 #define CMD_MSGACCEPTED		0x12
+#define CMD_PADBYTES		0x18
 #define CMD_SETATN		0x1a
 #define CMD_RSETATN		0x1b
 
@@ -171,15 +172,17 @@
 typedef enum {
 	PHASE_IDLE,					/* we're not planning on doing anything	*/
 	PHASE_SELECTION,				/* selecting a device			*/
+	PHASE_SELSTEPS,					/* selection with command steps		*/
+	PHASE_COMMAND,					/* command sent				*/
 	PHASE_MESSAGESENT,				/* selected, and we're sending cmd	*/
 	PHASE_RECONNECTED,				/* reconnected				*/
 	PHASE_DATAOUT,					/* data out to device			*/
 	PHASE_DATAIN,					/* data in from device			*/
 	PHASE_MSGIN,					/* message in from device		*/
-	PHASE_MSGOUT,					/* message out to device		*/
-	PHASE_AFTERMSGOUT,				/* after message out phase		*/
+	PHASE_MSGIN_DISCONNECT,				/* disconnecting from bus		*/
+	PHASE_MSGOUT,					/* after message out phase		*/
+	PHASE_MSGOUT_EXPECT,				/* expecting message out		*/
 	PHASE_STATUS,					/* status from device			*/
-	PHASE_DISCONNECT,				/* disconnecting from bus		*/
 	PHASE_DONE					/* Command complete			*/
 } phase_t;
 
@@ -197,13 +200,15 @@
 } fasdmatype_t;
 
 typedef enum {
-	syncneg_start,					/* Negociate with device for Sync xfers	*/
-	syncneg_sent,					/* Sync Xfer negociation sent		*/
-	syncneg_complete,				/* Sync Xfer complete			*/
-	syncneg_invalid					/* Sync Xfer not supported		*/
-} syncneg_t;
+	neg_wait,					/* Negociate with device		*/
+	neg_inprogress,					/* Negociation sent			*/
+	neg_complete,					/* Negociation complete			*/
+	neg_targcomplete,				/* Target completed negociation		*/
+	neg_invalid					/* Negociation not supported		*/
+} neg_t;
 
 #define MAGIC	0x441296bdUL
+#define NR_MSGS	8
 
 typedef struct {
 	unsigned long		magic_start;
@@ -231,7 +236,9 @@
 		MsgQueue_t	msgs;			/* message queue for connected device	*/
 
 		unsigned int	async_stp;		/* Async transfer STP value		*/
-		unsigned short	last_message;		/* last message to be sent		*/
+		unsigned char	msgin_fifo;		/* bytes in fifo at time of message in	*/
+		unsigned char	message[256];		/* last message received from device	*/
+		unsigned int	msglen;			/* length of last message received	*/
 
 		unsigned char	disconnectable:1;	/* this command can be disconnected	*/
 		unsigned char	aborting:1;		/* aborting command			*/
@@ -255,6 +262,7 @@
 		unsigned char	clockrate;		/* clock rate of FAS device (MHz)	*/
 		unsigned char	select_timeout;		/* timeout (R5)				*/
 		unsigned char	sync_max_depth;		/* Synchronous xfer max fifo depth	*/
+		unsigned char	wide_max_size;		/* Maximum wide transfer size		*/
 		unsigned char	cntl3;			/* Control Reg 3			*/
 		unsigned int	asyncperiod;		/* Async transfer period (ns)		*/
 		unsigned int	disconnect_ok:1;	/* Disconnects allowed?			*/
@@ -267,12 +275,14 @@
 	} queues;
 
 	/* per-device info */
-	struct {
+	struct fas216_device {
 		unsigned char	disconnect_ok:1;	/* device can disconnect		*/
-		unsigned int	period;			/* sync xfer period (*4ns)		*/
+		unsigned char	period;			/* sync xfer period in (*4ns)		*/
 		unsigned char	stp;			/* synchronous transfer period		*/
 		unsigned char	sof;			/* synchronous offset register		*/
-		syncneg_t	negstate;		/* synchronous transfer mode		*/
+		unsigned char	wide_xfer;		/* currently negociated wide transfer	*/
+		neg_t		sync_state;		/* synchronous transfer mode		*/
+		neg_t		wide_state;		/* wide transfer mode			*/
 	} device[8];
 	unsigned char	busyluns[8];			/* array of bits indicating LUNs busy	*/
 
@@ -339,6 +349,9 @@
  * Returns : 0 on success
  */
 extern int fas216_release (struct Scsi_Host *instance);
+
+extern int fas216_print_stats(FAS216_Info *info, char *buffer);
+extern int fas216_print_device(FAS216_Info *info, Scsi_Device *scd, char *buffer);
 
 /* Function: int fas216_eh_abort(Scsi_Cmnd *SCpnt)
  * Purpose : abort this command

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)