Deleted Added
full compact
2c2
< * $FreeBSD: head/sys/cam/scsi/scsi_sa.c 58934 2000-04-02 15:24:56Z phk $
---
> * $FreeBSD: head/sys/cam/scsi/scsi_sa.c 59249 2000-04-15 05:54:02Z phk $
193c193
< struct buf_queue_head buf_queue;
---
> struct bio_queue_head bio_queue;
623c623
< sastrategy(struct buf *bp)
---
> sastrategy(struct bio *bp)
630,631c630,631
< if (SA_IS_CTRL(bp->b_dev)) {
< bp->b_error = EINVAL;
---
> if (SA_IS_CTRL(bp->bio_dev)) {
> bp->bio_error = EINVAL;
634c634
< unit = SAUNIT(bp->b_dev);
---
> unit = SAUNIT(bp->bio_dev);
637c637
< bp->b_error = ENXIO;
---
> bp->bio_error = ENXIO;
646c646
< bp->b_error = ENXIO;
---
> bp->bio_error = ENXIO;
652c652
< bp->b_error = EPERM;
---
> bp->bio_error = EPERM;
661c661
< if (bp->b_bcount == 0)
---
> if (bp->bio_bcount == 0)
671c671
< ((bp->b_bcount & softc->blk_mask) != 0)) ||
---
> ((bp->bio_bcount & softc->blk_mask) != 0)) ||
673c673
< ((bp->b_bcount % softc->min_blk) != 0))) {
---
> ((bp->bio_bcount % softc->min_blk) != 0))) {
678c678
< bp->b_error = EINVAL;
---
> bp->bio_error = EINVAL;
681,683c681,683
< } else if ((bp->b_bcount > softc->max_blk) ||
< (bp->b_bcount < softc->min_blk) ||
< (bp->b_bcount & softc->blk_mask) != 0) {
---
> } else if ((bp->bio_bcount > softc->max_blk) ||
> (bp->bio_bcount < softc->min_blk) ||
> (bp->bio_bcount & softc->blk_mask) != 0) {
693c693
< bp->b_error = EINVAL;
---
> bp->bio_error = EINVAL;
707c707
< bufq_insert_tail(&softc->buf_queue, bp);
---
> bioq_insert_tail(&softc->bio_queue, bp);
711c711
< "%s byte %s queue count now %d\n", (int) bp->b_bcount,
---
> "%s byte %s queue count now %d\n", (int) bp->bio_bcount,
713c713
< (bp->b_iocmd == BIO_READ)? "read" : "write", softc->queue_count));
---
> (bp->bio_cmd == BIO_READ)? "read" : "write", softc->queue_count));
724c724
< bp->b_ioflags |= BIO_ERROR;
---
> bp->bio_flags |= BIO_ERROR;
730c730
< bp->b_resid = bp->b_bcount;
---
> bp->bio_resid = bp->bio_bcount;
1224c1224
< struct buf *q_bp;
---
> struct bio *q_bp;
1255,1259c1255,1259
< while ((q_bp = bufq_first(&softc->buf_queue)) != NULL){
< bufq_remove(&softc->buf_queue, q_bp);
< q_bp->b_resid = q_bp->b_bcount;
< q_bp->b_error = ENXIO;
< q_bp->b_ioflags |= BIO_ERROR;
---
> while ((q_bp = bioq_first(&softc->bio_queue)) != NULL){
> bioq_remove(&softc->bio_queue, q_bp);
> q_bp->bio_resid = q_bp->bio_bcount;
> q_bp->bio_error = ENXIO;
> q_bp->bio_flags |= BIO_ERROR;
1370c1370
< bufq_init(&softc->buf_queue);
---
> bioq_init(&softc->bio_queue);
1467c1467
< struct buf *bp;
---
> struct bio *bp;
1474c1474
< bp = bufq_first(&softc->buf_queue);
---
> bp = bioq_first(&softc->bio_queue);
1488c1488
< struct buf *done_bp;
---
> struct bio *done_bp;
1490,1492c1490,1492
< bufq_remove(&softc->buf_queue, bp);
< bp->b_resid = bp->b_bcount;
< bp->b_ioflags |= BIO_ERROR;
---
> bioq_remove(&softc->bio_queue, bp);
> bp->bio_resid = bp->bio_bcount;
> bp->bio_flags |= BIO_ERROR;
1494,1495c1494,1495
< if (bp->b_iocmd == BIO_WRITE)
< bp->b_error = ENOSPC;
---
> if (bp->bio_cmd == BIO_WRITE)
> bp->bio_error = ENOSPC;
1497c1497
< bp->b_error = EIO;
---
> bp->bio_error = EIO;
1500c1500
< bp->b_error = EIO;
---
> bp->bio_error = EIO;
1503c1503
< bp->b_error = EIO;
---
> bp->bio_error = EIO;
1506c1506
< bp = bufq_first(&softc->buf_queue);
---
> bp = bioq_first(&softc->bio_queue);
1524c1524
< bufq_remove(&softc->buf_queue, bp);
---
> bioq_remove(&softc->bio_queue, bp);
1530c1530
< bp->b_bcount >> softc->blk_shift;
---
> bp->bio_bcount >> softc->blk_shift;
1533c1533
< bp->b_bcount / softc->media_blksize;
---
> bp->bio_bcount / softc->media_blksize;
1535c1535
< bp->b_error = EIO;
---
> bp->bio_error = EIO;
1546c1546
< length = bp->b_bcount;
---
> length = bp->bio_bcount;
1571c1571
< softc->dsreg = (bp->b_iocmd == BIO_READ)?
---
> softc->dsreg = (bp->bio_cmd == BIO_READ)?
1574c1574
< MSG_SIMPLE_Q_TAG, (bp->b_iocmd == BIO_READ),
---
> MSG_SIMPLE_Q_TAG, (bp->bio_cmd == BIO_READ),
1576c1576
< length, bp->b_data, bp->b_bcount, SSD_FULL_SIZE,
---
> length, bp->bio_data, bp->bio_bcount, SSD_FULL_SIZE,
1580c1580
< bp = bufq_first(&softc->buf_queue);
---
> bp = bioq_first(&softc->bio_queue);
1610c1610
< struct buf *bp;
---
> struct bio *bp;
1614c1614
< bp = (struct buf *)done_ccb->ccb_h.ccb_bp;
---
> bp = (struct bio *)done_ccb->ccb_h.ccb_bp;
1627c1627
< struct buf *q_bp;
---
> struct bio *q_bp;
1642,1646c1642,1646
< while ((q_bp = bufq_first(&softc->buf_queue)) != NULL) {
< bufq_remove(&softc->buf_queue, q_bp);
< q_bp->b_resid = q_bp->b_bcount;
< q_bp->b_error = EIO;
< q_bp->b_ioflags |= BIO_ERROR;
---
> while ((q_bp = bioq_first(&softc->bio_queue)) != NULL) {
> bioq_remove(&softc->bio_queue, q_bp);
> q_bp->bio_resid = q_bp->bio_bcount;
> q_bp->bio_error = EIO;
> q_bp->bio_flags |= BIO_ERROR;
1652,1654c1652,1654
< bp->b_resid = bp->b_bcount;
< bp->b_error = error;
< bp->b_ioflags |= BIO_ERROR;
---
> bp->bio_resid = bp->bio_bcount;
> bp->bio_error = error;
> bp->bio_flags |= BIO_ERROR;
1659,1660c1659,1660
< bp->b_resid = csio->resid;
< bp->b_error = 0;
---
> bp->bio_resid = csio->resid;
> bp->bio_error = 0;
1662c1662
< bp->b_ioflags |= BIO_ERROR;
---
> bp->bio_flags |= BIO_ERROR;
1664c1664
< if (bp->b_iocmd == BIO_WRITE) {
---
> if (bp->bio_cmd == BIO_WRITE) {
1672c1672
< l = bp->b_bcount >>
---
> l = bp->bio_bcount >>
1675c1675
< l = bp->b_bcount /
---
> l = bp->bio_bcount /
1691c1691
< if (error || bp->b_resid) {
---
> if (error || bp->bio_resid) {
1694c1694
< bp->b_resid, bp->b_bcount));
---
> bp->bio_resid, bp->bio_bcount));
1697c1697
< devstat_end_transaction_buf(&softc->device_stats, bp);
---
> devstat_end_transaction_bio(&softc->device_stats, bp);