From: Joe Jin <joe.jin@oracle.com>
To: Ron Mercer <ron.mercer@qlogic.com>,
Linux-Driver@qlogic.com,
Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>,
Joe Jin <joe.jin@oracle.com>
Cc: netdev <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org,
Greg Marsden <greg.marsden@oracle.com>
Subject: [PATCH] qla3xxx: Ensure request/response queue addr writes to the registers
Date: Fri, 19 Oct 2012 09:22:29 +0800 [thread overview]
Message-ID: <5080AB55.9010609@oracle.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
Before use the request and response queue addr, make sure it has wrote
to the registers.
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Cc: Ron Mercer <ron.mercer@qlogic.com>
---
drivers/net/ethernet/qlogic/qla3xxx.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c
index df09b1c..f745ade 100644
--- a/drivers/net/ethernet/qlogic/qla3xxx.c
+++ b/drivers/net/ethernet/qlogic/qla3xxx.c
@@ -2525,6 +2525,12 @@ static int ql_alloc_net_req_rsp_queues(struct ql3_adapter *qdev)
qdev->req_q_size =
(u32) (NUM_REQ_Q_ENTRIES * sizeof(struct ob_mac_iocb_req));
+ /*
+ * The barrier is required to ensure request and response queue
+ * addr writes to the registers.
+ */
+ wmb();
+
qdev->req_q_virt_addr =
pci_alloc_consistent(qdev->pdev,
(size_t) qdev->req_q_size,
--
1.7.11.7
[-- Attachment #2: Attached Message Part --]
[-- Type: text/plain, Size: 0 bytes --]
next reply other threads:[~2012-10-19 1:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 1:22 Joe Jin [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-10-19 1:24 [PATCH] qla3xxx: Ensure request/response queue addr writes to the registers Joe Jin
2012-10-19 17:12 ` Jitendra Kalsaria
2012-10-22 0:40 Joe Jin
2012-10-22 17:17 ` Jitendra Kalsaria
2012-10-22 19:17 ` David Miller
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=5080AB55.9010609@oracle.com \
--to=joe.jin@oracle.com \
--cc=Linux-Driver@qlogic.com \
--cc=greg.marsden@oracle.com \
--cc=jitendra.kalsaria@qlogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ron.mercer@qlogic.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;
as well as URLs for NNTP newsgroup(s).