From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32194 invoked by alias); 15 Oct 2007 05:59:10 -0000 Received: (qmail 32184 invoked by uid 22791); 15 Oct 2007 05:59:09 -0000 X-Spam-Check-By: sourceware.org Received: from defer117.ocn.ad.jp (HELO defer117.ocn.ad.jp) (125.206.148.136) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 Oct 2007 05:59:07 +0000 Received: from pop132.ocn.ne.jp (pop132.ocn.ne.jp [60.37.31.215]) by defer117.ocn.ad.jp (Postfix) with ESMTP id 71E37BBE08; Mon, 15 Oct 2007 14:55:07 +0900 (JST) Received: from ariga (p1143-ipbf2202marunouchi.tokyo.ocn.ne.jp [122.17.131.143]) by pop132.ocn.ne.jp (OCN) with SMTP id l9F5t6dr011549; Mon, 15 Oct 2007 14:55:07 +0900 (JST) Message-ID: <000501c80eef$edf10f30$1c0110ac@ariga> From: "ariga masahiro" To: "Andrew Lunn" Cc: References: <000501c7f691$4847e2f0$1c0110ac@ariga> <20070914082224.GA16840@lunn.ch> Date: Mon, 15 Oct 2007 05:59:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; 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] What functions should I call in ethernet drv ? X-SW-Source: 2007-10/txt/msg00086.txt.bz2 Hello, I am in a complete predicament,please help me. I am testing SMSC LAN91C111 ethernet driver using nc_test_slave/master and managed to make it run,correctly say,I succeeded to receive ARP from host. But I discovered that in ether_input and ether_output functions in if_ethersubr.c file, ng_ether_input_p and ng_ether_output_p pointers are both NULL,and passed out function calls. \packages\net\bsd_tcpip\current\src\sys\net\if_ethersubr.c ether_input(ifp, eh, m) /* Handle ng_ether(4) processing, if any */ if (ng_ether_input_p != NULL) { (*ng_ether_input_p)(ifp, &m, eh); if (m == NULL) return; } ether_output(ifp, m, dst, rt0) /* Handle ng_ether(4) processing, if any */ if (ng_ether_output_p != NULL) { if ((error = (*ng_ether_output_p)(ifp, &m)) != 0) { bad: if (m != NULL) m_freem(m); return (error); } if (m == NULL) return (0); } I encountered the same problem in ether_ifattach in the same file where ng_ether_attach_p were NULL and passed out function call. But at that time I found next function fulfill need, so I inserted pointer assignment before function call like below. packages\net\bsd_tcpip\current\src\sys\net\if.c if_attach(ifp) ether_ifattach(ifp, bpf) ng_ether_attach_p = if_attach; // inserted if (ng_ether_attach_p != NULL) (*ng_ether_attach_p)(ifp); I hope I was right. But this time I can't find suitable functions in ether_input and ether_output. It is crestfallen to select every functions.Is there any way to select correctly ? Or rather,since I configured to use LAN91C111 driver specifically, it is unreasonable to choose each functions manually. There ought be the way to initialize cyg_ pointers in param.h. Please let me know how to initialize cyg_ pointers so I could use LAN91C111 driver properly. I need your help urgently. 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