Bug 23535

Summary: 4.x kernels seem to no longer support Adaptec 1542CP SCSI
Product: Base System Reporter: Ronald F. Guilmette <rfg>
Component: kernAssignee: Warner Losh <imp>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-RELEASE   
Hardware: Any   
OS: Any   

Description Ronald F. Guilmette 2000-12-14 00:30:01 UTC
	I had trouble getting past the first kernel boot during an attempt
	to install FreeBSD 4.1.1 on this virgin system.  After much swapping
	of components, I finally found that the problem was DEFINITELY due
	to some incompatibility between the FreeBSD 4.1.1 kernel and the old
	Adaptec 1542CP SCSI card.

	Ot appears that the kernel is executing some part of the card's on-
	board SCSI BIOS, and that it is doing so in the `vm86' mode.  It
	also appears however that the on-board SCSI bios really doesn't want
	to be constrained like that.  During the initial kernel boot, here
	is what I have been seeing:

	--------------------------------------------------------------------
	...
	atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
	atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
	atkbd: the current kbd controller command byte 0067
	atkbd: keyboard ID 0x41ab (2)
	kbdc: RESET_KBD return code:00fa
	kbdc: RESET_KBD status:00aa
	
	
	Fatal trap 1: privledged instruction fault while in vm86 mode
	instruction pointer     = 0xcc00:0x30d3
	stack pointer           = 0x0:0xff8
	frame pointer           = 0x0:0x0
	code segment            = base rx0, limit 0x0, type 0x0
	                        = DPL 0, pres 0, def32 0, gran 0
	processor eflags        = interrupt enabled, resume, vm86, IOPL = 0
	current process         = 0 (swapper)
	interrupt mask          = net tty bio cam
	trap number             = 1
	panic: privledged instruction fault
	Uptime: 0s
	Automatic reboot in 15 seconds - press a key on the console to abort
	
	--------------------------------------------------------------------

	All attempts to cure this problem, i.e. by swapping other components,
	failed until I swapped out the Adaptech 1542CP and replaced it with
	an Adaptech 2940AU.

	Note that I *was* able to get bast the initial kernel boot with no
	problems (using this same hardware configuration - including the
	AHA-1542CP) when I used an old FreeBSD 3.3 bootable install CD.  Thus,
	it is clear that this is a new problem that was introduced sometime
	between 3.3 and 4.1.1 and that it relates only to the AHA-1542CP card,
	and possibly also to other 154x Adaptec cards.

Fix: 

None known.  The only fix seems to be to go out and buy a new SCSI
	controller.  (Grrrr.)
How-To-Repeat: 
	Get yourself an AHA-1542CP, stick it into a system, and then try
	doing a from-scratch install using FreeBSD 4.1.1.  It should crash
	on you just like it did on me.  (Note:  The BIOS rev number on the
	particular 1524CP that I have seems to be version `A91E'.)
Comment 1 Brian Somers 2000-12-14 00:41:11 UTC
> >Number:         23535
> >Category:       kern
> >Synopsis:       4.x kernels seem to no longer support Adaptec 1542CP SCSI

This problem appeared in -stable last December when ``options 
PNPBIOS'' became the default.  It persisted for quite some time, but 
now seems to have disappeared.

If you're not in a position to install the 4.2 or greater, hard code 
a return at the start of pnp_identify() in sys/isa/pnp.c.  That 
worked for me.

-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !
Comment 2 Ronald F. Guilmette 2000-12-27 21:18:27 UTC
FreeBSD 4.2 fails in exactly the same way.

Thus, I am still waiting for an official fix.
Comment 3 jedgar 2001-01-05 12:05:56 UTC
On Wed, Dec 13, 2000 at 04:27:43PM -0800, Ronald F. Guilmette wrote:
> 
> >Number:         23535
> >Category:       kern
> >Synopsis:       4.x kernels seem to no longer support Adaptec 1542CP SCSI

Are you using PNP or setting the IRQ?

aha0 at port 0x130-0x133 irq 10 drq 6 on isa0
aha0: AHA-1542CP FW Rev. F.0 (ID=46) SCSI Host Adapter, SCSI ID 7, 16 CCBs
...
cd1 at aha0 bus 0 target 6 lun 0
cd1: <PHILIPS CDD2600 1.07> Removable CD-ROM SCSI-2 device 
cd1: 3.300MB/s transfers

