Re: SMP and aic7xxx

Doug Ledford (dledford@dialnet.net)
Tue, 06 May 1997 00:21:55 -0500


--------
> Dan,
> Okay. If I compile 2.1.37x without SMP enabled, your driver works okay.
> I added save_flags() cli()/etc.. in aic7xxx_queue() and aic7xxx_isr()
> (from the beginning), etc. and did not break anything. It still works
> in non SMP mode.
>
> However, in SMP mode, the kernel simply stops working as soon as the
> first write occurs after the root file system is mounted. There is
> ---sometimes--- an Ooops with "unable to handle NULL pointer dereference
> at 0000", with some code that usually does not look like good code, but
> sometimes is real code. It is variable. It does not lie between any
> symbols that the kernel knows about.
>
>
> This is copied from the screen:
>
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
> current->tss.cr3 = 00101000, %cr3 = 00101000

This looks familiar, and I think I know where the SMP problem is coming from with the aic7xxx driver now (or at least I have a clue). Make the following modification to the driver and it will either confirm or deny my suspicion:

in the function aic7xxx_isr()
in the if (intstat & BRKADRINT) section of code
change the last printk to a panic instead.

If my suspicion is correct, the first time you write to the drive you won't get an oops anymore, but a panic instead (you may still get some other extraneous garbage if panic on an smp box doesn't stop all processors, but hopefully we can get the info I'm looking for).

Usually the oops you just posted is caused not by the driver in normal operation, but by the driver encountering the BRKADRINT and attempting to reset the bus after all scbs have already been completed. The purpose of the panic is to stop things before the oops so that the BRKADRINT condition is obvious.

-- 
*****************************************************************************
* Doug Ledford                      *   Unix, Novell, Dos, Windows 3.x,     *
* dledford@dialnet.net    873-DIAL  *     WfW, Windows 95 & NT Technician   *
*   PPP access $14.95/month         *****************************************
*   Springfield, MO and surrounding * Usenet news, e-mail and shell account.*
*   communities.  Sign-up online at * Web page creation and hosting, other  *
*   873-9000 V.34                   * services available, call for info.    *
*****************************************************************************