aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2006-09-27 15:02:26 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-27 17:57:16 -0400
commitd4b0a4c19ace3021235a33658c520ab0da80dfb1 (patch)
treee8023b10037fec6c3f411a9d7ec0a6bce5b8fbc9 /drivers/net/spider_net.c
parentc73a29da23c9236f868faecf85cb5401893d7c42 (diff)
[PATCH] spidernet: Use pci_dma_mapping_error()
A driver shouldn't compare to DMA_ERROR_CODE directly, use pci_dma_mapping_error() instead. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r--drivers/net/spider_net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index cc240adb7269..1397fc55cf68 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -317,7 +317,7 @@ spider_net_init_chain(struct spider_net_card *card,
317 SPIDER_NET_DESCR_SIZE, 317 SPIDER_NET_DESCR_SIZE,
318 direction); 318 direction);
319 319
320 if (buf == DMA_ERROR_CODE) 320 if (pci_dma_mapping_error(buf))
321 goto iommu_error; 321 goto iommu_error;
322 322
323 descr->bus_addr = buf; 323 descr->bus_addr = buf;
@@ -420,7 +420,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
420 buf = pci_map_single(card->pdev, descr->skb->data, 420 buf = pci_map_single(card->pdev, descr->skb->data,
421 SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); 421 SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE);
422 descr->buf_addr = buf; 422 descr->buf_addr = buf;
423 if (buf == DMA_ERROR_CODE) { 423 if (pci_dma_mapping_error(buf)) {
424 dev_kfree_skb_any(descr->skb); 424 dev_kfree_skb_any(descr->skb);
425 if (netif_msg_rx_err(card) && net_ratelimit()) 425 if (netif_msg_rx_err(card) && net_ratelimit())
426 pr_err("Could not iommu-map rx buffer\n"); 426 pr_err("Could not iommu-map rx buffer\n");
@@ -649,7 +649,7 @@ spider_net_prepare_tx_descr(struct spider_net_card *card,
649 dma_addr_t buf; 649 dma_addr_t buf;
650 650
651 buf = pci_map_single(card->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); 651 buf = pci_map_single(card->pdev, skb->data, skb->len, PCI_DMA_TODEVICE);
652 if (buf == DMA_ERROR_CODE) { 652 if (pci_dma_mapping_error(buf)) {
653 if (netif_msg_tx_err(card) && net_ratelimit()) 653 if (netif_msg_tx_err(card) && net_ratelimit())
654 pr_err("could not iommu-map packet (%p, %i). " 654 pr_err("could not iommu-map packet (%p, %i). "
655 "Dropping packet\n", skb->data, skb->len); 655 "Dropping packet\n", skb->data, skb->len);