X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fatapi.h;h=fe29a2ddba4d3ee18a589fd32feb0583a2b37e44;hb=366a20deaf086107d75a2004fec076db4705e7c2;hp=029229bbc87eae4803fd3d0f303d288e3908b7e6;hpb=acaadd79c597c8d5180fbfbec79c01fef3dff003;p=palacios.git diff --git a/palacios/src/devices/atapi.h b/palacios/src/devices/atapi.h index 029229b..fe29a2d 100644 --- a/palacios/src/devices/atapi.h +++ b/palacios/src/devices/atapi.h @@ -17,11 +17,15 @@ * redistribute, and modify it as specified in the file "V3VEE_LICENSE". */ +#ifndef __DEVICES_ATAPI_H__ +#define __DEVICES_ATAPI_H__ + #define ATAPI_PACKET_SIZE 12 #include "atapi-types.h" + /* ATAPI sucks... * The OS will write to the cylinder register the number of bytes it wants to read * however the device can change that value @@ -235,9 +239,11 @@ static int atapi_read10(struct guest_info * core, static void atapi_req_sense(struct ide_internal * ide, struct ide_channel * channel) { struct ide_drive * drive = get_selected_drive(channel); + drive->cd_state.sense.read_len=0xa; + memcpy(drive->data_buf, drive->cd_state.sense.buf, sizeof(drive->cd_state.sense.buf)); - atapi_setup_cmd_resp(ide, channel, 18); + atapi_setup_cmd_resp(ide, channel, sizeof(drive->cd_state.sense.buf)); } @@ -623,6 +629,8 @@ static int atapi_handle_packet(struct guest_info * core, struct ide_internal * i case 0x1b: // start/stop drive + atapi_cmd_nop(ide,channel); + break; case 0xbe: // read cd @@ -721,3 +729,5 @@ static void atapi_identify_device(struct ide_drive * drive) { /* Disabled until command packet DMA is fixed */ drive_id->dma_ultra = 0x2020; // Ultra_DMA_Mode_5_Selected | Ultra_DMA_Mode_5_Supported; } + +#endif