ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR

Post 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!
natp
Posts: 6
Joined: Tue Apr 07, 2009 9:08 pm

Re: ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR

Post 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.
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

Re: ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR

Post 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...
Post Reply