Linus and others,

Patch attached that should fix some of the problems with the new
scsi scanning:

        devfs registration should be ok now with both builtin and module.
        link order changed to reflect hosts.c + minor additions.
        minor cleanups.

First of all, please don't yell too loud about the Makefile changes. I 
really stink at this, but it seems to work for me. Tested different
configs, with different hosts. Layers get linked: core - hosts - upper
I'm sure the Makefile stuff can be done a lot better, so someone
please do if my attempt is crap. I had to link scsi_syms separately
in order not to get unresolved symbols with modules. 

Also, those of you that have special needs with regards to host order
initialization, please let us know. Please specify which driver 
runs what controller.

Thanks

-- 
Torben Mathiasen <[EMAIL PROTECTED]>
Linux ThunderLAN maintainer 
http://tlan.kernel.dk
diff -ur --exclude-from=/root/torben linux-2.4.0-test9p4/drivers/scsi/Makefile 
linux/drivers/scsi/Makefile
--- linux-2.4.0-test9p4/drivers/scsi/Makefile   Wed Sep 20 16:52:35 2000
+++ linux/drivers/scsi/Makefile Wed Sep 20 17:12:36 2000
@@ -4,6 +4,8 @@
 # 30 May 2000, Christoph Hellwig <[EMAIL PROTECTED]>
 # Rewritten to use lists instead of if-statements.
 #
+# 20 Sep 2000, Torben Mathiasen <[EMAIL PROTECTED]>
+# Changed link order to reflect new scsi initialization.
 
 O_TARGET := scsidrv.o
 
@@ -22,25 +24,14 @@
 endif
 
 export-objs    := scsi_syms.o
-list-multi     := scsi_mod.o sr_mod.o initio.o a100u2w.o
+list-multi     := scsi_mod.o initio.o a100u2w.o
 
 CFLAGS_aha152x.o =   -DAHA152X_STAT -DAUTOCONF
 CFLAGS_gdth.o    = # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS
 CFLAGS_seagate.o =   -DARBITRATE -DPARITY -DSEAGATE_USE_ASM
 
-obj-$(CONFIG_SCSI)             += scsi_mod.o
-obj-$(CONFIG_CHR_DEV_ST)       += st.o
-obj-$(CONFIG_BLK_DEV_SD)       += sd_mod.o
-obj-$(CONFIG_BLK_DEV_SR)       += sr_mod.o
-obj-$(CONFIG_CHR_DEV_SG)       += sg.o
+obj-$(CONFIG_SCSI)             += scsi_mod.o   scsi_syms.o
 
-obj-$(CONFIG_SCSI_ADVANSYS)    += advansys.o
-obj-$(CONFIG_SCSI_PCI2000)     += pci2000.o
-obj-$(CONFIG_SCSI_PCI2220I)    += pci2220i.o
-obj-$(CONFIG_SCSI_PSI240I)     += psi240i.o
-obj-$(CONFIG_MVME16x_SCSI)     += mvme16x.o    53c7xx.o
-obj-$(CONFIG_BVME6000_SCSI)    += bvme6000.o   53c7xx.o
-obj-$(CONFIG_SCSI_SIM710)      += sim710.o
 obj-$(CONFIG_A4000T_SCSI)      += amiga7xx.o   53c7xx.o
 obj-$(CONFIG_A4091_SCSI)       += amiga7xx.o   53c7xx.o
 obj-$(CONFIG_BLZ603EPLUS_SCSI) += amiga7xx.o   53c7xx.o
@@ -48,8 +39,6 @@
 obj-$(CONFIG_A3000_SCSI)       += a3000.o      wd33c93.o
 obj-$(CONFIG_A2091_SCSI)       += a2091.o      wd33c93.o
 obj-$(CONFIG_GVP11_SCSI)       += gvp11.o      wd33c93.o
-obj-$(CONFIG_SCSI_SGIWD93)     += sgiwd93.o    wd33c93.o
-obj-$(CONFIG_SCSI_MCA_53C9X)   += NCR53C9x.o   mca_53c9x.o
 obj-$(CONFIG_CYBERSTORM_SCSI)  += NCR53C9x.o   cyberstorm.o
 obj-$(CONFIG_CYBERSTORMII_SCSI)        += NCR53C9x.o   cyberstormII.o
 obj-$(CONFIG_BLZ2060_SCSI)     += NCR53C9x.o   blz2060.o
