From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 24 23:32:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DE8F16A4CE; Wed, 24 Mar 2004 23:32:39 -0800 (PST) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45A3E43D3F; Wed, 24 Mar 2004 23:32:38 -0800 (PST) (envelope-from sos@DeepCore.dk) Received: from DeepCore.dk (sos.deepcore.dk [194.192.25.130]) by spider.deepcore.dk (8.12.11/8.12.10) with ESMTP id i2P7WJQ7020521; Thu, 25 Mar 2004 08:32:24 +0100 (CET) (envelope-from sos@DeepCore.dk) Message-ID: <40628B02.10909@DeepCore.dk> Date: Thu, 25 Mar 2004 08:32:18 +0100 From: =?KOI8-R?Q?S=3Fren_Schmidt?= User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6b) Gecko/20040126 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Roman Kurakin References: <4061D498.4080007@cronyx.ru> In-Reply-To: <4061D498.4080007@cronyx.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-mail-scanned: by DeepCore Virus & Spam killer v1.4 cc: freebsd-hackers@freebsd.org cc: FreeBSD Current Subject: Re: ATA/CHS problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2004 07:32:39 -0000 Roman Kurakin wrote: > This is not an LBA request. ATA driver thinks that I have 80G CHS > device, cause it's ATA_FLAG_54_58 > is zero. (This decision is incorrect, we shouldn't relay on this flag). > I've checked another seagate 80G drive in > CHS mode(by driver hacking), and problematic one with LBA mode. I get > the same behavior on both with CHS. > And both work fine in LBA mode. It also should be mentioned that I get > this problem on machine with > ICH2 controller, and it seems that I don't have such problem on other > machine with ICH5 Hmm, we could loosen up this check (Se patch below) but that will probably break support for real old ATA disks (note that those old systems most likely will have trouble with -current anyways). If I coul dhave my ways, we wouldn't even try to support disks that doesn't support LBA.... > PS. If you have any ideas, or if you have any materials (standards for > example) about ATA/ATAPI and you > can share them with me, please let me know. I am not ata developer, so > this is a bit difficalt for me to > dig this problem. Go to t13.org they are the standards body for ATA etc... Index: ata-disk.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v retrieving revision 1.171 diff -u -r1.171 ata-disk.c --- ata-disk.c 1 Mar 2004 13:17:07 -0000 1.171 +++ ata-disk.c 25 Mar 2004 07:28:20 -0000 @@ -104,8 +104,7 @@ ((u_int32_t)atadev->param->lba_size_2 << 16); /* does this device need oldstyle CHS addressing */ - if (!ad_version(atadev->param->version_major) || - !(atadev->param->atavalid & ATA_FLAG_54_58) || !lbasize) + if (!ad_version(atadev->param->version_major) || !lbasize) atadev->flags |= ATA_D_USE_CHS; /* use the 28bit LBA size if valid or bigger than the CHS mapping */ -S?ren