Skip to contentSkip to conversation

2.5.18 ide-scsi compile fix

PATCH In review Gert Vervoort 4 participants 7 messages May 25, 2002 – May 27, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5.18 ide-scsi compile fix

ide-scsi.c renamed from ide-scsi.c.1 +1 -1
@@ -804,7 +804,7 @@
 };
 
 
-static int __init idescsi_init(void)
+int __init idescsi_init(void)
 {
 	int ret;
 	ret = ata_driver_module(&idescsi_driver);
#1 lore raw

ide-scsi.c line 810

Quoted 11 lines · On Sat, 25 May 2002 14:48:21 +0200 Gert Vervoort <[email protected]> wrote:
ide-scsi.c renamed from ide-scsi.c.1 +1 -1
@@ -804,7 +804,7 @@
 };
 
 
-static int __init idescsi_init(void)
+int __init idescsi_init(void)
 {
 	int ret;
 	ret = ata_driver_module(&idescsi_driver);

Well... this is a _compile_ fix... ;)
But when you boot a kernel with this patch... it hangs directly after SCSI subsystem driver Revision: X.YZ

Bye

#2 lore raw
In reply to Gert Vervoort

ide-scsi.c Sat May 25 14:21:37 2002 line 810

Quoted 11 lines
ide-scsi.c Sat May 25 14:21:37 2002 renamed from ide-scsi.c.1 Sat May 25 14:21:28 2002 +1 -1
@@ -804,7 +804,7 @@
 };
 
 
-static int __init idescsi_init(void)
+int __init idescsi_init(void)
 {
        int ret;
        ret = ata_driver_module(&idescsi_driver);

This does not boot, as idescsi_init seems is also called by the scsi subsystem. The following patch actually boots on my system:

ide.c Sat May 25 16:23:22 2002 renamed from ide.c.1 Sat May 25 16:22:54 2002 +1 -3
@@ -3444,9 +3444,7 @@
        idefloppy_init();
 #endif
 #ifdef CONFIG_BLK_DEV_IDESCSI
-# ifdef CONFIG_SCSI
-       idescsi_init();
-# else
+# ifndef CONFIG_SCSI
    #error ATA SCSI emulation selected but no SCSI-subsystem in kernel
 # endif
 #endif
#3 lore raw
Quoted 18 lines · On Sat, 25 May 2002 17:17:25 +0200 Gert Vervoort <[email protected]> wrote:

ide-scsi.c Sat May 25 14:21:37 2002 line 810

Quoted 11 lines
ide-scsi.c Sat May 25 14:21:37 2002 renamed from ide-scsi.c.1 Sat May 25 14:21:28 2002 +1 -1
@@ -804,7 +804,7 @@
 };
 
 
-static int __init idescsi_init(void)
+int __init idescsi_init(void)
 {
        int ret;
        ret = ata_driver_module(&idescsi_driver);

This does not boot, as idescsi_init seems is also called by the scsi subsystem. The following patch actually boots on my system:

ide.c Sat May 25 16:23:22 2002 line 3450

Quoted 10 lines
ide.c Sat May 25 16:23:22 2002 renamed from ide.c.1 Sat May 25 16:22:54 2002 +1 -3
@@ -3444,9 +3444,7 @@
        idefloppy_init();
 #endif
 #ifdef CONFIG_BLK_DEV_IDESCSI
-# ifdef CONFIG_SCSI
-       idescsi_init();
-# else
+# ifndef CONFIG_SCSI
    #error ATA SCSI emulation selected but no SCSI-subsystem in kernel
 # endif
 #endif

This patch does not work too....
Only one ide-scsi device will get detected

BTW: why do I get an oops (reported 2 or 3 times but no answers) when mounting cdroms since 2.5.7 or something?

cat /proc/cmdline
BOOT_IMAGE=2.5.18 rw root=301 hdc=scsi hdd=scsi

[...]
ATA/ATAPI device driver v7.0.0
ATA: PCI bus speed 33.3MHz
ATA: Intel Corp. 82371AB PIIX4 IDE, PCI slot 00:07.1
ATA: chipset rev.: 1
ATA: non-legacy mode: IRQ probe delayed
PIIX: Intel Corp. 82371AB PIIX4 IDE UDMA33 controller on pci00:07.1

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA

hda: IBM-DTTA-351010, ATA DISK drive
hdb: WDC WD800BB-00BSA0, ATA DISK drive
hdc: CD-W512EB, ATAPI CD/DVD-ROM drive
hdd: CD-532E-B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
[...]
SCSI subsystem driver Revision: 1.00
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
Vendor: TEAC Model: CD-W512EB Rev: 2.0E
Type: CD-ROM ANSI SCSI revision: 02
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray Uniform CD-ROM driver Revision: 3.12

#4 lore raw
In reply to Gert Vervoort
Quoted 4 lines · Sebastian Droege

Well... this is a _compile_ fix... ;)
But when you boot a kernel with this patch... it hangs directly after SCSI subsystem driver Revision: X.YZ

Yes indeed, I should have tested it first 8-(.

New patch sended to the list, this one actually boots:

[gert@viper gert]$ uname -a
Linux viper 2.5.18 #4 Sat May 25 16:14:17 CEST 2002 i686 unknown [gert@viper gert]$ cdrecord -scanbus
Cdrecord 1.11a23 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling Linux sg driver version: 3.5.25
Using libscg version 'schily-0.6'
scsibus0:

	0,0,0	  0) 'PHILIPS ' 'PCA460RW        ' '1.0g' Removable CD-ROM
	0,1,0	  1) *
	0,2,0	  2) *
	0,3,0	  3) *
	0,4,0	  4) *
	0,5,0	  5) *
	0,6,0	  6) *
	0,7,0	  7) *

[gert@viper gert]$

#5 lore raw
In reply to Gert Vervoort
Quoted 3 lines · Sebastian Droege

BTW: why do I get an oops (reported 2 or 3 times but no answers) when mounting cdroms since 2.5.7 or something?

Because the ide-scsi code hasn't caught up to Martin's IDE cleanup changes yet.

Signature · 1 line
Skip
#6 lore raw
In reply to Gert Vervoort

Uz.ytkownik Skip Ford napisa?:

Quoted 8 lines
Quoted 2 lines · Sebastian Droege

BTW: why do I get an oops (reported 2 or 3 times but no answers) when mounting cdroms since 2.5.7 or something?

Because the ide-scsi code hasn't caught up to Martin's IDE cleanup changes yet.

That's not the case. The problem is simply the SCSI part of the game, (80% of certainlity) which seems to don't deal properly with hot pluggable drives right now.