@@ -58,69 +47,82 @@
 obj-$(CONFIG_OKTAGON_SCSI)     += NCR53C9x.o   oktagon_esp.o   oktagon_io.o
 obj-$(CONFIG_ATARI_SCSI)       += atari_scsi.o
 obj-$(CONFIG_MAC_SCSI)         += mac_scsi.o
-obj-$(CONFIG_SUN3_SCSI)                += sun3_scsi.o
 obj-$(CONFIG_SCSI_MAC_ESP)     += mac_esp.o    NCR53C9x.o
-obj-$(CONFIG_SCSI_PPA)         += ppa.o
-obj-$(CONFIG_SCSI_IMM)         += imm.o
-obj-$(CONFIG_SCSI_QLOGIC_FAS)  += qlogicfas.o
-obj-$(CONFIG_SCSI_QLOGIC_ISP)  += qlogicisp.o 
-obj-$(CONFIG_SCSI_QLOGIC_1280) += qla1280.o 
-obj-$(CONFIG_SCSI_ACARD)       += atp870u.o
-obj-$(CONFIG_SCSI_INITIO)      += initio.o
-obj-$(CONFIG_SCSI_INIA100)     += a100u2w.o
-obj-$(CONFIG_SCSI_QLOGIC_FC)   += qlogicfc.o 
+obj-$(CONFIG_SUN3_SCSI)                += sun3_scsi.o
+obj-$(CONFIG_MVME16x_SCSI)     += mvme16x.o    53c7xx.o
+obj-$(CONFIG_BVME6000_SCSI)    += bvme6000.o   53c7xx.o
+obj-$(CONFIG_SCSI_SIM710)      += sim710.o
+obj-$(CONFIG_SCSI_ADVANSYS)    += advansys.o
+obj-$(CONFIG_SCSI_PCI2000)     += pci2000.o
+obj-$(CONFIG_SCSI_PCI2220I)    += pci2220i.o
+obj-$(CONFIG_SCSI_PSI240I)     += psi240i.o
+obj-$(CONFIG_SCSI_BUSLOGIC)    += BusLogic.o
+obj-$(CONFIG_SCSI_U14_34F)     += u14-34f.o
+obj-$(CONFIG_SCSI_ULTRASTOR)   += ultrastor.o
 obj-$(CONFIG_SCSI_AHA152X)     += aha152x.o
 obj-$(CONFIG_SCSI_AHA1542)     += aha1542.o
 obj-$(CONFIG_SCSI_AHA1740)     += aha1740.o
 obj-$(CONFIG_SCSI_AIC7XXX)     += aic7xxx.o
 obj-$(CONFIG_SCSI_IPS)         += ips.o
-obj-$(CONFIG_SCSI_DC390T)      += tmscsim.o
-obj-$(CONFIG_SCSI_AM53C974)    += AM53C974.o
-obj-$(CONFIG_SCSI_BUSLOGIC)    += BusLogic.o
-obj-$(CONFIG_SCSI_EATA_DMA)    += eata_dma.o
-obj-$(CONFIG_SCSI_EATA_PIO)    += eata_pio.o
-obj-$(CONFIG_SCSI_U14_34F)     += u14-34f.o
-obj-$(CONFIG_SCSI_SUNESP)      += esp.o
-obj-$(CONFIG_SCSI_QLOGICPTI)   += qlogicpti.o
-obj-$(CONFIG_SCSI_MESH)                += mesh.o
-obj-$(CONFIG_SCSI_MAC53C94)    += mac53c94.o
-obj-$(CONFIG_SCSI_GDTH)                += gdth.o
-
-obj-$(CONFIG_SCSI_DEBUG)       += scsi_debug.o
-
+obj-$(CONFIG_SCSI_FD_MCS)      += fd_mcs.o
 obj-$(CONFIG_SCSI_FUTURE_DOMAIN)+= fdomain.o
 obj-$(CONFIG_SCSI_IN2000)      += in2000.o
 obj-$(CONFIG_SCSI_GENERIC_NCR5380) += g_NCR5380.o
