Skip to content

Commit

Permalink
[tg3] Fix compilation on newer gcc versions
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
Christian Hesse authored and mcb30 committed Feb 9, 2012
1 parent f6840ba commit b5ed30b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
3 changes: 1 addition & 2 deletions src/drivers/net/tg3/tg3.c
Expand Up @@ -533,7 +533,7 @@ static int tg3_test_dma(struct tg3 *tp)
{ DBGP("%s\n", __func__);

dma_addr_t buf_dma;
u32 *buf, saved_dma_rwctrl;
u32 *buf;
int ret = 0;

buf = malloc_dma(TEST_BUFFER_SIZE, TG3_DMA_ALIGNMENT);
Expand Down Expand Up @@ -624,7 +624,6 @@ static int tg3_test_dma(struct tg3 *tp)
/* It is best to perform DMA test with maximum write burst size
* to expose the 5700/5701 write DMA bug.
*/
saved_dma_rwctrl = tp->dma_rwctrl;
tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK;
tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl);

Expand Down
9 changes: 1 addition & 8 deletions src/drivers/net/tg3/tg3_hw.c
Expand Up @@ -1778,7 +1778,7 @@ static void tg3_rings_reset(struct tg3 *tp)
{ DBGP("%s\n", __func__);

int i;
u32 stblk, txrcb, rxrcb, limit;
u32 txrcb, rxrcb, limit;

/* Disable all transmit rings but the first. */
if (!tg3_flag(tp, 5705_PLUS))
Expand Down Expand Up @@ -1854,8 +1854,6 @@ static void tg3_rings_reset(struct tg3 *tp)
BDINFO_FLAGS_MAXLEN_SHIFT, 0);
rxrcb += TG3_BDINFO_SIZE;
}

stblk = HOSTCC_STATBLCK_RING1;
}

static void tg3_setup_rxbd_thresholds(struct tg3 *tp)
Expand Down Expand Up @@ -2569,14 +2567,9 @@ void tg3_set_txd(struct tg3 *tp, int entry,
u32 tg3_calc_dma_bndry(struct tg3 *tp, u32 val)
{ DBGP("%s\n", __func__);

int cacheline_size;
u8 byte;

pci_read_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE, &byte);
if (byte == 0)
cacheline_size = 1024;
else
cacheline_size = (int) byte * 4;

/* On 5703 and later chips, the boundary bits have no
* effect.
Expand Down
3 changes: 0 additions & 3 deletions src/drivers/net/tg3/tg3_phy.c
Expand Up @@ -1124,13 +1124,10 @@ static u8 tg3_resolve_flowctrl_1000X(u16 lcladv, u16 rmtadv)
static void tg3_setup_flow_control(struct tg3 *tp, u32 lcladv, u32 rmtadv)
{ DBGP("%s\n", __func__);

u8 autoneg;
u8 flowctrl = 0;
u32 old_rx_mode = tp->rx_mode;
u32 old_tx_mode = tp->tx_mode;

autoneg = tp->link_config.autoneg;

if (tg3_flag(tp, PAUSE_AUTONEG)) {
if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)
flowctrl = tg3_resolve_flowctrl_1000X(lcladv, rmtadv);
Expand Down

0 comments on commit b5ed30b

Please sign in to comment.