aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r--drivers/net/spider_net.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index f58741239196..96a7e771daa4 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -367,21 +367,20 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card)
367} 367}
368 368
369/** 369/**
370 * spider_net_prepare_rx_descr - reinitializes a rx descriptor 370 * spider_net_prepare_rx_descr - Reinitialize RX descriptor
371 * @card: card structure 371 * @card: card structure
372 * @descr: descriptor to re-init 372 * @descr: descriptor to re-init
373 * 373 *
374 * return 0 on succes, <0 on failure 374 * Return 0 on succes, <0 on failure.
375 * 375 *
376 * allocates a new rx skb, iommu-maps it and attaches it to the descriptor. 376 * Allocates a new rx skb, iommu-maps it and attaches it to the
377 * Activate the descriptor state-wise 377 * descriptor. Mark the descriptor as activated, ready-to-use.
378 */ 378 */
379static int 379static int
380spider_net_prepare_rx_descr(struct spider_net_card *card, 380spider_net_prepare_rx_descr(struct spider_net_card *card,
381 struct spider_net_descr *descr) 381 struct spider_net_descr *descr)
382{ 382{
383 dma_addr_t buf; 383 dma_addr_t buf;
384 int error = 0;
385 int offset; 384 int offset;
386 int bufsize; 385 int bufsize;
387 386
@@ -409,7 +408,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
409 (SPIDER_NET_RXBUF_ALIGN - 1); 408 (SPIDER_NET_RXBUF_ALIGN - 1);
410 if (offset) 409 if (offset)
411 skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset); 410 skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset);
412 /* io-mmu-map the skb */ 411 /* iommu-map the skb */
413 buf = pci_map_single(card->pdev, descr->skb->data, 412 buf = pci_map_single(card->pdev, descr->skb->data,
414 SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); 413 SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE);
415 descr->buf_addr = buf; 414 descr->buf_addr = buf;
@@ -424,7 +423,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
424 SPIDER_NET_DMAC_NOINTR_COMPLETE; 423 SPIDER_NET_DMAC_NOINTR_COMPLETE;
425 } 424 }
426 425
427 return error; 426 return 0;
428} 427}
429 428
430/** 429/**