diff options
author | mjacob <mjacob@FreeBSD.org> | 2010-03-26 15:13:31 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2010-03-26 15:13:31 +0000 |
commit | 8e6a6c380c1336a18e76be1d009aed8c83774fd1 (patch) | |
tree | 62486c3713e125e6e81bed2c7daf1a095db545ba /sys/dev/isp/isp_freebsd.h | |
parent | d82aae616f1807273da2d6c2f38d74a63752642e (diff) | |
download | FreeBSD-src-8e6a6c380c1336a18e76be1d009aed8c83774fd1.zip FreeBSD-src-8e6a6c380c1336a18e76be1d009aed8c83774fd1.tar.gz |
Clean up some printing stuff so that we can have a bit finer control
on debug output. Add a new platform function requirement to allow
for printing based upon the ITL nexus instead of the isp unit plus
channel, target and lun. This allows some printouts and error messages
from the core code to appear in the same format as the platform's
subsystem (in FreeBSD's case, CAM path).
MFC after: 1 week
Diffstat (limited to 'sys/dev/isp/isp_freebsd.h')
-rw-r--r-- | sys/dev/isp/isp_freebsd.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h index dea6266..44c8bdf 100644 --- a/sys/dev/isp/isp_freebsd.h +++ b/sys/dev/isp/isp_freebsd.h @@ -424,6 +424,8 @@ default: \ imin((sizeof((ccb)->sense_data)), ccb->sense_len) #define XS_SNSKEY(ccb) ((ccb)->sense_data.flags & 0xf) +#define XS_SNSASC(ccb) ((ccb)->sense_data.add_sense_code) +#define XS_SNSASCQ(ccb) ((ccb)->sense_data.add_sense_code_qual) #define XS_TAG_P(ccb) \ (((ccb)->ccb_h.flags & CAM_TAG_ACTION_VALID) && \ (ccb)->tag_action != CAM_TAG_ACTION_NONE) @@ -461,7 +463,7 @@ default: \ (xs)->ccb_h.status |= CAM_AUTOSNS_VALID; \ memcpy(&(xs)->sense_data, sense_ptr, imin(XS_SNSLEN(xs), sense_len)) -#define XS_SET_STATE_STAT(a, b, c) +#define XS_SENSE_VALID(xs) (((xs)->ccb_h.status & CAM_AUTOSNS_VALID) != 0) #define DEFAULT_FRAMESIZE(isp) isp->isp_osinfo.framesize #define DEFAULT_EXEC_THROTTLE(isp) isp->isp_osinfo.exec_throttle @@ -593,6 +595,7 @@ extern int isp_autoconfig; * Platform Library Functions */ void isp_prt(ispsoftc_t *, int level, const char *, ...) __printflike(3, 4); +void isp_xs_prt(ispsoftc_t *, XS_T *, int level, const char *, ...) __printflike(4, 5); uint64_t isp_nanotime_sub(struct timespec *, struct timespec *); int isp_mbox_acquire(ispsoftc_t *); void isp_mbox_wait_complete(ispsoftc_t *, mbreg_t *); |