Page 1 of 1

ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR

Posted: Mon Feb 14, 2011 3:03 pm
by iocoder
Hi guys :D !
Recently, I have been trying to enable PCI DMA for ATAPI drives. my DMA code works well on ATA, and PIO works well on ATA & ATAPI. but when i try to use DMA Protocol with ATAPI, it ends with an error. Status Byte 0x1F7 is 0x51, and Error Byte is 0x50, this should mean that a SCSI error have happened, and this error is one of these:

MEDIUM ERROR - UNRECOVERED READ ERROR
MEDIUM ERROR - ADDRESS MARK NOT FOUND FOR ID FIELD (What do these heavy words mean????)
MEDIUM ERROR - RECORD NOT FOUND
MEDIUM ERROR - LOGICAL BLOCK ADDRESS OUT OF RANGE

I use the same 6-word packet and send it, then do a PIO transfer, and it works well.. why ATAPI DMA is problematic??
Any one has any idea plz?? I followed up these well done articles on the wiki but really the problem still exists... any help would be appreciated...

Thanks in advance and regards!

Re: ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR

Posted: Thu Feb 17, 2011 8:18 pm
by natp
Error Byte is 0x50
Sense Key 5 = ILLEGAL REQUEST

You should send a "REQUEST SENSE" packet command to the drive to get the ASC (Additional Sense Code) and ASQ. Those values might help you find the problem.

Re: ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR

Posted: Fri Feb 18, 2011 2:46 am
by iocoder
I had already resolved the problem but thanks also for your help :D .

As you said, it was an illegal request, as when i checked VMWare log, i found this: "CD-ROM: Unknown Command 0xA8". Although this command "READ(12)" works well in PIO Mode, but i think VMWare doesn't accept it in DMA (I don't know why). When i use "READ (10)", it works well on both PIO and DMA!

Thankx and regards...