aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 7b124840bbcc..3a03a74c0609 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -748,9 +748,9 @@ e1000_reset(struct e1000_adapter *adapter)
748 VLAN_TAG_SIZE; 748 VLAN_TAG_SIZE;
749 min_tx_space = min_rx_space; 749 min_tx_space = min_rx_space;
750 min_tx_space *= 2; 750 min_tx_space *= 2;
751 E1000_ROUNDUP(min_tx_space, 1024); 751 min_tx_space = ALIGN(min_tx_space, 1024);
752 min_tx_space >>= 10; 752 min_tx_space >>= 10;
753 E1000_ROUNDUP(min_rx_space, 1024); 753 min_rx_space = ALIGN(min_rx_space, 1024);
754 min_rx_space >>= 10; 754 min_rx_space >>= 10;
755 755
756 /* If current Tx allocation is less than the min Tx FIFO size, 756 /* If current Tx allocation is less than the min Tx FIFO size,
@@ -1556,7 +1556,7 @@ e1000_setup_tx_resources(struct e1000_adapter *adapter,
1556 /* round up to nearest 4K */ 1556 /* round up to nearest 4K */
1557 1557
1558 txdr->size = txdr->count * sizeof(struct e1000_tx_desc); 1558 txdr->size = txdr->count * sizeof(struct e1000_tx_desc);
1559 E1000_ROUNDUP(txdr->size, 4096); 1559 txdr->size = ALIGN(txdr->size, 4096);
1560 1560
1561 txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma); 1561 txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma);
1562 if (!txdr->desc) { 1562 if (!txdr->desc) {
@@ -1798,7 +1798,7 @@ e1000_setup_rx_resources(struct e1000_adapter *adapter,
1798 /* Round up to nearest 4K */ 1798 /* Round up to nearest 4K */
1799 1799
1800 rxdr->size = rxdr->count * desc_len; 1800 rxdr->size = rxdr->count * desc_len;
1801 E1000_ROUNDUP(rxdr->size, 4096); 1801 rxdr->size = ALIGN(rxdr->size, 4096);
1802 1802
1803 rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma); 1803 rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma);
1804 1804
@@ -3170,7 +3170,7 @@ e1000_82547_fifo_workaround(struct e1000_adapter *adapter, struct sk_buff *skb)
3170 uint32_t fifo_space = adapter->tx_fifo_size - adapter->tx_fifo_head; 3170 uint32_t fifo_space = adapter->tx_fifo_size - adapter->tx_fifo_head;
3171 uint32_t skb_fifo_len = skb->len + E1000_FIFO_HDR; 3171 uint32_t skb_fifo_len = skb->len + E1000_FIFO_HDR;
3172 3172
3173 E1000_ROUNDUP(skb_fifo_len, E1000_FIFO_HDR); 3173 skb_fifo_len = ALIGN(skb_fifo_len, E1000_FIFO_HDR);
3174 3174
3175 if (adapter->link_duplex != HALF_DUPLEX) 3175 if (adapter->link_duplex != HALF_DUPLEX)
3176 goto no_fifo_stall_required; 3176 goto no_fifo_stall_required;