I'm hunting the hz(9) in ciss_cmd().  To remove it I need to first
untangle the polling code.

To start, I think it's sensible to remove a level of indentation.

I've attached the -w diff to simplify review.

ok?

Index: ic/ciss.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ciss.c,v
retrieving revision 1.75
diff -u -p -w -r1.75 ciss.c
--- ic/ciss.c   14 Aug 2016 04:08:03 -0000      1.75
+++ ic/ciss.c   20 Jan 2020 02:48:38 -0000
@@ -518,7 +518,10 @@ ciss_cmd(struct ciss_ccb *ccb, int flags
        } else
                bus_space_write_4(sc->iot, sc->ioh, CISS_INQ, ccb->ccb_cmdpa);
 
-       if (wait & SCSI_POLL) {
+       /* If we're not waiting for completion we're done. */
+       if (!(wait & SCSI_POLL))
+               return (error);
+
                struct timeval tv;
                int etick;
                CISS_DPRINTF(CISS_D_CMD, ("waiting "));
@@ -598,7 +601,6 @@ ciss_cmd(struct ciss_ccb *ccb, int flags
 
                CISS_DPRINTF(CISS_D_CMD, ("done %d:%d",
                    ccb->ccb_err.cmd_stat, ccb->ccb_err.scsi_stat));
-       }
 
        return (error);
 }

Reply via email to