[zaptel-commits] jdixon: branch 1.4 r2807 - /branches/1.4/pciradio.c
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Tue Jul 31 19:15:58 CDT 2007
Author: jdixon
Date: Tue Jul 31 19:15:57 2007
New Revision: 2807
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2807
Log:
Merged back in some changes I wasnt aware of
Modified:
branches/1.4/pciradio.c
Modified: branches/1.4/pciradio.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/pciradio.c?view=diff&rev=2807&r1=2806&r2=2807
==============================================================================
--- branches/1.4/pciradio.c (original)
+++ branches/1.4/pciradio.c Tue Jul 31 19:15:57 2007
@@ -2,11 +2,11 @@
* PCI RADIO Card Zapata Telephony PCI Quad Radio Interface driver
*
* Written by Jim Dixon <jim at lambdatel.com>
- * Based on previous work by Mark Spencer <markster at linux-support.net>
+ * Based on previous work by Mark Spencer <markster at digium.com>
* Based on previous works, designs, and archetectures conceived and
* written by Jim Dixon <jim at lambdatel.com>.
*
- * Copyright (C) 2001-2004 Jim Dixon / Zapata Telephony.
+ * Copyright (C) 2001-2007 Jim Dixon / Zapata Telephony.
*
* All rights reserved.
*
@@ -56,7 +56,11 @@
#ifdef STANDALONE_ZAPATA
#include "zaptel.h"
#else
-#include <linux/zaptel.h>
+#include <zaptel/zaptel.h>
+#endif
+
+#ifdef LINUX26
+#include <linux/moduleparam.h>
#endif
#define RAD_MAX_IFACES 128
@@ -170,8 +174,8 @@
volatile unsigned long ioaddr;
dma_addr_t readdma;
dma_addr_t writedma;
- volatile int *writechunk; /* Double-word aligned write memory */
- volatile int *readchunk; /* Double-word aligned read memory */
+ volatile unsigned int *writechunk; /* Double-word aligned write memory */
+ volatile unsigned int *readchunk; /* Double-word aligned read memory */
unsigned char saudio_status[NUM_CHANS];
char gotcor[NUM_CHANS];
char gotct[NUM_CHANS];
@@ -555,7 +559,7 @@
static void _do_encdec(struct pciradio *rad)
{
int i,n;
-unsigned char byte1,byte2;
+unsigned char byte1 = 0,byte2 = 0;
/* return doing nothing if busy */
if ((rad->encdec.lastcmd + 2) > jiffies) return;
@@ -729,11 +733,15 @@
static void pciradio_reset_serial(struct pciradio *rad);
static void pciradio_restart_dma(struct pciradio *rad);
+#ifdef LEAVE_THIS_COMMENTED_OUT
#ifdef LINUX26
static irqreturn_t pciradio_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#else
static void pciradio_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#endif
+#endif
+
+ZAP_IRQ_HANDLER(pciradio_interrupt)
{
struct pciradio *rad = dev_id;
unsigned char ints,byte1,byte2,gotcor,gotctcss,gotslowctcss,ctcss;
@@ -1332,7 +1340,7 @@
if ((rad->rxindex < stack.p.data) &&
(rad->srxtimer < SRX_TIMEOUT) &&
((rad->remmode[chan->chanpos - 1] == ZT_RADPAR_REM_SERIAL) ||
- (!strchr(rad->rxbuf,'\r'))))
+ (!strchr((char *)rad->rxbuf,'\r'))))
{
spin_unlock_irqrestore(&rad->lock,flags);
interruptible_sleep_on_timeout(&mywait,2);
@@ -1752,7 +1760,7 @@
/* Allocate enough memory for two zt chunks, receive and transmit. Each sample uses
32 bits. Allocate an extra set just for control too */
- rad->writechunk = (int *)pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &rad->writedma);
+ rad->writechunk = pci_alloc_consistent(pdev, ZT_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, &rad->writedma);
if (!rad->writechunk) {
printk("pciradio: Unable to allocate DMA-able memory\n");
if (rad->freeregion)
@@ -1807,7 +1815,7 @@
}
- if (request_irq(pdev->irq, pciradio_interrupt, SA_SHIRQ, "pciradio", rad)) {
+ if (request_irq(pdev->irq, pciradio_interrupt, ZAP_IRQ_SHARED, "pciradio", rad)) {
printk("pciradio: Unable to request IRQ %d\n", pdev->irq);
if (rad->freeregion)
release_region(rad->ioaddr, 0xff);
More information about the zaptel-commits
mailing list