diff --git a/src/ide_atapi.c b/src/ide_atapi.c index b916898..7ac20a2 100644 --- a/src/ide_atapi.c +++ b/src/ide_atapi.c @@ -142,6 +142,8 @@ void atapi_process_packet(atapi_device_t *atapi_dev) case ATAPI_STATE_COMMAND: *atapi_dev->atastat = READY_STAT | (*atapi_dev->atastat & ERR_STAT); atapi_dev->max_transfer_len = (*atapi_dev->cylinder) & ~1; + if (!atapi_dev->max_transfer_len) + atapi_dev->max_transfer_len = 0xfffe; atapi_dev->bus_state = BUS_CD | BUS_REQ; break; diff --git a/src/scsi_cd.c b/src/scsi_cd.c index 0f0ceb7..9a33674 100644 --- a/src/scsi_cd.c +++ b/src/scsi_cd.c @@ -1174,6 +1174,7 @@ static void scsi_cd_atapi_identify(uint16_t *buffer, void *p) ide_padstr((char *)(buffer + 23), "v1.0", 8); /* Firmware */ ide_padstr((char *)(buffer + 27), "PCemCD", 40); /* Model */ buffer[49] = 0x200; /* LBA supported */ + buffer[126] = 0xfffe; /* Interpret zero byte count limit as maximum length */ } scsi_device_t scsi_cd = diff --git a/src/scsi_zip.c b/src/scsi_zip.c index 89a9386..8af34d9 100644 --- a/src/scsi_zip.c +++ b/src/scsi_zip.c @@ -1077,6 +1077,7 @@ static void scsi_zip_atapi_identify(uint16_t *buffer, void *p) ide_padstr((char *)(buffer + 23), "E.08", 8); /* Firmware */ ide_padstr((char *)(buffer + 27), "IOMEGA ZIP 100 ATAPI", 40); /* Model */ buffer[49] = 0x200; /* LBA supported */ + buffer[126] = 0xfffe; /* Interpret zero byte count limit as maximum length */ } scsi_device_t scsi_zip =