diff options
author | mjacob <mjacob@FreeBSD.org> | 2010-02-03 21:09:32 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2010-02-03 21:09:32 +0000 |
commit | df42a0ca6b960167d6735a4fb358950b6d690ce6 (patch) | |
tree | fdde0434a01b70cd56bc51a41aa3aaccfc6b07f8 /sys/dev/isp/isp_library.h | |
parent | c499a83bba8f8470ae5c8ef7a572fe3892a87d8c (diff) | |
download | FreeBSD-src-df42a0ca6b960167d6735a4fb358950b6d690ce6.zip FreeBSD-src-df42a0ca6b960167d6735a4fb358950b6d690ce6.tar.gz |
Redo how commands handles are created and managed and implement sequence
numbers and handle types in rational way. This will better protect from
(unwittingly) dealing with stale handles/commands.
Fix the watchdog timeout code to better protect itself from mistakes.
If we run an abort on a putatively timed out command, the command
may in fact get completed, so check to make sure the command we're
timing it out is still around. If the abort succeeds, btw, the command
should get returned via a different path.
Diffstat (limited to 'sys/dev/isp/isp_library.h')
-rw-r--r-- | sys/dev/isp/isp_library.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/isp/isp_library.h b/sys/dev/isp/isp_library.h index 9a9e397..b055dd8 100644 --- a/sys/dev/isp/isp_library.h +++ b/sys/dev/isp/isp_library.h @@ -43,10 +43,10 @@ int isp_send_cmd(ispsoftc_t *, void *, void *, uint32_t, uint32_t, isp_ddir_t); * * These handles are associate with a command. */ -int isp_save_xs(ispsoftc_t *, XS_T *, uint32_t *); +int isp_allocate_xs(ispsoftc_t *, XS_T *, uint32_t *); XS_T * isp_find_xs(ispsoftc_t *, uint32_t); uint32_t isp_find_handle(ispsoftc_t *, XS_T *); -uint32_t isp_handle_index(uint32_t); +uint32_t isp_handle_index(ispsoftc_t *, uint32_t); void isp_destroy_handle(ispsoftc_t *, uint32_t); /* @@ -156,9 +156,7 @@ void isp_put_ct_hdr(ispsoftc_t *isp, ct_hdr_t *, ct_hdr_t *); int isp_send_tgt_cmd(ispsoftc_t *, void *, void *, uint32_t, uint32_t, isp_ddir_t, void *, uint32_t); -#define IS_TARGET_HANDLE(x) ((x) & 0x8000) - -int isp_save_xs_tgt(ispsoftc_t *, void *, uint32_t *); +int isp_allocate_xs_tgt(ispsoftc_t *, void *, uint32_t *); void *isp_find_xs_tgt(ispsoftc_t *, uint32_t); uint32_t isp_find_tgt_handle(ispsoftc_t *, void *); void isp_destroy_tgt_handle(ispsoftc_t *, uint32_t); |