From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17864 invoked by alias); 10 Sep 2007 08:21:43 -0000 Received: (qmail 17847 invoked by uid 22791); 10 Sep 2007 08:21:42 -0000 X-Spam-Check-By: sourceware.org Received: from defer-pm04.ocn.ad.jp (HELO defer-pm04.ocn.ad.jp) (211.129.14.53) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Sep 2007 08:21:29 +0000 Received: from pop132.ocn.ne.jp (pop132.ocn.ne.jp [60.37.31.215]) by defer-pm04.ocn.ad.jp (Postfix) with ESMTP id 6A5BA1B237 for ; Mon, 10 Sep 2007 17:21:25 +0900 (JST) Received: from ariga (p3109-ipbf1207marunouchi.tokyo.ocn.ne.jp [124.84.132.109]) by pop132.ocn.ne.jp (OCN) with SMTP id l8A8LPI0018068 for ; Mon, 10 Sep 2007 17:21:25 +0900 (JST) Message-ID: <001701c7f383$91bcbfc0$1c0110ac@ariga> From: "ariga masahiro" To: Date: Mon, 10 Sep 2007 08:21:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-2022-jp"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] How DSR is executed in interrupt ? X-SW-Source: 2007-09/txt/msg00044.txt.bz2 Hi, Please help me next question ? I am trying to run LAN91CXX drive on interrupt, and it became to enter ISR routine when IRQ3 Line is asserted. But it looks like IRQ3 Line is ON-State forever and never become OFF-State. ISR is repetedly entered but never enter into DSR routine. ISR/DSR are setted like this in smsc_lan91cxx_init(), // Initialize environment, setup interrupt handler cyg_drv_interrupt_create(cpd->interrupt, 8, // Priority - what goes here? (cyg_addrword_t)sc, // Data item passed to interrupt handler (cyg_ISR_t *)lan91cxx_isr, (cyg_DSR_t *)eth_drv_dsr, // The logical driver DSR &lan91cxx_interrupt_handle, &lan91cxx_interrupt); cyg_drv_interrupt_attach(lan91cxx_interrupt_handle); ISR is like below, static int lan91cxx_isr(cyg_vector_t vector, cyg_addrword_t data /* , HAL_SavedRegisters *regs */ ) { struct eth_drv_sc *sc = (struct eth_drv_sc *)data; struct lan91cxx_priv_data *cpd = (struct lan91cxx_priv_data *)sc->driver_private; DEBUG_FUNCTION(); INCR_STAT( interrupts ); cyg_drv_interrupt_mask(cpd->interrupt); cyg_drv_interrupt_acknowledge(cpd->interrupt); return (CYG_ISR_HANDLED|CYG_ISR_CALL_DSR); // Run the DSR } According Anthony J. Massa's Book,as far as ISR returns CYG_ISR_CALL_DSR DSR is executed. As DSR,since I build using "net" Template, I think /packages/io/eth/v2_0/src/net/eth_drv.c file's eth_drv_dsr function is used. I tested its entering by inserting diag_printf but never entered in it. DSR is below, eth_drv_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data) { struct eth_drv_sc *sc = (struct eth_drv_sc *)data; //20070907 diag_printf("DSR\n"); #ifdef CYGDBG_USE_ASSERTS // then check that this really is a "sc" { cyg_netdevtab_entry_t *t; for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++) if ( ((struct eth_drv_sc *)t->device_instance) == sc ) break; // found it CYG_ASSERT( t != &__NETDEVTAB_END__, "eth_drv_dsr: Failed to find sc in NETDEVTAB" ); } #endif // Checking code sc->state |= ETH_DRV_NEEDS_DELIVERY; ecos_synch_eth_drv_dsr(); // [request] run delivery function for this dev } Also I assured interrupt_end is executed in VSR after subroutine call of ISR. My question is that are there any way DSR is called other than above route ? Especially I doubt about delivery operation althoug I have not fathamed its operation. Is delivery operation is connected to interrupt ? Please enlighten me. Masahiro Ariga -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss