Problem with ATA driver on pc386

Angelo Fraietta afraiett at
Tue Jul 6 23:12:36 UTC 2004

Eugeny S. Mints wrote:

> Hi Angelo!
> Ok, let start from the beginning. I developed the the code based on ATA 
> spec revision mentioned in the header in ata.c file. The revision is 
> quite old.
> First command executed for a IDE controller is DEVICE DIAGNOSTIC 
> command. Return codes other then 0x81 or 0x01 are vendor specific and 
> probably are not handled properly by the current ata.c driver. There is 
> no special return code for "master (device 0) not present". THere is 
> "device 0 failed" only. One potential is that your IDE controller uses 
> some vendor specific code for "master not present". Other is that your 
> IDE controller cann't handle "no master" case and doesn't set BSY bit 
> properly and DIAGNOSTIC command never terminates.
> I would like to help you with the issue but I need more details on the 
> failure. Could you please check first that:
> - execution of ata_process_request_on_init_phase is completed 
> successfully for DEVICE_DIAGNOSTIC command
> - disassembe of the diagnostic return codes gives correct configuration 
> for you system, i.e. it detects "no master, slave present" for your IDE 
> controller

The system is stuck in a loop in the first
call to ide_controller_read_register - I added a printk to show the value

static void
ata_process_request_on_init_phase(rtems_device_minor_number  ctrl_minor,
                                   ata_req_t                 *areq)
     unsigned16         byte;/* emphasize that only 8 low bits is

do {
   	ide_controller_read_register(ctrl_minor, IDE_REGISTER_STATUS, &byte);
	printk("Start ide_controller_read_register 1 Byte = %x\r\n", byte);
     } while ((byte & IDE_REGISTER_STATUS_BSY) ||
              (!(byte & IDE_REGISTER_STATUS_DRDY)));

The value of byte is returned as FF

Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page

There are those who seek knowledge for the sake of knowledge - that is 
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
     Bernard of Clairvaux (1090 - 1153)

More information about the users mailing list