Remove the last two uses of ahc->unit in the FreeBSD version of the driver.

ahc->unit is depricated and will be going away as soon as the Linux
driver catches up.  In the FreeBSD case, it is always initialized to 0
and this caused some strangeness in registering multiple ahc controllers
with CAM.

Noticed by:	Tor.Egge@fast.no
This commit is contained in:
Justin T. Gibbs 2000-09-20 04:46:15 +00:00
parent b1daa1b9db
commit dfd86f14c0
2 changed files with 6 additions and 4 deletions

View File

@ -146,7 +146,8 @@ ahc_attach(struct ahc_softc *ahc)
/*
* Construct our first channel SIM entry
*/
sim = cam_sim_alloc(ahc_action, ahc_poll, "ahc", ahc, ahc->unit,
sim = cam_sim_alloc(ahc_action, ahc_poll, "ahc", ahc,
device_get_unit(ahc->dev_softc),
1, AHC_SCB_MAX, devq);
if (sim == NULL) {
cam_simq_free(devq);
@ -178,7 +179,7 @@ ahc_attach(struct ahc_softc *ahc)
if (ahc->features & AHC_TWIN) {
sim2 = cam_sim_alloc(ahc_action, ahc_poll, "ahc",
ahc, ahc->unit, 1,
ahc, device_get_unit(ahc->dev_softc), 1,
AHC_SCB_MAX, devq);
if (sim2 == NULL) {

View File

@ -146,7 +146,8 @@ ahc_attach(struct ahc_softc *ahc)
/*
* Construct our first channel SIM entry
*/
sim = cam_sim_alloc(ahc_action, ahc_poll, "ahc", ahc, ahc->unit,
sim = cam_sim_alloc(ahc_action, ahc_poll, "ahc", ahc,
device_get_unit(ahc->dev_softc),
1, AHC_SCB_MAX, devq);
if (sim == NULL) {
cam_simq_free(devq);
@ -178,7 +179,7 @@ ahc_attach(struct ahc_softc *ahc)
if (ahc->features & AHC_TWIN) {
sim2 = cam_sim_alloc(ahc_action, ahc_poll, "ahc",
ahc, ahc->unit, 1,
ahc, device_get_unit(ahc->dev_softc), 1,
AHC_SCB_MAX, devq);
if (sim2 == NULL) {