From: "J.E.J. Bottomley" <James.Bottomley@steeleye.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "J.E.J. Bottomley" <James.Bottomley@SteelEye.com>,
Linus Torvalds <torvalds@transmeta.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: BOGUS: megaraid changes
Date: Sun, 10 Nov 2002 11:32:47 -0500 [thread overview]
Message-ID: <200211101632.gAAGWln11508@localhost.localdomain> (raw)
In-Reply-To: Message from Alan Cox <alan@lxorguk.ukuu.org.uk> of "10 Nov 2002 16:47:48 GMT." <1036946868.1009.16.camel@irongate.swansea.linux.org.uk>
alan@lxorguk.ukuu.org.uk said:
> I dont think panic() is needed bug a loud printk and maybe an error
> return from scsi_register() would do the trick. We do however have a
> couple of drivers where "pray, the firmware does all the work" is the
> right answer, but they really should be setting their own handler that
> delays rather than aborting/resetting/kicking offline
How about this? It doesn't panic, just refuses to attach the driver (although
this will still eventually cause a panic if your root fs is on it).
James
===== hosts.c 1.23 vs edited =====
--- 1.23/drivers/scsi/hosts.c Tue Nov 5 11:18:22 2002
+++ edited/hosts.c Sun Nov 10 10:17:32 2002
@@ -51,6 +51,22 @@
static int scsi_host_next_hn; /* host_no for next new host */
static int scsi_hosts_registered; /* cnt of registered scsi hosts */
+static int scsi_ignore_no_error_handling = 0;
+
+#ifdef MODULE
+MODULE_PARM(scsi_ignore_no_error_handling, "i");
+#else
+static int __init
+scsi_ignore_no_error_handling_setup(char *str)
+{
+ scsi_ignore_no_error_handling = 1;
+
+ return 1;
+}
+
+__setup("scsi_ignore_no_error_handling=", scsi_ignore_no_error_handling_setup)
;
+#endif
+
/**
* scsi_tp_for_each_host - call function for each scsi host off a template
@@ -345,6 +361,25 @@
int gfp_mask;
DECLARE_MUTEX_LOCKED(sem);
+ /*
+ * Determine host number. Check reserved first before allocating
+ * new one
+ */
+ hname = (shost_tp->proc_name) ? shost_tp->proc_name : "";
+ hname_len = strlen(hname);
+
+ /* Check to see if this host has any error handling facilities */
+ if(shost_tp->eh_strategy_handler == NULL &&
+ shost_tp->eh_abort_handler == NULL &&
+ shost_tp->eh_device_reset_handler == NULL &&
+ shost_tp->eh_bus_reset_handler == NULL &&
+ shost_tp->eh_host_reset_handler == NULL) {
+ printk(KERN_ERR "ERROR: SCSI host `%s' has no error
handling\nERROR: This is not a safe way to run your SCSI host\nERROR: The
error handling must be added to this driver\n", hname);
+ if(!scsi_ignore_no_error_handling) {
+ printk(KERN_ERR "ERROR: not attaching this
host.\n\nERROR: to force attachment, boot with the
scsi_ignore_no_error_handling flag");
+ return NULL;
+ }
+ }
gfp_mask = GFP_KERNEL;
if (shost_tp->unchecked_isa_dma && xtr_bytes)
gfp_mask |= __GFP_DMA;
@@ -356,13 +391,6 @@
}
memset(shost, 0, sizeof(struct Scsi_Host) + xtr_bytes);
-
- /*
- * Determine host number. Check reserved first before allocating
- * new one
- */
- hname = (shost_tp->proc_name) ? shost_tp->proc_name : "";
- hname_len = strlen(hname);
if (hname_len)
list_for_each(lh, &scsi_host_hn_list) {
next prev parent reply other threads:[~2002-11-10 16:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-10 14:53 J.E.J. Bottomley
2002-11-10 16:47 ` Alan Cox
2002-11-10 16:32 ` J.E.J. Bottomley [this message]
2002-11-10 17:08 ` Alan Cox
2002-11-10 18:43 ` Linus Torvalds
2002-11-10 19:04 ` J.E.J. Bottomley
2002-11-10 19:11 ` Linus Torvalds
2002-11-10 19:18 ` J.E.J. Bottomley
2002-11-10 19:37 ` Sam Ravnborg
2002-11-10 20:11 ` Alan Cox
[not found] ` <1037052584.12335.6.camel@dell_ss3.pdx.osdl.net>
[not found] ` <1037055810.4648.68.camel@irongate.swansea.linux.org.uk>
2002-11-12 22:44 ` Megaraid SCSI problems Stephen Hemminger
[not found] <200211070603.gA763cX03676@hera.kernel.org>
2002-11-10 14:47 ` BOGUS: megaraid changes Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2002-11-10 14:46 Matt_Domsch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200211101632.gAAGWln11508@localhost.localdomain \
--to=james.bottomley@steeleye.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome