Deleted Added
full compact
28c28
< * $FreeBSD: head/sys/cam/scsi/scsi_target.c 58934 2000-04-02 15:24:56Z phk $
---
> * $FreeBSD: head/sys/cam/scsi/scsi_target.c 59249 2000-04-15 05:54:02Z phk $
127c127
< struct buf_queue_head snd_buf_queue;
---
> struct bio_queue_head snd_bio_queue;
133c133
< struct buf_queue_head rcv_buf_queue;
---
> struct bio_queue_head rcv_bio_queue;
155c155
< struct buf *bp; /* Buffer for this transfer */
---
> struct bio *bp; /* Buffer for this transfer */
460,461c460,461
< bufq_init(&softc->snd_buf_queue);
< bufq_init(&softc->rcv_buf_queue);
---
> bioq_init(&softc->snd_bio_queue);
> bioq_init(&softc->rcv_bio_queue);
1032c1032
< && bufq_first(&softc->rcv_buf_queue) == NULL)
---
> && bioq_first(&softc->rcv_bio_queue) == NULL)
1037c1037
< && bufq_first(&softc->snd_buf_queue) == NULL)
---
> && bioq_first(&softc->snd_bio_queue) == NULL)
1120c1120
< targstrategy(struct buf *bp)
---
> targstrategy(struct bio *bp)
1127c1127
< unit = minor(bp->b_dev);
---
> unit = minor(bp->bio_dev);
1131c1131
< bp->b_error = EINVAL;
---
> bp->bio_error = EINVAL;
1137c1137
< bp->b_error = ENXIO;
---
> bp->bio_error = ENXIO;
1156c1156
< bp->b_error = EBUSY;
---
> bp->bio_error = EBUSY;
1158c1158
< bp->b_error = ENXIO;
---
> bp->bio_error = ENXIO;
1167,1168c1167,1168
< bp->b_resid = bp->b_bcount;
< if (bp->b_iocmd == BIO_READ) {
---
> bp->bio_resid = bp->bio_bcount;
> if (bp->bio_cmd == BIO_READ) {
1171c1171
< bufq_insert_tail(&softc->snd_buf_queue, bp);
---
> bioq_insert_tail(&softc->snd_bio_queue, bp);
1175c1175
< bufq_insert_tail(&softc->rcv_buf_queue, bp);
---
> bioq_insert_tail(&softc->rcv_bio_queue, bp);
1188c1188
< bp->b_ioflags |= BIO_ERROR;
---
> bp->bio_flags |= BIO_ERROR;
1193c1193
< bp->b_resid = bp->b_bcount;
---
> bp->bio_resid = bp->bio_bcount;
1202,1203c1202,1203
< struct buf_queue_head *bufq;
< struct buf *bp;
---
> struct bio_queue_head *bioq;
> struct bio *bp;
1210c1210
< bufq = NULL;
---
> bioq = NULL;
1220c1220
< if (((bp = bufq_first(&softc->snd_buf_queue)) != NULL
---
> if (((bp = bioq_first(&softc->snd_bio_queue)) != NULL
1229c1229
< bp->b_bcount));
---
> bp->bio_bcount));
1231c1231
< bufq = &softc->snd_buf_queue;
---
> bioq = &softc->snd_bio_queue;
1233c1233
< } else if (((bp = bufq_first(&softc->rcv_buf_queue)) != NULL
---
> } else if (((bp = bioq_first(&softc->rcv_bio_queue)) != NULL
1242c1242
< bp->b_bcount));
---
> bp->bio_bcount));
1244c1244
< bufq = &softc->rcv_buf_queue;
---
> bioq = &softc->rcv_bio_queue;
1262,1263c1262,1263
< bufq_remove(bufq, bp);
< desc->data = &bp->b_data[bp->b_bcount - bp->b_resid];
---
> bioq_remove(bioq, bp);
> desc->data = &bp->bio_data[bp->bio_bcount - bp->bio_resid];
1265c1265
< MIN(desc->data_resid, bp->b_resid);
---
> MIN(desc->data_resid, bp->bio_resid);
1637c1637
< struct buf *bp;
---
> struct bio *bp;
1689,1690c1689,1690
< bp->b_resid -= desc->data_increment;
< bp->b_error = error;
---
> bp->bio_resid -= desc->data_increment;
> bp->bio_error = error;
1694c1694
< bp->b_resid, desc->data_resid));
---
> bp->bio_resid, desc->data_resid));
1701c1701
< || bp->b_resid == 0
---
> || bp->bio_resid == 0
1703c1703
< if (bp->b_resid != 0)
---
> if (bp->bio_resid != 0)
1705c1705
< bp->b_ioflags |= BIO_ERROR;
---
> bp->bio_flags |= BIO_ERROR;
1732c1732
< &softc->snd_buf_queue.queue,
---
> &softc->snd_bio_queue.queue,
1740c1740
< &softc->rcv_buf_queue.queue,
---
> &softc->rcv_bio_queue.queue,
1750,1751c1750,1751
< bp->b_ioflags |= BIO_ERROR;
< bp->b_error = ENXIO;
---
> bp->bio_flags |= BIO_ERROR;
> bp->bio_error = ENXIO;
1810c1810
< struct buf *bp;
---
> struct bio *bp;
1818,1820c1818,1820
< while ((bp = bufq_first(&softc->snd_buf_queue)) != NULL) {
< bufq_remove(&softc->snd_buf_queue, bp);
< bp->b_ioflags |= BIO_ERROR;
---
> while ((bp = bioq_first(&softc->snd_bio_queue)) != NULL) {
> bioq_remove(&softc->snd_bio_queue, bp);
> bp->bio_flags |= BIO_ERROR;
1824,1826c1824,1826
< while ((bp = bufq_first(&softc->rcv_buf_queue)) != NULL) {
< bufq_remove(&softc->snd_buf_queue, bp);
< bp->b_ioflags |= BIO_ERROR;
---
> while ((bp = bioq_first(&softc->rcv_bio_queue)) != NULL) {
> bioq_remove(&softc->snd_bio_queue, bp);
> bp->bio_flags |= BIO_ERROR;
2162c2162
< desc->bp->b_ioflags |= BIO_ERROR;
---
> desc->bp->bio_flags |= BIO_ERROR;
2164c2164
< desc->bp->b_error = errno;
---
> desc->bp->bio_error = errno;
2166c2166
< desc->bp->b_error = ENXIO;
---
> desc->bp->bio_error = ENXIO;