diff --git a/hw/atapi-pt.c b/hw/atapi-pt.c
-index 413cc47..d5c5f0b 100644
+index 413cc47..66da45a 100644
--- a/hw/atapi-pt.c
+++ b/hw/atapi-pt.c
@@ -497,124 +497,106 @@ static void ide_atapi_pt_error(IDEState *s)
memcpy(s->io_buffer, &s->atapi_pt.sense, sizeof (s->atapi_pt.sense));
ide_atapi_cmd_reply(s, size, max_size);
return;
-@@ -1053,57 +980,40 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1053,57 +980,41 @@ static void ide_atapi_pt_cmd(IDEState *s)
case GPCMD_READ_DVD_STRUCTURE:
cmd->din_xfer_len = ube16_to_cpu(s->io_buffer + 8);
- // cmd->din_xferp = (__u64)s->io_buffer;
s->atapi_pt.cmd_sent = ide_atapi_pt_standard_reply;
++ s->atapi_pt.reply_size_init = 4;
s->atapi_pt.reply_size_len = 2;
- // ATAPI_PT_SEND_PACKET;
- // return;
break;
case GPCMD_READ_10:
-@@ -1123,17 +1033,12 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1123,17 +1034,12 @@ static void ide_atapi_pt_cmd(IDEState *s)
default: assert(0);
}
cmd->din_xfer_len = nbblocks * blocksize;
cmd->din_xfer_len = ube24_to_cpu(s->io_buffer + 6);
switch (s->io_buffer[1] & 0x7)
-@@ -1157,30 +1062,21 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1157,30 +1063,21 @@ static void ide_atapi_pt_cmd(IDEState *s)
goto illegal_request;
}
s->atapi_pt.cmd_sent = ide_atapi_pt_standard_reply;
break;
case GPCMD_GET_EVENT_STATUS_NOTIFICATION:
-@@ -1188,22 +1084,16 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1188,22 +1085,16 @@ static void ide_atapi_pt_cmd(IDEState *s)
case GPCMD_READ_TOC_PMA_ATIP:
case GPCMD_READ_TRACK_RZONE_INFO:
cmd->din_xfer_len = ube16_to_cpu(s->io_buffer + 7);
break;
case GPCMD_READ_CD:
-@@ -1214,11 +1104,8 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1214,11 +1105,8 @@ static void ide_atapi_pt_cmd(IDEState *s)
int block_size = ide_atapi_pt_read_cd_block_size(s->io_buffer);
cmd->din_xfer_len = block_count * block_size;
break;
}
-@@ -1233,11 +1120,8 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1233,11 +1121,8 @@ static void ide_atapi_pt_cmd(IDEState *s)
int block_size = ide_atapi_pt_read_cd_block_size(s->io_buffer);
cmd->din_xfer_len = block_count * block_size;
break;
}
-@@ -1245,11 +1129,8 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1245,11 +1130,8 @@ static void ide_atapi_pt_cmd(IDEState *s)
{
int block_count = ube16_to_cpu(s->io_buffer + 7);
cmd->din_xfer_len = block_count * CD_FRAMESIZE;
break;
}
-@@ -1261,40 +1142,28 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1261,40 +1143,28 @@ static void ide_atapi_pt_cmd(IDEState *s)
MSF_TO_FRAMES(s->io_buffer[6], s->io_buffer[7], s->io_buffer[8]);
int block_count = ending_frame - starting_frame;
cmd->din_xfer_len = block_count * CD_FRAMESIZE;
break;
case 0x01: // GPMODE_R_W_ERROR_PAGE ?
-@@ -1318,110 +1187,5 @@ static void ide_atapi_pt_cmd(IDEState *s)
+@@ -1318,110 +1188,5 @@ static void ide_atapi_pt_cmd(IDEState *s)
return;
}