diff options
author | mjacob <mjacob@FreeBSD.org> | 2012-06-01 23:29:48 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2012-06-01 23:29:48 +0000 |
commit | 668ec8ec8cf82118d79473006ff5e22ee32fbd74 (patch) | |
tree | 221e605810db01fdf9ad7488ea78bedd1853e5fa /sys/dev/isp/ispvar.h | |
parent | f2720055c7f6d97725f2a042dd27c8b19c917ef5 (diff) | |
download | FreeBSD-src-668ec8ec8cf82118d79473006ff5e22ee32fbd74.zip FreeBSD-src-668ec8ec8cf82118d79473006ff5e22ee32fbd74.tar.gz |
Clean up and complete the incomplete deferred enable code.
Make the default role NONE if target mode is selected. This
allows ctl(8) to switch to/from target mode via knob settings.
If we default to role 'none', this causes a reset of the
24XX f/w which then causes initiators to wake up and notice
when we come online.
Reviewed by: kdm
MFC after: 2 weeks
Sponsored by: Spectralogic
Diffstat (limited to 'sys/dev/isp/ispvar.h')
-rw-r--r-- | sys/dev/isp/ispvar.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index 55edc17..e00191a 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -724,8 +724,17 @@ struct ispsoftc { #define ISP_ROLE_BOTH (ISP_ROLE_TARGET|ISP_ROLE_INITIATOR) #define ISP_ROLE_EITHER ISP_ROLE_BOTH #ifndef ISP_DEFAULT_ROLES +/* + * Counterintuitively, we prefer to default to role 'none' + * if we are enable target mode support. This gives us the + * maximum flexibility as to which port will do what. + */ +#ifdef ISP_TARGET_MODE +#define ISP_DEFAULT_ROLES ISP_ROLE_NONE +#else #define ISP_DEFAULT_ROLES ISP_ROLE_INITIATOR #endif +#endif /* |