ATA/IDE disk access using PIO and interrupt

Yan Luo yan_luo at uml.edu
Fri Jun 2 21:12:35 UTC 2006


Hello Thomas,
Thanks for your reply.

I tried to assign IRQ number as 14 and test the IDE driver on i386. I can
see the BSP_install_rtems_irq_handler() is successful. However, I don't see
any interrupt is triggered: I added a printk in ata_interrupt_handler, but
no debug message were seen.

By reading ata.c, I understand ata_process_request() will process I/O
requests from controller's queue. But I don't see the DMA operations are
initiated here. So question: where are the DMA operations initiated?

In ata.c,  the ata_interrupt_handler() will send an ATA_MSG_GEN_EVT message
to ata_queue_task(). In ata_queue_task(), I can see ATA_COMMAND_TYPE_PIO_IN
request is handled, so as the ATA_COMMAND_TYPE_PIO_OUT and
ATA_COMMAND_TYPE_NON_DATA. However, I don't see ATA_COMMAND_TYPE_DMA is
handled. Is it because the interrupt represents the completion of DMA
transfers? 

I look forward your reply.

Thanks,
Yan

> -----Original Message-----
> From: Thomas Doerfler (nt) [mailto:Thomas.Doerfler at imd-systems.de] 
> Sent: Friday, June 02, 2006 1:46 AM
> To: Yan Luo
> Cc: Eugeny S. Mints; rtems-users at rtems.com
> Subject: Re: ATA/IDE disk access using PIO and interrupt
> 
> Hello,
> 
> Yan Luo schrieb:
> > Hello Thomas,
> > 
> > I still have a question. When you said "works like a 
> charm", do you mean
> > it works for powerpc/gen5200?
> 
> yes.
> 
> > 
> > I don't see any irq.h or irq.c under 
> c/src/lib/libbsp/i386/pc386. The
> > interrupt vector BSP_SIU_IRQ_ATA is defined for 
> powerpc/gen5200 in its
> > irq.h, but NOT for i386. I don't think I can use that irq 
> number for i386.
> 
> yes, you are right, the interrupt number defined in the gen5200 BSP is
> only suitable for the MPC5200 microcontroller. I am sorry, 
> but I am not
> an expert for the i286 architecture. I can only give you a guess:
> interrupt number 14 MIGHT be the right one to use for the primary IDE
> device.
> 
> wkr,
> Thomas.
> 
> 
> > 
> > Any suggestions?
> > 
> > Thanks,
> > Yan
> > 
> > 
> > ----- Original Message ----- From: "Thomas Doerfler"
> > <Thomas.Doerfler at imd-systems.de>
> > To: "Eugeny S. Mints" <emints at ru.mvista.com>
> > Cc: "Yan Luo" <yan_luo at uml.edu>; <rtems-users at rtems.com>
> > Sent: Monday, May 29, 2006 10:11 AM
> > Subject: Re: ATA/IDE disk access using PIO and interrupt
> > 
> > 
> > Eugeny,
> > 
> > 
> > Eugeny S. Mints schrieb:
> > 
> >>>> Hello Yan,
> > 
> > ...
> > 
> >>>>
> >>>> you mentioned you are on 4.6.2 but you could check 
> 4.6.99.3 and take a
> >>>> look at powerpc/gen5200 bsp. ide/idecfg.c in this bsp 
> has 'int_driven'
> >>>> flag set under 'ifdef ATA_USE_INT'. Since ATA_USE_INT is 
> undefined in
> >>>> bsp.h for this bsp I have no idea whether anybody gives 
> this a try but I
> >>>> guess Thomas could shed a light on this :)
> > 
> > 
> > Yes, ok, we found that aswell. And in our current patched sources
> > ATA_USE_INT is defined (and works like a charm :-)
> > 
> > wkr,
> > Thomas.
> > 
> > 
> > --
> > --------------------------------------------
> > IMD Ingenieurbuero fuer Microcomputertechnik
> > Thomas Doerfler           Herbststrasse 8
> > D-82178 Puchheim          Germany
> > email:    Thomas.Doerfler at imd-systems.de
> > PGP public key available at:
> >     http://www.imd-systems.de/pgpkey_en.html
> >>
> 
> -- 
> --------------------------------------------
> IMD Ingenieurbuero fuer Microcomputertechnik
> Thomas Doerfler           Herbststrasse 8
> D-82178 Puchheim          Germany
> email:    Thomas.Doerfler at imd-systems.de
> PGP public key available at:
>      http://www.imd-systems.de/pgpkey_en.html
> 




More information about the users mailing list