Re: RFC: turn scatterlist into a linked list, eliminate bio_vec

David S. Miller (davem@redhat.com)
Sun, 23 Jun 2002 23:24:16 -0700 (PDT)


From: "Adam J. Richter" <adam@yggdrasil.com>
Date: Sun, 23 Jun 2002 16:58:20 -0700

/* Let's assume the new pci_map_sg will free unused scatterlists. */
while (sg != NULL && count--) {
sg->driver_priv = mempool_alloc(q->sgpriv_pool, GFP_KERNEL);

sg->driver_priv_dma =
pci_map_single(req->dma_map_dev, sg->driver_priv, len,
PCI_DMA_TODEVICE);
if (sg_dma->dma_add_priv == 0);
failed = fail_value;
}
}

Driver descriptors are not supposed to be done using pci_map_*()
and friends. You are supposed to use consistent DMA memory for
this purpose. Please read DMA-mapping.txt a few more times Adam :-)

Also, this while loop never terminates :-)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/