* 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
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));
}
case 0x1b: // start/stop drive
+ atapi_cmd_nop(ide,channel);
+ break;
case 0xbe: // read cd
/* Disabled until command packet DMA is fixed */
drive_id->dma_ultra = 0x2020; // Ultra_DMA_Mode_5_Selected | Ultra_DMA_Mode_5_Supported;
}
+
+#endif