Commit 863925f5 authored by John W. Linville's avatar John W. Linville Committed by David S. Miller

[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: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cbf46853
...@@ -5237,10 +5237,8 @@ static int tg3_reset_hw(struct tg3 *tp) ...@@ -5237,10 +5237,8 @@ static int tg3_reset_hw(struct tg3 *tp)
RDMAC_MODE_LNGREAD_ENAB); RDMAC_MODE_LNGREAD_ENAB);
if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE)
rdmac_mode |= RDMAC_MODE_SPLIT_ENABLE; rdmac_mode |= RDMAC_MODE_SPLIT_ENABLE;
if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) &&
tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) || 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_TSO_CAPABLE && 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_A1 ||
tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) { tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) {
...@@ -5353,10 +5351,8 @@ static int tg3_reset_hw(struct tg3 *tp) ...@@ -5353,10 +5351,8 @@ static int tg3_reset_hw(struct tg3 *tp)
WDMAC_MODE_FIFOURUN_ENAB | WDMAC_MODE_FIFOOREAD_ENAB | WDMAC_MODE_FIFOURUN_ENAB | WDMAC_MODE_FIFOOREAD_ENAB |
WDMAC_MODE_LNGREAD_ENAB); WDMAC_MODE_LNGREAD_ENAB);
if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) &&
tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) || 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_flags & TG3_FLG2_TSO_CAPABLE) && 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_A1 ||
tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) { tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment