From owner-freebsd-drivers@FreeBSD.ORG Thu Mar 6 06:50:20 2008 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2700C1065672 for ; Thu, 6 Mar 2008 06:50:20 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp2.yandex.ru (smtp2.yandex.ru [213.180.200.18]) by mx1.freebsd.org (Postfix) with ESMTP id 68E628FC3A for ; Thu, 6 Mar 2008 06:50:19 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from ns.kirov.so-cdu.ru ([77.72.136.145]:12271 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S4395521AbYCFGuL (ORCPT ); Thu, 6 Mar 2008 09:50:11 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp2 X-Yandex-TimeMark: 1204786211 X-MsgDayCount: 10 X-Comment: RFC 2476 MSA function at smtp2.yandex.ru logged sender identity as: bu7cher Message-ID: <47CF9420.1060204@yandex.ru> Date: Thu, 06 Mar 2008 09:50:08 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Sean Bruno References: <47CEF71D.6060600@miralink.com> <47CF786D.2000805@yandex.ru> <47CF7C73.70403@miralink.com> <47CF82FA.20706@miralink.com> In-Reply-To: <47CF82FA.20706@miralink.com> Content-Type: multipart/mixed; boundary="------------070100040804080403010604" Cc: freebsd-drivers@freebsd.org Subject: Re: ICH9 based IDE speed negotiation error X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 06:50:20 -0000 This is a multi-part message in MIME format. --------------070100040804080403010604 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Sean Bruno wrote: > Sean Bruno wrote: >> Andrey V. Elsukov wrote: >>> Sean Bruno wrote: >>>> I have an IBM x3250M with a CF IDE flash device in the IDE >>>> controller socket instead of the CDROM. >>>> It appears that the ICH9 IDE chipset is negotiating to UDMA66 >>>> instead of UDMA33 on this board, and that is not the speed of my CF >>>> IDE device: >>>> http://www.transcendusa.com/Products/ModDetail.asp?ModNo=26&LangNo=0 >>> >>> ICH9 doesn't have an IDE function. Can you show `pciconf -l` and >>> `grep ata /var/run/dmesg.boot` outputs? >>> >> Done and done. Wierd huh? I was confused as well. >ata3: on atapci1 >atapci1: Reserved 0x8 bytes for rid 0x18 type 4 at 0x1c28 >atapci1: Reserved 0x4 bytes for rid 0x1c type 4 at 0x1c20 >ata3: reset tp1 mask=03 ostat0=50 ostat1=00 >ata3: stat0=0x50 err=0x01 lsb=0x00 msb=0x00 >ata3: stat1=0x00 err=0x01 lsb=0x00 msb=0x00 >ata3: reset tp2 stat0=50 stat1=00 devices=0x1 >ata3: [MPSAFE] >ata: ata0 already exists; skipping it >ata: ata1 already exists; skipping it >ata3-master: pio=PIO4 wdma=WDMA2 udma=UDMA66 cable=40 wire >ad6: 488MB at ata3-master UDMA66 Try the attached patch. Maybe Soren can suggest more properer patch? -- WBR, Andrey V. Elsukov --------------070100040804080403010604 Content-Type: text/plain; name="ata.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ata.diff" Index: src/sys/dev/ata/ata-chipset.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/ata-chipset.c,v retrieving revision 1.211 diff -u -b -p -r1.211 ata-chipset.c --- src/sys/dev/ata/ata-chipset.c 13 Dec 2007 11:47:36 -0000 1.211 +++ src/sys/dev/ata/ata-chipset.c 6 Mar 2008 06:49:24 -0000 @@ -2049,7 +2049,7 @@ ata_intel_sata_setmode(device_t dev, int atadev->mode = ATA_SA150; } else { - mode = ata_limit_mode(dev, mode, ATA_UDMA5); + mode = ata_check_80pin(dev, ATA_UDMA5); if (!ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode)) atadev->mode = mode; } --------------070100040804080403010604--