From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: James Bottomley <James.Bottomley@SteelEye.com>,
Linux-SCSI Mailing List <linux-scsi@vger.kernel.org>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Subject: PATCH [8/11] qla2xxx: SYSFS queue-depth override
Date: Wed, 8 Dec 2004 23:39:39 -0800 [thread overview]
Message-ID: <20041209073939.GA22137@plap.san.rr.com> (raw)
ChangeSet
1.2242 04/12/08 16:48:25 andrew.vasquez@qlogic.com +1 -0
Add sysfs queue depth override to qla2xxx.
Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
drivers/scsi/qla2xxx/qla_os.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+)
diff -Nru a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
--- a/drivers/scsi/qla2xxx/qla_os.c 2004-12-08 22:16:12 -08:00
+++ b/drivers/scsi/qla2xxx/qla_os.c 2004-12-08 22:16:12 -08:00
@@ -162,6 +162,20 @@
static int qla2x00_proc_info(struct Scsi_Host *, char *, char **,
off_t, int, int);
+static ssize_t qla2xxx_store_queue_depth(struct device *, const char *, size_t);
+
+static struct device_attribute qla2xxx_queue_depth_attr = {
+ .attr = {
+ .name = "queue_depth",
+ .mode = S_IWUSR,
+ },
+ .store = qla2xxx_store_queue_depth,
+};
+
+static struct device_attribute *qla2xxx_dev_attrs[] = {
+ &qla2xxx_queue_depth_attr,
+ NULL,
+};
static struct scsi_host_template qla2x00_driver_template = {
.module = THIS_MODULE,
@@ -187,6 +201,8 @@
* which equates to 0x800000 sectors.
*/
.max_sectors = 0xFFFF,
+
+ .sdev_attrs = qla2xxx_dev_attrs,
};
static struct scsi_transport_template *qla2xxx_transport_template = NULL;
@@ -1787,6 +1803,21 @@
}
return (0);
+}
+
+static ssize_t
+qla2xxx_store_queue_depth(struct device *dev, const char *buf, size_t count)
+{
+ int depth;
+ struct scsi_device *sdev = to_scsi_device(dev);
+
+ if (sdev->tagged_supported) {
+ depth = simple_strtoul(buf, NULL, 0);
+ if (depth > UINT_MAX)
+ depth = UINT_MAX;
+ scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, depth);
+ }
+ return count;
}
/**
next reply other threads:[~2004-12-09 7:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-09 7:39 Andrew Vasquez [this message]
2004-12-09 14:59 ` PATCH [8/11] qla2xxx: SYSFS queue-depth override James Bottomley
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=20041209073939.GA22137@plap.san.rr.com \
--to=andrew.vasquez@qlogic.com \
--cc=James.Bottomley@SteelEye.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.