Commit 951f6aa7 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Linus Torvalds

[PATCH] fix starfire 64-bit b0rkage

(x >> 32) is undefined on a 32 bit integral variable in C; In contrast
(x >>16 >> 16) is fine (and gets optimized out to 0, while (x >> 32)
gets optimized out to a nop). 

Fix for starfire below
parent 8448b11e
......@@ -1175,15 +1175,9 @@ static int netdev_open(struct net_device *dev)
TX_DESC_SPACING | TX_DESC_TYPE,
ioaddr + TxDescCtrl);
#if defined(ADDR_64BITS)
writel(np->queue_mem_dma >> 32, ioaddr + RxDescQHiAddr);
writel(np->queue_mem_dma >> 32, ioaddr + TxRingHiAddr);
writel(np->queue_mem_dma >> 32, ioaddr + CompletionHiAddr);
#else
writel(0, ioaddr + RxDescQHiAddr);
writel(0, ioaddr + TxRingHiAddr);
writel(0, ioaddr + CompletionHiAddr);
#endif
writel( (np->queue_mem_dma >> 16) >> 16, ioaddr + RxDescQHiAddr);
writel( (np->queue_mem_dma >> 16) >> 16, ioaddr + TxRingHiAddr);
writel( (np->queue_mem_dma >> 16) >> 16, ioaddr + CompletionHiAddr);
writel(np->rx_ring_dma, ioaddr + RxDescQAddr);
writel(np->tx_ring_dma, ioaddr + TxRingPtr);
......
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