summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_target.h
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2001-05-28 21:20:43 +0000
committermjacob <mjacob@FreeBSD.org>2001-05-28 21:20:43 +0000
commit19b20edd4063454edfe9d46a08ec2249527d1e8b (patch)
tree2ff029f1c3035ecb1a70ed1b7e80e5a0ed1b794c /sys/dev/isp/isp_target.h
parentf80decdc0cdb69cc9099b1ba2b51651e287082f2 (diff)
downloadFreeBSD-src-19b20edd4063454edfe9d46a08ec2249527d1e8b.zip
FreeBSD-src-19b20edd4063454edfe9d46a08ec2249527d1e8b.tar.gz
Spring MegaChange #1.
---- Make a device for each ISP- really usable only with devfs and add an ioctl entry point (this can be used to (re)set debug levels, reset the HBA, rescan the fabric, issue lips, etc). ---- Add in a kernel thread for Fibre Channel cards. The purpose of this thread is to be woken up to clean up after Fibre Channel events block things. Basically, any FC event that casts doubt on the location or identify of FC devices blocks the queues. When, and if, we get the PORT DATABASE CHANGED or NAME SERVER DATABASE CHANGED async event, we activate the kthread which will then, in full thread context, re-evaluate the local loop and/or the fabric. When it's satisfied that things are stable, it can then release the blocked queues and let commands flow again. The prior mechanism was a lazy evaluation. That is, the next command to come down the pipe after change events would pay the full price for re-evaluation. And if this was done off of a softcall, it really could hang up the system. These changes brings the FreeBSD port more in line with the Solaris, Linux and NetBSD ports. It also, more importantly, gets us being more proactive about topology changes which could then be reflected upwards to CAM so that the periph driver can be informed sooner rather than later when things arrive or depart. --- Add in the (correct) usage of locking macros- we now have lock transition macros which allow us to transition from holding the CAM lock (Giant) and grabbing the softc lock and vice versa. Switch over to having this HBA do real locking. Some folks claim this won't be a win. They're right. But you have to start somewhere, and this will begin to teach us how to DTRT for HBAs, etc. -- Start putting in prototype 2300 support. Add back in LIP and Loop Reset as async events that each platform will handle. Add in another int_bogus instrumentation point. Do some more substantial target mode cleanups. MFC after: 8 weeks
Diffstat (limited to 'sys/dev/isp/isp_target.h')
-rw-r--r--sys/dev/isp/isp_target.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/isp/isp_target.h b/sys/dev/isp/isp_target.h
index fde87ce..c94bda8 100644
--- a/sys/dev/isp/isp_target.h
+++ b/sys/dev/isp/isp_target.h
@@ -361,13 +361,16 @@ typedef struct {
#define CT_INVAL 0x06 /* request for disabled lun */
#define CT_NOPATH 0x07 /* invalid ITL nexus */
#define CT_INVRXID 0x08 /* (FC only) Invalid RX_ID */
+#define CT_DATA_OVER 0x09 /* (FC only) Data Overrun */
#define CT_RSELTMO 0x0A /* reselection timeout after 2 tries */
#define CT_TIMEOUT 0x0B /* timed out */
#define CT_RESET 0x0E /* SCSI Bus Reset occurred */
#define CT_PARITY 0x0F /* Uncorrectable Parity Error */
+#define CT_BUS_ERROR 0x10 /* (FC Only) DMA PCI Error */
#define CT_PANIC 0x13 /* Unrecoverable Error */
#define CT_PHASE_ERROR 0x14 /* Bus phase sequence error */
#define CT_BDR_MSG 0x17 /* Bus Device Reset msg received */
+#define CT_DATA_UNDER 0x15 /* (FC only) Data Underrun */
#define CT_TERMINATED 0x19 /* due to Terminate Transfer mbox cmd */
#define CT_PORTNOTAVAIL 0x28 /* port not available */
#define CT_LOGOUT 0x29 /* port logout */
@@ -682,10 +685,11 @@ int isp_target_notify(struct ispsoftc *, void *, u_int16_t *);
/*
* Enable/Disable/Modify a logical unit.
+ * (softc, cmd, bus, tgt, lun, cmd_cnt, inotify_cnt, opaque)
*/
-#define DFLT_CMD_CNT 32 /* XX */
-#define DFLT_INOTIFY (4)
-int isp_lun_cmd(struct ispsoftc *, int, int, int, int, u_int32_t);
+#define DFLT_CMND_CNT 32
+#define DFLT_INOT_CNT 4
+int isp_lun_cmd(struct ispsoftc *, int, int, int, int, int, int, u_int32_t);
/*
* General request queue 'put' routine for target mode entries.
OpenPOWER on IntegriCloud