diff -urN /home/volker/qemu/hw/ide.c ./hw/ide.c --- /home/volker/qemu/hw/ide.c 2005-08-06 11:32:01.000000000 +0200 +++ ./hw/ide.c 2005-11-05 20:10:56.752773808 +0100 @@ -1191,7 +1191,11 @@ break; case 0x2a: cpu_to_ube16(&buf[0], 28 + 6); - buf[2] = 0x70; + if (bdrv_is_inserted(s->bs)) { + buf[2] = 0x12; + } else { + buf[2] = 0x70; + } buf[3] = 0; buf[4] = 0; buf[5] = 0; @@ -1433,6 +1437,24 @@ padstr8(buf + 32, 4, QEMU_VERSION); ide_atapi_cmd_reply(s, 36, max_len); break; + case GPCMD_READ_SUBCHANNEL: + if (!bdrv_is_inserted(s->bs)) { + ide_atapi_cmd_error(s, SENSE_NOT_READY, + ASC_MEDIUM_NOT_PRESENT); + break; + } + if (packet[2] & 0x40) { /* SubQ not supported */ + ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST, + ASC_INV_FIELD_IN_CMD_PACKET); + break; + } + max_len = ube16_to_cpu(packet + 7); + buf[0] = 0x00; + buf[1] = 0x00; /* audio not supported */ + buf[2] = 0x00; + buf[3] = 0x00; + ide_atapi_cmd_reply(s, 4, max_len); + break; default: ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST, ASC_ILLEGAL_OPCODE);