diff options
author | sbruno <sbruno@FreeBSD.org> | 2014-06-29 18:53:15 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2014-06-29 18:53:15 +0000 |
commit | fcae8e05c8d0ca008360af9f820184a221cd2740 (patch) | |
tree | 60a912c6c5e98cea255e154f8886c3f191f9c2dd /sys/dev/ciss/ciss.c | |
parent | af69ed37812081d1cef71e77ec81f201216843d3 (diff) | |
download | FreeBSD-src-fcae8e05c8d0ca008360af9f820184a221cd2740.zip FreeBSD-src-fcae8e05c8d0ca008360af9f820184a221cd2740.tar.gz |
Add detection for ciss(4) controllers that are set to non-raid JBOD mode.
If a controller is set to JBOD, it has no RAID functions turned on.
Populate even more of the firmware specification headers, copied from
cciss_vol_status.
Reviewed by: Benesh, Scott <scott.benesh@hp.com>
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/ciss/ciss.c')
-rw-r--r-- | sys/dev/ciss/ciss.c | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 9553fb4..5240051 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -1220,7 +1220,7 @@ ciss_identify_adapter(struct ciss_softc *sc) } /* sanity-check reply */ - if (!sc->ciss_id->big_map_supported) { + if (!(sc->ciss_id->controller_flags & CONTROLLER_FLAGS_BIG_MAP_SUPPORT)) { ciss_printf(sc, "adapter does not support BIG_MAP\n"); error = ENXIO; goto out; @@ -1250,7 +1250,7 @@ ciss_identify_adapter(struct ciss_softc *sc) sc->ciss_id->configured_logical_drives, (sc->ciss_id->configured_logical_drives == 1) ? "" : "s"); ciss_printf(sc, " firmware %4.4s\n", sc->ciss_id->running_firmware_revision); - ciss_printf(sc, " %d SCSI channels\n", sc->ciss_id->scsi_bus_count); + ciss_printf(sc, " %d SCSI channels\n", sc->ciss_id->scsi_chip_count); ciss_printf(sc, " signature '%.4s'\n", sc->ciss_cfg->signature); ciss_printf(sc, " valence %d\n", sc->ciss_cfg->valence); @@ -1274,6 +1274,10 @@ ciss_identify_adapter(struct ciss_softc *sc) ciss_printf(sc, " max logical logical volumes: %d\n", sc->ciss_cfg->max_logical_supported); ciss_printf(sc, " max physical disks supported: %d\n", sc->ciss_cfg->max_physical_supported); ciss_printf(sc, " max physical disks per logical volume: %d\n", sc->ciss_cfg->max_physical_per_logical); + ciss_printf(sc, " JBOD Support is %s\n", (sc->ciss_id->uiYetMoreControllerFlags & YMORE_CONTROLLER_FLAGS_JBOD_SUPPORTED) ? + "Available" : "Unavailable"); + ciss_printf(sc, " JBOD Mode is %s\n", (sc->ciss_id->PowerUPNvramFlags & PWR_UP_FLAG_JBOD_ENABLED) ? + "Enabled" : "Disabled"); } out: @@ -3387,25 +3391,28 @@ ciss_cam_complete_fixup(struct ciss_softc *sc, struct ccb_scsiio *csio) bus = cam_sim_bus(xpt_path_sim(csio->ccb_h.path)); /* - * Don't let hard drives be seen by the DA driver. They will still be - * attached by the PASS driver. + * If the controller is in JBOD mode, there are no logical volumes. + * Let the disks be probed and dealt with via CAM. Else, mask off + * the physical disks and setup the parts of the inq structure for + * the logical volume. swb */ - if (CISS_IS_PHYSICAL(bus)) { - if (SID_TYPE(inq) == T_DIRECT) - inq->device = (inq->device & 0xe0) | T_NODEVICE; - return; + if( !(sc->ciss_id->PowerUPNvramFlags & PWR_UP_FLAG_JBOD_ENABLED)){ + if (CISS_IS_PHYSICAL(bus)) { + if (SID_TYPE(inq) == T_DIRECT) + inq->device = (inq->device & 0xe0) | T_NODEVICE; + return; + } + cl = &sc->ciss_logical[bus][target]; + + padstr(inq->vendor, "HP", + SID_VENDOR_SIZE); + padstr(inq->product, + ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), + SID_PRODUCT_SIZE); + padstr(inq->revision, + ciss_name_ldrive_status(cl->cl_lstatus->status), + SID_REVISION_SIZE); } - - cl = &sc->ciss_logical[bus][target]; - - padstr(inq->vendor, "HP", - SID_VENDOR_SIZE); - padstr(inq->product, - ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), - SID_PRODUCT_SIZE); - padstr(inq->revision, - ciss_name_ldrive_status(cl->cl_lstatus->status), - SID_REVISION_SIZE); } } |