-obj-$(CONFIG_SCSI_NCR53C7xx)   += 53c7,8xx.o 
-obj-$(CONFIG_SCSI_NCR53C8XX)   += ncr53c8xx.o 
-obj-$(CONFIG_SCSI_SYM53C8XX)   += sym53c8xx.o 
+obj-$(CONFIG_SCSI_NCR53C406A)  += NCR53c406a.o
+obj-$(CONFIG_SCSI_SYM53C416)   += sym53c416.o
+obj-$(CONFIG_SCSI_QLOGIC_FAS)  += qlogicfas.o
+obj-$(CONFIG_SCSI_QLOGIC_ISP)  += qlogicisp.o 
+obj-$(CONFIG_SCSI_QLOGIC_FC)   += qlogicfc.o 
+obj-$(CONFIG_SCSI_QLOGIC_1280) += qla1280.o 
 obj-$(CONFIG_SCSI_PAS16)       += pas16.o
 obj-$(CONFIG_SCSI_SEAGATE)     += seagate.o
 obj-$(CONFIG_SCSI_FD_8xx)      += seagate.o
-obj-$(CONFIG_SCSI_7000FASST)   += wd7000.o
-obj-$(CONFIG_SCSI_IBMMCA)      += ibmmca.o
-obj-$(CONFIG_SCSI_FD_MCS)      += fd_mcs.o
 obj-$(CONFIG_SCSI_T128)                += t128.o
 obj-$(CONFIG_SCSI_DMX3191D)    += dmx3191d.o
 obj-$(CONFIG_SCSI_DTC3280)     += dtc.o
-obj-$(CONFIG_SCSI_ULTRASTOR)   += ultrastor.o
-obj-$(CONFIG_SCSI_PLUTO)       += pluto.o
-obj-$(CONFIG_SCSI_FCAL)                += fcal.o
+obj-$(CONFIG_SCSI_NCR53C7xx)   += 53c7,8xx.o 
+obj-$(CONFIG_SCSI_SYM53C8XX)   += sym53c8xx.o 
+obj-$(CONFIG_SCSI_NCR53C8XX)   += ncr53c8xx.o 
+obj-$(CONFIG_SCSI_EATA_DMA)    += eata_dma.o
+obj-$(CONFIG_SCSI_EATA_PIO)    += eata_pio.o
+obj-$(CONFIG_SCSI_7000FASST)   += wd7000.o
+obj-$(CONFIG_SCSI_MCA_53C9X)   += NCR53C9x.o   mca_53c9x.o
+obj-$(CONFIG_SCSI_IBMMCA)      += ibmmca.o
 obj-$(CONFIG_SCSI_EATA)                += eata.o
-obj-$(CONFIG_SCSI_NCR53C406A)  += NCR53c406a.o
+obj-$(CONFIG_SCSI_DC390T)      += tmscsim.o
+obj-$(CONFIG_SCSI_AM53C974)    += AM53C974.o
 obj-$(CONFIG_SCSI_MEGARAID)    += megaraid.o
-obj-$(CONFIG_SCSI_SYM53C416)   += sym53c416.o
+obj-$(CONFIG_SCSI_ACARD)       += atp870u.o
+obj-$(CONFIG_SCSI_SUNESP)      += esp.o
+obj-$(CONFIG_SCSI_GDTH)                += gdth.o
+obj-$(CONFIG_SCSI_INITIO)      += initio.o
+obj-$(CONFIG_SCSI_INIA100)     += a100u2w.o
+obj-$(CONFIG_SCSI_QLOGICPTI)   += qlogicpti.o
 obj-$(CONFIG_BLK_DEV_IDESCSI)  += ide-scsi.o
-obj-$(CONFIG_JAZZ_ESP)         += NCR53C9x.o   jazz_esp.o
+obj-$(CONFIG_SCSI_MESH)                += mesh.o
+obj-$(CONFIG_SCSI_MAC53C94)    += mac53c94.o
+obj-$(CONFIG_SCSI_PLUTO)       += pluto.o
 obj-$(CONFIG_SCSI_DECNCR)      += NCR53C9x.o   dec_esp.o
