Subject: Re: aic7899 support ?
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: current-users
Date: 05/11/2001 22:30:49
On Friday, May 11, 2001 at 20:40:48 (+0200), Frank van der Linden wrote:
> It's been working fine so far

On Fri, May 11, 2001 at 03:44:30PM -0400, Greg A. Woods wrote:
> Yes, so far, so good!
> 

OK, thanks. So here's the problem reported by Paul Hoffman
<phoffman@proper.com> (this is with plain 1.5):
>>  pci3 at pchb3 bus 2
>>  pci3: memory space enabled
>>  ahc1 at pci3 dev 5 function 0
>>  OptionMode = 3
>>  ahc1: interrupting at irq 5
>>  ahc1: aic7899 Wide Channel A, SCSI Id=7, 16/255 SCBs
>>  uvm_fault(0xc058b380, 0x1000, 0, 1) -> 1
>>  kernel: page fault trap, code=0
>>  Stopped in swapper at 0xc010be53:   movzwl    0x4(%ebx),%eax
>>  db>

0xc010be53 is in ahc_check_patch (../../../../dev/ic/aic7xxx.c:4452).
4447
4448            num_patches = sizeof(patches)/sizeof(struct patch);
4449            last_patch = &patches[num_patches];
4450            cur_patch = *start_patch;
4451
4452            while (cur_patch < last_patch && start_instr ==
cur_patch->begin) {
4453
4454                    if (cur_patch->patch_func(ahc) == 0) {
4455
4456                            /* Start rejecting code */

Note that this PCI bus doesn't have I/O space enabled, so I suggested him
to rebuild a boot floppy with 'options AHC_ALLOW_MEMIO' (otherwise it
would just fail to map registers).

I can't explain why this makes the kernel fail in ahc_check_patch()

If someone has idea ...

--
Manuel Bouyer <bouyer@antioche.eu.org>
--