28c28
< * $FreeBSD: head/sys/cam/scsi/scsi_target.c 76192 2001-05-01 19:37:25Z ken $
---
> * $FreeBSD: head/sys/cam/scsi/scsi_target.c 76362 2001-05-08 08:30:48Z phk $
1157a1158
> bp->bio_resid = bp->bio_bcount;
1161,1162c1162,1163
< bp->bio_error = EINVAL;
< goto bad;
---
> biofinish(bp, NULL, EINVAL);
> return;
1167,1168c1168,1169
< bp->bio_error = ENXIO;
< goto bad;
---
> biofinish(bp, NULL, ENXIO);
> return;
1186c1187
< bp->bio_error = EBUSY;
---
> s = EBUSY;
1188,1189c1189,1191
< bp->bio_error = ENXIO;
< goto bad;
---
> s = ENXIO;
> biofinish(bp, NULL, s);
> return;
1217,1224d1218
< bad:
< bp->bio_flags |= BIO_ERROR;
<
< /*
< * Correctly set the buf to indicate a completed xfer
< */
< bp->bio_resid = bp->bio_bcount;
< biodone(bp);
< * $FreeBSD: head/sys/cam/scsi/scsi_target.c 76192 2001-05-01 19:37:25Z ken $
---
> * $FreeBSD: head/sys/cam/scsi/scsi_target.c 76362 2001-05-08 08:30:48Z phk $
1157a1158
> bp->bio_resid = bp->bio_bcount;
1161,1162c1162,1163
< bp->bio_error = EINVAL;
< goto bad;
---
> biofinish(bp, NULL, EINVAL);
> return;
1167,1168c1168,1169
< bp->bio_error = ENXIO;
< goto bad;
---
> biofinish(bp, NULL, ENXIO);
> return;
1186c1187
< bp->bio_error = EBUSY;
---
> s = EBUSY;
1188,1189c1189,1191
< bp->bio_error = ENXIO;
< goto bad;
---
> s = ENXIO;
> biofinish(bp, NULL, s);
> return;
1217,1224d1218
< bad:
< bp->bio_flags |= BIO_ERROR;
<
< /*
< * Correctly set the buf to indicate a completed xfer
< */
< bp->bio_resid = bp->bio_bcount;
< biodone(bp);