Author: mav
Date: Thu Mar 28 11:24:30 2013
New Revision: 248825
URL: http://svnweb.freebsd.org/changeset/base/248825

Log:
  Except one case mps(4) driver does not touch the data and works well with
  unmapped I/O.  That one exception is access to INQUIRY VPD request result.
  Those requests are never unmapped now, but to be safe add respective check
  there and allow unmapped I/O for the SIM by setting PIM_UNMAPPED flag.

Modified:
  head/sys/dev/mps/mps_sas.c

Modified: head/sys/dev/mps/mps_sas.c
==============================================================================
--- head/sys/dev/mps/mps_sas.c  Thu Mar 28 11:00:41 2013        (r248824)
+++ head/sys/dev/mps/mps_sas.c  Thu Mar 28 11:24:30 2013        (r248825)
@@ -914,7 +914,7 @@ mpssas_action(struct cam_sim *sim, union
                cpi->version_num = 1;
                cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16;
                cpi->target_sprt = 0;
-               cpi->hba_misc = PIM_NOBUSRESET;
+               cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED;
                cpi->hba_eng_cnt = 0;
                cpi->max_target = sassc->sc->facts->MaxTargets - 1;
                cpi->max_lun = 255;
@@ -2238,6 +2238,7 @@ mpssas_scsiio_complete(struct mps_softc 
                if ((csio->cdb_io.cdb_bytes[0] == INQUIRY) &&
                    (csio->cdb_io.cdb_bytes[1] & SI_EVPD) &&
                    (csio->cdb_io.cdb_bytes[2] == SVPD_SUPPORTED_PAGE_LIST) &&
+                   ((csio->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR) &&
                    (csio->data_ptr != NULL) && (((uint8_t *)cm->cm_data)[0] ==
                    T_SEQUENTIAL) && (sc->control_TLR) &&
                    (sc->mapping_table[csio->ccb_h.target_id].device_info &
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to