[patch 10/57] atl1: fix vlan tag regression

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Tuesday, November 4, 2008 - 4:31 pm

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Jay Cliburn <jacliburn@bellsouth.net>

commit dc5596d920b504d263c7ca38bd76326179b13dee upstream

Commit 401c0aabec4b97320f962a0161a846d230a6f7aa introduced a regression
in the atl1 driver by storing the VLAN tag in the wrong TX descriptor
field.

This patch causes the VLAN tag to be stored in its proper location.

Tested-by: Ramon Casellas <ramon.casellas@cttc.es>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/atlx/atl1.c |    7 ++++---
 drivers/net/atlx/atl1.h |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2317,7 +2317,8 @@ static void atl1_tx_queue(struct atl1_ad
 		if (tpd != ptpd)
 			memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
 		tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
-		tpd->word2 = (cpu_to_le16(buffer_info->length) &
+		tpd->word2 &= ~(TPD_BUFLEN_MASK << TPD_BUFLEN_SHIFT);
+		tpd->word2 |= (cpu_to_le16(buffer_info->length) &
 			TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
 
 		/*
@@ -2426,8 +2427,8 @@ static int atl1_xmit_frame(struct sk_buf
 		vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
 			((vlan_tag >> 9) & 0x8);
 		ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
-		ptpd->word3 |= (vlan_tag & TPD_VL_TAGGED_MASK) <<
-			TPD_VL_TAGGED_SHIFT;
+		ptpd->word2 |= (vlan_tag & TPD_VLANTAG_MASK) <<
+			TPD_VLANTAG_SHIFT;
 	}
 
 	tso = atl1_tso(adapter, skb, ptpd);
--- a/drivers/net/atlx/atl1.h
+++ b/drivers/net/atlx/atl1.h
@@ -504,7 +504,7 @@ struct rx_free_desc {
 #define TPD_PKTNT_MASK		0x0001
 #define TPD_PKTINT_SHIFT	15
 #define TPD_VLANTAG_MASK	0xFFFF
-#define TPD_VLAN_SHIFT		16
+#define TPD_VLANTAG_SHIFT	16
 
 /* tpd word 3 bits 0:13 */
 #define TPD_EOP_MASK		0x0001

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/57] 2.6.27-stable review, Greg KH, (Tue Nov 4, 4:30 pm)
[patch 07/57] ALSA: hda - Add reboot notifier, Greg KH, (Tue Nov 4, 4:31 pm)
[patch 08/57] kbuild: mkspec - fix build rpm, Greg KH, (Tue Nov 4, 4:31 pm)
[patch 10/57] atl1: fix vlan tag regression, Greg KH, (Tue Nov 4, 4:31 pm)
[patch 11/57] libertas: fix buffer overrun, Greg KH, (Tue Nov 4, 4:31 pm)
[patch 25/57] firewire: fw-sbp2: fix races, Greg KH, (Tue Nov 4, 4:31 pm)
[patch 48/57] ACPI: EC: Rename some variables, Greg KH, (Tue Nov 4, 4:33 pm)
[patch 52/57] ACPI: Clear WAK_STS on resume, Greg KH, (Tue Nov 4, 4:33 pm)