[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#266239:



Joshua wrote:
>
> this bug is not discover1-data's - it already opts to load ncr53c8xx.
> But mkinitrd has:
>
>                                 s/^ncr53c8xx$/sym53c8xx/; t
>
> when parsing /proc/scsi, it assumes that ncr53c8xx devices will be
> handled by the new sym53c8xx driver. This seems to not be the case.
>
> I think that this substitution should be removed if it seems to have no
> ill effects?
>


The current 2.4.27 kernel package provides 3 (!!!) different
drivers for this kind of hardware:

   drivers/scsi/ncr53c8xx.o                the old ncr driver
   drivers/scsi/sym53c8xx.o                the old sym driver
   drivers/scsi/sym53c8xx_2/sym53c8xx_2.o  the new sym driver

But the current 2.6.8 kernel package includes just the new
sym53c8xx driver:

   drivers/scsi/sym53c8xx_2/sym53c8xx.ko   the new sym driver

Worst of all: It has been renamed! (The old ncr driver is still
in the kernel sources, but it is not built for the kernel
package.)

There are 2 special cases:
a) minor upgrade (i.e. 2.4.x --> 2.4.y, or 2.6.x --> 2.6.y)
	I would agree to Joshua's suggestion to kick the sed
	line out. mkinitrd should rely upon the SCSI driver it
	has found in the running kernel.

b) major upgrade (i.e. 2.4.x --> 2.6.y)
	For this case we need a new sed statement, replacing
	the 'ncr53c8xx' and 'sym53c8xx_2' by the new 'sym53c8xx'.

It seems that the 3rd case (major downgrade) is not supported
by mkinitrd,

Attached you can find a patch for initrd-tools 0.1.74. I know it
is an ugly patch, but it is still easy to extend. Maybe somebody
has another idea how to handle renamed modules?



Regards

Harri
--- /usr/sbin/mkinitrd	2004-08-29 01:34:50.000000000 +0200
+++ mkinitrd	2004-09-16 14:11:47.094188937 +0200
@@ -505,7 +505,6 @@
 				s/^isp1020$/qlogicisp/; t
 				s/^isp2x00$/qlogicfc/; t
 				s/^ncr53c7xx$/53c7,8xx/; t
-				s/^ncr53c8xx$/sym53c8xx/; t
 				s/^A2091$/a2091/; t
 				s/^A3000$/a3000/; t
 				s/^Amiga7xx$/amiga7xx/; t
@@ -536,7 +535,10 @@
 qla6312\
 qla6322/; t
 				s/^esp-oktagon$/octagon_esp/
-			' | tac
+			' | ( [ $oldkernel ] && ! [ $oldstyle ] && sed '
+				s/^ncr53c8xx$/sym53c8xx/; t
+				s/^sym53c8xx_2$/sym53c8xx/; t
+			' || cat ) | tac
 			echo sd_mod
 		;;
 	7[2-9])

Reply to: