diff options
author | Olof Johansson <olof@lixom.net> | 2006-09-27 21:02:26 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-27 23:57:16 +0200 |
commit | d4b0a4c19ace3021235a33658c520ab0da80dfb1 (patch) | |
tree | e8023b10037fec6c3f411a9d7ec0a6bce5b8fbc9 /drivers/net | |
parent | [PATCH] sky2: version 1.9 (diff) | |
download | linux-d4b0a4c19ace3021235a33658c520ab0da80dfb1.tar.xz linux-d4b0a4c19ace3021235a33658c520ab0da80dfb1.zip |
[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')
-rw-r--r-- | drivers/net/spider_net.c | 6 |
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, SPIDER_NET_DESCR_SIZE, direction); - if (buf == DMA_ERROR_CODE) + if (pci_dma_mapping_error(buf)) goto iommu_error; descr->bus_addr = buf; @@ -420,7 +420,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, buf = pci_map_single(card->pdev, descr->skb->data, SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); descr->buf_addr = buf; - if (buf == DMA_ERROR_CODE) { + if (pci_dma_mapping_error(buf)) { dev_kfree_skb_any(descr->skb); if (netif_msg_rx_err(card) && net_ratelimit()) pr_err("Could not iommu-map rx buffer\n"); @@ -649,7 +649,7 @@ spider_net_prepare_tx_descr(struct spider_net_card *card, dma_addr_t buf; buf = pci_map_single(card->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); - if (buf == DMA_ERROR_CODE) { + if (pci_dma_mapping_error(buf)) { if (netif_msg_tx_err(card) && net_ratelimit()) pr_err("could not iommu-map packet (%p, %i). " "Dropping packet\n", skb->data, skb->len); |