From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org, jejb@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
"Theodore Ts'o" <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
Chuck Ebbert <cebbert@redhat.com>,
Domenico Andreoli <cavokz@gmail.com>, Willy Tarreau <w@1wt.eu>,
Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
Jake Edge <jake@lwn.net>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Mike Miller <mike.miller@hp.com>,
Jens Axboe <jens.axboe@oracle.com>
Subject: [patch 22/47] cciss: read config to obtain max outstanding commands per controller
Date: Tue, 22 Jul 2008 16:16:11 -0700 [thread overview]
Message-ID: <20080722231611.GW8282@suse.de> (raw)
In-Reply-To: <20080722231342.GA8282@suse.de>
[-- Attachment #1: cciss-read-config-to-obtain-max-outstanding-commands-per-controller.patch --]
[-- Type: text/plain, Size: 5898 bytes --]
2.6.25-stable review patch. If anyone has any objections, please let us
know.
------------------
From: Mike Miller <mike.miller@hp.com>
commit 491539982aa01fa71de93c2a06ac5d890d4cf1e2 upstream
This patch changes the way we determine the maximum number of outstanding
commands for each controller.
Most Smart Array controllers can support up to 1024 commands, the notable
exceptions are the E200 and E200i.
The next generation of controllers which were just added support a mode of
operation called Zero Memory Raid (ZMR). In this mode they only support
64 outstanding commands. In Full Function Raid (FFR) mode they support
1024.
We have been setting the queue depth by arbitrarily assigning some value
for each controller. We needed a better way to set the queue depth to
avoid lots of annoying "fifo full" messages. So we made the driver a
little smarter. We now read the config table and subtract 4 from the
returned value. The -4 is to allow some room for ioctl calls which are
not tracked the same way as io commands are tracked.
Please consider this for inclusion.
Signed-off-by: Mike Miller <mike.miller@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/block/cciss.c | 66 ++++++++++++++++++++++++++++----------------------
1 file changed, 37 insertions(+), 29 deletions(-)
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -106,35 +106,34 @@ MODULE_DEVICE_TABLE(pci, cciss_pci_devic
/* board_id = Subsystem Device ID & Vendor ID
* product = Marketing Name for the board
* access = Address of the struct of function pointers
- * nr_cmds = Number of commands supported by controller
*/
static struct board_type products[] = {
- {0x40700E11, "Smart Array 5300", &SA5_access, 512},
- {0x40800E11, "Smart Array 5i", &SA5B_access, 512},
- {0x40820E11, "Smart Array 532", &SA5B_access, 512},
- {0x40830E11, "Smart Array 5312", &SA5B_access, 512},
- {0x409A0E11, "Smart Array 641", &SA5_access, 512},
- {0x409B0E11, "Smart Array 642", &SA5_access, 512},
- {0x409C0E11, "Smart Array 6400", &SA5_access, 512},
- {0x409D0E11, "Smart Array 6400 EM", &SA5_access, 512},
- {0x40910E11, "Smart Array 6i", &SA5_access, 512},
- {0x3225103C, "Smart Array P600", &SA5_access, 512},
- {0x3223103C, "Smart Array P800", &SA5_access, 512},
- {0x3234103C, "Smart Array P400", &SA5_access, 512},
- {0x3235103C, "Smart Array P400i", &SA5_access, 512},
- {0x3211103C, "Smart Array E200i", &SA5_access, 120},
- {0x3212103C, "Smart Array E200", &SA5_access, 120},
- {0x3213103C, "Smart Array E200i", &SA5_access, 120},
- {0x3214103C, "Smart Array E200i", &SA5_access, 120},
- {0x3215103C, "Smart Array E200i", &SA5_access, 120},
- {0x3237103C, "Smart Array E500", &SA5_access, 512},
- {0x323D103C, "Smart Array P700m", &SA5_access, 512},
- {0x3241103C, "Smart Array P212", &SA5_access, 384},
- {0x3243103C, "Smart Array P410", &SA5_access, 384},
- {0x3245103C, "Smart Array P410i", &SA5_access, 384},
- {0x3247103C, "Smart Array P411", &SA5_access, 384},
- {0x3249103C, "Smart Array P812", &SA5_access, 384},
- {0xFFFF103C, "Unknown Smart Array", &SA5_access, 120},
+ {0x40700E11, "Smart Array 5300", &SA5_access},
+ {0x40800E11, "Smart Array 5i", &SA5B_access},
+ {0x40820E11, "Smart Array 532", &SA5B_access},
+ {0x40830E11, "Smart Array 5312", &SA5B_access},
+ {0x409A0E11, "Smart Array 641", &SA5_access},
+ {0x409B0E11, "Smart Array 642", &SA5_access},
+ {0x409C0E11, "Smart Array 6400", &SA5_access},
+ {0x409D0E11, "Smart Array 6400 EM", &SA5_access},
+ {0x40910E11, "Smart Array 6i", &SA5_access},
+ {0x3225103C, "Smart Array P600", &SA5_access},
+ {0x3223103C, "Smart Array P800", &SA5_access},
+ {0x3234103C, "Smart Array P400", &SA5_access},
+ {0x3235103C, "Smart Array P400i", &SA5_access},
+ {0x3211103C, "Smart Array E200i", &SA5_access},
+ {0x3212103C, "Smart Array E200", &SA5_access},
+ {0x3213103C, "Smart Array E200i", &SA5_access},
+ {0x3214103C, "Smart Array E200i", &SA5_access},
+ {0x3215103C, "Smart Array E200i", &SA5_access},
+ {0x3237103C, "Smart Array E500", &SA5_access},
+ {0x323D103C, "Smart Array P700m", &SA5_access},
+ {0x3241103C, "Smart Array P212", &SA5_access},
+ {0x3243103C, "Smart Array P410", &SA5_access},
+ {0x3245103C, "Smart Array P410i", &SA5_access},
+ {0x3247103C, "Smart Array P411", &SA5_access},
+ {0x3249103C, "Smart Array P812", &SA5_access},
+ {0xFFFF103C, "Unknown Smart Array", &SA5_access},
};
/* How long to wait (in milliseconds) for board to go into simple mode */
@@ -3082,11 +3081,20 @@ static int __devinit cciss_pci_init(ctlr
print_cfg_table(c->cfgtable);
#endif /* CCISS_DEBUG */
+ /* Some controllers support Zero Memory Raid (ZMR).
+ * When configured in ZMR mode the number of supported
+ * commands drops to 64. So instead of just setting an
+ * arbitrary value we make the driver a little smarter.
+ * We read the config table to tell us how many commands
+ * are supported on the controller then subtract 4 to
+ * leave a little room for ioctl calls.
+ */
+ c->max_commands = readl(&(c->cfgtable->CmdsOutMax));
for (i = 0; i < ARRAY_SIZE(products); i++) {
if (board_id == products[i].board_id) {
c->product_name = products[i].product_name;
c->access = *(products[i].access);
- c->nr_cmds = products[i].nr_cmds;
+ c->nr_cmds = c->max_commands - 4;
break;
}
}
@@ -3106,7 +3114,7 @@ static int __devinit cciss_pci_init(ctlr
if (subsystem_vendor_id == PCI_VENDOR_ID_HP) {
c->product_name = products[i-1].product_name;
c->access = *(products[i-1].access);
- c->nr_cmds = products[i-1].nr_cmds;
+ c->nr_cmds = c->max_commands - 4;
printk(KERN_WARNING "cciss: This is an unknown "
"Smart Array controller.\n"
"cciss: Please update to the latest driver "
--
next prev parent reply other threads:[~2008-07-22 23:25 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080722230208.148102983@mini.kroah.org>
2008-07-22 23:13 ` [patch 00/47] 2.6.25-stable review Greg KH
2008-07-22 23:14 ` [patch 01/47] b43legacy: Do not return TX_BUSY from op_tx Greg KH
2008-07-22 23:14 ` [patch 02/47] b43: " Greg KH
2008-07-22 23:14 ` [patch 03/47] b43: Fix possible MMIO access while device is down Greg KH
2008-07-22 23:14 ` [patch 04/47] mac80211: detect driver tx bugs Greg KH
2008-07-22 23:14 ` [patch 05/47] block: Fix the starving writes bug in the anticipatory IO scheduler Greg KH
2008-07-22 23:14 ` [patch 06/47] md: Fix error paths if md_probe fails Greg KH
2008-07-22 23:14 ` [patch 07/47] md: Dont acknowlege that stripe-expand is complete until it really is Greg KH
2008-07-22 23:14 ` [patch 08/47] md: Ensure interrupted recovery completed properly (v1 metadata plus bitmap) Greg KH
2008-07-22 23:14 ` [patch 09/47] block: Properly notify block layer of sync writes Greg KH
2008-07-22 23:14 ` [patch 10/47] OHCI: Fix problem if SM501 and another platform driver is selected Greg KH
2008-07-22 23:14 ` [patch 11/47] USB: ehci - fix timer regression Greg KH
2008-07-22 23:14 ` [patch 12/47] USB: ohci - record data toggle after unlink Greg KH
2008-07-22 23:15 ` [patch 13/47] USB: fix interrupt disabling for HCDs with shared interrupt handlers Greg KH
2008-07-22 23:15 ` [patch 14/47] hdaps: add support for various newer Lenovo thinkpads Greg KH
2008-07-22 23:15 ` [patch 15/47] b43legacy: Fix possible NULL pointer dereference in DMA code Greg KH
2008-07-22 23:15 ` [patch 16/47] netdrvr: 3c59x: remove irqs_disabled warning from local_bh_enable Greg KH
2008-07-22 23:15 ` [patch 17/47] SCSI: esp: Fix OOPS in esp_reset_cleanup() Greg KH
2008-07-22 23:15 ` [patch 18/47] SCSI: esp: tidy up target reference counting Greg KH
2008-07-22 23:15 ` [patch 19/47] SCSI: ses: Fix timeout Greg KH
2008-07-22 23:16 ` [patch 20/47] mm: switch node meminfo Active & Inactive pages to Kbytes Greg KH
2008-07-22 23:16 ` [patch 21/47] reiserfs: discard prealloc in reiserfs_delete_inode Greg KH
2008-07-22 23:16 ` Greg KH [this message]
2008-07-22 23:16 ` [patch 23/47] serial: fix serial_match_port() for dynamic major tty-device numbers Greg KH
2008-07-22 23:16 ` [patch 24/47] can: add sanity checks Greg KH
2008-07-22 23:16 ` [patch 25/47] sisusbvga: Fix oops on disconnect Greg KH
2008-07-22 23:16 ` [patch 26/47] md: ensure all blocks are uptodate or locked when syncing Greg KH
2008-07-22 23:16 ` [patch 27/47] textsearch: fix Boyer-Moore text search bug Greg KH
2008-07-22 23:16 ` [patch 28/47] netfilter: nf_conntrack_tcp: fixing to check the lower bound of valid ACK Greg KH
2008-07-22 23:16 ` [patch 29/47] zd1211rw: add ID for AirTies WUS-201 Greg KH
2008-07-22 23:16 ` [patch 30/47] exec: fix stack excutability without PT_GNU_STACK Greg KH
2008-07-22 23:16 ` [patch 31/47] slub: Fix use-after-preempt of per-CPU data structure Greg KH
2008-07-22 23:16 ` [patch 32/47] rtc: fix reported IRQ rate for when HPET is enabled Greg KH
2008-07-22 23:16 ` [patch 33/47] rapidio: fix device reference counting Greg KH
2008-07-22 23:16 ` [patch 34/47] tpm: add Intel TPM TIS device HID Greg KH
2008-07-22 23:16 ` [patch 35/47] cifs: fix wksidarr declaration to be big-endian friendly Greg KH
2008-07-22 23:16 ` [patch 36/47] ov7670: clean up ov7670_read semantics Greg KH
2008-07-22 23:17 ` [patch 37/47] serial8250: sanity check nr_uarts on all paths Greg KH
2008-07-22 23:17 ` [patch 38/47] fbdev: bugfix for multiprocess defio Greg KH
2008-07-22 23:17 ` [patch 39/47] drivers/isdn/i4l/isdn_common.c fix small resource leak Greg KH
2008-07-22 23:17 ` [patch 40/47] drivers/char/pcmcia/ipwireless/hardware.c fix " Greg KH
2008-07-22 23:17 ` [patch 41/47] SCSI: mptspi: fix oops in mptspi_dv_renegotiate_work() Greg KH
2008-07-22 23:17 ` [patch 42/47] crypto: chainiv - Invoke completion function Greg KH
2008-07-22 23:17 ` [patch 43/47] powerpc: Add missing reference to coherent_dma_mask Greg KH
2008-07-22 23:17 ` [patch 44/47] pxamci: fix byte aligned DMA transfers Greg KH
2008-07-23 7:01 ` pHilipp Zabel
2008-07-23 20:12 ` [stable] " Greg KH
2008-07-23 20:24 ` Linus Torvalds
2008-07-23 20:32 ` Greg KH
2008-07-24 10:33 ` pHilipp Zabel
2008-07-24 15:05 ` Greg KH
2008-07-24 19:22 ` Linus Torvalds
2008-07-24 20:34 ` Pierre Ossman
2008-07-22 23:17 ` [patch 45/47] mmc: dont use DMA on newer ENE controllers Greg KH
2008-07-22 23:17 ` [patch 46/47] hrtimer: prevent migration for raising softirq Greg KH
2008-07-22 23:17 ` [patch 47/47] V4L/DVB (7475): Added support for Terratec Cinergy T USB XXS Greg KH
2008-07-23 4:42 ` [patch 00/47] 2.6.25-stable review Michael Krufky
2008-07-23 4:51 ` Michael Krufky
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=20080722231611.GW8282@suse.de \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cavokz@gmail.com \
--cc=cebbert@redhat.com \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=jake@lwn.net \
--cc=jejb@kernel.org \
--cc=jens.axboe@oracle.com \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.miller@hp.com \
--cc=mkrufky@linuxtv.org \
--cc=rbranco@la.checkpoint.com \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=w@1wt.eu \
--cc=zwane@arm.linux.org.uk \
/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