OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:08 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR
PostPosted: Mon Feb 14, 2011 3:03 pm 
Offline
Member
Member
User avatar

Joined: Sun Oct 18, 2009 5:47 pm
Posts: 208
Location: Alexandria, Egypt | Ottawa, Canada
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!


Top
 Profile  
 
 Post subject: Re: ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR
PostPosted: Thu Feb 17, 2011 8:18 pm 
Offline

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


Top
 Profile  
 
 Post subject: Re: ATAPI: MEDIUM ERROR - UNRECOVERED READ ERROR
PostPosted: Fri Feb 18, 2011 2:46 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 18, 2009 5:47 pm
Posts: 208
Location: Alexandria, Egypt | Ottawa, Canada
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...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot], Google [Bot] and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group