lkml.org 
[lkml]   [1996]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectAMD53c794 initialisation (fwd)
Date
From
I didn't seem to get any response from the linux-scsi folks on this.  Anybody
here got any thoughts, similar experiences, paranormal explanations, ... ?

------- Forwarded Message

X-Mailer: exmh version 1.6.8 8/21/96
To: linux-scsi@vger.rutgers.edu
cc: fri@rsx42sun0.dofn.de, Xavier Neyt <Xavier.Neyt@elec.rma.ac.be>
Subject: AM53c974 initialisation
Mime-Version: 1.0
Content-Type: text/plain
Date: Sun, 15 Sep 1996 19:50:26 +0100
From: Philip Blundell <phil@ermintrude.disaster.area>

I just fitted my AMD SCSI card back into this machine, having been without it
for a week or so. When I boot the kernel, I've been getting NULL
dereferences in build_proc_dir_entries (scsi_proc.c).

Having peered at the code a bit, it looks as if this is because the AMD driver
doesn't provide a proc_scsi entry in its host template. I'm slightly baffled
as to how it ever worked at all, though.

This short patch adds the missing element, which seems to fix the problem.

phil
- --
- --- clean-linux/linux/drivers/scsi/AM53C974.c Mon May 13 23:56:40 1996
+++ linux/drivers/scsi/AM53C974.c Sun Sep 15 19:07:13 1996
@@ -156,6 +156,11 @@
static int commandline_current = 0;
override_t overrides[7] = { {-1, 0, 0, 0}, }; /* LILO overrides */

+struct proc_dir_entry proc_scsi_am53c974 = {
+ PROC_SCSI_AM53C974, 8, "am53c974",
+ S_IFDIR | S_IRUGO | S_IXUGO, 2
+};
+
#ifdef AM53C974_DEBUG
static int deb_stop = 1;

@@ -564,6 +569,8 @@
{
int count; /* number of boards detected */

+tpnt->proc_dir = &proc_scsi_am53c974;
+
#if defined (CONFIG_PCI)
if (pcibios_present())
count = AM53C974_bios_detect(tpnt);
- --- clean-linux/linux/drivers/scsi/AM53C974.h Tue May 14 00:04:46 1996
+++ linux/drivers/scsi/AM53C974.h Sun Sep 15 19:12:42 1996
@@ -258,10 +264,12 @@
unsigned char max_offset[8]; /* max. sync. offset (setup), only
valid if corresponding sync_en is nonzero */
};

+extern struct proc_dir_entry proc_scsi_am53c974;
+
#define AM53C974 { \
NULL, /* pointer to next in list */ \
NULL, /* long * usage_count */ \
- - NULL, /* struct proc_dir_entry *proc_dir
*/ \
+ &proc_scsi_am53c974, /* struct proc_dir_entry *proc_dir
*/ \
NULL, /* int (*proc_info)(char *, char **, off_t,
int, int, int); */ \
"AM53C974", /* name */ \
AM53C974_detect, /* int (* detect)(struct SHT *) */ \




------- End of Forwarded Message



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.055 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site