lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5E4F49720D0BAD499EE1F01232234BA87744A93B8E@AVEXMB1.qlogic.org>
Date:	Wed, 17 Oct 2012 10:45:45 -0700
From:	Jitendra Kalsaria <jitendra.kalsaria@...gic.com>
To:	Joe Jin <joe.jin@...cle.com>, Ron Mercer <ron.mercer@...gic.com>,
	Dept-Eng Linux Driver <Linux-Driver@...gic.com>
CC:	netdev <netdev@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Greg Marsden <greg.marsden@...cle.com>
Subject: RE: [PATCH] qla3xxx: Ensure req_q_phy_addr writes to the register



>-----Original Message-----
>From: Joe Jin [mailto:joe.jin@...cle.com] 
>Sent: Tuesday, October 16, 2012 11:32 PM
>To: Ron Mercer; Jitendra Kalsaria; Dept-Eng Linux Driver
>Cc: netdev; linux-kernel; Greg Marsden
>Subject: [PATCH] qla3xxx: Ensure req_q_phy_addr writes to the register
>
>Make sure req_q_phy_addr write to the register.
>
>Signed-off-by: Joe Jin <joe.jin@...cle.com>
>Cc: Ron Mercer <ron.mercer@...gic.com>
>Cc: Jitendra Kalsaria <jitendra.kalsaria@...gic.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..78b4cba 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 that req_q_phy_addr writes to
>+	 * the memory.
>+	 */
>+	wmb();
>+
> 	qdev->req_q_virt_addr =
> 	    pci_alloc_consistent(qdev->pdev,
> 				 (size_t) qdev->req_q_size,

Your changes only take care of request queue but not response queue which also need barrier.

	qdev->req_q_size =
		(u32) (NUM_REQ_Q_ENTRIES * sizeof(struct ob_mac_iocb_req));

	qdev->rsp_q_size = NUM_RSP_Q_ENTRIES * sizeof(struct net_rsp_iocb);

	wmb();

thanks,
	Jiten
-- 
1.7.11.7

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