From 759981f4640a8a383c7e5519dfcefa80a85db7c7 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Sun, 16 Jun 2002 05:02:25 +0000 Subject: [PATCH] Extend private adjunct to ATIO to have both tag lun, and extended state (so we can, when things get lost, find out who currently is processing on behalf of this open exchange. Invariably, when things are lost and wedged, it's CAM). Keep an atio resource counter locally. MFC after: 1 week --- sys/dev/isp/isp_freebsd.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h index 28002720a7e..903df0fe319 100644 --- a/sys/dev/isp/isp_freebsd.h +++ b/sys/dev/isp/isp_freebsd.h @@ -80,8 +80,16 @@ typedef struct { u_int32_t orig_datalen; u_int32_t bytes_xfered; u_int32_t last_xframt; - u_int32_t tag; + u_int32_t tag : 16, + lun : 13, /* not enough */ + state : 3; } atio_private_data_t; +#define ATPD_STATE_FREE 0 +#define ATPD_STATE_ATIO 1 +#define ATPD_STATE_CAM 2 +#define ATPD_STATE_CTIO 3 +#define ATPD_STATE_LAST_CTIO 4 +#define ATPD_STATE_PDON 5 typedef struct tstate { struct tstate *next; @@ -91,6 +99,7 @@ typedef struct tstate { lun_id_t lun; int bus; u_int32_t hold; + int atio_count; } tstate_t; #define LUN_HASH_SIZE 32