Author: imp
Date: Fri Apr 15 05:10:39 2016
New Revision: 298037
URL: https://svnweb.freebsd.org/changeset/base/298037

Log:
  Expand CAM_IO_STATS #ifdef to logical unit.

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c   Fri Apr 15 05:10:32 2016        (r298036)
+++ head/sys/cam/ata/ata_da.c   Fri Apr 15 05:10:39 2016        (r298037)
@@ -2175,6 +2175,7 @@ out:
 static int
 adaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
 {
+#ifdef CAM_IO_STATS
        struct ada_softc *softc;
        struct cam_periph *periph;
 
@@ -2183,9 +2184,7 @@ adaerror(union ccb *ccb, u_int32_t cam_f
 
        switch (ccb->ccb_h.status & CAM_STATUS_MASK) {
        case CAM_CMD_TIMEOUT:
-#ifdef CAM_IO_STATS
                softc->timeouts++;
-#endif
                break;
        case CAM_REQ_ABORTED:
        case CAM_REQ_CMP_ERR:
@@ -2193,13 +2192,12 @@ adaerror(union ccb *ccb, u_int32_t cam_f
        case CAM_UNREC_HBA_ERROR:
        case CAM_DATA_RUN_ERR:
        case CAM_ATA_STATUS_ERROR:
-#ifdef CAM_IO_STATS
                softc->errors++;
-#endif
                break;
        default:
                break;
        }
+#endif
 
        return(cam_periph_error(ccb, cam_flags, sense_flags, NULL));
 }

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c Fri Apr 15 05:10:32 2016        (r298036)
+++ head/sys/cam/scsi/scsi_da.c Fri Apr 15 05:10:39 2016        (r298037)
@@ -3773,24 +3773,22 @@ daerror(union ccb *ccb, u_int32_t cam_fl
        if (error == ERESTART)
                return (ERESTART);
 
+#ifdef CAM_IO_STATS
        switch (ccb->ccb_h.status & CAM_STATUS_MASK) {
        case CAM_CMD_TIMEOUT:
-#ifdef CAM_IO_STATS
                softc->timeouts++;
-#endif
                break;
        case CAM_REQ_ABORTED:
        case CAM_REQ_CMP_ERR:
        case CAM_REQ_TERMIO:
        case CAM_UNREC_HBA_ERROR:
        case CAM_DATA_RUN_ERR:
-#ifdef CAM_IO_STATS
                softc->errors++;
-#endif
                break;
        default:
                break;
        }
+#endif
 
        /*
         * XXX
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to