On Thursday 05 April 2007 06:11, Will Dyson wrote:
> @@ -525,8 +525,24 @@ static int setup_rx_descbuffer(struct bcm43xx_dmaring
> *ring,
> return -ENOMEM;
> dmaaddr = map_descbuffer(ring, skb->data,
> ring->rx_buffersize, 0);
> - if (dma_mapping_error(dmaaddr))
> + if (dma_mapping_error(dmaaddr)) {
> + /* ugh. try to realloc in zone_dma */
> + gfp_flags &= ~GFP_KERNEL;
> + gfp_flags |= GFP_DMA;
This is wrong. The line
gfp_flags &= ~GFP_KERNEL;
should be deleted.
> + if (dma_mapping_error(dma_test)) {
> + /* ugh realloc */
> + kfree(ring->txhdr_cache);
> + ring->txhdr_cache = kcalloc(nr_slots,
> + sizeof(struct
> bcm43xx_txhdr_fw4),
> + GFP_DMA);
GFP_KERNEL | GFP_DMA
> + /* create a bounce buffer in zone_dma on mapping failure. */
> + if (dma_mapping_error(meta->dmaaddr)) {
> + bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC|GFP_DMA);
Whitespace around the |
--
Greetings Michael.
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev