diff options
author | mjacob <mjacob@FreeBSD.org> | 2007-04-02 01:04:20 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2007-04-02 01:04:20 +0000 |
commit | 00323bff58a4642e190d904bae8a04685867f87c (patch) | |
tree | 301dc2dba02ff47c95da310a9856c01c9754f539 /sys/dev/isp/isp_freebsd.c | |
parent | 65a30c481ba0f8b44f073c893e9d5dbc5747a5d1 (diff) | |
download | FreeBSD-src-00323bff58a4642e190d904bae8a04685867f87c.zip FreeBSD-src-00323bff58a4642e190d904bae8a04685867f87c.tar.gz |
Temporarily desupport simultaneous target and initiator mode.
When the linux port changes were imported which split the
target command list to be separate from the initiator command
list and the handle format changed to encode a type in the handle
the implications to the function isp_handle_index (which only
the NetBSD/OpenBSD/FreeBSD ports use) were overlooked.
The fault is twofold: first, the index into the DMA maps
in isp_pci is wrong because a target command handle with
the type bit left in place caused a bad index (and panic)
into dma map. Secondly, the assumption of the array
of DMA maps in either PCS or SBUS attachment structures is
that there is a linear mapping between handle index and
DMA map index. This can no longer be true if there are
overlapping index spaces for initiator mode and target
mode commands.
These changes bandaid around the problem by forcing us
to not have simultaneous dual roles and doing the appropriate
masking to make sure things are indexed correctly. A longer
term fix is being devloped.
Diffstat (limited to 'sys/dev/isp/isp_freebsd.c')
-rw-r--r-- | sys/dev/isp/isp_freebsd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index 8ec82e2..f422659 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -382,6 +382,14 @@ ispioctl(_DEV dev, u_long c, caddr_t addr, int flags, _IOP *td) retval = EINVAL; break; } + /* + * XXX: Current + */ + if (nr == ISP_ROLE_BOTH) { + isp_prt(isp, ISP_LOGERR, "dual roles not supported"); + retval = EINVAL; + break; + } *(int *)addr = isp->isp_role; isp->isp_role = nr; /* FALLTHROUGH */ @@ -1133,7 +1141,7 @@ isp_en_lun(ispsoftc_t *isp, union ccb *ccb) static void isp_ledone(ispsoftc_t *isp, lun_entry_t *lep) { - const char lfmt[] = "now %sabled for target mode"; + const char lfmt[] = "now %sabled for target mode\n"; union ccb *ccb; uint32_t seq; tstate_t *tptr; |