This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

DSR not called by scheduler after ISR


I am developing a device driver for a PCI card on x86 PC target. I
have implemented the driver ISR and DSR. The ISR gets called when ever
interrupt occurs. But the DSR never gets called. I have checked my
build configuration, it has been configured to use DSRs

The ISR & DSR have been implemented as follows.

static cyg_uint32 pci_ISR( cyg_vector_t vector, cyg_addrword_t data)
{
unsigned int status;

status = read32(IntrStatus); // read interrupt status
       if(status)
       {

               printf("pci_ISR() called. vector=%d, INT STATUS = %08X\n",
                               vector, status);
               cyg_drv_interrupt_mask(vector);
               cyg_drv_interrupt_acknowledge(vector);
               return CYG_ISR_CALL_DSR; // i also tried
INT_ISR_HANDLED | CYG_ISR_CALL_DSR

       }
       else
       {
               isrDbg("NOT_MINE\n");
               return 0; // ????? What should I return if the
interrupt is not for this device
       }
}

static void pci_DSR( cyg_vector_t vector, cyg_ucount32 count,
cyg_addrword_t data)
{

       usbDbg("DSR scheduled %d times\n",count);
       write32(IntStatus,0x1); // clear interrupt status
       cyg_drv_interrupt_unmask(vector);

}

void main()
{

cyg_drv_interrupt_create((CYG_ADDRWORD)vector,
                                0,
                                0,
                                pci_ISR,
                                pci_DSR,
                                &handle,
                                &intr);

       cyg_drv_interrupt_configure(vector,1,0);
       cyg_drv_interrupt_attach(handle);
       cyg_drv_interrupt_acknowledge(vector);
       cyg_drv_interrupt_unmask(vector);
}

Does anyone has clue why DSRs are not working in this case ?

Thanks in advance,

Regards
Surendra

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]