aboutsummaryrefslogtreecommitdiff
path: root/src/disk.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-07-21 12:01:12 -0400
committerKevin O'Connor <kevin@koconnor.net>2012-07-21 12:29:48 -0400
commitbd6afe5d1191759a0dd1a626c4116e13bdba2dc1 (patch)
tree7a4c05a16f97eadec9ce66545b67d10a597f026d /src/disk.c
parent9d6bac1d32b72cdf7c0ad009c1371a2e69084de3 (diff)
downloadseabios-hppa-bd6afe5d1191759a0dd1a626c4116e13bdba2dc1.zip
seabios-hppa-bd6afe5d1191759a0dd1a626c4116e13bdba2dc1.tar.gz
seabios-hppa-bd6afe5d1191759a0dd1a626c4116e13bdba2dc1.tar.bz2
Unify ATAPI command processing.
Unify the ATA and AHCI ATAPI command processing into one function in block.c (process_atapi_op). This patch disables the existing handlers for ATA ATAPI isready and reset. However, it's unlikely that support is needed and it does not appear that the implemented support is fully correct. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/disk.c')
-rw-r--r--src/disk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/disk.c b/src/disk.c
index 8eff464..8e1d3ec 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -530,7 +530,7 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
, size, type, npc, nph, npspt, (u32)lba, blksize);
SET_FARVAR(seg, param_far->size, 26);
- if (type == DTYPE_ATAPI) {
+ if (type == DTYPE_ATA_ATAPI) {
// 0x74 = removable, media change, lockable, max values
SET_FARVAR(seg, param_far->infos, 0x74);
SET_FARVAR(seg, param_far->cylinders, 0xffffffff);
@@ -552,7 +552,7 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
SET_FARVAR(seg, param_far->blksize, blksize);
if (size < 30 ||
- (type != DTYPE_ATA && type != DTYPE_ATAPI &&
+ (type != DTYPE_ATA && type != DTYPE_ATA_ATAPI &&
type != DTYPE_VIRTIO_BLK && type != DTYPE_VIRTIO_SCSI)) {
disk_ret(regs, DISK_RET_SUCCESS);
return;
@@ -565,7 +565,7 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
u64 device_path = 0;
u8 channel = 0;
SET_FARVAR(seg, param_far->size, 30);
- if (type == DTYPE_ATA || type == DTYPE_ATAPI) {
+ if (type == DTYPE_ATA || type == DTYPE_ATA_ATAPI) {
SET_FARVAR(seg, param_far->dpte, SEGOFF(SEG_LOW, (u32)&DefaultDPTE));
// Fill in dpte