Bug 24398

Summary: Unit number is not set in ahc driver.
Product: Base System Reporter: iain <iain>
Component: kernAssignee: Justin T. Gibbs <gibbs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description iain 2001-01-17 03:50:00 UTC
The ahc->unit field is not being set in the softc structure. This effects
the test against AHC_TARGET_MODE since it uses that field. If it is not set
it is 0, and the test happens as if all the devices were ahc0.

I suspect it doesn't effect anything else (the field isn't used elsewhere).

Fix: Try this patch. It simply sets the unit number after allocating the 
ahc_softc structure.

How-To-Repeat: 
Use AHC_TARGET_MODE set to some value with bits other than bit 0 set. It
won't activate target mode on any units higher than 0.
Comment 1 dwmalone freebsd_committer freebsd_triage 2001-01-17 09:56:22 UTC
Responsible Changed
From-To: freebsd-bugs->gibbs

The ahc driver is Justin's.
Comment 2 Justin T. Gibbs freebsd_committer freebsd_triage 2001-02-24 20:07:56 UTC
State Changed
From-To: open->closed

Fixed in rev 1.39 of ahc_pci.c and rev 1.19 of ahc_eisa.c