From owner-freebsd-current@FreeBSD.ORG Mon Sep 8 02:50:25 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0A9F16A4BF for ; Mon, 8 Sep 2003 02:50:25 -0700 (PDT) Received: from smtp.fud.org.nz (203-79-110-29.cable.paradise.net.nz [203.79.110.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5682343F93 for ; Mon, 8 Sep 2003 02:50:24 -0700 (PDT) (envelope-from andy@fud.org.nz) Received: from localhost (localhost [127.0.0.1]) by smtp.fud.org.nz (Postfix) with ESMTP id 416DF5C69; Mon, 8 Sep 2003 21:50:22 +1200 (NZST) Received: from smtp.fud.org.nz ([127.0.0.1]) by localhost (grace.fud.org.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 41766-01; Mon, 8 Sep 2003 21:50:21 +1200 (NZST) Received: from [192.168.10.254] (dhcp-254.fud.org.nz [192.168.10.254]) by smtp.fud.org.nz (Postfix) with ESMTP id 927185C21; Mon, 8 Sep 2003 21:50:21 +1200 (NZST) From: Andrew Thompson To: Soren Schmidt In-Reply-To: <200309080938.h889c7UZ043165@spider.deepcore.dk> References: <200309080938.h889c7UZ043165@spider.deepcore.dk> Content-Type: text/plain Message-Id: <1063014661.20769.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Mon, 08 Sep 2003 21:53:09 +1200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at fud.org.nz cc: YazzY cc: freebsd-current Subject: Re: ATAng and CF cards X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 09:50:26 -0000 On Mon, 2003-09-08 at 21:38, Soren Schmidt wrote: > It seems Soren Schmidt wrote: > > It seems YazzY wrote: > > > Hi. > > > > > > It can be mounted when I boot the laptop and do not take the card out of > > > the slot. > > > If I eject it and then put it back in, I cannot mount it or dd files to > > > it anymore... > > > Anyway, this bit of dmesg does not look healthy to me. And as I said, > > > everything worked fine before the ATAng code got changed. > > > > Please try this simple patch: > > Forget that, wrong patch, here goes the right one: > > Index: ata-lowlevel.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/ata/ata-lowlevel.c,v > retrieving revision 1.10 > diff -u -r1.10 ata-lowlevel.c > --- ata-lowlevel.c 8 Sep 2003 08:36:46 -0000 1.10 > +++ ata-lowlevel.c 8 Sep 2003 09:36:53 -0000 > @@ -772,7 +772,10 @@ > struct ata_channel *ch = request->device->channel; > int resid; > > - if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t))) > + if ((!(request->flags & ATA_R_ATAPI) && > + (request->u.ata.command = ATA_ATA_IDENTIFY || > + request->u.ata.command = ATA_ATAPI_IDENTIFY)) || > + ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t))) > ATA_IDX_INSW_STRM(ch, ATA_DATA, > (void*)((uintptr_t)request->data+request->donecount), > size / sizeof(int16_t)); Correct me if im wrong, but shouldnt it be =='s + (request->u.ata.command == ATA_ATA_IDENTIFY || + request->u.ata.command == ATA_ATAPI_IDENTIFY)) || Andy