[PATCH] : check TG3_FLG2_5750_PLUS flag to set TG3_FLG2_5705_PLUS flag

Linux Kernel Mailing List <[email protected]> Tue, 24 May 2005 12:40:07 +0000
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1535, 2005/05/24 09:40:07-03:00, [email protected]

	[PATCH] : check TG3_FLG2_5750_PLUS flag to set TG3_FLG2_5705_PLUS flag
	
	[TG3]: check TG3_FLG2_5750_PLUS flag to set TG3_FLG2_5705_PLUS flag
	
	Use check of TG3_FLG2_5750_PLUS in tg3_get_invariants to set
	TG3_FLG2_5705_PLUS flag.
	
	Signed-off-by: John W. Linville <[email protected]>
	Signed-off-by: David S. Miller <[email protected]>



 tg3.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)


diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c	2005-05-24 14:05:19 -07:00
+++ b/drivers/net/tg3.c	2005-05-24 14:05:19 -07:00
@@ -7893,14 +7893,13 @@
 	tp->pci_hdr_type     = (cacheline_sz_reg >> 16) & 0xff;
 	tp->pci_bist         = (cacheline_sz_reg >> 24) & 0xff;
 
-	if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) ||
-	    (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) ||
-	    (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752))
-		tp->tg3_flags2 |= TG3_FLG2_5705_PLUS;
-
 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 ||
 	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752)
 		tp->tg3_flags2 |= TG3_FLG2_5750_PLUS;
+
+	if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) ||
+	    (tp->tg3_flags2 & TG3_FLG2_5750_PLUS))
+		tp->tg3_flags2 |= TG3_FLG2_5705_PLUS;
 
 	if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS)
 		tp->tg3_flags2 |= TG3_FLG2_HW_TSO;