Re: ATAng and CF cards

From: Andrew Thompson <andy_at_fud.org.nz>
Date: Mon, 08 Sep 2003 21:53:09 +1200
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
> _at__at_ -772,7 +772,10 _at__at_
>      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
Received on Mon Sep 08 2003 - 00:50:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:21 UTC