cosmetic changes only.

This commit is contained in:
sos 2000-01-29 14:10:59 +00:00
parent 1a453ea9ce
commit 027422c351
3 changed files with 9 additions and 30 deletions

View File

@ -281,21 +281,8 @@ atapi_interrupt(struct atapi_request *request)
return ATA_OP_CONTINUES;
}
if (atp->flags & ATAPI_F_DMA_USED)
dma_stat = ata_dmadone(atp->controller);
/* is this needed anymore ?? SOS XXX */
#if NOT_ANY_MORE
if (ata_wait(atp->controller, atp->unit, 0) < 0) {
printf("%s: timeout waiting for status", atp->devname);
atp->flags &= ~ATAPI_F_DMA_USED;
request->result = inb(atp->controller->ioaddr + ATA_ERROR) |
ATAPI_SK_RESERVED;
goto op_finished;
}
#endif
if (atp->flags & ATAPI_F_DMA_USED) {
dma_stat = ata_dmadone(atp->controller);
atp->flags &= ~ATAPI_F_DMA_USED;
if ((atp->controller->status & (ATA_S_ERROR | ATA_S_DWF)) ||
dma_stat != ATA_BMSTAT_INTERRUPT) {

View File

@ -1030,15 +1030,6 @@ acdstrategy(struct buf *bp)
struct acd_softc *cdp = bp->b_dev->si_drv1;
int32_t s;
#ifdef NOTYET
/* allow write only on CD-R/RW media */ /* all for now SOS */
if (!(bp->b_flags & B_READ) && !(writeable_media)) {
bp->b_error = EROFS;
bp->b_flags |= B_ERROR;
biodone(bp);
return;
}
#endif
/* if it's a null transfer, return immediatly. */
if (bp->b_bcount == 0) {
bp->b_resid = 0;
@ -1046,8 +1037,6 @@ acdstrategy(struct buf *bp)
return;
}
/* check for valid blocksize SOS */
bp->b_pblkno = bp->b_blkno;
bp->b_resid = bp->b_bcount;
@ -1288,7 +1277,8 @@ acd_open_track(struct acd_softc *cdp, struct cdr_track *track)
if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE,
&param, sizeof(param))))
return error;
param.page_code = 0x05;
param.page_code = ATAPI_CDROM_WRITE_PARAMETERS_PAGE;
param.page_length = 0x32;
param.test_write = track->test_write ? 1 : 0;
param.write_type = CDR_WTYPE_TRACK;
@ -1349,9 +1339,9 @@ acd_open_track(struct acd_softc *cdp, struct cdr_track *track)
}
#if 1
param.multi_session = CDR_MSES_MULTI;
param.multi_session = CDR_MSES_MULTI;
#else
param.multi_session = CDR_MSES_NONE;
param.multi_session = CDR_MSES_NONE;
#endif
param.fp = 0;
param.packet_size = 0;

View File

@ -211,15 +211,17 @@ static int
afdopen(dev_t dev, int32_t flags, int32_t fmt, struct proc *p)
{
struct afd_softc *fdp = dev->si_drv1;
struct disklabel *label;
struct disklabel *label = &fdp->disk.d_label;
atapi_test_ready(fdp->atp);
afd_prevent_allow(fdp, 1);
if (afd_sense(fdp))
printf("afd%d: sense media type failed\n", fdp->lun);
fdp->atp->flags &= ~ATAPI_F_MEDIA_CHANGED;
label = &fdp->disk.d_label;
bzero(label, sizeof *label);
label->d_secsize = fdp->cap.sector_size;
label->d_nsectors = fdp->cap.sectors;