linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: linux-scsi@vger.kernel.org
Cc: andmike@us.ibm.com
Subject: [PATCH] scsi_debug lk 2.6.0t6
Date: Tue, 07 Oct 2003 21:00:31 +1000	[thread overview]
Message-ID: <3F829CCF.3020104@torque.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

This small patch adds a "release" method to the "pseudo_0"
device to stop the noise when the scsi_debug module is
loaded.

Another annoyance that I was unable to get to the bottom
of was during "rmmod scsi_debug" **:
   Synchronizing SCSI cache for disk sda: <4>FAILED
     status = 0, message = 00, host = 1, driver = 00
That is a DID_NO_CONNECT error. So the LLD host is
being shut down before the sd driver gets a chance to
send through a SYNCHRONIZE CACHE command. If the user
instigates a rmmod (as distinct from the hardware
saying the host/device is gone), shouldn't a window
be left open for such a flushing type command. This
problem seems to have appeared recently.


** "echo -1 > add_host" in scsi_debug's driver directory
    (i.e. remove a host) also causes the same error so the
    problem is not perculiar to rmmod.

Doug Gilbert

[-- Attachment #2: scsi_debug260t6.diff --]
[-- Type: text/plain, Size: 1100 bytes --]

--- linux/drivers/scsi/scsi_debug.c	2003-09-28 14:25:06.000000000 +1000
+++ linux/drivers/scsi/scsi_debug.c260t6dpg	2003-10-07 17:04:51.000000000 +1000
@@ -55,7 +55,7 @@
 #include "scsi_logging.h"
 #include "scsi_debug.h"
 
-static const char * scsi_debug_version_str = "Version: 1.70 (20030507)";
+static const char * scsi_debug_version_str = "Version: 1.71 (20031007)";
 
 /* Additional Sense Code (ASC) used */
 #define NO_ADDED_SENSE 0x0
@@ -1541,7 +1541,7 @@
         }
 
 	if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) {
-		printk(KERN_INFO "scsi_debug: ... built %d host(s)\n",
+		printk(KERN_INFO "scsi_debug_init: built %d host(s)\n",
 		       scsi_debug_add_host);
 	}
 	return 0;
@@ -1565,8 +1565,15 @@
 device_initcall(scsi_debug_init);
 module_exit(scsi_debug_exit);
 
+void pseudo_0_release(struct device * dev)
+{
+	if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)
+		printk(KERN_INFO "scsi_debug: pseudo_0_release() called\n");
+}
+
 static struct device pseudo_primary = {
 	.bus_id		= "pseudo_0",
+	.release	= pseudo_0_release,
 };
 
 static int pseudo_lld_bus_match(struct device *dev, 

             reply	other threads:[~2003-10-07 11:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-07 11:00 Douglas Gilbert [this message]
2003-10-08 12:57 ` [PATCH] scsi_debug lk 2.6.0t6 Douglas Gilbert
2003-10-09  0:35 ` Mike Anderson

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=3F829CCF.3020104@torque.net \
    --to=dougg@torque.net \
    --cc=andmike@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).