X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fatapi.h;h=15e8eecdf3789b357b66d53471d86d5f062209e6;hb=4a55bf2a12c7a1fe3daa7ecb1598b67acb246774;hp=ad03ee97750b5fc2fe3331245844454a526edac8;hpb=123a1ba27ea09c8fa77a1b36ce625b43d7c48b14;p=palacios.git diff --git a/palacios/src/devices/atapi.h b/palacios/src/devices/atapi.h index ad03ee9..15e8eec 100644 --- a/palacios/src/devices/atapi.h +++ b/palacios/src/devices/atapi.h @@ -161,7 +161,9 @@ static int atapi_update_data_buf(struct vm_device * dev, struct ide_channel * ch return 0; } -static int atapi_read10(struct vm_device * dev, struct ide_channel * channel) { +static int atapi_read10(struct guest_info * core, + struct vm_device * dev, + struct ide_channel * channel) { struct ide_drive * drive = get_selected_drive(channel); struct atapi_read10_cmd * cmd = (struct atapi_read10_cmd *)(drive->data_buf); uint32_t lba = be_to_le_32(cmd->lba); @@ -198,7 +200,7 @@ static int atapi_read10(struct vm_device * dev, struct ide_channel * channel) { if (channel->features.dma) { if (channel->dma_status.active == 1) { - if (dma_read(dev, channel) == -1) { + if (dma_read(core, dev, channel) == -1) { PrintError("Error in DMA read for CD Read10 command\n"); return -1; } @@ -450,7 +452,7 @@ static int atapi_cmd_is_data_op(uint8_t cmd) { } -static int atapi_handle_packet(struct vm_device * dev, struct ide_channel * channel) { +static int atapi_handle_packet(struct guest_info * core, struct vm_device * dev, struct ide_channel * channel) { struct ide_drive * drive = get_selected_drive(channel); uint8_t cmd = drive->data_buf[0]; @@ -475,7 +477,7 @@ static int atapi_handle_packet(struct vm_device * dev, struct ide_channel * chan break; case 0x28: // read(10) - if (atapi_read10(dev, channel) == -1) { + if (atapi_read10(core, dev, channel) == -1) { PrintError("IDE: Error in ATAPI read (%x)\n", cmd); return -1; } @@ -511,6 +513,8 @@ static int atapi_handle_packet(struct vm_device * dev, struct ide_channel * chan } break; + + case 0x4a: // Get Status/event case 0x51: // read disk info // no-op to keep the Linux CD-ROM driver happy PrintDebug("Error: Read disk info no-op to keep the Linux CD-ROM driver happy\n"); @@ -552,8 +556,7 @@ static int atapi_handle_packet(struct vm_device * dev, struct ide_channel * chan case 0xba: // scan case 0xbb: // set cd speed case 0x4e: // stop play/scan - - case 0x4a: // ??? + default: PrintError("Unhandled ATAPI command %x\n", cmd); atapi_cmd_error(dev, channel, ATAPI_SEN_ILL_REQ, ASC_INV_CMD_FIELD);