From: Laurence Oberman <loberman@redhat.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH]: add debug flag parameter for SCSI tape driver
Date: Tue, 10 Jun 2014 19:48:33 -0400 (EDT) [thread overview]
Message-ID: <1374689615.17272341.1402444113231.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <101311718.17236924.1402433475036.JavaMail.zimbra@redhat.com>
Hello
Take 2 of this patch, changed module description and subject line.
This patch adds a debug_flag parameter that can be set on module load, and allows the DEBUG facility without a module recompile.
Usage: mpdprobe st debug_flag=1
Signed-off-by: Laurence Oberman <loberman@redhat.com>
diff -Nur a/st.c b/st.c
--- a/st.c 2014-06-10 16:45:18.522354105 -0400
+++ b/st.c 2014-06-10 19:40:39.774387990 -0400
@@ -80,6 +80,7 @@
static int try_direct_io = TRY_DIRECT_IO;
static int try_rdio = 1;
static int try_wdio = 1;
+static int debug_flag = 0;
static struct class st_sysfs_class;
static const struct attribute_group *st_dev_groups[];
@@ -100,6 +101,9 @@
MODULE_PARM_DESC(max_sg_segs, "Maximum number of scatter/gather segments to use (256)");
module_param_named(try_direct_io, try_direct_io, int, 0);
MODULE_PARM_DESC(try_direct_io, "Try direct I/O between user buffer and tape drive (1)");
+module_param_named(debug_flag, debug_flag, int, 0);
+MODULE_PARM_DESC(debug_flag, "Enable DEBUG, same as setting debugging=1");
+
/* Extra parameters for testing */
module_param_named(try_rdio, try_rdio, int, 0);
@@ -124,6 +128,9 @@
},
{
"try_direct_io", &try_direct_io
+ },
+ {
+ "debug_flag", &debug_flag
}
};
#endif
@@ -4277,7 +4284,9 @@
static int __init init_st(void)
{
int err;
-
+ debugging = (debug_flag > 0) ? debug_flag : DEBUG;
+ if (debugging)
+ printk(KERN_INFO "st: Debugging enabled debug_flag = %d\n",debugging);
validate_options();
printk(KERN_INFO "st: Version %s, fixed bufsize %d, s/g segs %d\n",
Thanks
Laurence
next prev parent reply other threads:[~2014-06-10 23:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2027096335.17236699.1402433423338.JavaMail.zimbra@redhat.com>
2014-06-10 20:51 ` Debug flag parameter for SCSI tape driver Laurence Oberman
2014-06-10 23:48 ` Laurence Oberman [this message]
2014-06-11 18:03 ` [PATCH]: add debug " "Kai Mäkisara (Kolumbus)"
2014-06-11 18:24 ` Laurence Oberman
2014-06-11 19:35 ` Dale R. Worley
2014-06-11 19:54 ` Laurence Oberman
2014-06-13 21:18 ` Debug " Dale R. Worley
2014-10-17 20:20 ` [PATCH]: add debug flag parameter for SCSI tape driver - 2nd request Laurence Oberman
2014-10-17 20:41 ` Laurence Oberman
2014-10-19 8:54 ` "Kai Mäkisara (Kolumbus)"
2014-10-19 13:44 ` Laurence Oberman
2014-10-19 19:37 ` "Kai Mäkisara (Kolumbus)"
2014-10-23 17:11 ` Christoph Hellwig
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=1374689615.17272341.1402444113231.JavaMail.zimbra@redhat.com \
--to=loberman@redhat.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).