From 89e8995fe2d4a54327478d0665ca3aba3c8eede4 Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 5 Oct 2015 09:08:06 +0000 Subject: MFC r287724: Check for obsolete NUL bin in CSCD descriptor. --- sys/cam/ctl/ctl_tpc_local.c | 3 ++- sys/cam/scsi/scsi_all.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/cam/ctl/ctl_tpc_local.c b/sys/cam/ctl/ctl_tpc_local.c index 5f438af..ce7c3e8 100644 --- a/sys/cam/ctl/ctl_tpc_local.c +++ b/sys/cam/ctl/ctl_tpc_local.c @@ -282,7 +282,8 @@ tpcl_resolve(struct ctl_softc *softc, int init_port, uint64_t lunid = UINT64_MAX; if (cscd->type_code != EC_CSCD_ID || - (cscd->luidt_pdt & EC_LUIDT_MASK) != EC_LUIDT_LUN) + (cscd->luidt_pdt & EC_LUIDT_MASK) != EC_LUIDT_LUN || + (cscd->luidt_pdt & EC_NUL) != 0) return (lunid); cscdid = (struct scsi_ec_cscd_id *)cscd; diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index 375fcbe..f860624 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -1669,6 +1669,7 @@ struct scsi_ec_cscd uint8_t type_code; #define EC_CSCD_EXT 0xff uint8_t luidt_pdt; +#define EC_NUL 0x20 #define EC_LUIDT_MASK 0xc0 #define EC_LUIDT_LUN 0x00 #define EC_LUIDT_PROXY_TOKEN 0x40 -- cgit v1.1