Skip to contentSkip to conversation

qla3xxx: receive path bugfixes.

PATCH In review Ron Mercer 2 participants 4 messages Oct 1, 2007 – Oct 2, 2007

Subsystems (2)
lore
Share & tools
lore

Ron Mercer

author
#0 lore raw

cover qla3xxx: receive path bugfixes.

Jeff,
This is the second submission... First was in August. Thanks, Ron

The following two patches fix:

An undocumented "feature" where the 4032 chip sets bit-7 of the opcode for an inbound completion if it's for a VLAN.

The access of stale data on a completion entry.

These patches were built and tested on 2.6.23-rc1.

author
#1 lore raw

PATCH 1/2 qla3xxx: bugfix: Add memory barrier before accessing rx completion.

---
 drivers/net/qla3xxx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/qla3xxx.c +1 -0
index 69da95b..c3fe1c7 100755
@@ -2248,6 +2248,7 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
 		qdev->rsp_consumer_index) && (work_done < work_to_do)) {
 
 		net_rsp = qdev->rsp_current;
+		rmb();
 		switch (net_rsp->opcode) {
 
 		case OPCODE_OB_MAC_IOCB_FN0:
Signature · 1 line
1.5.0.rc4.16.g9e258
author
#3 lore raw

PATCH 2/2 qla3xxx: bugfix: Fix VLAN rx completion handling.

In reply to Ron Mercer

Fix 4032 chip undocumented "feature" where bit-8 is set if the inbound completion is for a VLAN.

---
 drivers/net/qla3xxx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/net/qla3xxx.c +6 -0
index c3fe1c7..ea15131 100755
@@ -2249,6 +2249,12 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
 
 		net_rsp = qdev->rsp_current;
 		rmb();
+		/*
+		 * Fix 4032 chipe undocumented "feature" where bit-8 is set if the
+		 * inbound completion is for a VLAN.
+		 */
+		if (qdev->device_id == QL3032_DEVICE_ID)
+			net_rsp->opcode &= 0x7f;
 		switch (net_rsp->opcode) {
 
 		case OPCODE_OB_MAC_IOCB_FN0:
Signature · 1 line
1.5.0.rc4.16.g9e258
#2 lore raw

Re: [PATCH 1/2] qla3xxx: bugfix: Add memory barrier before accessing rx completion.

In reply to Ron Mercer
Quoted 10 lines · Ron Mercer
---
 drivers/net/qla3xxx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/qla3xxx.c +0 -0
index 69da95b..c3fe1c7 100755

drivers/net/qla3xxx.c static int ql_tx_rx_clean(struct ql3_adapter *qdev, · line 2252

Quoted 5 lines
drivers/net/qla3xxx.c +1 -0
@@ -2248,6 +2248,7 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev,
 		qdev->rsp_consumer_index) && (work_done < work_to_do)) {
 
 		net_rsp = qdev->rsp_current;
+		rmb();
 		switch (net_rsp->opcode) {

applied 1-2