From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 16 10:30:26 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECC1616A4B3 for ; Tue, 16 Sep 2003 10:30:25 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B57A943FE9 for ; Tue, 16 Sep 2003 10:30:20 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8GHUEUp055880 for ; Tue, 16 Sep 2003 10:30:14 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h8GHUE4l055879; Tue, 16 Sep 2003 10:30:14 -0700 (PDT) Resent-Date: Tue, 16 Sep 2003 10:30:14 -0700 (PDT) Resent-Message-Id: <200309161730.h8GHUE4l055879@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Simon Walton Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4C2416A4B3 for ; Tue, 16 Sep 2003 10:27:08 -0700 (PDT) Received: from flamingo.mail.pas.earthlink.net (flamingo.mail.pas.earthlink.net [207.217.120.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 289B143F3F for ; Tue, 16 Sep 2003 10:27:06 -0700 (PDT) (envelope-from simonw@matteworld.com) Received: from user-119bq9k.biz.mindspring.com ([66.149.233.52] helo=matteworld.com) by flamingo.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 19zJbV-0006Im-00 for FreeBSD-gnats-submit@freebsd.org; Tue, 16 Sep 2003 10:27:05 -0700 Message-Id: <3F6747E8.92E8C623@matteworld.com> Date: Tue, 16 Sep 2003 10:27:04 -0700 From: Simon Walton Sender: simonw@FreeBSD.org To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/56924: [Patch] ATA controller seems to have wrong ID for ServerWorks chipset X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2003 17:30:26 -0000 >Number: 56924 >Category: kern >Synopsis: [Patch] ATA controller seems to have wrong ID for ServerWorks chipset >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 16 10:30:14 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Simon Walton >Release: FreeBSD 4.7-RELEASE i386 >Organization: >Environment: System: FreeBSD mongo 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Mon Sep 15 17:24:01 PDT 2003 simonw@mongo:/usr/src/sys/compile/MONGO i386 Compaq/HP ProLiant ML310, Pentium 4, 2.2 GHz >Description: This server was fitted with two ATA-100 disks on a single IDE port. According to the atacontrol command the host was using PIO to access them, and atacontrol would not renegotiate to UDMA speeds. The disks gave poor performance. Investiation shows that the ATA driver apparently checked for the wrong value of the chip ID. When this was changed the kernel automatically negotiated to UDMA 100 and the disk performance was significantly improved. The current code seems to check for the chip's subid, not the chip id: pciconf -lv ... atapci0@pci0:15:1: class=0x01018a card=0x02121166 chip=0x02131166 rev=0xa0 hdr=0x00 vendor = 'Reliance Computer Corp./ServerWorks' class = mass storage subclass = ATA >How-To-Repeat: Add ATA disks to the above-specified system. Use atacontrol to observe the data-rate. >Fix: *** /sys/dev/ata/ata-dma.c.orig Tue Aug 26 11:53:22 2003 --- /sys/dev/ata/ata-dma.c Tue Aug 26 11:54:32 2003 *************** *** 822,827 **** --- 822,828 ---- atadev->mode = ATA_PIO0 + apiomode; return; + case 0x02131166: /* ServerWorks CSB5 ATA66/100 controller */ case 0x02121166: /* ServerWorks CSB5 ATA66/100 controller */ if (udmamode >= 5 && pci_get_revid(parent) >= 0x92) { error = ata_command(atadev, ATA_C_SETFEATURES, 0, *** /sys/dev/ata/ata-pci.c.orig Tue Aug 26 12:10:33 2003 --- /sys/dev/ata/ata-pci.c Tue Aug 26 12:25:24 2003 *************** *** 242,247 **** --- 242,248 ---- case 0x02111166: return "ServerWorks ROSB4 ATA33 controller"; + case 0x02131166: case 0x02121166: if (pci_get_revid(dev) >= 0x92) return "ServerWorks CSB5 ATA100 controller"; >Release-Note: >Audit-Trail: >Unformatted: