Received: from mail.onstor.com (66.201.51.107) by exch1.onstor.net
 (10.0.0.225) with Microsoft SMTP Server id 8.1.311.2; Sat, 7 Feb 2009
 06:58:53 -0800
Received: from ausesmta2-1.messageone.com ([64.20.241.45]) by mail.onstor.com
 with Microsoft SMTPSVC(6.0.3790.3959);	 Sat, 7 Feb 2009 06:58:52 -0800
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])	by
 ausesmta2-1.messageone.com (8.13.8/8.13.8) with ESMTP id n17EwrJT017000	for
 <andy.sharp@onstor.com>; Sat, 7 Feb 2009 08:58:53 -0600
Received: from localhost.localdomain ([127.0.0.1]:1157 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S21366277AbZBGO6A
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Sat, 7 Feb 2009 14:58:00 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 07 Feb 2009 14:57:43
 +0000 (GMT)
Received: from orbit.nwl.cc ([91.121.169.95]:30384 "EHLO orbit.nwl.cc")	by
 ftp.linux-mips.org with ESMTP id S21366278AbZBGO5j (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sat, 7 Feb 2009 14:57:39 +0000
Received: from orbit.nwl.cc (localhost [127.0.0.1])	by orbit.nwl.cc (Postfix)
 with ESMTP id E38904CEB7;	Sat,  7 Feb 2009 15:57:33 +0100 (CET)
Received: from base (localhost [127.0.0.1])	by orbit.nwl.cc (Postfix) with
 ESMTP id ABA9E4CE8B;	Sat,  7 Feb 2009 15:57:33 +0100 (CET)
From: Phil Sutter <n0-1@freewrt.org>
To: Linux-Mips List <linux-mips@linux-mips.org>
CC: Ralf Baechle <ralf@linux-mips.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Sat, 7 Feb 2009 06:57:26 -0800
Subject: [PATCH] MIPS: rb532: use mdelay to sleep when atomic
Thread-Topic: [PATCH] MIPS: rb532: use mdelay to sleep when atomic
Thread-Index: AcmJNJhBGCac6YUWQiCEdd6PuwLTpw==
Message-ID: <20090207145733.ABA9E4CE8B@orbit.nwl.cc>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 0b
X-MS-Exchange-Organization-AuthSource: exch1.onstor.net
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-originalarrivaltime: 07 Feb 2009 14:58:53.0190 (UTC)
 FILETIME=[979FB260:01C98934]
errors-to: linux-mips-bounce@linux-mips.org
x-virus-scanned: ClamAV using ClamSMTP
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: OrR7muXUywCU6lLfoOxYUg==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2009-02-06_04:2009-02-05,2009-02-06,2009-02-06 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-0810130000 definitions=main-0902070058
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21909
x-ecartis-version: Ecartis v1.0.0
x-original-sender: n0-1@freewrt.org
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

In fact, using msleep() here triggers scheduling when the kernel has
been built with CONFIG_PREEMPT, which in turn causes the kernel to
complain about scheduling when being atomic.

The delay itself is basically a hack to allow the rb564 daughter board
(FIXME: right?) to be detected correctly. Maybe there is some real fix
for this issue, but sadly I can't test as I don't have any hardware
requiring this delay.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
---
 arch/mips/pci/ops-rc32434.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/pci/ops-rc32434.c b/arch/mips/pci/ops-rc32434.c
index d1f8fa2..0999e91 100644
--- a/arch/mips/pci/ops-rc32434.c
+++ b/arch/mips/pci/ops-rc32434.c
@@ -118,7 +118,7 @@ retry:
 			if (delay > 4)
 				return 0;
 			delay *=3D 2;
-			msleep(delay);
+			mdelay(delay);
 			goto retry;
 		}
 	}
--=20
1.5.6.4


