aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-10-28 19:08:51 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-10-28 19:08:51 +0000
commit668c0ec64f429df19688158165c90f35745aaeb8 (patch)
tree0ffff190a32181a1113d9d6fa0dc04f400352e8e /sys/dev
parent83a283cf62c7e1a69f5973aeff4ab00ef437b546 (diff)
downloadsrc-668c0ec64f429df19688158165c90f35745aaeb8.tar.gz
src-668c0ec64f429df19688158165c90f35745aaeb8.zip
Change the way how target mode is enabled on 23xx chips.
Without docs I am not completely sure about this, but on my tests new method works better then previous, at least with our latest firmware.
Notes
Notes: svn path=/head/; revision=290118
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isp/isp.c2
-rw-r--r--sys/dev/isp/isp_freebsd.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index 443064f3d2df..31764f81abf4 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -1895,7 +1895,7 @@ isp_fibre_init(ispsoftc_t *isp)
icbp->icb_logintime = ICB_LOGIN_TOV;
#ifdef ISP_TARGET_MODE
- if (ISP_FW_NEWER_THAN(isp, 3, 25, 0) && (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE)) {
+ if (IS_23XX(isp) && (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE)) {
icbp->icb_lunenables = 0xffff;
icbp->icb_ccnt = DFLT_CMND_CNT;
icbp->icb_icnt = DFLT_INOT_CNT;
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index db1229751708..efc1b7c11966 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -1414,7 +1414,8 @@ isp_enable_deferred(ispsoftc_t *isp, int bus, lun_id_t lun)
ISP_GET_PC(isp, bus, tm_luns_enabled, luns_already_enabled);
isp_prt(isp, ISP_LOGTINFO, "%s: bus %d lun %jx luns_enabled %d", __func__, bus, (uintmax_t)lun, luns_already_enabled);
- if (IS_24XX(isp) || (IS_FC(isp) && luns_already_enabled)) {
+ if (IS_23XX(isp) || IS_24XX(isp) ||
+ (IS_FC(isp) && luns_already_enabled)) {
status = CAM_REQ_CMP;
} else {
int cmd_cnt, not_cnt;
@@ -1485,7 +1486,7 @@ isp_disable_lun(ispsoftc_t *isp, union ccb *ccb)
/*
* If we're a 24XX card, we're done.
*/
- if (IS_24XX(isp)) {
+ if (IS_23XX(isp) || IS_24XX(isp)) {
status = CAM_REQ_CMP;
goto done;
}
@@ -1501,7 +1502,7 @@ isp_disable_lun(ispsoftc_t *isp, union ccb *ccb)
if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun, 0, 0)) {
status = CAM_RESRC_UNAVAIL;
} else {
- mtx_sleep(ccb, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0);
+ mtx_sleep(&status, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0);
}
isp->isp_osinfo.rptr = NULL;
done: