From patchwork Sun Sep 21 23:34:37 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jonsmirl@gmail.com" X-Patchwork-Id: 811 X-Patchwork-Delegate: grant.likely@secretlab.ca Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id E11D2DE077 for ; Mon, 22 Sep 2008 09:34:53 +1000 (EST) X-Original-To: Linuxppc-dev@ozlabs.org Delivered-To: Linuxppc-dev@ozlabs.org Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by ozlabs.org (Postfix) with ESMTP id 98842DDE1D for ; Mon, 22 Sep 2008 09:34:38 +1000 (EST) Received: by qw-out-2122.google.com with SMTP id 9so117449qwb.15 for ; Sun, 21 Sep 2008 16:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ypVUvRihMypSZlJUcH6BKx6CmraF+ZgxLbeO/4LAuHE=; b=CmYgUf3/GHdpkuOHTArvtMuSQdQs5cc1bB9BmTP39QGo+P+nA7d8V2JZBAEed/xU6q Lp9TeX+pK5a6ZtVol9OjQGFPBYENAFqnxeOAfMeW0TaUZeaninj02Sl0ZdoLlP4zFuqP tUAyTR43uxSfKpHr8Ryyd0E9tsRIcuM7fvtAc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=TjKuVqoEdWT1pOCOcDWY4xgWRlKeIzjczsIX3yxwsOLZrRkYkkzYORYbLxbszt9FRT PpD5jJ960V+TDIAFUKNrA2OUml8ypumaGy2RU01dgzifv3buhp/fPu51nSDISsU3M8oc O6gIQgNrzbW/z/3fj38C6eQ1vSEC7lVOl6rLg= Received: by 10.215.14.10 with SMTP id r10mr2066299qai.91.1222040077356; Sun, 21 Sep 2008 16:34:37 -0700 (PDT) Received: by 10.214.10.19 with HTTP; Sun, 21 Sep 2008 16:34:37 -0700 (PDT) Message-ID: <9e4733910809211634u5b37e297pe8503f08de4f19a8@mail.gmail.com> Date: Sun, 21 Sep 2008 19:34:37 -0400 From: "Jon Smirl" To: "Sergei Shtylyov" Subject: Re: solution to printk() blocking interrupts? In-Reply-To: <48D6C8F0.4060808@ru.mvista.com> MIME-Version: 1.0 Content-Disposition: inline References: <9e4733910809211353k1f06fb5bi219c124d0c44b47a@mail.gmail.com> <9e4733910809211443l5638887aw856377d39fcca85c@mail.gmail.com> <48D6C8F0.4060808@ru.mvista.com> Cc: linuxppc-dev X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org On Sun, Sep 21, 2008 at 6:21 PM, Sergei Shtylyov wrote: > Implementing the poll_controller() method in the network driver is usually > staightforward. Good tip, the simple implementation worked. What controls this? "carrier detect appears untrustworthy, waiting 4 seconds" Get that fixed and this patch could be useful, root@phyCORE-MPC5200B-tiny:~ dmesg | grep netconsole Kernel command line: console=ttyPSC0,115200 rw debug root=/dev/nfs ip=dhcp nfsroot=192.168.1.4:/home/OSELAS.BSP-Phytec-phyCORE-MPC5200B-tiny-6/root,v3,tcp netconsole=6666@192.168.1.11/eth0,514@192.168.1.4/00:19:d1:e4:0f:8d netconsole: local port 6666 netconsole: local IP 192.168.1.11 netconsole: interface eth0 netconsole: remote port 514 netconsole: remote IP 192.168.1.4 netconsole: remote ethernet address 00:19:d1:e4:0f:8d netconsole: device eth0 not up yet, forcing it netconsole: carrier detect appears untrustworthy, waiting 4 seconds netconsole: network logging started root@phyCORE-MPC5200B-tiny:~ static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id) @@ -926,6 +936,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) ndev->tx_timeout = mpc52xx_fec_tx_timeout; ndev->watchdog_timeo = FEC_WATCHDOG_TIMEOUT; ndev->base_addr = mem.start; +#ifdef CONFIG_NET_POLL_CONTROLLER + ndev->poll_controller = mpc52xx_fec_poll_controller; +#endif priv->t_irq = priv->r_irq = ndev->irq = NO_IRQ; /* IRQ are free for now */ diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 4e4f683..72541b5 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c @@ -401,6 +401,16 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *d return 0; } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void mpc52xx_fec_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + mpc52xx_fec_tx_interrupt(dev->irq, dev); + enable_irq(dev->irq); +} +#endif + + /* This handles BestComm transmit task interrupts */