[Prism54-devel] [patch 1/6] [prism54 svn trunk] various fixes for
prism54 svn
jean-baptiste.note at wanadoo.fr
jean-baptiste.note at wanadoo.fr
Sun May 15 11:44:10 UTC 2005
Index: trunk/ksrc/islpci_mgt.c
===================================================================
--- trunk.orig/ksrc/islpci_mgt.c 2005-05-15 11:03:35.000000000 +0200
+++ trunk/ksrc/islpci_mgt.c 2005-05-15 11:18:44.000000000 +0200
@@ -128,7 +128,8 @@
isl38xx_fragment *frag = &cb->rx_data_mgmt[index];
if (buf->skb == NULL) {
- buf->skb = alloc_skb(MGMT_FRAME_SIZE+2, GFP_ATOMIC);
+ buf->skb = dev_alloc_skb(MGMT_FRAME_SIZE+2);
+ /* fixme : should do some realignment work */
if (!buf->skb) {
printk(KERN_WARNING
"Error allocating management frame.\n");
@@ -136,9 +137,10 @@
}
buf->size = MGMT_FRAME_SIZE;
buf->mem = buf->skb->data;
+ buf->pci_addr = 0;
}
if (buf->pci_addr == 0) {
- buf->pci_addr = pci_map_single(priv->pdev, buf->skb,
+ buf->pci_addr = pci_map_single(priv->pdev, buf->skb->data,
MGMT_FRAME_SIZE,
PCI_DMA_FROMDEVICE);
if (!buf->pci_addr) {
@@ -345,11 +347,13 @@
}
/* Ensure the results of device DMA are visible to the CPU. */
+ /* frag_len not being the whole buffer, we need to
+ * synchronize the whole buffer */
pci_dma_sync_single(priv->pdev, buf->pci_addr,
- frag_len, PCI_DMA_FROMDEVICE);
+ MGMT_FRAME_SIZE, PCI_DMA_FROMDEVICE);
/* Perform endianess conversion for PIMFOR header in-place. */
- header = pimfor_decode_header(buf->skb, frag_len);
+ header = pimfor_decode_header(buf->skb->data, frag_len);
if (!header) {
printk(KERN_WARNING "%s: no PIMFOR header found\n",
ndev->name);
--
Jean-Baptiste Note
+33 (0)6 83 03 42 38
jean-baptiste.note at wanadoo.fr
More information about the Prism54-devel
mailing list