Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cam/nvme/nvme_da.c
Show First 20 Lines • Show All 1,004 Lines • ▼ Show 20 Lines | if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { | ||||
panic("REQ_CMP with QFRZN"); | panic("REQ_CMP with QFRZN"); | ||||
error = 0; | error = 0; | ||||
} | } | ||||
bp->bio_error = error; | bp->bio_error = error; | ||||
if (error != 0) { | if (error != 0) { | ||||
bp->bio_resid = bp->bio_bcount; | bp->bio_resid = bp->bio_bcount; | ||||
bp->bio_flags |= BIO_ERROR; | bp->bio_flags |= BIO_ERROR; | ||||
} else { | } else { | ||||
if (state == NDA_CCB_TRIM) | |||||
bp->bio_resid = 0; | bp->bio_resid = 0; | ||||
else | |||||
bp->bio_resid = nvmeio->resid; | |||||
if (bp->bio_resid > 0) | |||||
bp->bio_flags |= BIO_ERROR; | |||||
} | } | ||||
if (state == NDA_CCB_TRIM) | if (state == NDA_CCB_TRIM) | ||||
free(bp->bio_driver2, M_NVMEDA); | free(bp->bio_driver2, M_NVMEDA); | ||||
softc->outstanding_cmds--; | softc->outstanding_cmds--; | ||||
/* | /* | ||||
* We need to call cam_iosched before we call biodone so that we | * We need to call cam_iosched before we call biodone so that we | ||||
* don't measure any activity that happens in the completion | * don't measure any activity that happens in the completion | ||||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |