Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2009 18:45:49 +0900
From:      Weongyo Jeong <weongyo.jeong@gmail.com>
To:        Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: Apple ATA DMA problems with ATAPI
Message-ID:  <20090323094549.GB3713@weongyo.cdnetworks.kr>
In-Reply-To: <alpine.BSF.2.00.0903221941130.18715@banshee.munuc.org>
References:  <20090322180638.GA3708@narn.knownspace> <8B9483E9-D6D4-441E-9202-31FA34F5DA98@mac.com> <20090322215406.GA1257@narn.knownspace> <alpine.BSF.2.00.0903221941130.18715@banshee.munuc.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 22, 2009 at 07:43:44PM -0500, Nathan Whitehorn wrote:
> 
> On Sun, 22 Mar 2009, Justin Hibbits wrote:
> 
> >On Sun, Mar 22, 2009 at 01:41:18PM -0700, Marcel Moolenaar wrote:
> >>
> >>On Mar 22, 2009, at 11:06 AM, Justin Hibbits wrote:
> >>
> >>>Well, it seems I was bitten by the ATA DMA problems from a few
> >>>months back.
> >>
> >>Try disabling DMA for atapi in /boot/loader.conf and enable
> >>it in /etc/sysctl.conf. For some reason, on my Mac Mini at
> >>least, it helps to first program PIO and then program *DMA.
> >>
> >>YMMV,
> >>
> >
> >It appears hw.ata.atapi_dma is a read-only tunable, so /etc/sysctl.conf 
> >has no
> >effect on it, and only throws a warning about being unable to change it.  
> >It's
> >working sufficiently as PIO, though.
> >
> 
> So it looks like this issue is limited to ATAPI devices, and as a result I
> have one more stab in the dark. Apparently at least some of these 
> controllers die if you try to give them an ATAPI command with a length 
> that is not divisible by 16. I have a patch at 
> http://people.freebsd.org/~nwhitehorn/ata-alignment.diff that converts 
> such commands to PIO. Could you see if it works?
> 
> If this fails, I'll apply a sledgehammer and force all ATAPI devices on 
> Apple controllers to PIO.

FWIW I applied your patch then tried to rebuild kernel but it still
encountered a panic in my iBook G4 without hw.ata.atapi_dma=0 during
booting.  My bug was:

	http://lists.freebsd.org/pipermail/freebsd-ppc/2009-February/003539.html

regards,
Weongyo Jeong




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090323094549.GB3713>