Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.1830);
	 Mon, 21 Jul 2008 02:54:27 -0700
Received: from dalesmta2-2.messageone.com ([129.41.169.249]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.1830);
	 Mon, 21 Jul 2008 02:54:26 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by dalesmta2-2.messageone.com (8.13.8/8.13.8) with ESMTP id m6L9sPuZ013693
	for <andy.sharp@onstor.com>; Mon, 21 Jul 2008 04:54:25 -0500
Received: from localhost.localdomain ([127.0.0.1]:49623 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S28573714AbYGUJyQ (ORCPT <rfc822;andy.sharp@onstor.com>);
	Mon, 21 Jul 2008 10:54:16 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 21 Jul 2008 10:53:59 +0100 (BST)
Received: from alpha-bit.de ([217.160.213.225]:8924 "EHLO
	p15137410.pureserver.info") by ftp.linux-mips.org with ESMTP
	id S28573717AbYGUJxw (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 21 Jul 2008 10:53:52 +0100
Received: from Porsche (DSL01.83.171.182.190.ip-pool.NEFkom.net [83.171.182.190])
	by p15137410.pureserver.info (Postfix) with ESMTP id 4A3A980DA12
	for <linux-mips@linux-mips.org>; Mon, 21 Jul 2008 11:53:52 +0200 (CEST)
X-KENId: 00001AA9KEN004CDB5A
X-KENRelayed: 00001AA9KEN004CDB5A@Porsche
Received: from [192.168.0.209]
   by KEN (4.00.93-v070725) with SMTP
   ; Mon, 21 Jul 2008 11:53:42 +0200
Date: 	Mon, 21 Jul 2008 11:53:50 +0200
From: Martin Gebert <martin.gebert@alpha-bit.de>
Subject: [PATCH] Spinlock initialisation au1000_eth.c
To: linux-mips@linux-mips.org
Message-Id: <48845CAE.5000606@alpha-bit.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
X-KENRecTime: 1216634022
Content-Transfer-Encoding: 7bit
User-Agent: Thunderbird 2.0.0.14 (X11/20080421)
X-archive-position: 19910
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: martin.gebert@alpha-bit.de
Precedence: bulk
X-list: 	linux-mips
X-MessageOne-Virus-Version: vendor=fsecure engine=4.65.7161:2.4.4,1.2.40,4.0.164 definitions=2008-07-21_02:2008-07-16,2008-07-21,2008-07-21 signatures=0
X-MessageOne-Virus-Scanned: Clean
X-MessageOne-Envelope-Sender: linux-mips-bounce@linux-mips.org
X-MessageOne-Spam-Details: rule=m773emszm_notspam policy=m773emszm score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0805090000 definitions=main-0807210010
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 21 Jul 2008 09:54:26.0709 (UTC) FILETIME=[C2EC2450:01C8EB17]

Seems like the spinlock for the AU1x00 ethernet device is initialised too
late, as it is already used in enable_mac(), which is called via
mii_probe() before the init takes place.
The attached patch is working here for a Linux Au1100 2.6.22.6 kernel,
and as far as I checked should also be applicable to the current head
(just line numbers differ).

Signed-off-by: Martin Gebert <Martin.Gebert@alpha-bit.de>

--- drivers/net/au1000_eth.c	2008-06-26 14:21:53.000000000 +0200
+++ drivers/net/au1000_eth.c	2008-06-26 14:23:00.000000000 +0200
@@ -656,6 +656,7 @@
		dev->name, base, irq);

	aup = dev->priv;
+	spin_lock_init(&aup->lock);

	/* Allocate the data buffers */
	/* Snooping works fine with eth on all au1xxx */
@@ -766,7 +767,6 @@
		aup->tx_db_inuse[i] = pDB;
	}

-	spin_lock_init(&aup->lock);
	dev->base_addr = base;
	dev->irq = irq;
	dev->open = au1000_open;




