[PATCH] : more use of TG3_FLG2_5705_PLUS flag
Linux Kernel Mailing List <[email protected]> Tue, 24 May 2005 12:39:10 +0000
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
ChangeSet 1.1533, 2005/05/24 09:39:10-03:00, [email protected] [PATCH] : more use of TG3_FLG2_5705_PLUS flag [TG3]: more use of TG3_FLG2_5705_PLUS flag Rewrite of a couple of troublesome multi-way if statements to use TG3_FLG2_5705_PLUS flag. Signed-off-by: John W. Linville <[email protected]> Signed-off-by: David S. Miller <[email protected]> tg3.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2005-05-24 14:05:04 -07:00 +++ b/drivers/net/tg3.c 2005-05-24 14:05:04 -07:00 @@ -5208,10 +5208,8 @@ RDMAC_MODE_LNGREAD_ENAB); if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) rdmac_mode |= RDMAC_MODE_SPLIT_ENABLE; - if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && - tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) || - (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752)) { + if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && + tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) { if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE && (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 || tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) { @@ -5324,10 +5322,8 @@ WDMAC_MODE_FIFOURUN_ENAB | WDMAC_MODE_FIFOOREAD_ENAB | WDMAC_MODE_LNGREAD_ENAB); - if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && - tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) || - (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752)) { + if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && + tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) { if ((tp->tg3_flags & TG3_FLG2_TSO_CAPABLE) && (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 || tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) {