summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2000-06-12 23:08:31 +0000
committermjacob <mjacob@FreeBSD.org>2000-06-12 23:08:31 +0000
commit933a6392cace0eb911e0998ca89db700ff008dfc (patch)
tree5c1a61237a72bb564f1b7940fe5ed9ccf7d2b27c
parent7fcd5a36e807129837a0c7902828866e05f4fa54 (diff)
downloadFreeBSD-src-933a6392cace0eb911e0998ca89db700ff008dfc.zip
FreeBSD-src-933a6392cace0eb911e0998ca89db700ff008dfc.tar.gz
Fix breakage to target mode support.
What we'd like to know is whether or not we have a listener upstream that really hasn't configured yet. If we do, then we can give a more sensible reply here. If not, then we can reject this out of hand. Choices for what to send were Not Ready, Unit Not Self-Configured Yet (0x2,0x3e,0x00) for the former and Illegal Request, Logical Unit Not Supported (0x5,0x25,0x00) for the latter. We used to decide whether there was at least one listener based upon whether the black hole driver was configured. However, recent config(8) changes have made this hard to do at this time. Actually, we didn't use the above quite yet, but were sure considering it.
-rw-r--r--sys/dev/isp/isp_freebsd.c39
1 files changed, 25 insertions, 14 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 6437e12..d0094a0 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -160,7 +160,6 @@ isp_attach(struct ispsoftc *isp)
*/
#ifdef ISP_TARGET_MODE
-#include "targbh.h"
static __inline int is_lun_enabled(struct ispsoftc *, lun_id_t);
static __inline int are_any_luns_enabled(struct ispsoftc *);
@@ -962,20 +961,32 @@ isp_handle_platform_atio2(struct ispsoftc *isp, at2_entry_t *aep)
}
if (tptr == NULL) {
-#if 0
- /* XXX WE REALLY NEED A HARDWIRED SENSE/INQ CTIO TO USE XXX */
- u_int32_t ccode = SCSI_STATUS_CHECK_COND | ECMD_SVALID;
-#if NTARGBH > 0
- /* Not Ready, Unit Not Self-Configured yet.... */
- ccode |= (SSD_KEY_NOT_READY << 8) | (0x3E << 24);
-#else
- /* Illegal Request, Unit Not Self-Configured yet.... */
- ccode |= (SSD_KEY_ILLEGAL_REQUEST << 8) | (0x25 << 24);
-#endif
-#else
+ /*
+ * What we'd like to know is whether or not we have a listener
+ * upstream that really hasn't configured yet. If we do, then
+ * we can give a more sensible reply here. If not, then we can
+ * reject this out of hand.
+ *
+ * Choices for what to send were
+ *
+ * Not Ready, Unit Not Self-Configured Yet
+ * (0x2,0x3e,0x00)
+ *
+ * for the former and
+ *
+ * Illegal Request, Logical Unit Not Supported
+ * (0x5,0x25,0x00)
+ *
+ * for the latter.
+ *
+ * We used to decide whether there was at least one listener
+ * based upon whether the black hole driver was configured.
+ * However, recent config(8) changes have made this hard to do
+ * at this time.
+ *
+ */
u_int32_t ccode = SCSI_STATUS_BUSY;
-#endif
-
+
/*
* Because we can't autofeed sense data back with
* a command for parallel SCSI, we can't give back
OpenPOWER on IntegriCloud