From: brking@charter.net
To: Neela.Kolli@engenio.com
Cc: seokmann.ju@lsil.com, linux-scsi@vger.kernel.org, brking@charter.net
Subject: [patch 1/1] megaraid: Add support for change_queue_depth
Date: Wed, 05 Jul 2006 17:00:01 -0500 [thread overview]
Message-ID: <52v207$18p343h@mxip28a.cluster1.charter.net> (raw)
Adds support for change_queue_depth so that device
queue depth can be changed at runtime through sysfs.
Signed-off-by: <brking@charter.net>
---
diff -puN drivers/scsi/megaraid/megaraid_mbox.c~megaraid_change_queue_depth drivers/scsi/megaraid/megaraid_mbox.c
--- linux-2.6/drivers/scsi/megaraid/megaraid_mbox.c~megaraid_change_queue_depth 2006-07-05 14:00:04.000000000 -0500
+++ linux-2.6-brking/drivers/scsi/megaraid/megaraid_mbox.c 2006-07-05 16:53:36.000000000 -0500
@@ -330,6 +330,21 @@ static struct device_attribute *megaraid
NULL,
};
+/**
+ * megaraid_change_queue_depth - Change the device's queue depth
+ * @sdev: scsi device struct
+ * @qdepth: depth to set
+ *
+ * Return value:
+ * actual depth set
+ **/
+static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth)
+{
+ if (qdepth > MBOX_MAX_SCSI_CMDS)
+ qdepth = MBOX_MAX_SCSI_CMDS;
+ scsi_adjust_queue_depth(sdev, 0, qdepth);
+ return sdev->queue_depth;
+}
/*
* Scsi host template for megaraid unified driver
@@ -343,6 +358,7 @@ static struct scsi_host_template megarai
.eh_device_reset_handler = megaraid_reset_handler,
.eh_bus_reset_handler = megaraid_reset_handler,
.eh_host_reset_handler = megaraid_reset_handler,
+ .change_queue_depth = megaraid_change_queue_depth,
.use_clustering = ENABLE_CLUSTERING,
.sdev_attrs = megaraid_sdev_attrs,
.shost_attrs = megaraid_shost_attrs,
_
next reply other threads:[~2006-07-05 22:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-05 22:00 brking [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-06 12:16 [patch 1/1] megaraid: Add support for change_queue_depth Ju, Seokmann
2006-07-09 14:13 ` James Bottomley
2006-07-07 3:22 brking
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='52v207$18p343h@mxip28a.cluster1.charter.net' \
--to=brking@charter.net \
--cc=Neela.Kolli@engenio.com \
--cc=linux-scsi@vger.kernel.org \
--cc=seokmann.ju@lsil.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