Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.1830);
	 Wed, 2 Jul 2008 12:06:51 -0700
Received: from chiesmta2-2.messageone.com ([216.203.30.55]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.1830);
	 Wed, 2 Jul 2008 12:06:50 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by chiesmta2-2.messageone.com (8.13.8/8.13.8) with ESMTP id m62J6n3o013026
	for <andy.sharp@onstor.com>; Wed, 2 Jul 2008 14:06:50 -0500
Received: from localhost.localdomain ([127.0.0.1]:56268 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S23869173AbYGBTGe (ORCPT <rfc822;andy.sharp@onstor.com>);
	Wed, 2 Jul 2008 20:06:34 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 02 Jul 2008 20:06:17 +0100 (BST)
Received: from elvis.franken.de ([193.175.24.41]:33459 "EHLO elvis.franken.de")
	by ftp.linux-mips.org with ESMTP id S23869175AbYGBTGH (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Wed, 2 Jul 2008 20:06:07 +0100
Received: from uucp (helo=solo.franken.de)
	by elvis.franken.de with local-bsmtp (Exim 3.36 #1)
	id 1KE7eW-0000rd-00; Wed, 02 Jul 2008 21:06:04 +0200
Received: by solo.franken.de (Postfix, from userid 1000)
	id 26B63C214C; Wed,  2 Jul 2008 21:06:03 +0200 (CEST)
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: [PATCH] Enable FAST-20 for onboard scsi
To: linux-mips@linux-mips.org
cc: ralf@linux-mips.org
Message-Id: <20080702190603.26B63C214C@solo.franken.de>
Date: 	Wed,  2 Jul 2008 21:06:03 +0200 (CEST)
X-archive-position: 19699
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: tsbogend@alpha.franken.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-02_08:2008-07-02,2008-07-02,2008-07-02 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-0807020069
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 02 Jul 2008 19:06:51.0196 (UTC) FILETIME=[C8BA3FC0:01C8DC76]

Both onboard controller of the O2 support FAST-20 transfer speeds,
but the bit, which signals that to the aic driver, isn't set. Instead
of adding detection code to the scsi driver, we just fake the missing
bit in the PCI config space of the scsi chips.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---

 arch/mips/pci/ops-mace.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/mips/pci/ops-mace.c b/arch/mips/pci/ops-mace.c
index e958818..1cfb558 100644
--- a/arch/mips/pci/ops-mace.c
+++ b/arch/mips/pci/ops-mace.c
@@ -61,6 +61,13 @@ mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
 	/* ack possible master abort */
 	mace->pci.error &= ~MACEPCI_ERROR_MASTER_ABORT;
 	mace->pci.control = control;
+	/*
+	 * someone forgot to set the ultra bit for the onboard
+	 * scsi chips; we fake it here
+	 */
+	if (bus->number == 0 && reg == 0x40 && size == 4 &&
+	    (devfn == (1 << 3) || devfn == (2 << 3)))
+		*val |= 0x1000;
 
 	DPRINTK("read%d: reg=%08x,val=%02x\n", size * 8, reg, *val);
 

