Short ATA command format has 28bit address, not 36bit.
Rename ata_36bit_cmd() into ata_28bit_cmd(), while it didn't become legacy. MFC after: 2 days
This commit is contained in:
parent
cd294cd30d
commit
fa4d9f58aa
@ -1212,9 +1212,9 @@ ataidentify(struct cam_device *device, int retry_count, int timeout)
|
||||
/*dxfer_len*/sizeof(struct ata_params),
|
||||
timeout ? timeout : 30 * 1000);
|
||||
if (cgd.protocol == PROTO_ATA)
|
||||
ata_36bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0);
|
||||
ata_28bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0);
|
||||
else
|
||||
ata_36bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0);
|
||||
ata_28bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0);
|
||||
|
||||
/* Disable freezing the device queue */
|
||||
ccb->ccb_h.flags |= CAM_DEV_QFRZDIS;
|
||||
|
@ -91,7 +91,7 @@ ata_print_ident(struct ata_params *ident_data)
|
||||
}
|
||||
|
||||
void
|
||||
ata_36bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features,
|
||||
ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features,
|
||||
uint32_t lba, uint8_t sector_count)
|
||||
{
|
||||
bzero(&ataio->cmd, sizeof(ataio->cmd));
|
||||
|
@ -83,7 +83,7 @@ struct ata_res {
|
||||
int ata_version(int ver);
|
||||
void ata_print_ident(struct ata_params *ident_data);
|
||||
|
||||
void ata_36bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features,
|
||||
void ata_28bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint8_t features,
|
||||
uint32_t lba, uint8_t sector_count);
|
||||
void ata_48bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint16_t features,
|
||||
uint64_t lba, uint16_t sector_count);
|
||||
|
@ -287,7 +287,7 @@ adaclose(struct disk *dp)
|
||||
if (softc->flags & ADA_FLAG_CAN_48BIT)
|
||||
ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0);
|
||||
else
|
||||
ata_36bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0);
|
||||
ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0);
|
||||
cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0,
|
||||
/*sense_flags*/SF_RETRY_UA,
|
||||
softc->disk->d_devstat);
|
||||
@ -411,7 +411,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t len
|
||||
ata_48bit_cmd(&ccb.ataio, ATA_WRITE_DMA48,
|
||||
0, lba, count);
|
||||
} else {
|
||||
ata_36bit_cmd(&ccb.ataio, ATA_WRITE_DMA,
|
||||
ata_28bit_cmd(&ccb.ataio, ATA_WRITE_DMA,
|
||||
0, lba, count);
|
||||
}
|
||||
xpt_polled_action(&ccb);
|
||||
@ -441,7 +441,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t len
|
||||
if (softc->flags & ADA_FLAG_CAN_48BIT)
|
||||
ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0);
|
||||
else
|
||||
ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0);
|
||||
ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0);
|
||||
xpt_polled_action(&ccb);
|
||||
|
||||
if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
|
||||
@ -856,10 +856,10 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
}
|
||||
} else {
|
||||
if (bp->bio_cmd == BIO_READ) {
|
||||
ata_36bit_cmd(ataio, ATA_READ_DMA,
|
||||
ata_28bit_cmd(ataio, ATA_READ_DMA,
|
||||
0, lba, count);
|
||||
} else {
|
||||
ata_36bit_cmd(ataio, ATA_WRITE_DMA,
|
||||
ata_28bit_cmd(ataio, ATA_WRITE_DMA,
|
||||
0, lba, count);
|
||||
}
|
||||
}
|
||||
@ -878,7 +878,7 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
if (softc->flags & ADA_FLAG_CAN_48BIT)
|
||||
ata_48bit_cmd(ataio, ATA_FLUSHCACHE48, 0, 0, 0);
|
||||
else
|
||||
ata_36bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0);
|
||||
ata_28bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0);
|
||||
break;
|
||||
}
|
||||
start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO;
|
||||
@ -1126,7 +1126,7 @@ adashutdown(void * arg, int howto)
|
||||
if (softc->flags & ADA_FLAG_CAN_48BIT)
|
||||
ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0);
|
||||
else
|
||||
ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0);
|
||||
ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0);
|
||||
xpt_polled_action(&ccb);
|
||||
|
||||
if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
|
||||
|
@ -357,9 +357,9 @@ probestart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
/*dxfer_len*/sizeof(struct ata_params),
|
||||
30 * 1000);
|
||||
if (periph->path->device->protocol == PROTO_ATA)
|
||||
ata_36bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0);
|
||||
ata_28bit_cmd(ataio, ATA_ATA_IDENTIFY, 0, 0, 0);
|
||||
else
|
||||
ata_36bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0);
|
||||
ata_28bit_cmd(ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0);
|
||||
break;
|
||||
}
|
||||
case PROBE_SETMODE:
|
||||
@ -375,7 +375,7 @@ probestart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
/*data_ptr*/NULL,
|
||||
/*dxfer_len*/0,
|
||||
30 * 1000);
|
||||
ata_36bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0,
|
||||
ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0,
|
||||
ata_max_mode(ident_buf, ATA_UDMA6, ATA_UDMA6));
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user