[dahdi-commits] sruffell: branch linux/2.2 r8672 - in /linux/branches/2.2: ./ drivers/dahdi/v...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Fri May 21 09:58:08 CDT 2010


Author: sruffell
Date: Fri May 21 09:58:06 2010
New Revision: 8672

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8672
Log:
Merged revisions 8176,8560 via svnmerge from 
https://origsvn.digium.com/svn/dahdi/linux/trunk

NOTE:  These changes were already added to the 2.2.1.2 tag in r8666.  I
should have merged these two changes into the 2.2 branch first, and then
cherry-picked them for the 2.2.1.2 release.

........
  r8176 | sruffell | 2010-03-01 02:14:17 -0600 (Mon, 01 Mar 2010) | 4 lines
  
  wcte12xp, wctdm24xxp: Use memory mapped IO instead of port IO.
  
  Some systems do not like the port I/O and this change allows it to work.
  DAHDI-515.
........
  r8560 | sruffell | 2010-04-22 16:36:16 -0500 (Thu, 22 Apr 2010) | 11 lines
  
  wcte12xp, wctdm24xxp: Ensure writes to I/O registers are flushed.
  
  In revision 8176 I changed register access from I/O space to memory mapped
  registers.  Unfortunately, when I made that change, I didn't account for
  posted writes.  This change makes sure all the registers are read back to
  ensure that they are posted through any intermediate bridges.
  
  The most readily observable symptom were cards that were taking 2000
  interrupts/second. The card reported that it handled an interrupt but the
  write to silence the card wasn't flushed through until the second time the
  interrupt handler run. DAHDI-602.
........

Modified:
    linux/branches/2.2/   (props changed)
    linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c

Propchange: linux/branches/2.2/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=8672&r1=8671&r2=8672
==============================================================================
--- linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c Fri May 21 09:58:06 2010
@@ -169,8 +169,8 @@
 #else
 	struct kmem_cache *buffer_cache;
 #endif
-	/*! Base address of the VoiceBus interface registers in I/O space. */
-	u32 iobase;
+	/*! Base address of the VoiceBus interface registers in memory space. */
+	void __iomem 		*iobase;
 	/*! The IRQ line for this VoiceBus interface. */
 	unsigned int irq;
 #if VOICEBUS_DEFERRED == WORKQUEUE
@@ -482,7 +482,7 @@
 static inline u32
 __vb_getctl(struct voicebus *vb, u32 addr)
 {
-	return le32_to_cpu(inl(vb->iobase + addr));
+	return readl(vb->iobase + addr);
 }
 
 /*!
@@ -599,7 +599,8 @@
 __vb_setctl(struct voicebus *vb, u32 addr, u32 val)
 {
 	wmb();
-	outl(cpu_to_le32(val), vb->iobase + addr);
+	writel(val, vb->iobase + addr);
+	readl(vb->iobase + addr);
 }
 
 /*!
@@ -1233,7 +1234,9 @@
 				  vb->idle_vbb, vb->idle_vbb_dma_addr);
 	}
 	kmem_cache_destroy(vb->buffer_cache);
-	release_region(vb->iobase, 0xff);
+	release_mem_region(pci_resource_start(vb->pdev, 1),
+		pci_resource_len(vb->pdev, 1));
+	pci_iounmap(vb->pdev, vb->iobase);
 	pci_disable_device(vb->pdev);
 	kfree(vb);
 }
@@ -1790,8 +1793,9 @@
 		retval = -EIO;
 		goto cleanup;
 	}
-	vb->iobase = pci_resource_start(pdev, 0);
-	if (NULL == request_region(vb->iobase, 0xff, board_name)) {
+	vb->iobase = pci_iomap(vb->pdev, 1, 0);
+	if (!request_mem_region(pci_resource_start(vb->pdev, 1),
+	    pci_resource_len(vb->pdev, 1), board_name)) {
 		dev_err(&vb->pdev->dev, "IO Registers are in use by another "
 			"module.\n");
 		retval = -EIO;
@@ -1805,7 +1809,8 @@
 	   Configure the hardware interface.
 	   ---------------------------------------------------------------- */
 	if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
-		release_region(vb->iobase, 0xff);
+		release_mem_region(pci_resource_start(vb->pdev, 1),
+			pci_resource_len(vb->pdev, 1));
 		dev_warn(&vb->pdev->dev, "No suitable DMA available.\n");
 		goto cleanup;
 	}
@@ -1865,7 +1870,7 @@
 		kmem_cache_destroy(vb->buffer_cache);
 
 	if (vb->iobase)
-		release_region(vb->iobase, 0xff);
+		pci_iounmap(vb->pdev, vb->iobase);
 
 	if (vb->pdev)
 		pci_disable_device(vb->pdev);




More information about the dahdi-commits mailing list