Re: aic7xxx_host->host_no persists through ins/rmmod aic7xxx = not right.

Leonard N. Zubkoff (lnz@dandelion.com)
Mon, 1 Jun 1998 09:57:55 -0700


Date: Sun, 31 May 1998 17:27:16 +0100 (BST)
From: Tigran Aivazian <tigran@aivazian.demon.co.uk>

Dear Leonard,

I did not find e-mail for the maintainer of this specific SCSI module -
aic7xxx so I decided to mail you since you were mentioned in the
MAINTAINERS against SCSI Subsystem in general.

I am running 2.1.104pre1 and noticed an odd behaviour of aic7xxx module.

I compile sd_mod, scsi_mod and aic7xxx as modules and there is a line:

alias scsi_hostadapter aic7xxx

in /etc/modules.conf file. I have only one scsi device - ZIP drive and no
other SCSI adapters on this system. When I mount /dev/sda1 kmod correctly
autoloads sd_mod, scsi_mod and aic7xxx modules. Then I umount /dev/sda1
and rmmod aic7xxx. This removes it cleanly, i.e. /proc/ioports doesn't
oops (like it used to) and /proc/modules shows that everything is ok.

However, if I then insmod aic7xxx manually (with sd_mod and scsi_mod
already loaded from the previous time) the host number seems to be
incremented. The fragment shown below is after I repeated this procedure
twice (the only difference I see is that now it is scsi2 instead of scsi1,
whilst it should really be scsi0):

[snip]

For some reason I do not recall, the original author of the SCSI module code
decided that the host number needed to be incremented every time a driver was
loaded. I don't see a reason for this, at least in the case where driver
modules are removed in the reverse order that they were installed. I also
recall a proposal to keep track of where a driver module had been installed and
re-install at the same host number if possible. An interesting experiment
would be to remove the module test in:

if (max_scsi_hosts == next_scsi_host && !scsi_loadable_module_flag)
max_scsi_hosts--;

from hosts.c and see if the system operates properly.

Leonard

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu