patch-2.3.47 linux/drivers/parport/parport_pc.c

Next file: linux/drivers/pcmcia/cs.c
Previous file: linux/drivers/net/yellowfin.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/drivers/parport/parport_pc.c linux/drivers/parport/parport_pc.c
@@ -561,7 +561,8 @@
 		if ((start ^ end) & ~0xffffUL)
 			maxlen = (0x10000 - start) & 0xffff;
 
-		dma_addr = dma_handle = pci_map_single(priv->dev, (void *)buf, length);
+		dma_addr = dma_handle = pci_map_single(priv->dev, (void *)buf, length,
+						       PCI_DMA_TODEVICE);
         } else {
 		/* above 16 MB we use a bounce buffer as ISA-DMA is not possible */
 		maxlen   = PAGE_SIZE;          /* sizeof(priv->dma_buf) */
@@ -661,7 +662,7 @@
 	frob_econtrol (port, 1<<3, 0);
 	
 	if (dma_handle)
-		pci_unmap_single(priv->dev, dma_handle, length);
+		pci_unmap_single(priv->dev, dma_handle, length, PCI_DMA_TODEVICE);
 
 	return length - left;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)