-obj-$(CONFIG_SUN3X_ESP)                += NCR53C9x.o   sun3x_esp.o
 obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o
+obj-$(CONFIG_SCSI_PPA)         += ppa.o
+obj-$(CONFIG_SCSI_IMM)         += imm.o
+obj-$(CONFIG_JAZZ_ESP)         += NCR53C9x.o   jazz_esp.o
+obj-$(CONFIG_SUN3X_ESP)                += NCR53C9x.o   sun3x_esp.o
+obj-$(CONFIG_SCSI_DEBUG)       += scsi_debug.o
+obj-$(CONFIG_SCSI_FCAL)                += fcal.o
+
+obj-$(CONFIG_CHR_DEV_ST)       += st.o
+obj-$(CONFIG_BLK_DEV_SD)       += sd_mod.o
+obj-$(CONFIG_BLK_DEV_SR)       += sr_mod.o
+obj-$(CONFIG_CHR_DEV_SG)       += sg.o
+
+
 
 scsi_mod-objs  := scsi.o hosts.o scsi_ioctl.o constants.o \
                        scsicam.o scsi_proc.o scsi_error.o \
                        scsi_obsolete.o scsi_queue.o scsi_lib.o \
                        scsi_merge.o scsi_dma.o scsi_scan.o \
-                       scsi_syms.o
+                       
 sr_mod-objs    := sr.o sr_ioctl.o sr_vendor.o
 initio-objs    := ini9100u.o i91uscsi.o
 a100u2w-objs   := inia100.o i60uscsi.o
@@ -135,9 +137,6 @@
 # Files that are both resident and modular: remove from modular.
 obj-m          := $(filter-out $(obj-y), $(obj-m))
 int-m          := $(filter-out $(int-y), $(int-m))
-
-# Take multi-part drivers out of obj-y and put components in.
-obj-y          := $(filter-out $(list-multi), $(obj-y)) $(int-y)
 
 O_OBJS         := $(filter-out $(export-objs), $(obj-y))
 OX_OBJS                := $(filter     $(export-objs), $(obj-y))
diff -ur --exclude-from=/root/torben linux-2.4.0-test9p4/drivers/scsi/scsi.c 
linux/drivers/scsi/scsi.c
--- linux-2.4.0-test9p4/drivers/scsi/scsi.c     Wed Sep 20 16:52:39 2000
+++ linux/drivers/scsi/scsi.c   Wed Sep 20 16:58:10 2000
@@ -1888,9 +1888,6 @@
                        }
                }
 
-               printk("scsi : %d host%s.\n", next_scsi_host,
-                      (next_scsi_host == 1) ? "" : "s");
-
                /* The next step is to call scan_scsis here.  This generates the
                 * Scsi_Devices entries
                 */
diff -ur --exclude-from=/root/torben linux-2.4.0-test9p4/drivers/scsi/scsi_module.c 
linux/drivers/scsi/scsi_module.c
--- linux-2.4.0-test9p4/drivers/scsi/scsi_module.c      Wed Sep 20 16:52:39 2000
+++ linux/drivers/scsi/scsi_module.c    Wed Sep 20 16:58:10 2000
@@ -40,7 +40,7 @@
                return 0;
 
        scsi_unregister_module(MODULE_SCSI_HA, &driver_template);
-       return -1;
+       return -ENODEV;
 }
 
 static void __exit exit_this_scsi_driver(void)
diff -ur --exclude-from=/root/torben linux-2.4.0-test9p4/drivers/scsi/scsi_syms.c 
linux/drivers/scsi/scsi_syms.c
--- linux-2.4.0-test9p4/drivers/scsi/scsi_syms.c        Wed Sep 20 16:52:38 2000
+++ linux/drivers/scsi/scsi_syms.c      Wed Sep 20 16:58:10 2000
@@ -6,8 +6,6 @@
 #include <linux/config.h>
 #include <linux/module.h>
 
-#ifdef CONFIG_MODULES
-
 #include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/string.h>
@@ -93,4 +91,3 @@
 EXPORT_SYMBOL(scsi_devicelist);
 EXPORT_SYMBOL(scsi_device_types);
 
-#endif                         /* CONFIG_MODULES */

Reply via email to