diff options
author | mav <mav@FreeBSD.org> | 2011-04-14 21:25:32 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2011-04-14 21:25:32 +0000 |
commit | 9bc238fc0334cfb46f05799c73b4c2e354eb9be4 (patch) | |
tree | 71bd2fcd06915bd43a64124900a2385aa575a77a /sys/cam/cam_ccb.h | |
parent | c1a81e0659dd1202f6a4ec7b68ae949d74264b48 (diff) | |
download | FreeBSD-src-9bc238fc0334cfb46f05799c73b4c2e354eb9be4.zip FreeBSD-src-9bc238fc0334cfb46f05799c73b4c2e354eb9be4.tar.gz |
Make CAM report devices with ATA/SATA transport to devstat(9) as IDE.
Diffstat (limited to 'sys/cam/cam_ccb.h')
-rw-r--r-- | sys/cam/cam_ccb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index bee07e8..981a5ed 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -258,6 +258,14 @@ typedef enum { XPORT_ISCSI, /* iSCSI */ } cam_xport; +#define XPORT_IS_ATA(t) ((t) == XPORT_ATA || (t) == XPORT_SATA) +#define XPORT_IS_SCSI(t) ((t) != XPORT_UNKNOWN && \ + (t) != XPORT_UNSPECIFIED && \ + !XPORT_IS_ATA(t)) +#define XPORT_DEVSTAT_TYPE(t) (XPORT_IS_ATA(t) ? DEVSTAT_TYPE_IF_IDE : \ + XPORT_IS_SCSI(t) ? DEVSTAT_TYPE_IF_SCSI : \ + DEVSTAT_TYPE_IF_OTHER) + #define PROTO_VERSION_UNKNOWN (UINT_MAX - 1) #define PROTO_VERSION_UNSPECIFIED UINT_MAX #define XPORT_VERSION_UNKNOWN (UINT_MAX - 1) |