From patchwork Sun Nov 7 21:45:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marin Mitov X-Patchwork-Id: 70383 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7BBA7B70F7 for ; Mon, 8 Nov 2010 08:55:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752063Ab0KGVzO (ORCPT ); Sun, 7 Nov 2010 16:55:14 -0500 Received: from mail.issp.bas.bg ([195.96.236.10]:39988 "EHLO mail.issp.bas.bg" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751723Ab0KGVzN (ORCPT ); Sun, 7 Nov 2010 16:55:13 -0500 X-Greylist: delayed 498 seconds by postgrey-1.27 at vger.kernel.org; Sun, 07 Nov 2010 16:55:13 EST Received: from lfb.issp.bas.bg (IDENT:1000@lfb.issp.bas.bg [195.96.236.237]) by mail.issp.bas.bg (8.14.3/8.14.3) with ESMTP id oA7Lk6kX022276; Sun, 7 Nov 2010 23:46:07 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=issp.bas.bg; s=default; t=1289166368; bh=Szz6HKwhY9h8Jvj2aJOxk7SuDsW2ep7IBcx5H1HMCgE=; h=From:To:Subject:Date:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id; b=kipQ4p7UHv0GY/jAWQwMwIgQSuK0jdgP3Je2JZ+zrcTkKG4TiFQ5ZERCLms5RUq2M Ldjppjh5Zml2DSBH2REoJL1F7Hyio39ITJ1rq/hA9uOCaT0HTBDG92XcgbQ6t6k1oA eG1bW/cXICEoasnD/dBf+9SwsRh2crNt94kc86Ho= From: Marin Mitov Organization: Institute of Solid State Physics To: Stephen Hemminger , Stephen Hemminger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" Subject: [BUG]: skge not working (as module) in 2.6.37-rc1 Date: Sun, 7 Nov 2010 23:45:52 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.37-rc1; KDE/4.4.3; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201011072345.52784.mitov@issp.bas.bg> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Stephen, skge as in 2.6.36 (and before) is working. As in 2.6.37-rc1 it is not: kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 kernel: IP: [] skge_devinit+0x270/0x2a0 [skge] kernel: PGD d8657067 PUD d8658067 PMD 0 kernel: Oops: 0002 [#1] PREEMPT SMP kernel: last sysfs file: /sys/devices/platform/mga_warp.0/firmware/mga_warp.0/loading kernel: CPU 1 kernel: Modules linked in: skge(+) kernel: kernel: Pid: 2005, comm: insmod Not tainted 2.6.37-rc1 #2 A8V/System Product Name kernel: RIP: 0010:[] [] skge_devinit+0x270/0x2a0 [skge] kernel: RSP: 0018:ffff8800ce477cb8 EFLAGS: 00010292 kernel: RAX: 0000000000000000 RBX: ffff88011f2cc800 RCX: ffffffff815ab260 kernel: RDX: ffffffff814e82a8 RSI: 0000000000000046 RDI: ffffffff815ab154 kernel: RBP: ffff8800ce477cd8 R08: 00000000ffffffff R09: 0000000000000000 kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800daa27480 kernel: R13: 0000000000000000 R14: ffff88011f2ccd80 R15: 0000000000000000 kernel: FS: 00007f2af73f3700(0000) GS:ffff8800dfd00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b kernel: CR2: 0000000000000010 CR3: 00000000d865a000 CR4: 00000000000006e0 kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 kernel: Process insmod (pid: 2005, threadinfo ffff8800ce476000, task ffff880109875370) kernel: Stack: kernel: ffff88011fe5f800 0000000000000000 ffff8800daa27480 ffff8800daa274e8 kernel: ffff8800ce477d28 ffffffffa0006f2d ffff8800ce477d08 ffffffff8119555a kernel: ffff8800ce477d38 ffff88011fe5f888 ffff88011fe5f800 ffffffffa0008120 kernel: Call Trace: kernel: [] skge_probe+0x27c/0x4a7 [skge] kernel: [] ? kobject_get+0x1a/0x30 kernel: [] local_pci_probe+0x12/0x20 kernel: [] pci_device_probe+0x80/0xb0 kernel: [] ? driver_sysfs_add+0x7a/0xb0 kernel: [] driver_probe_device+0x81/0x1a0 kernel: [] __driver_attach+0x93/0xa0 kernel: [] ? __driver_attach+0x0/0xa0 kernel: [] bus_for_each_dev+0x5c/0x90 kernel: [] driver_attach+0x19/0x20 kernel: [] bus_add_driver+0x198/0x250 kernel: [] ? skge_init_module+0x0/0x3a [skge] kernel: [] driver_register+0x78/0x140 kernel: [] ? skge_init_module+0x0/0x3a [skge] kernel: [] __pci_register_driver+0x51/0xd0 kernel: [] ? dmi_check_system+0x20/0x50 kernel: [] skge_init_module+0x38/0x3a [skge] kernel: [] do_one_initcall+0x3e/0x170 kernel: [] sys_init_module+0xb2/0x200 kernel: [] system_call_fastpath+0x16/0x1b kernel: Code: 39 e1 48 89 df e8 81 a7 33 e1 ba 15 0f 00 00 48 c7 c6 08 7c 00 a0 48 c7 c7 48 73 00 a0 31 c0 e8 c1 aa 39 e1 48 8b 83 00 03 00 00 80 48 10 01 ba 17 0f 00 00 48 c7 c6 08 7c 00 a0 48 c7 c7 48 kernel: RIP [] skge_devinit+0x270/0x2a0 [skge] kernel: RSP kernel: CR2: 0000000000000010 kernel: ---[ end trace ef29176d9e5b71a4 ]--- Reverting the changes in skge.c (2.6.36 -> 2.6.37-rc1) does not help. Debugging with many printk embedded in skge_devinit() found the problem is in netif_stop_queue(dev). Removing the statement (see the patch) helps - skge is working. But I am not expert in the networking, so I am not sure I have solved the real problem. May be some changes in the core networking are the real cause of the problem. And by the way, why one should stop a queue that is not yet (at least explicitly) started? :-) Best regards. Marin Mitov Signed-off-by: Marin Mitov --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html =========================================================== --- a/drivers/net/skge.c 2010-11-07 10:55:22.000000000 +0200 +++ b/drivers/net/skge.c 2010-11-07 20:55:43.000000000 +0200 @@ -3858,7 +3858,6 @@ static struct net_device *skge_devinit(s /* device is off until link detection */ netif_carrier_off(dev); - netif_stop_queue(dev); return dev; }