Works great here.

-- 
Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org
--------------------------------------------------------
FreeBSD: The Power To Serve   -   http://www.FreeBSD.org
Comment 4 Warner Losh freebsd_committer freebsd_triage 2001-06-13 20:36:53 UTC
Responsible Changed
From-To: freebsd-bugs->imp

This worked the last time I tried it.  There are some people that have plug 
and play issues because the PnP stuff of the card sets the address/ DRQ, etc 
to conflicts.  I'll see if I can recreate the panic on my testbox. 

Warner
Comment 5 John C. Archambeau 2002-02-02 21:59:17 UTC
It appears that 4.x suffers from PnP bitrot.  The only work around I 
have found with this issue is to put the troublesome card into ISA 
legacy mode.  I also have had similar problems with a Cisco AIR-
ISA-342.  The card works great under an0 in ISA legacy mode 
when the resources are specified in the kernel and PnP is 
disabled.  The moment PnP is enabled, FreeBSD 4.x can not 
acquire the resources via PnP with the wireless NIC or with any of 
my three Adaptec 1542CP cards.

PnP works fine in other OSes so I know the cards are functioning.  
Until this issue is resolved, I strongly suggest that everyone just 
run everything in ISA legacy (non-PnP mode).  There's a better 
than average chance that your ISA PnP card will work fine in ISA 
legacy mode with the appropriate kernel configuration under 
FreeBSD 4.x.  Granted, I haven't checked the various PnP only 
sound cards.  We may have an issue with the Creative SB 16 PnP 
and other cards that only function to my knowledge in PnP mode.

My two test systems are an Abit BP6 with a pair of Celeron 553s 
and system with an Iwill P55TU.  This issue replicates itself under 
4.4 and 4.5 with a Cisco AIR ISA-342 and three different Adaptec 
1542CP cards.  The PnP bugs can be replicated without failure.
- -
John C. Archambeau
jca@lvcm.com
Comment 6 John Baldwin freebsd_committer freebsd_triage 2005-11-23 15:12:48 UTC
Are you able to test this hardware with 5.4 or 6.0?  Do you even have this=
=20
hardware available anymore?

=2D-=20
John Baldwin <jhb@FreeBSD.org> =A0<>< =A0http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org
Comment 7 Ronald F. Guilmette 2005-12-02 00:05:15 UTC
In message <200511231012.49436.jhb@freebsd.org>, you wrote:

>Are you able to test this hardware with 5.4 or 6.0?  Do you even have this=
>=20
>hardware available anymore?

I'm sorry, but no.

I got rid of the card when I realized that FreeBSD wasn't going to support
it anymore.
Comment 8 John Baldwin freebsd_committer freebsd_triage 2005-12-02 13:50:31 UTC
On Thursday 01 December 2005 07:05 pm, Ronald F. Guilmette wrote:
> In message <200511231012.49436.jhb@freebsd.org>, you wrote:
> >Are you able to test this hardware with 5.4 or 6.0?  Do you even have
> > this=3D =3D20
> >hardware available anymore?
>
> I'm sorry, but no.
>
> I got rid of the card when I realized that FreeBSD wasn't going to support
> it anymore.

It looks like bug doesn't have anything to do with an individual PnP card, =
but=20
with the PnP BIOS on that motherboard and the expectations of its real/vm86=
=20
mode entry point that the kernel is somehow not supplying.  Without access =
to=20
the motherboard in question (either directly or indirectly via another=20
tester) we don't really have a chance to fix this as it is probably specifi=
c=20
to this BIOS as many other BIOSen work with PNP just fine (though 5.x=20
introduced some sort of bug that breaks on some Intel mobo chipset such as=
=20
the 845 and 865 desktop chipsets).  Given that, I'm inclined to close this =
PR=20
for now.

=2D-=20
John Baldwin <jhb@FreeBSD.org> =A0<>< =A0http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org
Comment 9 John Baldwin freebsd_committer freebsd_triage 2005-12-02 13:50:36 UTC
State Changed
From-To: open->closed

The submitter no longer has the original motherboard whose BIOS took 
issue with FreeBSD's vm86 implementation, so there isn't a viable way 
to further investigate this or test any potential fixes.