From owner-freebsd-current@FreeBSD.ORG Mon Sep 8 02:38:16 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 C4AD516A4BF for ; Mon, 8 Sep 2003 02:38:16 -0700 (PDT) Received: from spider.deepcore.dk (cpe.atm2-0-56339.0x50c6aa0a.abnxx2.customer.tele.dk [80.198.170.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E373C43F3F for ; Mon, 8 Sep 2003 02:38:14 -0700 (PDT) (envelope-from sos@spider.deepcore.dk) Received: from spider.deepcore.dk (localhost [127.0.0.1]) by spider.deepcore.dk (8.12.9/8.12.9) with ESMTP id h889c7Io043166; Mon, 8 Sep 2003 11:38:07 +0200 (CEST) (envelope-from sos@spider.deepcore.dk) Received: (from sos@localhost) by spider.deepcore.dk (8.12.9/8.12.9/Submit) id h889c7UZ043165; Mon, 8 Sep 2003 11:38:07 +0200 (CEST) From: Soren Schmidt Message-Id: <200309080938.h889c7UZ043165@spider.deepcore.dk> In-Reply-To: <200309080725.h887Ppd1042030@spider.deepcore.dk> To: Soren Schmidt Date: Mon, 8 Sep 2003 11:38:06 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL99f (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1 X-mail-scanned: by DeepCore Virus & Spam killer v1.3 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:38:16 -0000 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)); -Søren