Re: Severe(?) breakage in 2.1.98 NCR3C58xx Driver

Jeffrey Hundstad (jeffrey.hundstad@mankato.msus.edu)
Thu, 30 Apr 1998 10:17:25 -0500 (CDT)


On 29 Apr, Marc Bechler wrote:
> Phil.
>
> It's not a problem of your NCR SCSI Controller! I had the same problem a few days ago and it was discussed here some more days ago; but the solution is very simple:
>
> Modify the drivers/scsi/53c7,8xx.c file in the following way:
>
> Search for 'pcibios_strerror' (there is only one), replace 'pcibios_strerror(error)' with 'error' instead. Afterwards your compilation will work fine!
>
> marc
>
>
> --- old message ---
>
>
>
> Okay, it's funfact time;
>
> The Tekram DC390F is a PCI SCSI-UW Controller
> The Tekram DC390F uses the SymBios/NCR 3C5875 chipset
>
> We're using 2.1.98 here. Tekram DC390 and NCR3C58xx drivers both ready, as
> well as hacked AHA152x.
>
> make[1]: Leaving directory `/sda1/src/2.1x/linux/arch/i386/lib'
> ld -m elf_i386 -T /sda1/src/2.1x/linux/arch/i386/vmlinux.lds -e stext
> arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o
> init/version.o \
> arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o
> mm/mm.o fs/fs.o ipc/ipc.o \
> fs/filesystems.a \
> net/network.a \
> drivers/block/block.a drivers/char/char.a drivers/misc/misc.a
> drivers/net/net.a drivers/scsi/scsi.a drivers/cdrom/cdrom.a
> drivers/sound/sound.a drivers/pci/pci.a drivers/pnp/pnp.a \
> /sda1/src/2.1x/linux/arch/i386/lib/lib.a
> /sda1/src/2.1x/linux/lib/lib.a
> /sda1/src/2.1x/linux/arch/i386/lib/lib.a \
> -o vmlinux
> drivers/scsi/scsi.a(53c7,8xx.o): In function `ncr_pci_init':
> 53c7,8xx.o(.text.init+0x620): undefined reference to `pcibios_strerror'
> make: *** [vmlinux] Error 1
>
> Uhh.. HUH!? Now, I haven't had the opprotunity to work with the NCR
> drivers (yet), and already I'm getting scared. What exactly is going on
> here? Anybody? *whimper* I wanna use my new SCSI card! ;(
>
> -Phil R. Jaenke (kernel@nls.net / prj@nls.net)
> TheGuyInCharge(tm), Ketyra Designs - We get paid to break stuff :)
> Linux pkrea.ketyra.INT 2.0.33 #15 Sat Apr 18 00:40:21 EDT 1998 i586
> Linux eiterra.nls.net 2.0.33 #15 Fri Apr 17 00:22:13 EDT 1998 i586
> - Linus says for 'brave people only.' I say 'keep a backup.' - :)
>

This is a patch that I sent to Linux. It patches agains 2.1.99-3. It
should fix the error and the two warnings about if than else structure:

--- 53c7,8xx.c-ORIG Wed Apr 29 15:22:35 1998
+++ 53c7,8xx.c Wed Apr 29 15:32:51 1998
@@ -1441,9 +1441,9 @@
&command)) ||
(error = pcibios_read_config_byte (bus, device_fn, PCI_CLASS_REVISION,
&revision))) {
- printk ("scsi-ncr53c7,8xx : error %s not initializing due to error reading configuration space\n"
- " perhaps you specified an incorrect PCI bus, device, or function.\n"
- , pcibios_strerror(error));
+ printk ("scsi-ncr53c7,8xx : error %d not initializing due to error reading configuration space\n"
+ " perhaps you specified an incorrect PCI bus, device, or function.\n", error);
+
return -1;
}
io_port = pdev->base_address[0];
@@ -2206,7 +2206,7 @@
if (left < 0)
printk("scsi%d: loop detected in ncr reconnect list\n",
host->host_no);
- else if (ncr_search)
+ else if (ncr_search) {
if (found)
printk("scsi%d: scsi %ld in ncr issue array and reconnect lists\n",
host->host_no, c->pid);
@@ -2217,7 +2217,7 @@
/* If we're at the tail end of the issue queue, update that pointer too. */
found = 1;
}
-
+ }
/*
* Traverse the host running list until we find this command or discover
* we have too many elements, pointing linux_prev at the next field of the
@@ -6326,11 +6326,12 @@
}
}
}
- if (!(istat & (ISTAT_SIP|ISTAT_DIP)))
+ if (!(istat & (ISTAT_SIP|ISTAT_DIP))) {
if (stage == 0)
++stage;
else if (stage == 3)
break;
+ }
}
hostdata->state = STATE_HALTED;
restore_flags(flags);

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