diff options
author | ming li - Sun Microsystems - Beijing China <River.Li@Sun.COM> | 2010-04-22 14:57:01 +0800 |
---|---|---|
committer | ming li - Sun Microsystems - Beijing China <River.Li@Sun.COM> | 2010-04-22 14:57:01 +0800 |
commit | c6698ca1e2450f37cc5ee4cdded3e5472088ba41 (patch) | |
tree | 2fc34fdb4d36c32083c5e2533209ca9838427225 /usr/src | |
parent | b83ec4ed825d984ca8f038544e15b4ca0eac82c7 (diff) | |
download | illumos-joyent-c6698ca1e2450f37cc5ee4cdded3e5472088ba41.tar.gz |
6939097 s10u9 /dev/openprom driver needs to be able to handle SAS/SATA HBA attached SATA DVD drive.
6945720 MPTSAS_WWN_STRLEN should add one more length
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c | 18 | ||||
-rw-r--r-- | usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h | 4 |
2 files changed, 18 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c b/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c index ebdb22d12a..ea6383a50a 100644 --- a/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c +++ b/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas.c @@ -12776,6 +12776,7 @@ mptsas_bus_config(dev_info_t *pdip, uint_t flag, uint8_t phy = 0xFF; int lun = 0; uint_t mflags = flag; + int bconfig = TRUE; if (scsi_hba_iport_unit_address(pdip) == 0) { return (DDI_FAILURE); @@ -12830,6 +12831,7 @@ mptsas_bus_config(dev_info_t *pdip, uint_t flag, ret = NDI_FAILURE; break; } + *childp = NULL; if (ptr[0] == 'w') { ret = mptsas_config_one_addr(pdip, wwid, lun, childp); @@ -12837,6 +12839,18 @@ mptsas_bus_config(dev_info_t *pdip, uint_t flag, ret = mptsas_config_one_phy(pdip, phy, lun, childp); } + + /* + * If this is CD/DVD device in OBP path, the + * ndi_busop_bus_config can be skipped as config one + * operation is done above. + */ + if ((ret == NDI_SUCCESS) && (*childp != NULL) && + (strcmp(ddi_node_name(*childp), "cdrom") == 0) && + (strncmp((char *)arg, "disk", 4) == 0)) { + bconfig = FALSE; + ndi_hold_devi(*childp); + } } else { ret = NDI_FAILURE; break; @@ -12854,7 +12868,7 @@ mptsas_bus_config(dev_info_t *pdip, uint_t flag, break; } - if (ret == NDI_SUCCESS) { + if ((ret == NDI_SUCCESS) && bconfig) { ret = ndi_busop_bus_config(pdip, mflags, op, (devnm == NULL) ? arg : devnm, childp, 0); } @@ -14503,7 +14517,7 @@ mptsas_create_phys_lun(dev_info_t *pdip, struct scsi_inquiry *inq, } - if (inq->inq_dtype == 0) { + if ((inq->inq_dtype == 0) || (inq->inq_dtype == 5)) { /* * add 'obp-path' properties for devinfo */ diff --git a/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h b/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h index 1a87fcadc0..23229c502e 100644 --- a/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h +++ b/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h @@ -98,9 +98,9 @@ typedef uint16_t mptsas_phymask_t; /* * 64-bit SAS WWN is displayed as 16 characters as HEX characters, - * plus one means the end of the string '\0'. + * plus two means the prefix 'w' and end of the string '\0'. */ -#define MPTSAS_WWN_STRLEN 16 + 1 +#define MPTSAS_WWN_STRLEN (16 + 2) #define MPTSAS_MAX_GUID_LEN 64 /* |