Christopher SEKIYA | 1 Oct 2003 08:25

Re: Snapshot 20030927 available

Hello,

On Tue, Sep 30, 2003 at 11:20:33PM +0900, Izumi Tsutsui wrote:

> It seems (ahc->flags & AHC_USEDEFAULTS) is true at ahc_pci.c:1035
> with your O2 on-board aic7xxx, right?

You are absolutely right -- AHC_USEDEFAULTS is indeed set at that point.

And, as you point out:

> On the other hand, there is the following comment:
> > /* Remember how the card was setup in case there is no SEEPROM */
> at line 914 in ahc_pci.c, but the next line is:
> >	if ((ahc_inb(ahc, HCNTRL) & POWRDN) == 0) {
> so it does not see ahc->flags to check SEEPROM. Is this really OK?

I didn't notice that.  Not only is it not checking ahc->flags, but it's
doing this _before_ it probes for the SEEPROM.

(I hadn't considered whether ahc_pci was behaving incorrectly.  Thank you
very much for correcting my mistaken logic)

If we add a check for ahc->flags to that bit, and move it after the SEEPROM
probe, it works perfectly on the O2.

What do you think about the attached diff?

-- Chris
	GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5  938E 023E EEFB FEB9 DE7F)
(Continue reading)

Izumi Tsutsui | 1 Oct 2003 17:29
Picon
Gravatar

Re: Snapshot 20030927 available

In article <20031001062501.GB28311 <at> rezrov.net>
wileyc <at> rezrov.net wrote:

> > On the other hand, there is the following comment:
> > > /* Remember how the card was setup in case there is no SEEPROM */
> > at line 914 in ahc_pci.c, but the next line is:
> > >	if ((ahc_inb(ahc, HCNTRL) & POWRDN) == 0) {
> > so it does not see ahc->flags to check SEEPROM. Is this really OK?
> 
> I didn't notice that.  Not only is it not checking ahc->flags, but it's
> doing this _before_ it probes for the SEEPROM.

Umm, I didn't notice it... Then, since the comment says _remember_
so it might be intentional to check status before probing SEEPROM.

Anyway, we should ask ahc maintainers (fvdl, gibbs, or bouyer?)
what these code (POWRDN bit etc.) are trying there.
---
Izumi Tsutsui
tsutsui <at> ceres.dti.ne.jp


Gmane