“1da177e4c3f41524e886b7f1b8a0c1fc7321cac2”上不存在“fs/ext4/namei.c”
提交 955a9d20 编写于 作者: J Joe Perches 提交者: David S. Miller

irda: Convert IRDA_DEBUG to pr_debug

Use the normal kernel debugging mechanism which also
enables dynamic_debug at the same time.

Other miscellanea:

o Remove sysctl for irda_debug
o Remove function tracing like uses (use ftrace instead)
o Coalesce formats
o Realign arguments
o Remove unnecessary OOM messages
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8d326d81
...@@ -107,8 +107,6 @@ static int act200l_open(struct sir_dev *dev) ...@@ -107,8 +107,6 @@ static int act200l_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __func__ );
/* Power on the dongle */ /* Power on the dongle */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -124,8 +122,6 @@ static int act200l_open(struct sir_dev *dev) ...@@ -124,8 +122,6 @@ static int act200l_open(struct sir_dev *dev)
static int act200l_close(struct sir_dev *dev) static int act200l_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__ );
/* Power off the dongle */ /* Power off the dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -143,8 +139,6 @@ static int act200l_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -143,8 +139,6 @@ static int act200l_change_speed(struct sir_dev *dev, unsigned speed)
u8 control[3]; u8 control[3];
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__ );
/* Clear DTR and set RTS to enter command mode */ /* Clear DTR and set RTS to enter command mode */
sirdev_set_dtr_rts(dev, FALSE, TRUE); sirdev_set_dtr_rts(dev, FALSE, TRUE);
...@@ -212,8 +206,6 @@ static int act200l_reset(struct sir_dev *dev) ...@@ -212,8 +206,6 @@ static int act200l_reset(struct sir_dev *dev)
}; };
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__ );
switch (state) { switch (state) {
case SIRDEV_STATE_DONGLE_RESET: case SIRDEV_STATE_DONGLE_RESET:
/* Reset the dongle : set RTS low for 25 ms */ /* Reset the dongle : set RTS low for 25 ms */
......
...@@ -165,8 +165,7 @@ static int actisys_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -165,8 +165,7 @@ static int actisys_change_speed(struct sir_dev *dev, unsigned speed)
int ret = 0; int ret = 0;
int i = 0; int i = 0;
IRDA_DEBUG(4, "%s(), speed=%d (was %d)\n", __func__, pr_debug("%s(), speed=%d (was %d)\n", __func__, speed, dev->speed);
speed, dev->speed);
/* dongle was already resetted from irda_request state machine, /* dongle was already resetted from irda_request state machine,
* we are in known state (dongle default) * we are in known state (dongle default)
......
此差异已折叠。
...@@ -232,7 +232,7 @@ char head=tete; ...@@ -232,7 +232,7 @@ char head=tete;
for (i=0;i<len;i+=16) { for (i=0;i<len;i+=16) {
for (j=0;j<16 && i+j<len;j++) { sprintf(&dump[3*j],"%02x.",data[i+j]); } for (j=0;j<16 && i+j<len;j++) { sprintf(&dump[3*j],"%02x.",data[i+j]); }
dump [3*j]=0; dump [3*j]=0;
IRDA_DEBUG (2, "%c%s\n",head , dump); pr_debug("%c%s\n", head, dump);
head='+'; head='+';
} }
} }
...@@ -245,8 +245,6 @@ toshoboe_dumpregs (struct toshoboe_cb *self) ...@@ -245,8 +245,6 @@ toshoboe_dumpregs (struct toshoboe_cb *self)
{ {
__u32 ringbase; __u32 ringbase;
IRDA_DEBUG (4, "%s()\n", __func__);
ringbase = INB (OBOE_RING_BASE0) << 10; ringbase = INB (OBOE_RING_BASE0) << 10;
ringbase |= INB (OBOE_RING_BASE1) << 18; ringbase |= INB (OBOE_RING_BASE1) << 18;
ringbase |= INB (OBOE_RING_BASE2) << 26; ringbase |= INB (OBOE_RING_BASE2) << 26;
...@@ -293,8 +291,6 @@ static void ...@@ -293,8 +291,6 @@ static void
toshoboe_disablebm (struct toshoboe_cb *self) toshoboe_disablebm (struct toshoboe_cb *self)
{ {
__u8 command; __u8 command;
IRDA_DEBUG (4, "%s()\n", __func__);
pci_read_config_byte (self->pdev, PCI_COMMAND, &command); pci_read_config_byte (self->pdev, PCI_COMMAND, &command);
command &= ~PCI_COMMAND_MASTER; command &= ~PCI_COMMAND_MASTER;
pci_write_config_byte (self->pdev, PCI_COMMAND, command); pci_write_config_byte (self->pdev, PCI_COMMAND, command);
...@@ -305,8 +301,6 @@ toshoboe_disablebm (struct toshoboe_cb *self) ...@@ -305,8 +301,6 @@ toshoboe_disablebm (struct toshoboe_cb *self)
static void static void
toshoboe_stopchip (struct toshoboe_cb *self) toshoboe_stopchip (struct toshoboe_cb *self)
{ {
IRDA_DEBUG (4, "%s()\n", __func__);
/*Disable interrupts */ /*Disable interrupts */
OUTB (0x0, OBOE_IER); OUTB (0x0, OBOE_IER);
/*Disable DMA, Disable Rx, Disable Tx */ /*Disable DMA, Disable Rx, Disable Tx */
...@@ -350,7 +344,7 @@ toshoboe_setbaud (struct toshoboe_cb *self) ...@@ -350,7 +344,7 @@ toshoboe_setbaud (struct toshoboe_cb *self)
__u16 pconfig = 0; __u16 pconfig = 0;
__u8 config0l = 0; __u8 config0l = 0;
IRDA_DEBUG (2, "%s(%d/%d)\n", __func__, self->speed, self->io.speed); pr_debug("%s(%d/%d)\n", __func__, self->speed, self->io.speed);
switch (self->speed) switch (self->speed)
{ {
...@@ -482,7 +476,6 @@ toshoboe_setbaud (struct toshoboe_cb *self) ...@@ -482,7 +476,6 @@ toshoboe_setbaud (struct toshoboe_cb *self)
static void static void
toshoboe_enablebm (struct toshoboe_cb *self) toshoboe_enablebm (struct toshoboe_cb *self)
{ {
IRDA_DEBUG (4, "%s()\n", __func__);
pci_set_master (self->pdev); pci_set_master (self->pdev);
} }
...@@ -492,8 +485,6 @@ toshoboe_initring (struct toshoboe_cb *self) ...@@ -492,8 +485,6 @@ toshoboe_initring (struct toshoboe_cb *self)
{ {
int i; int i;
IRDA_DEBUG (4, "%s()\n", __func__);
for (i = 0; i < TX_SLOTS; ++i) for (i = 0; i < TX_SLOTS; ++i)
{ {
self->ring->tx[i].len = 0; self->ring->tx[i].len = 0;
...@@ -550,8 +541,6 @@ toshoboe_startchip (struct toshoboe_cb *self) ...@@ -550,8 +541,6 @@ toshoboe_startchip (struct toshoboe_cb *self)
{ {
__u32 physaddr; __u32 physaddr;
IRDA_DEBUG (4, "%s()\n", __func__);
toshoboe_initring (self); toshoboe_initring (self);
toshoboe_enablebm (self); toshoboe_enablebm (self);
OUTBP (OBOE_CONFIG1_RESET, OBOE_CONFIG1); OUTBP (OBOE_CONFIG1_RESET, OBOE_CONFIG1);
...@@ -636,9 +625,8 @@ toshoboe_makemttpacket (struct toshoboe_cb *self, void *buf, int mtt) ...@@ -636,9 +625,8 @@ toshoboe_makemttpacket (struct toshoboe_cb *self, void *buf, int mtt)
xbofs=xbofs/80000; /*Eight bits per byte, and mtt is in us*/ xbofs=xbofs/80000; /*Eight bits per byte, and mtt is in us*/
xbofs++; xbofs++;
IRDA_DEBUG (2, DRIVER_NAME pr_debug(DRIVER_NAME ": generated mtt of %d bytes for %d us at %d baud\n",
": generated mtt of %d bytes for %d us at %d baud\n" xbofs, mtt, self->speed);
, xbofs,mtt,self->speed);
if (xbofs > TX_LEN) if (xbofs > TX_LEN)
{ {
...@@ -824,8 +812,6 @@ toshoboe_probe (struct toshoboe_cb *self) ...@@ -824,8 +812,6 @@ toshoboe_probe (struct toshoboe_cb *self)
#endif #endif
unsigned long flags; unsigned long flags;
IRDA_DEBUG (4, "%s()\n", __func__);
if (request_irq (self->io.irq, toshoboe_probeinterrupt, if (request_irq (self->io.irq, toshoboe_probeinterrupt,
self->io.irqflags, "toshoboe", (void *) self)) self->io.irqflags, "toshoboe", (void *) self))
{ {
...@@ -983,10 +969,10 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) ...@@ -983,10 +969,10 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
IRDA_ASSERT (self != NULL, return NETDEV_TX_OK; ); IRDA_ASSERT (self != NULL, return NETDEV_TX_OK; );
IRDA_DEBUG (1, "%s.tx:%x(%x)%x\n", __func__ pr_debug("%s.tx:%x(%x)%x\n",
,skb->len,self->txpending,INB (OBOE_ENABLEH)); __func__, skb->len, self->txpending, INB(OBOE_ENABLEH));
if (!cb->magic) { if (!cb->magic) {
IRDA_DEBUG (2, "%s.Not IrLAP:%x\n", __func__, cb->magic); pr_debug("%s.Not IrLAP:%x\n", __func__, cb->magic);
#ifdef DUMP_PACKETS #ifdef DUMP_PACKETS
_dumpbufs(skb->data,skb->len,'>'); _dumpbufs(skb->data,skb->len,'>');
#endif #endif
...@@ -1012,8 +998,8 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) ...@@ -1012,8 +998,8 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
if (self->txpending || skb->len) if (self->txpending || skb->len)
{ {
self->new_speed = speed; self->new_speed = speed;
IRDA_DEBUG (1, "%s: Queued TxDone scheduled speed change %d\n" , pr_debug("%s: Queued TxDone scheduled speed change %d\n" ,
__func__, speed); __func__, speed);
/* if no data, that's all! */ /* if no data, that's all! */
if (!skb->len) if (!skb->len)
{ {
...@@ -1055,8 +1041,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) ...@@ -1055,8 +1041,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev)
/* which we will add a wrong checksum to */ /* which we will add a wrong checksum to */
mtt = toshoboe_makemttpacket (self, self->tx_bufs[self->txs], mtt); mtt = toshoboe_makemttpacket (self, self->tx_bufs[self->txs], mtt);
IRDA_DEBUG (1, "%s.mtt:%x(%x)%d\n", __func__ pr_debug("%s.mtt:%x(%x)%d\n", __func__, skb->len, mtt, self->txpending);
,skb->len,mtt,self->txpending);
if (mtt) if (mtt)
{ {
self->ring->tx[self->txs].len = mtt & 0xfff; self->ring->tx[self->txs].len = mtt & 0xfff;
...@@ -1099,8 +1084,9 @@ dumpbufs(skb->data,skb->len,'>'); ...@@ -1099,8 +1084,9 @@ dumpbufs(skb->data,skb->len,'>');
if (self->ring->tx[self->txs].control & OBOE_CTL_TX_HW_OWNS) if (self->ring->tx[self->txs].control & OBOE_CTL_TX_HW_OWNS)
{ {
IRDA_DEBUG (0, "%s.ful:%x(%x)%x\n", __func__ pr_debug("%s.ful:%x(%x)%x\n",
,skb->len, self->ring->tx[self->txs].control, self->txpending); __func__, skb->len, self->ring->tx[self->txs].control,
self->txpending);
toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX);
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
...@@ -1177,8 +1163,7 @@ toshoboe_interrupt (int irq, void *dev_id) ...@@ -1177,8 +1163,7 @@ toshoboe_interrupt (int irq, void *dev_id)
if (self->ring->tx[i].control & OBOE_CTL_TX_HW_OWNS) if (self->ring->tx[i].control & OBOE_CTL_TX_HW_OWNS)
self->txpending++; self->txpending++;
} }
IRDA_DEBUG (1, "%s.txd(%x)%x/%x\n", __func__ pr_debug("%s.txd(%x)%x/%x\n", __func__, irqstat, txp, self->txpending);
,irqstat,txp,self->txpending);
txp = INB (OBOE_TXSLOT) & OBOE_SLOT_MASK; txp = INB (OBOE_TXSLOT) & OBOE_SLOT_MASK;
...@@ -1206,8 +1191,8 @@ toshoboe_interrupt (int irq, void *dev_id) ...@@ -1206,8 +1191,8 @@ toshoboe_interrupt (int irq, void *dev_id)
if ((!self->txpending) && (self->new_speed)) if ((!self->txpending) && (self->new_speed))
{ {
self->speed = self->new_speed; self->speed = self->new_speed;
IRDA_DEBUG (1, "%s: Executed TxDone scheduled speed change %d\n", pr_debug("%s: Executed TxDone scheduled speed change %d\n",
__func__, self->speed); __func__, self->speed);
toshoboe_setbaud (self); toshoboe_setbaud (self);
} }
...@@ -1222,8 +1207,8 @@ toshoboe_interrupt (int irq, void *dev_id) ...@@ -1222,8 +1207,8 @@ toshoboe_interrupt (int irq, void *dev_id)
{ {
int len = self->ring->rx[self->rxs].len; int len = self->ring->rx[self->rxs].len;
skb = NULL; skb = NULL;
IRDA_DEBUG (3, "%s.rcv:%x(%x)\n", __func__ pr_debug("%s.rcv:%x(%x)\n", __func__
,len,self->ring->rx[self->rxs].control); , len, self->ring->rx[self->rxs].control);
#ifdef DUMP_PACKETS #ifdef DUMP_PACKETS
dumpbufs(self->rx_bufs[self->rxs],len,'<'); dumpbufs(self->rx_bufs[self->rxs],len,'<');
...@@ -1244,7 +1229,7 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<'); ...@@ -1244,7 +1229,7 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
len -= 2; len -= 2;
else else
len = 0; len = 0;
IRDA_DEBUG (1, "%s.SIR:%x(%x)\n", __func__, len,enable); pr_debug("%s.SIR:%x(%x)\n", __func__, len, enable);
} }
#ifdef USE_MIR #ifdef USE_MIR
...@@ -1254,7 +1239,7 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<'); ...@@ -1254,7 +1239,7 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
len -= 2; len -= 2;
else else
len = 0; len = 0;
IRDA_DEBUG (2, "%s.MIR:%x(%x)\n", __func__, len,enable); pr_debug("%s.MIR:%x(%x)\n", __func__, len, enable);
} }
#endif #endif
else if (enable & OBOE_ENABLEH_FIRON) else if (enable & OBOE_ENABLEH_FIRON)
...@@ -1263,10 +1248,10 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<'); ...@@ -1263,10 +1248,10 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
len -= 4; /*FIXME: check this */ len -= 4; /*FIXME: check this */
else else
len = 0; len = 0;
IRDA_DEBUG (1, "%s.FIR:%x(%x)\n", __func__, len,enable); pr_debug("%s.FIR:%x(%x)\n", __func__, len, enable);
} }
else else
IRDA_DEBUG (0, "%s.?IR:%x(%x)\n", __func__, len,enable); pr_debug("%s.?IR:%x(%x)\n", __func__, len, enable);
if (len) if (len)
{ {
...@@ -1299,8 +1284,8 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<'); ...@@ -1299,8 +1284,8 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
/* (SIR) data is splitted in several slots. */ /* (SIR) data is splitted in several slots. */
/* we have to join all the received buffers received */ /* we have to join all the received buffers received */
/*in a large buffer before checking CRC. */ /*in a large buffer before checking CRC. */
IRDA_DEBUG (0, "%s.err:%x(%x)\n", __func__ pr_debug("%s.err:%x(%x)\n", __func__
,len,self->ring->rx[self->rxs].control); , len, self->ring->rx[self->rxs].control);
} }
self->ring->rx[self->rxs].len = 0x0; self->ring->rx[self->rxs].len = 0x0;
...@@ -1327,8 +1312,8 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<'); ...@@ -1327,8 +1312,8 @@ dumpbufs(self->rx_bufs[self->rxs],len,'<');
if (irqstat & OBOE_INT_SIP) if (irqstat & OBOE_INT_SIP)
{ {
self->int_sip++; self->int_sip++;
IRDA_DEBUG (1, "%s.sip:%x(%x)%x\n", __func__ pr_debug("%s.sip:%x(%x)%x\n",
,self->int_sip,irqstat,self->txpending); __func__, self->int_sip, irqstat, self->txpending);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -1341,8 +1326,6 @@ toshoboe_net_open (struct net_device *dev) ...@@ -1341,8 +1326,6 @@ toshoboe_net_open (struct net_device *dev)
unsigned long flags; unsigned long flags;
int rc; int rc;
IRDA_DEBUG (4, "%s()\n", __func__);
self = netdev_priv(dev); self = netdev_priv(dev);
if (self->async) if (self->async)
...@@ -1379,8 +1362,6 @@ toshoboe_net_close (struct net_device *dev) ...@@ -1379,8 +1362,6 @@ toshoboe_net_close (struct net_device *dev)
{ {
struct toshoboe_cb *self; struct toshoboe_cb *self;
IRDA_DEBUG (4, "%s()\n", __func__);
IRDA_ASSERT (dev != NULL, return -1; ); IRDA_ASSERT (dev != NULL, return -1; );
self = netdev_priv(dev); self = netdev_priv(dev);
...@@ -1424,7 +1405,7 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1424,7 +1405,7 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
IRDA_ASSERT (self != NULL, return -1; ); IRDA_ASSERT (self != NULL, return -1; );
IRDA_DEBUG (5, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
spin_lock_irqsave(&self->spinlock, flags); spin_lock_irqsave(&self->spinlock, flags);
...@@ -1436,8 +1417,8 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1436,8 +1417,8 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
* speed, so we still must allow for speed change within * speed, so we still must allow for speed change within
* interrupt context. * interrupt context.
*/ */
IRDA_DEBUG (1, "%s(BANDWIDTH), %s, (%X/%ld\n", __func__ pr_debug("%s(BANDWIDTH), %s, (%X/%ld\n",
,dev->name, INB (OBOE_STATUS), irq->ifr_baudrate ); __func__, dev->name, INB(OBOE_STATUS), irq->ifr_baudrate);
if (!in_interrupt () && !capable (CAP_NET_ADMIN)) { if (!in_interrupt () && !capable (CAP_NET_ADMIN)) {
ret = -EPERM; ret = -EPERM;
goto out; goto out;
...@@ -1449,8 +1430,9 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1449,8 +1430,9 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
self->new_speed = irq->ifr_baudrate; self->new_speed = irq->ifr_baudrate;
break; break;
case SIOCSMEDIABUSY: /* Set media busy */ case SIOCSMEDIABUSY: /* Set media busy */
IRDA_DEBUG (1, "%s(MEDIABUSY), %s, (%X/%x)\n", __func__ pr_debug("%s(MEDIABUSY), %s, (%X/%x)\n",
,dev->name, INB (OBOE_STATUS), capable (CAP_NET_ADMIN) ); __func__, dev->name,
INB(OBOE_STATUS), capable(CAP_NET_ADMIN));
if (!capable (CAP_NET_ADMIN)) { if (!capable (CAP_NET_ADMIN)) {
ret = -EPERM; ret = -EPERM;
goto out; goto out;
...@@ -1459,11 +1441,11 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1459,11 +1441,11 @@ toshoboe_net_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
break; break;
case SIOCGRECEIVING: /* Check if we are receiving right now */ case SIOCGRECEIVING: /* Check if we are receiving right now */
irq->ifr_receiving = (INB (OBOE_STATUS) & OBOE_STATUS_RXBUSY) ? 1 : 0; irq->ifr_receiving = (INB (OBOE_STATUS) & OBOE_STATUS_RXBUSY) ? 1 : 0;
IRDA_DEBUG (3, "%s(RECEIVING), %s, (%X/%x)\n", __func__ pr_debug("%s(RECEIVING), %s, (%X/%x)\n",
,dev->name, INB (OBOE_STATUS), irq->ifr_receiving ); __func__, dev->name, INB(OBOE_STATUS), irq->ifr_receiving);
break; break;
default: default:
IRDA_DEBUG (1, "%s(?), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); pr_debug("%s(?), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
} }
out: out:
...@@ -1490,8 +1472,6 @@ toshoboe_close (struct pci_dev *pci_dev) ...@@ -1490,8 +1472,6 @@ toshoboe_close (struct pci_dev *pci_dev)
int i; int i;
struct toshoboe_cb *self = pci_get_drvdata(pci_dev); struct toshoboe_cb *self = pci_get_drvdata(pci_dev);
IRDA_DEBUG (4, "%s()\n", __func__);
IRDA_ASSERT (self != NULL, return; ); IRDA_ASSERT (self != NULL, return; );
if (!self->stopped) if (!self->stopped)
...@@ -1538,8 +1518,6 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid) ...@@ -1538,8 +1518,6 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid)
int ok = 0; int ok = 0;
int err; int err;
IRDA_DEBUG (4, "%s()\n", __func__);
if ((err=pci_enable_device(pci_dev))) if ((err=pci_enable_device(pci_dev)))
return err; return err;
...@@ -1700,8 +1678,6 @@ toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap) ...@@ -1700,8 +1678,6 @@ toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap)
unsigned long flags; unsigned long flags;
int i = 10; int i = 10;
IRDA_DEBUG (4, "%s()\n", __func__);
if (!self || self->stopped) if (!self || self->stopped)
return 0; return 0;
...@@ -1728,8 +1704,6 @@ toshoboe_wakeup (struct pci_dev *pci_dev) ...@@ -1728,8 +1704,6 @@ toshoboe_wakeup (struct pci_dev *pci_dev)
struct toshoboe_cb *self = pci_get_drvdata(pci_dev); struct toshoboe_cb *self = pci_get_drvdata(pci_dev);
unsigned long flags; unsigned long flags;
IRDA_DEBUG (4, "%s()\n", __func__);
if (!self || !self->stopped) if (!self || !self->stopped)
return 0; return 0;
......
...@@ -86,8 +86,6 @@ static int girbil_open(struct sir_dev *dev) ...@@ -86,8 +86,6 @@ static int girbil_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power on dongle */ /* Power on dongle */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -102,8 +100,6 @@ static int girbil_open(struct sir_dev *dev) ...@@ -102,8 +100,6 @@ static int girbil_open(struct sir_dev *dev)
static int girbil_close(struct sir_dev *dev) static int girbil_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -126,8 +122,6 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -126,8 +122,6 @@ static int girbil_change_speed(struct sir_dev *dev, unsigned speed)
u8 control[2]; u8 control[2];
static int ret = 0; static int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__);
/* dongle alread reset - port and dongle at default speed */ /* dongle alread reset - port and dongle at default speed */
switch(state) { switch(state) {
...@@ -210,8 +204,6 @@ static int girbil_reset(struct sir_dev *dev) ...@@ -210,8 +204,6 @@ static int girbil_reset(struct sir_dev *dev)
u8 control = GIRBIL_TXEN | GIRBIL_RXEN; u8 control = GIRBIL_TXEN | GIRBIL_RXEN;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__);
switch (state) { switch (state) {
case SIRDEV_STATE_DONGLE_RESET: case SIRDEV_STATE_DONGLE_RESET:
/* Reset dongle */ /* Reset dongle */
......
...@@ -176,12 +176,13 @@ static void irda_usb_build_header(struct irda_usb_cb *self, ...@@ -176,12 +176,13 @@ static void irda_usb_build_header(struct irda_usb_cb *self,
(!force) && (self->speed != -1)) { (!force) && (self->speed != -1)) {
/* No speed and xbofs change here /* No speed and xbofs change here
* (we'll do it later in the write callback) */ * (we'll do it later in the write callback) */
IRDA_DEBUG(2, "%s(), not changing speed yet\n", __func__); pr_debug("%s(), not changing speed yet\n", __func__);
*header = 0; *header = 0;
return; return;
} }
IRDA_DEBUG(2, "%s(), changing speed to %d\n", __func__, self->new_speed); pr_debug("%s(), changing speed to %d\n",
__func__, self->new_speed);
self->speed = self->new_speed; self->speed = self->new_speed;
/* We will do ` self->new_speed = -1; ' in the completion /* We will do ` self->new_speed = -1; ' in the completion
* handler just in case the current URB fail - Jean II */ * handler just in case the current URB fail - Jean II */
...@@ -227,7 +228,8 @@ static void irda_usb_build_header(struct irda_usb_cb *self, ...@@ -227,7 +228,8 @@ static void irda_usb_build_header(struct irda_usb_cb *self,
/* Set the negotiated additional XBOFS */ /* Set the negotiated additional XBOFS */
if (self->new_xbofs != -1) { if (self->new_xbofs != -1) {
IRDA_DEBUG(2, "%s(), changing xbofs to %d\n", __func__, self->new_xbofs); pr_debug("%s(), changing xbofs to %d\n",
__func__, self->new_xbofs);
self->xbofs = self->new_xbofs; self->xbofs = self->new_xbofs;
/* We will do ` self->new_xbofs = -1; ' in the completion /* We will do ` self->new_xbofs = -1; ' in the completion
* handler just in case the current URB fail - Jean II */ * handler just in case the current URB fail - Jean II */
...@@ -301,8 +303,8 @@ static void irda_usb_change_speed_xbofs(struct irda_usb_cb *self) ...@@ -301,8 +303,8 @@ static void irda_usb_change_speed_xbofs(struct irda_usb_cb *self)
struct urb *urb; struct urb *urb;
int ret; int ret;
IRDA_DEBUG(2, "%s(), speed=%d, xbofs=%d\n", __func__, pr_debug("%s(), speed=%d, xbofs=%d\n", __func__,
self->new_speed, self->new_xbofs); self->new_speed, self->new_xbofs);
/* Grab the speed URB */ /* Grab the speed URB */
urb = self->speed_urb; urb = self->speed_urb;
...@@ -346,8 +348,6 @@ static void speed_bulk_callback(struct urb *urb) ...@@ -346,8 +348,6 @@ static void speed_bulk_callback(struct urb *urb)
{ {
struct irda_usb_cb *self = urb->context; struct irda_usb_cb *self = urb->context;
IRDA_DEBUG(2, "%s()\n", __func__);
/* We should always have a context */ /* We should always have a context */
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
/* We should always be called for the speed URB */ /* We should always be called for the speed URB */
...@@ -356,7 +356,8 @@ static void speed_bulk_callback(struct urb *urb) ...@@ -356,7 +356,8 @@ static void speed_bulk_callback(struct urb *urb)
/* Check for timeout and other USB nasties */ /* Check for timeout and other USB nasties */
if (urb->status != 0) { if (urb->status != 0) {
/* I get a lot of -ECONNABORTED = -103 here - Jean II */ /* I get a lot of -ECONNABORTED = -103 here - Jean II */
IRDA_DEBUG(0, "%s(), URB complete status %d, transfer_flags 0x%04X\n", __func__, urb->status, urb->transfer_flags); pr_debug("%s(), URB complete status %d, transfer_flags 0x%04X\n",
__func__, urb->status, urb->transfer_flags);
/* Don't do anything here, that might confuse the USB layer. /* Don't do anything here, that might confuse the USB layer.
* Instead, we will wait for irda_usb_net_timeout(), the * Instead, we will wait for irda_usb_net_timeout(), the
...@@ -391,7 +392,7 @@ static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb, ...@@ -391,7 +392,7 @@ static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb,
s16 xbofs; s16 xbofs;
int res, mtt; int res, mtt;
IRDA_DEBUG(4, "%s() on %s\n", __func__, netdev->name); pr_debug("%s() on %s\n", __func__, netdev->name);
netif_stop_queue(netdev); netif_stop_queue(netdev);
...@@ -402,7 +403,7 @@ static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb, ...@@ -402,7 +403,7 @@ static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb,
* We need to check self->present under the spinlock because * We need to check self->present under the spinlock because
* of irda_usb_disconnect() is synchronous - Jean II */ * of irda_usb_disconnect() is synchronous - Jean II */
if (!self->present) { if (!self->present) {
IRDA_DEBUG(0, "%s(), Device is gone...\n", __func__); pr_debug("%s(), Device is gone...\n", __func__);
goto drop; goto drop;
} }
...@@ -554,8 +555,6 @@ static void write_bulk_callback(struct urb *urb) ...@@ -554,8 +555,6 @@ static void write_bulk_callback(struct urb *urb)
struct sk_buff *skb = urb->context; struct sk_buff *skb = urb->context;
struct irda_usb_cb *self = ((struct irda_skb_cb *) skb->cb)->context; struct irda_usb_cb *self = ((struct irda_skb_cb *) skb->cb)->context;
IRDA_DEBUG(2, "%s()\n", __func__);
/* We should always have a context */ /* We should always have a context */
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
/* We should always be called for the speed URB */ /* We should always be called for the speed URB */
...@@ -568,7 +567,8 @@ static void write_bulk_callback(struct urb *urb) ...@@ -568,7 +567,8 @@ static void write_bulk_callback(struct urb *urb)
/* Check for timeout and other USB nasties */ /* Check for timeout and other USB nasties */
if (urb->status != 0) { if (urb->status != 0) {
/* I get a lot of -ECONNABORTED = -103 here - Jean II */ /* I get a lot of -ECONNABORTED = -103 here - Jean II */
IRDA_DEBUG(0, "%s(), URB complete status %d, transfer_flags 0x%04X\n", __func__, urb->status, urb->transfer_flags); pr_debug("%s(), URB complete status %d, transfer_flags 0x%04X\n",
__func__, urb->status, urb->transfer_flags);
/* Don't do anything here, that might confuse the USB layer, /* Don't do anything here, that might confuse the USB layer,
* and we could go in recursion and blow the kernel stack... * and we could go in recursion and blow the kernel stack...
...@@ -587,7 +587,7 @@ static void write_bulk_callback(struct urb *urb) ...@@ -587,7 +587,7 @@ static void write_bulk_callback(struct urb *urb)
/* If the network is closed, stop everything */ /* If the network is closed, stop everything */
if ((!self->netopen) || (!self->present)) { if ((!self->netopen) || (!self->present)) {
IRDA_DEBUG(0, "%s(), Network is gone...\n", __func__); pr_debug("%s(), Network is gone...\n", __func__);
spin_unlock_irqrestore(&self->lock, flags); spin_unlock_irqrestore(&self->lock, flags);
return; return;
} }
...@@ -598,7 +598,7 @@ static void write_bulk_callback(struct urb *urb) ...@@ -598,7 +598,7 @@ static void write_bulk_callback(struct urb *urb)
(self->new_xbofs != self->xbofs)) { (self->new_xbofs != self->xbofs)) {
/* We haven't changed speed yet (because of /* We haven't changed speed yet (because of
* IUC_SPEED_BUG), so do it now - Jean II */ * IUC_SPEED_BUG), so do it now - Jean II */
IRDA_DEBUG(1, "%s(), Changing speed now...\n", __func__); pr_debug("%s(), Changing speed now...\n", __func__);
irda_usb_change_speed_xbofs(self); irda_usb_change_speed_xbofs(self);
} else { } else {
/* New speed and xbof is now committed in hardware */ /* New speed and xbof is now committed in hardware */
...@@ -630,7 +630,7 @@ static void irda_usb_net_timeout(struct net_device *netdev) ...@@ -630,7 +630,7 @@ static void irda_usb_net_timeout(struct net_device *netdev)
struct urb *urb; struct urb *urb;
int done = 0; /* If we have made any progress */ int done = 0; /* If we have made any progress */
IRDA_DEBUG(0, "%s(), Network layer thinks we timed out!\n", __func__); pr_debug("%s(), Network layer thinks we timed out!\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
/* Protect us from USB callbacks, net Tx and else. */ /* Protect us from USB callbacks, net Tx and else. */
...@@ -647,7 +647,8 @@ static void irda_usb_net_timeout(struct net_device *netdev) ...@@ -647,7 +647,8 @@ static void irda_usb_net_timeout(struct net_device *netdev)
/* Check speed URB */ /* Check speed URB */
urb = self->speed_urb; urb = self->speed_urb;
if (urb->status != 0) { if (urb->status != 0) {
IRDA_DEBUG(0, "%s: Speed change timed out, urb->status=%d, urb->transfer_flags=0x%04X\n", netdev->name, urb->status, urb->transfer_flags); pr_debug("%s: Speed change timed out, urb->status=%d, urb->transfer_flags=0x%04X\n",
netdev->name, urb->status, urb->transfer_flags);
switch (urb->status) { switch (urb->status) {
case -EINPROGRESS: case -EINPROGRESS:
...@@ -672,7 +673,8 @@ static void irda_usb_net_timeout(struct net_device *netdev) ...@@ -672,7 +673,8 @@ static void irda_usb_net_timeout(struct net_device *netdev)
if (urb->status != 0) { if (urb->status != 0) {
struct sk_buff *skb = urb->context; struct sk_buff *skb = urb->context;
IRDA_DEBUG(0, "%s: Tx timed out, urb->status=%d, urb->transfer_flags=0x%04X\n", netdev->name, urb->status, urb->transfer_flags); pr_debug("%s: Tx timed out, urb->status=%d, urb->transfer_flags=0x%04X\n",
netdev->name, urb->status, urb->transfer_flags);
/* Increase error count */ /* Increase error count */
netdev->stats.tx_errors++; netdev->stats.tx_errors++;
...@@ -761,8 +763,6 @@ static void irda_usb_submit(struct irda_usb_cb *self, struct sk_buff *skb, struc ...@@ -761,8 +763,6 @@ static void irda_usb_submit(struct irda_usb_cb *self, struct sk_buff *skb, struc
struct irda_skb_cb *cb; struct irda_skb_cb *cb;
int ret; int ret;
IRDA_DEBUG(2, "%s()\n", __func__);
/* This should never happen */ /* This should never happen */
IRDA_ASSERT(skb != NULL, return;); IRDA_ASSERT(skb != NULL, return;);
IRDA_ASSERT(urb != NULL, return;); IRDA_ASSERT(urb != NULL, return;);
...@@ -805,7 +805,7 @@ static void irda_usb_receive(struct urb *urb) ...@@ -805,7 +805,7 @@ static void irda_usb_receive(struct urb *urb)
struct urb *next_urb; struct urb *next_urb;
unsigned int len, docopy; unsigned int len, docopy;
IRDA_DEBUG(2, "%s(), len=%d\n", __func__, urb->actual_length); pr_debug("%s(), len=%d\n", __func__, urb->actual_length);
/* Find ourselves */ /* Find ourselves */
cb = (struct irda_skb_cb *) skb->cb; cb = (struct irda_skb_cb *) skb->cb;
...@@ -815,7 +815,7 @@ static void irda_usb_receive(struct urb *urb) ...@@ -815,7 +815,7 @@ static void irda_usb_receive(struct urb *urb)
/* If the network is closed or the device gone, stop everything */ /* If the network is closed or the device gone, stop everything */
if ((!self->netopen) || (!self->present)) { if ((!self->netopen) || (!self->present)) {
IRDA_DEBUG(0, "%s(), Network is gone!\n", __func__); pr_debug("%s(), Network is gone!\n", __func__);
/* Don't re-submit the URB : will stall the Rx path */ /* Don't re-submit the URB : will stall the Rx path */
return; return;
} }
...@@ -838,7 +838,8 @@ static void irda_usb_receive(struct urb *urb) ...@@ -838,7 +838,8 @@ static void irda_usb_receive(struct urb *urb)
/* Usually precursor to a hot-unplug on OHCI. */ /* Usually precursor to a hot-unplug on OHCI. */
default: default:
self->netdev->stats.rx_errors++; self->netdev->stats.rx_errors++;
IRDA_DEBUG(0, "%s(), RX status %d, transfer_flags 0x%04X\n", __func__, urb->status, urb->transfer_flags); pr_debug("%s(), RX status %d, transfer_flags 0x%04X\n",
__func__, urb->status, urb->transfer_flags);
break; break;
} }
/* If we received an error, we don't want to resubmit the /* If we received an error, we don't want to resubmit the
...@@ -964,8 +965,6 @@ static void irda_usb_rx_defer_expired(unsigned long data) ...@@ -964,8 +965,6 @@ static void irda_usb_rx_defer_expired(unsigned long data)
struct irda_skb_cb *cb; struct irda_skb_cb *cb;
struct urb *next_urb; struct urb *next_urb;
IRDA_DEBUG(2, "%s()\n", __func__);
/* Find ourselves */ /* Find ourselves */
cb = (struct irda_skb_cb *) skb->cb; cb = (struct irda_skb_cb *) skb->cb;
IRDA_ASSERT(cb != NULL, return;); IRDA_ASSERT(cb != NULL, return;);
...@@ -1049,8 +1048,8 @@ static int stir421x_fw_upload(struct irda_usb_cb *self, ...@@ -1049,8 +1048,8 @@ static int stir421x_fw_upload(struct irda_usb_cb *self,
self->bulk_out_ep), self->bulk_out_ep),
patch_block, block_size, patch_block, block_size,
&actual_len, msecs_to_jiffies(500)); &actual_len, msecs_to_jiffies(500));
IRDA_DEBUG(3,"%s(): Bulk send %u bytes, ret=%d\n", pr_debug("%s(): Bulk send %u bytes, ret=%d\n",
__func__, actual_len, ret); __func__, actual_len, ret);
if (ret < 0) if (ret < 0)
break; break;
...@@ -1112,8 +1111,8 @@ static int stir421x_patch_device(struct irda_usb_cb *self) ...@@ -1112,8 +1111,8 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
+ ((build / 10) << 4) + ((build / 10) << 4)
+ (build % 10); + (build % 10);
IRDA_DEBUG(3, "%s(): Firmware Product version %ld\n", pr_debug("%s(): Firmware Product version %ld\n",
__func__, fw_version); __func__, fw_version);
} }
} }
...@@ -1169,8 +1168,6 @@ static int irda_usb_net_open(struct net_device *netdev) ...@@ -1169,8 +1168,6 @@ static int irda_usb_net_open(struct net_device *netdev)
char hwname[16]; char hwname[16];
int i; int i;
IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(netdev != NULL, return -1;); IRDA_ASSERT(netdev != NULL, return -1;);
self = netdev_priv(netdev); self = netdev_priv(netdev);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -1249,8 +1246,6 @@ static int irda_usb_net_close(struct net_device *netdev) ...@@ -1249,8 +1246,6 @@ static int irda_usb_net_close(struct net_device *netdev)
struct irda_usb_cb *self; struct irda_usb_cb *self;
int i; int i;
IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(netdev != NULL, return -1;); IRDA_ASSERT(netdev != NULL, return -1;);
self = netdev_priv(netdev); self = netdev_priv(netdev);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -1304,7 +1299,7 @@ static int irda_usb_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1304,7 +1299,7 @@ static int irda_usb_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
self = netdev_priv(dev); self = netdev_priv(dev);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
switch (cmd) { switch (cmd) {
case SIOCSBANDWIDTH: /* Set bandwidth */ case SIOCSBANDWIDTH: /* Set bandwidth */
...@@ -1354,7 +1349,6 @@ static inline void irda_usb_init_qos(struct irda_usb_cb *self) ...@@ -1354,7 +1349,6 @@ static inline void irda_usb_init_qos(struct irda_usb_cb *self)
{ {
struct irda_class_desc *desc; struct irda_class_desc *desc;
IRDA_DEBUG(3, "%s()\n", __func__);
desc = self->irda_desc; desc = self->irda_desc;
...@@ -1370,8 +1364,10 @@ static inline void irda_usb_init_qos(struct irda_usb_cb *self) ...@@ -1370,8 +1364,10 @@ static inline void irda_usb_init_qos(struct irda_usb_cb *self)
self->qos.window_size.bits = desc->bmWindowSize; self->qos.window_size.bits = desc->bmWindowSize;
self->qos.data_size.bits = desc->bmDataSize; self->qos.data_size.bits = desc->bmDataSize;
IRDA_DEBUG(0, "%s(), dongle says speed=0x%X, size=0x%X, window=0x%X, bofs=0x%X, turn=0x%X\n", pr_debug("%s(), dongle says speed=0x%X, size=0x%X, window=0x%X, bofs=0x%X, turn=0x%X\n",
__func__, self->qos.baud_rate.bits, self->qos.data_size.bits, self->qos.window_size.bits, self->qos.additional_bofs.bits, self->qos.min_turn_time.bits); __func__, self->qos.baud_rate.bits, self->qos.data_size.bits,
self->qos.window_size.bits, self->qos.additional_bofs.bits,
self->qos.min_turn_time.bits);
/* Don't always trust what the dongle tell us */ /* Don't always trust what the dongle tell us */
if(self->capability & IUC_SIR_ONLY) if(self->capability & IUC_SIR_ONLY)
...@@ -1414,8 +1410,6 @@ static inline int irda_usb_open(struct irda_usb_cb *self) ...@@ -1414,8 +1410,6 @@ static inline int irda_usb_open(struct irda_usb_cb *self)
{ {
struct net_device *netdev = self->netdev; struct net_device *netdev = self->netdev;
IRDA_DEBUG(1, "%s()\n", __func__);
netdev->netdev_ops = &irda_usb_netdev_ops; netdev->netdev_ops = &irda_usb_netdev_ops;
irda_usb_init_qos(self); irda_usb_init_qos(self);
...@@ -1430,8 +1424,6 @@ static inline int irda_usb_open(struct irda_usb_cb *self) ...@@ -1430,8 +1424,6 @@ static inline int irda_usb_open(struct irda_usb_cb *self)
*/ */
static inline void irda_usb_close(struct irda_usb_cb *self) static inline void irda_usb_close(struct irda_usb_cb *self)
{ {
IRDA_DEBUG(1, "%s()\n", __func__);
/* Remove netdevice */ /* Remove netdevice */
unregister_netdev(self->netdev); unregister_netdev(self->netdev);
...@@ -1509,8 +1501,9 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_ ...@@ -1509,8 +1501,9 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_
} }
} }
IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n", pr_debug("%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n",
__func__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); __func__, self->bulk_in_ep, self->bulk_out_ep,
self->bulk_out_mtu, self->bulk_int_ep);
return (self->bulk_in_ep != 0) && (self->bulk_out_ep != 0); return (self->bulk_in_ep != 0) && (self->bulk_out_ep != 0);
} }
...@@ -1572,7 +1565,7 @@ static inline struct irda_class_desc *irda_usb_find_class_desc(struct usb_interf ...@@ -1572,7 +1565,7 @@ static inline struct irda_class_desc *irda_usb_find_class_desc(struct usb_interf
0, intf->altsetting->desc.bInterfaceNumber, desc, 0, intf->altsetting->desc.bInterfaceNumber, desc,
sizeof(*desc), 500); sizeof(*desc), 500);
IRDA_DEBUG(1, "%s(), ret=%d\n", __func__, ret); pr_debug("%s(), ret=%d\n", __func__, ret);
if (ret < sizeof(*desc)) { if (ret < sizeof(*desc)) {
net_warn_ratelimited("usb-irda: class_descriptor read %s (%d)\n", net_warn_ratelimited("usb-irda: class_descriptor read %s (%d)\n",
ret < 0 ? "failed" : "too short", ret); ret < 0 ? "failed" : "too short", ret);
...@@ -1679,7 +1672,8 @@ static int irda_usb_probe(struct usb_interface *intf, ...@@ -1679,7 +1672,8 @@ static int irda_usb_probe(struct usb_interface *intf,
* specify an alternate, but very few driver do like this. * specify an alternate, but very few driver do like this.
* Jean II */ * Jean II */
ret = usb_set_interface(dev, intf->altsetting->desc.bInterfaceNumber, 0); ret = usb_set_interface(dev, intf->altsetting->desc.bInterfaceNumber, 0);
IRDA_DEBUG(1, "usb-irda: set interface %d result %d\n", intf->altsetting->desc.bInterfaceNumber, ret); pr_debug("usb-irda: set interface %d result %d\n",
intf->altsetting->desc.bInterfaceNumber, ret);
switch (ret) { switch (ret) {
case 0: case 0:
break; break;
...@@ -1687,10 +1681,11 @@ static int irda_usb_probe(struct usb_interface *intf, ...@@ -1687,10 +1681,11 @@ static int irda_usb_probe(struct usb_interface *intf,
/* Martin Diehl says if we get a -EPIPE we should /* Martin Diehl says if we get a -EPIPE we should
* be fine and we don't need to do a usb_clear_halt(). * be fine and we don't need to do a usb_clear_halt().
* - Jean II */ * - Jean II */
IRDA_DEBUG(0, "%s(), Received -EPIPE, ignoring...\n", __func__); pr_debug("%s(), Received -EPIPE, ignoring...\n",
__func__);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown error %d\n", __func__, ret); pr_debug("%s(), Unknown error %d\n", __func__, ret);
ret = -EIO; ret = -EIO;
goto err_out_3; goto err_out_3;
} }
...@@ -1716,7 +1711,7 @@ static int irda_usb_probe(struct usb_interface *intf, ...@@ -1716,7 +1711,7 @@ static int irda_usb_probe(struct usb_interface *intf,
ret = usb_control_msg (self->usbdev, usb_sndctrlpipe (self->usbdev, 0), ret = usb_control_msg (self->usbdev, usb_sndctrlpipe (self->usbdev, 0),
0x02, 0x40, 0, 0, NULL, 0, 500); 0x02, 0x40, 0, 0, NULL, 0, 500);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG (0, "usb_control_msg failed %d\n", ret); pr_debug("usb_control_msg failed %d\n", ret);
goto err_out_3; goto err_out_3;
} else { } else {
mdelay(10); mdelay(10);
...@@ -1808,8 +1803,6 @@ static void irda_usb_disconnect(struct usb_interface *intf) ...@@ -1808,8 +1803,6 @@ static void irda_usb_disconnect(struct usb_interface *intf)
struct irda_usb_cb *self = usb_get_intfdata(intf); struct irda_usb_cb *self = usb_get_intfdata(intf);
int i; int i;
IRDA_DEBUG(1, "%s()\n", __func__);
usb_set_intfdata(intf, NULL); usb_set_intfdata(intf, NULL);
if (!self) if (!self)
return; return;
...@@ -1858,7 +1851,7 @@ static void irda_usb_disconnect(struct usb_interface *intf) ...@@ -1858,7 +1851,7 @@ static void irda_usb_disconnect(struct usb_interface *intf)
/* Free self and network device */ /* Free self and network device */
free_netdev(self->netdev); free_netdev(self->netdev);
IRDA_DEBUG(0, "%s(), USB IrDA Disconnected\n", __func__); pr_debug("%s(), USB IrDA Disconnected\n", __func__);
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
......
...@@ -240,7 +240,7 @@ static void irtty_receive_buf(struct tty_struct *tty, const unsigned char *cp, ...@@ -240,7 +240,7 @@ static void irtty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
* Characters received with a parity error, etc? * Characters received with a parity error, etc?
*/ */
if (fp && *fp++) { if (fp && *fp++) {
IRDA_DEBUG(0, "Framing or parity error!\n"); pr_debug("Framing or parity error!\n");
sirdev_receive(dev, NULL, 0); /* notify sir_dev (updating stats) */ sirdev_receive(dev, NULL, 0); /* notify sir_dev (updating stats) */
return; return;
} }
...@@ -387,7 +387,7 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c ...@@ -387,7 +387,7 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
IRDA_ASSERT(priv != NULL, return -ENODEV;); IRDA_ASSERT(priv != NULL, return -ENODEV;);
IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;); IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;);
IRDA_DEBUG(3, "%s(cmd=0x%X)\n", __func__, cmd); pr_debug("%s(cmd=0x%X)\n", __func__, cmd);
dev = priv->dev; dev = priv->dev;
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
...@@ -477,7 +477,7 @@ static int irtty_open(struct tty_struct *tty) ...@@ -477,7 +477,7 @@ static int irtty_open(struct tty_struct *tty)
mutex_unlock(&irtty_mutex); mutex_unlock(&irtty_mutex);
IRDA_DEBUG(0, "%s - %s: irda line discipline opened\n", __func__, tty->name); pr_debug("%s - %s: irda line discipline opened\n", __func__, tty->name);
return 0; return 0;
...@@ -528,7 +528,7 @@ static void irtty_close(struct tty_struct *tty) ...@@ -528,7 +528,7 @@ static void irtty_close(struct tty_struct *tty)
kfree(priv); kfree(priv);
IRDA_DEBUG(0, "%s - %s: irda line discipline closed\n", __func__, tty->name); pr_debug("%s - %s: irda line discipline closed\n", __func__, tty->name);
} }
/* ------------------------------------------------------- */ /* ------------------------------------------------------- */
......
...@@ -76,8 +76,6 @@ static int litelink_open(struct sir_dev *dev) ...@@ -76,8 +76,6 @@ static int litelink_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power up dongle */ /* Power up dongle */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -93,8 +91,6 @@ static int litelink_open(struct sir_dev *dev) ...@@ -93,8 +91,6 @@ static int litelink_open(struct sir_dev *dev)
static int litelink_close(struct sir_dev *dev) static int litelink_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -111,8 +107,6 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -111,8 +107,6 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed)
{ {
int i; int i;
IRDA_DEBUG(2, "%s()\n", __func__);
/* dongle already reset by irda-thread - current speed (dongle and /* dongle already reset by irda-thread - current speed (dongle and
* port) is the default speed (115200 for litelink!) * port) is the default speed (115200 for litelink!)
*/ */
...@@ -154,8 +148,6 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -154,8 +148,6 @@ static int litelink_change_speed(struct sir_dev *dev, unsigned speed)
*/ */
static int litelink_reset(struct sir_dev *dev) static int litelink_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* probably the power-up can be dropped here, but with only /* probably the power-up can be dropped here, but with only
* 15 usec delay it's not worth the risk unless somebody with * 15 usec delay it's not worth the risk unless somebody with
* the hardware confirms it doesn't break anything... * the hardware confirms it doesn't break anything...
......
...@@ -65,13 +65,11 @@ static struct dongle_driver ma600 = { ...@@ -65,13 +65,11 @@ static struct dongle_driver ma600 = {
static int __init ma600_sir_init(void) static int __init ma600_sir_init(void)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
return irda_register_dongle(&ma600); return irda_register_dongle(&ma600);
} }
static void __exit ma600_sir_cleanup(void) static void __exit ma600_sir_cleanup(void)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
irda_unregister_dongle(&ma600); irda_unregister_dongle(&ma600);
} }
...@@ -86,8 +84,6 @@ static int ma600_open(struct sir_dev *dev) ...@@ -86,8 +84,6 @@ static int ma600_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __func__);
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
/* Explicitly set the speeds we can accept */ /* Explicitly set the speeds we can accept */
...@@ -104,8 +100,6 @@ static int ma600_open(struct sir_dev *dev) ...@@ -104,8 +100,6 @@ static int ma600_open(struct sir_dev *dev)
static int ma600_close(struct sir_dev *dev) static int ma600_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -174,8 +168,8 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -174,8 +168,8 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
{ {
u8 byte; u8 byte;
IRDA_DEBUG(2, "%s(), speed=%d (was %d)\n", __func__, pr_debug("%s(), speed=%d (was %d)\n", __func__,
speed, dev->speed); speed, dev->speed);
/* dongle already reset, dongle and port at default speed (9600) */ /* dongle already reset, dongle and port at default speed (9600) */
...@@ -204,7 +198,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -204,7 +198,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
return -1; return -1;
} }
else else
IRDA_DEBUG(2, "%s() control byte write read OK\n", __func__); pr_debug("%s() control byte write read OK\n", __func__);
#endif #endif
/* Set DTR, Set RTS */ /* Set DTR, Set RTS */
...@@ -236,8 +230,6 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -236,8 +230,6 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
static int ma600_reset(struct sir_dev *dev) static int ma600_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Reset the dongle : set DTR low for 10 ms */ /* Reset the dongle : set DTR low for 10 ms */
sirdev_set_dtr_rts(dev, FALSE, TRUE); sirdev_set_dtr_rts(dev, FALSE, TRUE);
msleep(10); msleep(10);
......
...@@ -63,8 +63,6 @@ static int mcp2120_open(struct sir_dev *dev) ...@@ -63,8 +63,6 @@ static int mcp2120_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __func__);
/* seems no explicit power-on required here and reset switching it on anyway */ /* seems no explicit power-on required here and reset switching it on anyway */
qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200; qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
...@@ -76,8 +74,6 @@ static int mcp2120_open(struct sir_dev *dev) ...@@ -76,8 +74,6 @@ static int mcp2120_open(struct sir_dev *dev)
static int mcp2120_close(struct sir_dev *dev) static int mcp2120_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
/* reset and inhibit mcp2120 */ /* reset and inhibit mcp2120 */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -102,8 +98,6 @@ static int mcp2120_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -102,8 +98,6 @@ static int mcp2120_change_speed(struct sir_dev *dev, unsigned speed)
u8 control[2]; u8 control[2];
static int ret = 0; static int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__);
switch (state) { switch (state) {
case SIRDEV_STATE_DONGLE_SPEED: case SIRDEV_STATE_DONGLE_SPEED:
/* Set DTR to enter command mode */ /* Set DTR to enter command mode */
...@@ -188,8 +182,6 @@ static int mcp2120_reset(struct sir_dev *dev) ...@@ -188,8 +182,6 @@ static int mcp2120_reset(struct sir_dev *dev)
unsigned delay = 0; unsigned delay = 0;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__);
switch (state) { switch (state) {
case SIRDEV_STATE_DONGLE_RESET: case SIRDEV_STATE_DONGLE_RESET:
//printk("mcp2120_reset: dongle_reset\n"); //printk("mcp2120_reset: dongle_reset\n");
......
...@@ -894,7 +894,7 @@ static int mcs_probe(struct usb_interface *intf, ...@@ -894,7 +894,7 @@ static int mcs_probe(struct usb_interface *intf,
if (!ndev) if (!ndev)
goto error1; goto error1;
IRDA_DEBUG(1, "MCS7780 USB-IrDA bridge found at %d.\n", udev->devnum); pr_debug("MCS7780 USB-IrDA bridge found at %d.\n", udev->devnum);
SET_NETDEV_DEV(ndev, &intf->dev); SET_NETDEV_DEV(ndev, &intf->dev);
...@@ -942,8 +942,8 @@ static int mcs_probe(struct usb_interface *intf, ...@@ -942,8 +942,8 @@ static int mcs_probe(struct usb_interface *intf,
if (ret != 0) if (ret != 0)
goto error2; goto error2;
IRDA_DEBUG(1, "IrDA: Registered MosChip MCS7780 device as %s\n", pr_debug("IrDA: Registered MosChip MCS7780 device as %s\n",
ndev->name); ndev->name);
mcs->transceiver_type = transceiver_type; mcs->transceiver_type = transceiver_type;
mcs->sir_tweak = sir_tweak; mcs->sir_tweak = sir_tweak;
...@@ -973,7 +973,7 @@ static void mcs_disconnect(struct usb_interface *intf) ...@@ -973,7 +973,7 @@ static void mcs_disconnect(struct usb_interface *intf)
free_netdev(mcs->netdev); free_netdev(mcs->netdev);
usb_set_intfdata(intf, NULL); usb_set_intfdata(intf, NULL);
IRDA_DEBUG(0, "MCS7780 now disconnected.\n"); pr_debug("MCS7780 now disconnected.\n");
} }
module_usb_driver(mcs_driver); module_usb_driver(mcs_driver);
...@@ -226,8 +226,8 @@ static int __init nsc_ircc_init(void) ...@@ -226,8 +226,8 @@ static int __init nsc_ircc_init(void)
/* Probe for all the NSC chipsets we know about */ /* Probe for all the NSC chipsets we know about */
for (chip = chips; chip->name ; chip++) { for (chip = chips; chip->name ; chip++) {
IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __func__, pr_debug("%s(), Probing for %s ...\n", __func__,
chip->name); chip->name);
/* Try all config registers for this chip */ /* Try all config registers for this chip */
for (cfg = 0; cfg < ARRAY_SIZE(chip->cfg); cfg++) { for (cfg = 0; cfg < ARRAY_SIZE(chip->cfg); cfg++) {
...@@ -238,7 +238,8 @@ static int __init nsc_ircc_init(void) ...@@ -238,7 +238,8 @@ static int __init nsc_ircc_init(void)
/* Read index register */ /* Read index register */
reg = inb(cfg_base); reg = inb(cfg_base);
if (reg == 0xff) { if (reg == 0xff) {
IRDA_DEBUG(2, "%s() no chip at 0x%03x\n", __func__, cfg_base); pr_debug("%s() no chip at 0x%03x\n",
__func__, cfg_base);
continue; continue;
} }
...@@ -246,8 +247,9 @@ static int __init nsc_ircc_init(void) ...@@ -246,8 +247,9 @@ static int __init nsc_ircc_init(void)
outb(chip->cid_index, cfg_base); outb(chip->cid_index, cfg_base);
id = inb(cfg_base+1); id = inb(cfg_base+1);
if ((id & chip->cid_mask) == chip->cid_value) { if ((id & chip->cid_mask) == chip->cid_value) {
IRDA_DEBUG(2, "%s() Found %s chip, revision=%d\n", pr_debug("%s() Found %s chip, revision=%d\n",
__func__, chip->name, id & ~chip->cid_mask); __func__, chip->name,
id & ~chip->cid_mask);
/* /*
* If we found a correct PnP setting, * If we found a correct PnP setting,
...@@ -277,7 +279,8 @@ static int __init nsc_ircc_init(void) ...@@ -277,7 +279,8 @@ static int __init nsc_ircc_init(void)
* the chip. * the chip.
*/ */
if (ret) { if (ret) {
IRDA_DEBUG(2, "%s, PnP init failed\n", driver_name); pr_debug("%s, PnP init failed\n",
driver_name);
memset(&info, 0, sizeof(chipio_t)); memset(&info, 0, sizeof(chipio_t));
info.cfg_base = cfg_base; info.cfg_base = cfg_base;
info.fir_base = io[i]; info.fir_base = io[i];
...@@ -299,7 +302,8 @@ static int __init nsc_ircc_init(void) ...@@ -299,7 +302,8 @@ static int __init nsc_ircc_init(void)
} }
i++; i++;
} else { } else {
IRDA_DEBUG(2, "%s(), Wrong chip id=0x%02x\n", __func__, id); pr_debug("%s(), Wrong chip id=0x%02x\n",
__func__, id);
} }
} }
} }
...@@ -363,9 +367,6 @@ static int __init nsc_ircc_open(chipio_t *info) ...@@ -363,9 +367,6 @@ static int __init nsc_ircc_open(chipio_t *info)
void *ret; void *ret;
int err, chip_index; int err, chip_index;
IRDA_DEBUG(2, "%s()\n", __func__);
for (chip_index = 0; chip_index < ARRAY_SIZE(dev_self); chip_index++) { for (chip_index = 0; chip_index < ARRAY_SIZE(dev_self); chip_index++) {
if (!dev_self[chip_index]) if (!dev_self[chip_index])
break; break;
...@@ -520,8 +521,6 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self) ...@@ -520,8 +521,6 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self)
{ {
int iobase; int iobase;
IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -532,8 +531,8 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self) ...@@ -532,8 +531,8 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self)
unregister_netdev(self->netdev); unregister_netdev(self->netdev);
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
IRDA_DEBUG(4, "%s(), Releasing Region %03x\n", pr_debug("%s(), Releasing Region %03x\n",
__func__, self->io.fir_base); __func__, self->io.fir_base);
release_region(self->io.fir_base, self->io.fir_ext); release_region(self->io.fir_base, self->io.fir_ext);
if (self->tx_buff.head) if (self->tx_buff.head)
...@@ -630,8 +629,8 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info) ...@@ -630,8 +629,8 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
break; break;
} }
info->sir_base = info->fir_base; info->sir_base = info->fir_base;
IRDA_DEBUG(2, "%s(), probing fir_base=0x%03x\n", __func__, pr_debug("%s(), probing fir_base=0x%03x\n", __func__,
info->fir_base); info->fir_base);
/* Read control signals routing register (CSRT) */ /* Read control signals routing register (CSRT) */
outb(CFG_108_CSRT, cfg_base); outb(CFG_108_CSRT, cfg_base);
...@@ -663,7 +662,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info) ...@@ -663,7 +662,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
info->irq = 15; info->irq = 15;
break; break;
} }
IRDA_DEBUG(2, "%s(), probing irq=%d\n", __func__, info->irq); pr_debug("%s(), probing irq=%d\n", __func__, info->irq);
/* Currently we only read Rx DMA but it will also be used for Tx */ /* Currently we only read Rx DMA but it will also be used for Tx */
switch ((reg >> 3) & 0x03) { switch ((reg >> 3) & 0x03) {
...@@ -680,7 +679,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info) ...@@ -680,7 +679,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
info->dma = 3; info->dma = 3;
break; break;
} }
IRDA_DEBUG(2, "%s(), probing dma=%d\n", __func__, info->dma); pr_debug("%s(), probing dma=%d\n", __func__, info->dma);
/* Read mode control register (MCTL) */ /* Read mode control register (MCTL) */
outb(CFG_108_MCTL, cfg_base); outb(CFG_108_MCTL, cfg_base);
...@@ -731,7 +730,7 @@ static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info) ...@@ -731,7 +730,7 @@ static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info)
pnp = (reg >> 3) & 0x01; pnp = (reg >> 3) & 0x01;
if (pnp) { if (pnp) {
IRDA_DEBUG(2, "(), Chip is in PnP mode\n"); pr_debug("(), Chip is in PnP mode\n");
outb(0x46, cfg_base); outb(0x46, cfg_base);
reg = (inb(cfg_base+1) & 0xfe) << 2; reg = (inb(cfg_base+1) & 0xfe) << 2;
...@@ -835,9 +834,8 @@ static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info) ...@@ -835,9 +834,8 @@ static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info)
int enabled; int enabled;
/* User is sure about his config... accept it. */ /* User is sure about his config... accept it. */
IRDA_DEBUG(2, "%s(): nsc_ircc_init_39x (user settings): " pr_debug("%s(): nsc_ircc_init_39x (user settings): io=0x%04x, irq=%d, dma=%d\n",
"io=0x%04x, irq=%d, dma=%d\n", __func__, info->fir_base, info->irq, info->dma);
__func__, info->fir_base, info->irq, info->dma);
/* Access bank for SP2 */ /* Access bank for SP2 */
outb(CFG_39X_LDN, cfg_base); outb(CFG_39X_LDN, cfg_base);
...@@ -877,8 +875,8 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info) ...@@ -877,8 +875,8 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info)
int reg1, reg2, irq, irqt, dma1, dma2; int reg1, reg2, irq, irqt, dma1, dma2;
int enabled, susp; int enabled, susp;
IRDA_DEBUG(2, "%s(), nsc_ircc_probe_39x, base=%d\n", pr_debug("%s(), nsc_ircc_probe_39x, base=%d\n",
__func__, cfg_base); __func__, cfg_base);
/* This function should be executed with irq off to avoid /* This function should be executed with irq off to avoid
* another driver messing with the Super I/O bank - Jean II */ * another driver messing with the Super I/O bank - Jean II */
...@@ -912,7 +910,8 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info) ...@@ -912,7 +910,8 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info)
outb(CFG_39X_SPC, cfg_base); outb(CFG_39X_SPC, cfg_base);
susp = 1 - ((inb(cfg_base+1) & 0x02) >> 1); susp = 1 - ((inb(cfg_base+1) & 0x02) >> 1);
IRDA_DEBUG(2, "%s(): io=0x%02x%02x, irq=%d (type %d), rxdma=%d, txdma=%d, enabled=%d (suspended=%d)\n", __func__, reg1,reg2,irq,irqt,dma1,dma2,enabled,susp); pr_debug("%s(): io=0x%02x%02x, irq=%d (type %d), rxdma=%d, txdma=%d, enabled=%d (suspended=%d)\n",
__func__, reg1, reg2, irq, irqt, dma1, dma2, enabled, susp);
/* Configure SP2 */ /* Configure SP2 */
...@@ -963,8 +962,8 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i ...@@ -963,8 +962,8 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
!(pnp_dma_flags(dev, 0) & IORESOURCE_DISABLED)) !(pnp_dma_flags(dev, 0) & IORESOURCE_DISABLED))
pnp_info.dma = pnp_dma(dev, 0); pnp_info.dma = pnp_dma(dev, 0);
IRDA_DEBUG(0, "%s() : From PnP, found firbase 0x%03X ; irq %d ; dma %d.\n", pr_debug("%s() : From PnP, found firbase 0x%03X ; irq %d ; dma %d.\n",
__func__, pnp_info.fir_base, pnp_info.irq, pnp_info.dma); __func__, pnp_info.fir_base, pnp_info.irq, pnp_info.dma);
if((pnp_info.fir_base == 0) || if((pnp_info.fir_base == 0) ||
(pnp_info.irq == -1) || (pnp_info.dma == -1)) { (pnp_info.irq == -1) || (pnp_info.dma == -1)) {
...@@ -992,8 +991,8 @@ static int nsc_ircc_setup(chipio_t *info) ...@@ -992,8 +991,8 @@ static int nsc_ircc_setup(chipio_t *info)
switch_bank(iobase, BANK3); switch_bank(iobase, BANK3);
version = inb(iobase+MID); version = inb(iobase+MID);
IRDA_DEBUG(2, "%s() Driver %s Found chip version %02x\n", pr_debug("%s() Driver %s Found chip version %02x\n",
__func__, driver_name, version); __func__, driver_name, version);
/* Should be 0x2? */ /* Should be 0x2? */
if (0x20 != (version & 0xf0)) { if (0x20 != (version & 0xf0)) {
...@@ -1096,39 +1095,39 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id) ...@@ -1096,39 +1095,39 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id)
switch (dongle_id) { switch (dongle_id) {
case 0x00: /* same as */ case 0x00: /* same as */
case 0x01: /* Differential serial interface */ case 0x01: /* Differential serial interface */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x02: /* same as */ case 0x02: /* same as */
case 0x03: /* Reserved */ case 0x03: /* Reserved */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x04: /* Sharp RY5HD01 */ case 0x04: /* Sharp RY5HD01 */
break; break;
case 0x05: /* Reserved, but this is what the Thinkpad reports */ case 0x05: /* Reserved, but this is what the Thinkpad reports */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x06: /* Single-ended serial interface */ case 0x06: /* Single-ended serial interface */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x07: /* Consumer-IR only */ case 0x07: /* Consumer-IR only */
IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n", pr_debug("%s(), %s is not for IrDA mode\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */ case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */
IRDA_DEBUG(0, "%s(), %s\n", pr_debug("%s(), %s\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x09: /* IBM31T1100 or Temic TFDS6000/TFDS6500 */ case 0x09: /* IBM31T1100 or Temic TFDS6000/TFDS6500 */
outb(0x28, iobase+7); /* Set irsl[0-2] as output */ outb(0x28, iobase+7); /* Set irsl[0-2] as output */
break; break;
case 0x0A: /* same as */ case 0x0A: /* same as */
case 0x0B: /* Reserved */ case 0x0B: /* Reserved */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x0C: /* same as */ case 0x0C: /* same as */
case 0x0D: /* HP HSDL-1100/HSDL-2100 */ case 0x0D: /* HP HSDL-1100/HSDL-2100 */
...@@ -1142,15 +1141,15 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id) ...@@ -1142,15 +1141,15 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id)
outb(0x28, iobase+7); /* Set irsl[0-2] as output */ outb(0x28, iobase+7); /* Set irsl[0-2] as output */
break; break;
case 0x0F: /* No dongle connected */ case 0x0F: /* No dongle connected */
IRDA_DEBUG(0, "%s(), %s\n", pr_debug("%s(), %s\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
outb(0x62, iobase+MCR); outb(0x62, iobase+MCR);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), invalid dongle_id %#x", pr_debug("%s(), invalid dongle_id %#x",
__func__, dongle_id); __func__, dongle_id);
} }
/* IRCFG1: IRSL1 and 2 are set to IrDA mode */ /* IRCFG1: IRSL1 and 2 are set to IrDA mode */
...@@ -1181,31 +1180,31 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id) ...@@ -1181,31 +1180,31 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
switch (dongle_id) { switch (dongle_id) {
case 0x00: /* same as */ case 0x00: /* same as */
case 0x01: /* Differential serial interface */ case 0x01: /* Differential serial interface */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x02: /* same as */ case 0x02: /* same as */
case 0x03: /* Reserved */ case 0x03: /* Reserved */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x04: /* Sharp RY5HD01 */ case 0x04: /* Sharp RY5HD01 */
break; break;
case 0x05: /* Reserved */ case 0x05: /* Reserved */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x06: /* Single-ended serial interface */ case 0x06: /* Single-ended serial interface */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x07: /* Consumer-IR only */ case 0x07: /* Consumer-IR only */
IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n", pr_debug("%s(), %s is not for IrDA mode\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */ case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */
IRDA_DEBUG(0, "%s(), %s\n", pr_debug("%s(), %s\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
outb(0x00, iobase+4); outb(0x00, iobase+4);
if (speed > 115200) if (speed > 115200)
outb(0x01, iobase+4); outb(0x01, iobase+4);
...@@ -1223,8 +1222,8 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id) ...@@ -1223,8 +1222,8 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
break; break;
case 0x0A: /* same as */ case 0x0A: /* same as */
case 0x0B: /* Reserved */ case 0x0B: /* Reserved */
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n", pr_debug("%s(), %s not defined by irda yet\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
break; break;
case 0x0C: /* same as */ case 0x0C: /* same as */
case 0x0D: /* HP HSDL-1100/HSDL-2100 */ case 0x0D: /* HP HSDL-1100/HSDL-2100 */
...@@ -1232,14 +1231,14 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id) ...@@ -1232,14 +1231,14 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
case 0x0E: /* Supports SIR Mode only */ case 0x0E: /* Supports SIR Mode only */
break; break;
case 0x0F: /* No dongle connected */ case 0x0F: /* No dongle connected */
IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n", pr_debug("%s(), %s is not for IrDA mode\n",
__func__, dongle_types[dongle_id]); __func__, dongle_types[dongle_id]);
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
outb(0x62, iobase+MCR); outb(0x62, iobase+MCR);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), invalid data_rate\n", __func__); pr_debug("%s(), invalid data_rate\n", __func__);
} }
/* Restore bank register */ /* Restore bank register */
outb(bank, iobase+BSR); outb(bank, iobase+BSR);
...@@ -1260,7 +1259,7 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed) ...@@ -1260,7 +1259,7 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
__u8 bank; __u8 bank;
__u8 ier; /* Interrupt enable register */ __u8 ier; /* Interrupt enable register */
IRDA_DEBUG(2, "%s(), speed=%d\n", __func__, speed); pr_debug("%s(), speed=%d\n", __func__, speed);
IRDA_ASSERT(self != NULL, return 0;); IRDA_ASSERT(self != NULL, return 0;);
...@@ -1293,20 +1292,20 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed) ...@@ -1293,20 +1292,20 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
outb(inb(iobase+4) | 0x04, iobase+4); outb(inb(iobase+4) | 0x04, iobase+4);
mcr = MCR_MIR; mcr = MCR_MIR;
IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __func__); pr_debug("%s(), handling baud of 576000\n", __func__);
break; break;
case 1152000: case 1152000:
mcr = MCR_MIR; mcr = MCR_MIR;
IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __func__); pr_debug("%s(), handling baud of 1152000\n", __func__);
break; break;
case 4000000: case 4000000:
mcr = MCR_FIR; mcr = MCR_FIR;
IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __func__); pr_debug("%s(), handling baud of 4000000\n", __func__);
break; break;
default: default:
mcr = MCR_FIR; mcr = MCR_FIR;
IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", pr_debug("%s(), unknown baud rate of %d\n",
__func__, speed); __func__, speed);
break; break;
} }
...@@ -1613,15 +1612,13 @@ static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -1613,15 +1612,13 @@ static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
int actual = 0; int actual = 0;
__u8 bank; __u8 bank;
IRDA_DEBUG(4, "%s()\n", __func__);
/* Save current bank */ /* Save current bank */
bank = inb(iobase+BSR); bank = inb(iobase+BSR);
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
if (!(inb_p(iobase+LSR) & LSR_TXEMP)) { if (!(inb_p(iobase+LSR) & LSR_TXEMP)) {
IRDA_DEBUG(4, "%s(), warning, FIFO not empty yet!\n", pr_debug("%s(), warning, FIFO not empty yet!\n",
__func__); __func__);
/* FIFO may still be filled to the Tx interrupt threshold */ /* FIFO may still be filled to the Tx interrupt threshold */
fifo_size -= 17; fifo_size -= 17;
...@@ -1633,8 +1630,8 @@ static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -1633,8 +1630,8 @@ static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
outb(buf[actual++], iobase+TXD); outb(buf[actual++], iobase+TXD);
} }
IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n", pr_debug("%s(), fifo_size %d ; %d sent of %d\n",
__func__, fifo_size, actual, len); __func__, fifo_size, actual, len);
/* Restore bank */ /* Restore bank */
outb(bank, iobase+BSR); outb(bank, iobase+BSR);
...@@ -1655,8 +1652,6 @@ static int nsc_ircc_dma_xmit_complete(struct nsc_ircc_cb *self) ...@@ -1655,8 +1652,6 @@ static int nsc_ircc_dma_xmit_complete(struct nsc_ircc_cb *self)
__u8 bank; __u8 bank;
int ret = TRUE; int ret = TRUE;
IRDA_DEBUG(2, "%s()\n", __func__);
iobase = self->io.fir_base; iobase = self->io.fir_base;
/* Save current bank */ /* Save current bank */
...@@ -1786,7 +1781,7 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase) ...@@ -1786,7 +1781,7 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase)
len = inb(iobase+RFLFL) | ((inb(iobase+RFLFH) & 0x1f) << 8); len = inb(iobase+RFLFL) | ((inb(iobase+RFLFH) & 0x1f) << 8);
if (st_fifo->tail >= MAX_RX_WINDOW) { if (st_fifo->tail >= MAX_RX_WINDOW) {
IRDA_DEBUG(0, "%s(), window is full!\n", __func__); pr_debug("%s(), window is full!\n", __func__);
continue; continue;
} }
...@@ -1980,7 +1975,7 @@ static void nsc_ircc_sir_interrupt(struct nsc_ircc_cb *self, int eir) ...@@ -1980,7 +1975,7 @@ static void nsc_ircc_sir_interrupt(struct nsc_ircc_cb *self, int eir)
* Need to be after self->io.direction to avoid race with * Need to be after self->io.direction to avoid race with
* nsc_ircc_hard_xmit_sir() - Jean II */ * nsc_ircc_hard_xmit_sir() - Jean II */
if (self->new_speed) { if (self->new_speed) {
IRDA_DEBUG(2, "%s(), Changing speed!\n", __func__); pr_debug("%s(), Changing speed!\n", __func__);
self->ier = nsc_ircc_change_speed(self, self->ier = nsc_ircc_change_speed(self,
self->new_speed); self->new_speed);
self->new_speed = 0; self->new_speed = 0;
...@@ -2174,7 +2169,6 @@ static int nsc_ircc_net_open(struct net_device *dev) ...@@ -2174,7 +2169,6 @@ static int nsc_ircc_net_open(struct net_device *dev)
char hwname[32]; char hwname[32];
__u8 bank; __u8 bank;
IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev); self = netdev_priv(dev);
...@@ -2236,7 +2230,6 @@ static int nsc_ircc_net_close(struct net_device *dev) ...@@ -2236,7 +2230,6 @@ static int nsc_ircc_net_close(struct net_device *dev)
int iobase; int iobase;
__u8 bank; __u8 bank;
IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
...@@ -2290,7 +2283,7 @@ static int nsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2290,7 +2283,7 @@ static int nsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
switch (cmd) { switch (cmd) {
case SIOCSBANDWIDTH: /* Set bandwidth */ case SIOCSBANDWIDTH: /* Set bandwidth */
...@@ -2329,7 +2322,7 @@ static int nsc_ircc_suspend(struct platform_device *dev, pm_message_t state) ...@@ -2329,7 +2322,7 @@ static int nsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
if (self->io.suspended) if (self->io.suspended)
return 0; return 0;
IRDA_DEBUG(1, "%s, Suspending\n", driver_name); pr_debug("%s, Suspending\n", driver_name);
rtnl_lock(); rtnl_lock();
if (netif_running(self->netdev)) { if (netif_running(self->netdev)) {
...@@ -2363,7 +2356,7 @@ static int nsc_ircc_resume(struct platform_device *dev) ...@@ -2363,7 +2356,7 @@ static int nsc_ircc_resume(struct platform_device *dev)
if (!self->io.suspended) if (!self->io.suspended)
return 0; return 0;
IRDA_DEBUG(1, "%s, Waking up\n", driver_name); pr_debug("%s, Waking up\n", driver_name);
rtnl_lock(); rtnl_lock();
nsc_ircc_setup(&self->io); nsc_ircc_setup(&self->io);
......
...@@ -90,8 +90,6 @@ static int old_belkin_open(struct sir_dev *dev) ...@@ -90,8 +90,6 @@ static int old_belkin_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power on dongle */ /* Power on dongle */
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
...@@ -108,8 +106,6 @@ static int old_belkin_open(struct sir_dev *dev) ...@@ -108,8 +106,6 @@ static int old_belkin_open(struct sir_dev *dev)
static int old_belkin_close(struct sir_dev *dev) static int old_belkin_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -123,8 +119,6 @@ static int old_belkin_close(struct sir_dev *dev) ...@@ -123,8 +119,6 @@ static int old_belkin_close(struct sir_dev *dev)
*/ */
static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed) static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
dev->speed = 9600; dev->speed = 9600;
return (speed==dev->speed) ? 0 : -EINVAL; return (speed==dev->speed) ? 0 : -EINVAL;
} }
...@@ -137,8 +131,6 @@ static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -137,8 +131,6 @@ static int old_belkin_change_speed(struct sir_dev *dev, unsigned speed)
*/ */
static int old_belkin_reset(struct sir_dev *dev) static int old_belkin_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* This dongles speed "defaults" to 9600 bps ;-) */ /* This dongles speed "defaults" to 9600 bps ;-) */
dev->speed = 9600; dev->speed = 9600;
......
...@@ -109,11 +109,11 @@ static void sirdev_config_fsm(struct work_struct *work) ...@@ -109,11 +109,11 @@ static void sirdev_config_fsm(struct work_struct *work)
int ret = -1; int ret = -1;
unsigned delay; unsigned delay;
IRDA_DEBUG(2, "%s(), <%ld>\n", __func__, jiffies); pr_debug("%s(), <%ld>\n", __func__, jiffies);
do { do {
IRDA_DEBUG(3, "%s - state=0x%04x / substate=0x%04x\n", pr_debug("%s - state=0x%04x / substate=0x%04x\n",
__func__, fsm->state, fsm->substate); __func__, fsm->state, fsm->substate);
next_state = fsm->state; next_state = fsm->state;
delay = 0; delay = 0;
...@@ -287,12 +287,12 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par ...@@ -287,12 +287,12 @@ int sirdev_schedule_request(struct sir_dev *dev, int initial_state, unsigned par
{ {
struct sir_fsm *fsm = &dev->fsm; struct sir_fsm *fsm = &dev->fsm;
IRDA_DEBUG(2, "%s - state=0x%04x / param=%u\n", __func__, pr_debug("%s - state=0x%04x / param=%u\n", __func__,
initial_state, param); initial_state, param);
if (down_trylock(&fsm->sem)) { if (down_trylock(&fsm->sem)) {
if (in_interrupt() || in_atomic() || irqs_disabled()) { if (in_interrupt() || in_atomic() || irqs_disabled()) {
IRDA_DEBUG(1, "%s(), state machine busy!\n", __func__); pr_debug("%s(), state machine busy!\n", __func__);
return -EWOULDBLOCK; return -EWOULDBLOCK;
} else } else
down(&fsm->sem); down(&fsm->sem);
...@@ -345,7 +345,7 @@ int sirdev_set_dongle(struct sir_dev *dev, IRDA_DONGLE type) ...@@ -345,7 +345,7 @@ int sirdev_set_dongle(struct sir_dev *dev, IRDA_DONGLE type)
{ {
int err; int err;
IRDA_DEBUG(3, "%s : requesting dongle %d.\n", __func__, type); pr_debug("%s : requesting dongle %d.\n", __func__, type);
err = sirdev_schedule_dongle_open(dev, type); err = sirdev_schedule_dongle_open(dev, type);
if (unlikely(err)) if (unlikely(err))
...@@ -380,7 +380,7 @@ int sirdev_raw_write(struct sir_dev *dev, const char *buf, int len) ...@@ -380,7 +380,7 @@ int sirdev_raw_write(struct sir_dev *dev, const char *buf, int len)
ret = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len); ret = dev->drv->do_write(dev, dev->tx_buff.data, dev->tx_buff.len);
if (ret > 0) { if (ret > 0) {
IRDA_DEBUG(3, "%s(), raw-tx started\n", __func__); pr_debug("%s(), raw-tx started\n", __func__);
dev->tx_buff.data += ret; dev->tx_buff.data += ret;
dev->tx_buff.len -= ret; dev->tx_buff.len -= ret;
...@@ -440,8 +440,8 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -440,8 +440,8 @@ void sirdev_write_complete(struct sir_dev *dev)
spin_lock_irqsave(&dev->tx_lock, flags); spin_lock_irqsave(&dev->tx_lock, flags);
IRDA_DEBUG(3, "%s() - dev->tx_buff.len = %d\n", pr_debug("%s() - dev->tx_buff.len = %d\n",
__func__, dev->tx_buff.len); __func__, dev->tx_buff.len);
if (likely(dev->tx_buff.len > 0)) { if (likely(dev->tx_buff.len > 0)) {
/* Write data left in transmit buffer */ /* Write data left in transmit buffer */
...@@ -475,7 +475,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -475,7 +475,7 @@ void sirdev_write_complete(struct sir_dev *dev)
* restarted when the irda-thread has completed the request. * restarted when the irda-thread has completed the request.
*/ */
IRDA_DEBUG(3, "%s(), raw-tx done\n", __func__); pr_debug("%s(), raw-tx done\n", __func__);
dev->raw_tx = 0; dev->raw_tx = 0;
goto done; /* no post-frame handling in raw mode */ goto done; /* no post-frame handling in raw mode */
} }
...@@ -492,7 +492,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -492,7 +492,7 @@ void sirdev_write_complete(struct sir_dev *dev)
* re-activated. * re-activated.
*/ */
IRDA_DEBUG(5, "%s(), finished with frame!\n", __func__); pr_debug("%s(), finished with frame!\n", __func__);
if ((skb=dev->tx_skb) != NULL) { if ((skb=dev->tx_skb) != NULL) {
dev->tx_skb = NULL; dev->tx_skb = NULL;
...@@ -502,7 +502,7 @@ void sirdev_write_complete(struct sir_dev *dev) ...@@ -502,7 +502,7 @@ void sirdev_write_complete(struct sir_dev *dev)
} }
if (unlikely(dev->new_speed > 0)) { if (unlikely(dev->new_speed > 0)) {
IRDA_DEBUG(5, "%s(), Changing speed!\n", __func__); pr_debug("%s(), Changing speed!\n", __func__);
err = sirdev_schedule_speed(dev, dev->new_speed); err = sirdev_schedule_speed(dev, dev->new_speed);
if (unlikely(err)) { if (unlikely(err)) {
/* should never happen /* should never happen
...@@ -552,7 +552,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count) ...@@ -552,7 +552,7 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count)
*/ */
irda_device_set_media_busy(dev->netdev, TRUE); irda_device_set_media_busy(dev->netdev, TRUE);
dev->netdev->stats.rx_dropped++; dev->netdev->stats.rx_dropped++;
IRDA_DEBUG(0, "%s; rx-drop: %zd\n", __func__, count); pr_debug("%s; rx-drop: %zd\n", __func__, count);
return 0; return 0;
} }
...@@ -598,7 +598,7 @@ static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb, ...@@ -598,7 +598,7 @@ static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb,
netif_stop_queue(ndev); netif_stop_queue(ndev);
IRDA_DEBUG(3, "%s(), skb->len = %d\n", __func__, skb->len); pr_debug("%s(), skb->len = %d\n", __func__, skb->len);
speed = irda_get_next_speed(skb); speed = irda_get_next_speed(skb);
if ((speed != dev->speed) && (speed != -1)) { if ((speed != dev->speed) && (speed != -1)) {
...@@ -635,7 +635,7 @@ static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb, ...@@ -635,7 +635,7 @@ static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb,
/* Check problems */ /* Check problems */
if(spin_is_locked(&dev->tx_lock)) { if(spin_is_locked(&dev->tx_lock)) {
IRDA_DEBUG(3, "%s(), write not completed\n", __func__); pr_debug("%s(), write not completed\n", __func__);
} }
/* serialize with write completion */ /* serialize with write completion */
...@@ -684,7 +684,7 @@ static int sirdev_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) ...@@ -684,7 +684,7 @@ static int sirdev_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
IRDA_DEBUG(3, "%s(), %s, (cmd=0x%X)\n", __func__, ndev->name, cmd); pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, ndev->name, cmd);
switch (cmd) { switch (cmd) {
case SIOCSBANDWIDTH: /* Set bandwidth */ case SIOCSBANDWIDTH: /* Set bandwidth */
...@@ -801,8 +801,6 @@ static int sirdev_open(struct net_device *ndev) ...@@ -801,8 +801,6 @@ static int sirdev_open(struct net_device *ndev)
if (!try_module_get(drv->owner)) if (!try_module_get(drv->owner))
return -ESTALE; return -ESTALE;
IRDA_DEBUG(2, "%s()\n", __func__);
if (sirdev_alloc_buffers(dev)) if (sirdev_alloc_buffers(dev))
goto errout_dec; goto errout_dec;
...@@ -819,7 +817,7 @@ static int sirdev_open(struct net_device *ndev) ...@@ -819,7 +817,7 @@ static int sirdev_open(struct net_device *ndev)
netif_wake_queue(ndev); netif_wake_queue(ndev);
IRDA_DEBUG(2, "%s - done, speed = %d\n", __func__, dev->speed); pr_debug("%s - done, speed = %d\n", __func__, dev->speed);
return 0; return 0;
...@@ -839,7 +837,7 @@ static int sirdev_close(struct net_device *ndev) ...@@ -839,7 +837,7 @@ static int sirdev_close(struct net_device *ndev)
struct sir_dev *dev = netdev_priv(ndev); struct sir_dev *dev = netdev_priv(ndev);
const struct sir_driver *drv; const struct sir_driver *drv;
// IRDA_DEBUG(0, "%s\n", __func__); /* pr_debug("%s\n", __func__); */
netif_stop_queue(ndev); netif_stop_queue(ndev);
...@@ -881,7 +879,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n ...@@ -881,7 +879,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
struct net_device *ndev; struct net_device *ndev;
struct sir_dev *dev; struct sir_dev *dev;
IRDA_DEBUG(0, "%s - %s\n", __func__, name); pr_debug("%s - %s\n", __func__, name);
/* instead of adding tests to protect against drv->do_write==NULL /* instead of adding tests to protect against drv->do_write==NULL
* at several places we refuse to create a sir_dev instance for * at several places we refuse to create a sir_dev instance for
...@@ -939,7 +937,7 @@ int sirdev_put_instance(struct sir_dev *dev) ...@@ -939,7 +937,7 @@ int sirdev_put_instance(struct sir_dev *dev)
{ {
int err = 0; int err = 0;
IRDA_DEBUG(0, "%s\n", __func__); pr_debug("%s\n", __func__);
atomic_set(&dev->enable_rx, 0); atomic_set(&dev->enable_rx, 0);
......
...@@ -34,8 +34,8 @@ int irda_register_dongle(struct dongle_driver *new) ...@@ -34,8 +34,8 @@ int irda_register_dongle(struct dongle_driver *new)
struct list_head *entry; struct list_head *entry;
struct dongle_driver *drv; struct dongle_driver *drv;
IRDA_DEBUG(0, "%s : registering dongle \"%s\" (%d).\n", pr_debug("%s : registering dongle \"%s\" (%d).\n",
__func__, new->driver_name, new->type); __func__, new->driver_name, new->type);
mutex_lock(&dongle_list_lock); mutex_lock(&dongle_list_lock);
list_for_each(entry, &dongle_list) { list_for_each(entry, &dongle_list) {
......
...@@ -461,7 +461,7 @@ static int __init smsc_ircc_init(void) ...@@ -461,7 +461,7 @@ static int __init smsc_ircc_init(void)
{ {
int ret; int ret;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
ret = platform_driver_register(&smsc_ircc_driver); ret = platform_driver_register(&smsc_ircc_driver);
if (ret) { if (ret) {
...@@ -523,7 +523,7 @@ static int smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma, ...@@ -523,7 +523,7 @@ static int smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u8 dma,
struct net_device *dev; struct net_device *dev;
int err; int err;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
err = smsc_ircc_present(fir_base, sir_base); err = smsc_ircc_present(fir_base, sir_base);
if (err) if (err)
...@@ -803,7 +803,7 @@ static int smsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd ...@@ -803,7 +803,7 @@ static int smsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd); pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name, cmd);
switch (cmd) { switch (cmd) {
case SIOCSBANDWIDTH: /* Set bandwidth */ case SIOCSBANDWIDTH: /* Set bandwidth */
...@@ -882,7 +882,7 @@ static netdev_tx_t smsc_ircc_hard_xmit_sir(struct sk_buff *skb, ...@@ -882,7 +882,7 @@ static netdev_tx_t smsc_ircc_hard_xmit_sir(struct sk_buff *skb,
unsigned long flags; unsigned long flags;
s32 speed; s32 speed;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;); IRDA_ASSERT(dev != NULL, return NETDEV_TX_OK;);
...@@ -957,21 +957,21 @@ static void smsc_ircc_set_fir_speed(struct smsc_ircc_cb *self, u32 speed) ...@@ -957,21 +957,21 @@ static void smsc_ircc_set_fir_speed(struct smsc_ircc_cb *self, u32 speed)
ir_mode = IRCC_CFGA_IRDA_HDLC; ir_mode = IRCC_CFGA_IRDA_HDLC;
ctrl = IRCC_CRC; ctrl = IRCC_CRC;
fast = 0; fast = 0;
IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __func__); pr_debug("%s(), handling baud of 576000\n", __func__);
break; break;
case 1152000: case 1152000:
ir_mode = IRCC_CFGA_IRDA_HDLC; ir_mode = IRCC_CFGA_IRDA_HDLC;
ctrl = IRCC_1152 | IRCC_CRC; ctrl = IRCC_1152 | IRCC_CRC;
fast = IRCC_LCR_A_FAST | IRCC_LCR_A_GP_DATA; fast = IRCC_LCR_A_FAST | IRCC_LCR_A_GP_DATA;
IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", pr_debug("%s(), handling baud of 1152000\n",
__func__); __func__);
break; break;
case 4000000: case 4000000:
ir_mode = IRCC_CFGA_IRDA_4PPM; ir_mode = IRCC_CFGA_IRDA_4PPM;
ctrl = IRCC_CRC; ctrl = IRCC_CRC;
fast = IRCC_LCR_A_FAST; fast = IRCC_LCR_A_FAST;
IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", pr_debug("%s(), handling baud of 4000000\n",
__func__); __func__);
break; break;
} }
#if 0 #if 0
...@@ -999,7 +999,7 @@ static void smsc_ircc_fir_start(struct smsc_ircc_cb *self) ...@@ -999,7 +999,7 @@ static void smsc_ircc_fir_start(struct smsc_ircc_cb *self)
struct net_device *dev; struct net_device *dev;
int fir_base; int fir_base;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
dev = self->netdev; dev = self->netdev;
...@@ -1044,7 +1044,7 @@ static void smsc_ircc_fir_stop(struct smsc_ircc_cb *self) ...@@ -1044,7 +1044,7 @@ static void smsc_ircc_fir_stop(struct smsc_ircc_cb *self)
{ {
int fir_base; int fir_base;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
...@@ -1068,7 +1068,7 @@ static void smsc_ircc_change_speed(struct smsc_ircc_cb *self, u32 speed) ...@@ -1068,7 +1068,7 @@ static void smsc_ircc_change_speed(struct smsc_ircc_cb *self, u32 speed)
struct net_device *dev; struct net_device *dev;
int last_speed_was_sir; int last_speed_was_sir;
IRDA_DEBUG(0, "%s() changing speed to: %d\n", __func__, speed); pr_debug("%s() changing speed to: %d\n", __func__, speed);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
dev = self->netdev; dev = self->netdev;
...@@ -1136,7 +1136,7 @@ static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed) ...@@ -1136,7 +1136,7 @@ static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
int lcr; /* Line control reg */ int lcr; /* Line control reg */
int divisor; int divisor;
IRDA_DEBUG(0, "%s(), Setting speed to: %d\n", __func__, speed); pr_debug("%s(), Setting speed to: %d\n", __func__, speed);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
iobase = self->io.sir_base; iobase = self->io.sir_base;
...@@ -1171,7 +1171,7 @@ static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed) ...@@ -1171,7 +1171,7 @@ static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
/* Turn on interrups */ /* Turn on interrups */
outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER); outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER);
IRDA_DEBUG(2, "%s() speed changed to: %d\n", __func__, speed); pr_debug("%s() speed changed to: %d\n", __func__, speed);
} }
...@@ -1255,7 +1255,7 @@ static void smsc_ircc_dma_xmit(struct smsc_ircc_cb *self, int bofs) ...@@ -1255,7 +1255,7 @@ static void smsc_ircc_dma_xmit(struct smsc_ircc_cb *self, int bofs)
int iobase = self->io.fir_base; int iobase = self->io.fir_base;
u8 ctrl; u8 ctrl;
IRDA_DEBUG(3, "%s\n", __func__); pr_debug("%s\n", __func__);
#if 1 #if 1
/* Disable Rx */ /* Disable Rx */
register_bank(iobase, 0); register_bank(iobase, 0);
...@@ -1309,7 +1309,7 @@ static void smsc_ircc_dma_xmit_complete(struct smsc_ircc_cb *self) ...@@ -1309,7 +1309,7 @@ static void smsc_ircc_dma_xmit_complete(struct smsc_ircc_cb *self)
{ {
int iobase = self->io.fir_base; int iobase = self->io.fir_base;
IRDA_DEBUG(3, "%s\n", __func__); pr_debug("%s\n", __func__);
#if 0 #if 0
/* Disable Tx */ /* Disable Tx */
register_bank(iobase, 0); register_bank(iobase, 0);
...@@ -1413,7 +1413,7 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self) ...@@ -1413,7 +1413,7 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self)
register_bank(iobase, 0); register_bank(iobase, 0);
IRDA_DEBUG(3, "%s\n", __func__); pr_debug("%s\n", __func__);
#if 0 #if 0
/* Disable Rx */ /* Disable Rx */
register_bank(iobase, 0); register_bank(iobase, 0);
...@@ -1424,8 +1424,8 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self) ...@@ -1424,8 +1424,8 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self)
lsr= inb(iobase + IRCC_LSR); lsr= inb(iobase + IRCC_LSR);
msgcnt = inb(iobase + IRCC_LCR_B) & 0x08; msgcnt = inb(iobase + IRCC_LCR_B) & 0x08;
IRDA_DEBUG(2, "%s: dma count = %d\n", __func__, pr_debug("%s: dma count = %d\n", __func__,
get_dma_residue(self->io.dma)); get_dma_residue(self->io.dma));
len = self->rx_buff.truesize - get_dma_residue(self->io.dma); len = self->rx_buff.truesize - get_dma_residue(self->io.dma);
...@@ -1450,7 +1450,7 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self) ...@@ -1450,7 +1450,7 @@ static void smsc_ircc_dma_receive_complete(struct smsc_ircc_cb *self)
net_warn_ratelimited("%s(), bogus len=%d\n", __func__, len); net_warn_ratelimited("%s(), bogus len=%d\n", __func__, len);
return; return;
} }
IRDA_DEBUG(2, "%s: msgcnt = %d, len=%d\n", __func__, msgcnt, len); pr_debug("%s: msgcnt = %d, len=%d\n", __func__, msgcnt, len);
skb = dev_alloc_skb(len + 1); skb = dev_alloc_skb(len + 1);
if (!skb) if (!skb)
...@@ -1494,7 +1494,7 @@ static void smsc_ircc_sir_receive(struct smsc_ircc_cb *self) ...@@ -1494,7 +1494,7 @@ static void smsc_ircc_sir_receive(struct smsc_ircc_cb *self)
/* Make sure we don't stay here to long */ /* Make sure we don't stay here to long */
if (boguscount++ > 32) { if (boguscount++ > 32) {
IRDA_DEBUG(2, "%s(), breaking!\n", __func__); pr_debug("%s(), breaking!\n", __func__);
break; break;
} }
} while (inb(iobase + UART_LSR) & UART_LSR_DR); } while (inb(iobase + UART_LSR) & UART_LSR_DR);
...@@ -1536,7 +1536,7 @@ static irqreturn_t smsc_ircc_interrupt(int dummy, void *dev_id) ...@@ -1536,7 +1536,7 @@ static irqreturn_t smsc_ircc_interrupt(int dummy, void *dev_id)
lcra = inb(iobase + IRCC_LCR_A); lcra = inb(iobase + IRCC_LCR_A);
lsr = inb(iobase + IRCC_LSR); lsr = inb(iobase + IRCC_LSR);
IRDA_DEBUG(2, "%s(), iir = 0x%02x\n", __func__, iir); pr_debug("%s(), iir = 0x%02x\n", __func__, iir);
if (iir & IRCC_IIR_EOM) { if (iir & IRCC_IIR_EOM) {
if (self->io.direction == IO_RECV) if (self->io.direction == IO_RECV)
...@@ -1586,12 +1586,12 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev) ...@@ -1586,12 +1586,12 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev)
/* Clear interrupt */ /* Clear interrupt */
lsr = inb(iobase + UART_LSR); lsr = inb(iobase + UART_LSR);
IRDA_DEBUG(4, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n", pr_debug("%s(), iir=%02x, lsr=%02x, iobase=%#x\n",
__func__, iir, lsr, iobase); __func__, iir, lsr, iobase);
switch (iir) { switch (iir) {
case UART_IIR_RLSI: case UART_IIR_RLSI:
IRDA_DEBUG(2, "%s(), RLSI\n", __func__); pr_debug("%s(), RLSI\n", __func__);
break; break;
case UART_IIR_RDI: case UART_IIR_RDI:
/* Receive interrupt */ /* Receive interrupt */
...@@ -1603,8 +1603,8 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev) ...@@ -1603,8 +1603,8 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev)
smsc_ircc_sir_write_wakeup(self); smsc_ircc_sir_write_wakeup(self);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unhandled IIR=%#x\n", pr_debug("%s(), unhandled IIR=%#x\n",
__func__, iir); __func__, iir);
break; break;
} }
...@@ -1631,12 +1631,12 @@ static int ircc_is_receiving(struct smsc_ircc_cb *self) ...@@ -1631,12 +1631,12 @@ static int ircc_is_receiving(struct smsc_ircc_cb *self)
int status = FALSE; int status = FALSE;
/* int iobase; */ /* int iobase; */
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
IRDA_ASSERT(self != NULL, return FALSE;); IRDA_ASSERT(self != NULL, return FALSE;);
IRDA_DEBUG(0, "%s: dma count = %d\n", __func__, pr_debug("%s: dma count = %d\n", __func__,
get_dma_residue(self->io.dma)); get_dma_residue(self->io.dma));
status = (self->rx_buff.state != OUTSIDE_FRAME); status = (self->rx_buff.state != OUTSIDE_FRAME);
...@@ -1651,8 +1651,8 @@ static int smsc_ircc_request_irq(struct smsc_ircc_cb *self) ...@@ -1651,8 +1651,8 @@ static int smsc_ircc_request_irq(struct smsc_ircc_cb *self)
error = request_irq(self->io.irq, smsc_ircc_interrupt, 0, error = request_irq(self->io.irq, smsc_ircc_interrupt, 0,
self->netdev->name, self->netdev); self->netdev->name, self->netdev);
if (error) if (error)
IRDA_DEBUG(0, "%s(), unable to allocate irq=%d, err=%d\n", pr_debug("%s(), unable to allocate irq=%d, err=%d\n",
__func__, self->io.irq, error); __func__, self->io.irq, error);
return error; return error;
} }
...@@ -1696,21 +1696,21 @@ static int smsc_ircc_net_open(struct net_device *dev) ...@@ -1696,21 +1696,21 @@ static int smsc_ircc_net_open(struct net_device *dev)
struct smsc_ircc_cb *self; struct smsc_ircc_cb *self;
char hwname[16]; char hwname[16];
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev); self = netdev_priv(dev);
IRDA_ASSERT(self != NULL, return 0;); IRDA_ASSERT(self != NULL, return 0;);
if (self->io.suspended) { if (self->io.suspended) {
IRDA_DEBUG(0, "%s(), device is suspended\n", __func__); pr_debug("%s(), device is suspended\n", __func__);
return -EAGAIN; return -EAGAIN;
} }
if (request_irq(self->io.irq, smsc_ircc_interrupt, 0, dev->name, if (request_irq(self->io.irq, smsc_ircc_interrupt, 0, dev->name,
(void *) dev)) { (void *) dev)) {
IRDA_DEBUG(0, "%s(), unable to allocate irq=%d\n", pr_debug("%s(), unable to allocate irq=%d\n",
__func__, self->io.irq); __func__, self->io.irq);
return -EAGAIN; return -EAGAIN;
} }
...@@ -1753,7 +1753,7 @@ static int smsc_ircc_net_close(struct net_device *dev) ...@@ -1753,7 +1753,7 @@ static int smsc_ircc_net_close(struct net_device *dev)
{ {
struct smsc_ircc_cb *self; struct smsc_ircc_cb *self;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev); self = netdev_priv(dev);
...@@ -1784,7 +1784,7 @@ static int smsc_ircc_suspend(struct platform_device *dev, pm_message_t state) ...@@ -1784,7 +1784,7 @@ static int smsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
struct smsc_ircc_cb *self = platform_get_drvdata(dev); struct smsc_ircc_cb *self = platform_get_drvdata(dev);
if (!self->io.suspended) { if (!self->io.suspended) {
IRDA_DEBUG(1, "%s, Suspending\n", driver_name); pr_debug("%s, Suspending\n", driver_name);
rtnl_lock(); rtnl_lock();
if (netif_running(self->netdev)) { if (netif_running(self->netdev)) {
...@@ -1805,7 +1805,7 @@ static int smsc_ircc_resume(struct platform_device *dev) ...@@ -1805,7 +1805,7 @@ static int smsc_ircc_resume(struct platform_device *dev)
struct smsc_ircc_cb *self = platform_get_drvdata(dev); struct smsc_ircc_cb *self = platform_get_drvdata(dev);
if (self->io.suspended) { if (self->io.suspended) {
IRDA_DEBUG(1, "%s, Waking up\n", driver_name); pr_debug("%s, Waking up\n", driver_name);
rtnl_lock(); rtnl_lock();
smsc_ircc_init_chip(self); smsc_ircc_init_chip(self);
...@@ -1836,7 +1836,7 @@ static int smsc_ircc_resume(struct platform_device *dev) ...@@ -1836,7 +1836,7 @@ static int smsc_ircc_resume(struct platform_device *dev)
*/ */
static int __exit smsc_ircc_close(struct smsc_ircc_cb *self) static int __exit smsc_ircc_close(struct smsc_ircc_cb *self)
{ {
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -1848,13 +1848,13 @@ static int __exit smsc_ircc_close(struct smsc_ircc_cb *self) ...@@ -1848,13 +1848,13 @@ static int __exit smsc_ircc_close(struct smsc_ircc_cb *self)
smsc_ircc_stop_interrupts(self); smsc_ircc_stop_interrupts(self);
/* Release the PORTS that this driver is using */ /* Release the PORTS that this driver is using */
IRDA_DEBUG(0, "%s(), releasing 0x%03x\n", __func__, pr_debug("%s(), releasing 0x%03x\n", __func__,
self->io.fir_base); self->io.fir_base);
release_region(self->io.fir_base, self->io.fir_ext); release_region(self->io.fir_base, self->io.fir_ext);
IRDA_DEBUG(0, "%s(), releasing 0x%03x\n", __func__, pr_debug("%s(), releasing 0x%03x\n", __func__,
self->io.sir_base); self->io.sir_base);
release_region(self->io.sir_base, self->io.sir_ext); release_region(self->io.sir_base, self->io.sir_ext);
...@@ -1875,7 +1875,7 @@ static void __exit smsc_ircc_cleanup(void) ...@@ -1875,7 +1875,7 @@ static void __exit smsc_ircc_cleanup(void)
{ {
int i; int i;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
if (dev_self[i]) if (dev_self[i])
...@@ -1899,7 +1899,7 @@ static void smsc_ircc_sir_start(struct smsc_ircc_cb *self) ...@@ -1899,7 +1899,7 @@ static void smsc_ircc_sir_start(struct smsc_ircc_cb *self)
struct net_device *dev; struct net_device *dev;
int fir_base, sir_base; int fir_base, sir_base;
IRDA_DEBUG(3, "%s\n", __func__); pr_debug("%s\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
dev = self->netdev; dev = self->netdev;
...@@ -1925,7 +1925,7 @@ static void smsc_ircc_sir_start(struct smsc_ircc_cb *self) ...@@ -1925,7 +1925,7 @@ static void smsc_ircc_sir_start(struct smsc_ircc_cb *self)
/* Turn on interrups */ /* Turn on interrups */
outb(UART_IER_RLSI | UART_IER_RDI |UART_IER_THRI, sir_base + UART_IER); outb(UART_IER_RLSI | UART_IER_RDI |UART_IER_THRI, sir_base + UART_IER);
IRDA_DEBUG(3, "%s() - exit\n", __func__); pr_debug("%s() - exit\n", __func__);
outb(0x00, fir_base + IRCC_MASTER); outb(0x00, fir_base + IRCC_MASTER);
} }
...@@ -1935,7 +1935,7 @@ void smsc_ircc_sir_stop(struct smsc_ircc_cb *self) ...@@ -1935,7 +1935,7 @@ void smsc_ircc_sir_stop(struct smsc_ircc_cb *self)
{ {
int iobase; int iobase;
IRDA_DEBUG(3, "%s\n", __func__); pr_debug("%s\n", __func__);
iobase = self->io.sir_base; iobase = self->io.sir_base;
/* Reset UART */ /* Reset UART */
...@@ -1961,7 +1961,7 @@ static void smsc_ircc_sir_write_wakeup(struct smsc_ircc_cb *self) ...@@ -1961,7 +1961,7 @@ static void smsc_ircc_sir_write_wakeup(struct smsc_ircc_cb *self)
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_DEBUG(4, "%s\n", __func__); pr_debug("%s\n", __func__);
iobase = self->io.sir_base; iobase = self->io.sir_base;
...@@ -1982,8 +1982,8 @@ static void smsc_ircc_sir_write_wakeup(struct smsc_ircc_cb *self) ...@@ -1982,8 +1982,8 @@ static void smsc_ircc_sir_write_wakeup(struct smsc_ircc_cb *self)
* if we need to change the speed of the hardware * if we need to change the speed of the hardware
*/ */
if (self->new_speed) { if (self->new_speed) {
IRDA_DEBUG(5, "%s(), Changing speed to %d.\n", pr_debug("%s(), Changing speed to %d.\n",
__func__, self->new_speed); __func__, self->new_speed);
smsc_ircc_sir_wait_hw_transmitter_finish(self); smsc_ircc_sir_wait_hw_transmitter_finish(self);
smsc_ircc_change_speed(self, self->new_speed); smsc_ircc_change_speed(self, self->new_speed);
self->new_speed = 0; self->new_speed = 0;
...@@ -2123,7 +2123,7 @@ static void smsc_ircc_sir_wait_hw_transmitter_finish(struct smsc_ircc_cb *self) ...@@ -2123,7 +2123,7 @@ static void smsc_ircc_sir_wait_hw_transmitter_finish(struct smsc_ircc_cb *self)
udelay(1); udelay(1);
if (count < 0) if (count < 0)
IRDA_DEBUG(0, "%s(): stuck transmitter\n", __func__); pr_debug("%s(): stuck transmitter\n", __func__);
} }
...@@ -2184,7 +2184,7 @@ static int __init smsc_superio_flat(const struct smsc_chip *chips, unsigned shor ...@@ -2184,7 +2184,7 @@ static int __init smsc_superio_flat(const struct smsc_chip *chips, unsigned shor
u8 mode, dma, irq; u8 mode, dma, irq;
int ret = -ENODEV; int ret = -ENODEV;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
if (smsc_ircc_probe(cfgbase, SMSCSIOFLAT_DEVICEID_REG, chips, type) == NULL) if (smsc_ircc_probe(cfgbase, SMSCSIOFLAT_DEVICEID_REG, chips, type) == NULL)
return ret; return ret;
...@@ -2235,7 +2235,7 @@ static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned sho ...@@ -2235,7 +2235,7 @@ static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned sho
unsigned short fir_io, sir_io; unsigned short fir_io, sir_io;
int ret = -ENODEV; int ret = -ENODEV;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
if (smsc_ircc_probe(cfg_base, 0x20, chips, type) == NULL) if (smsc_ircc_probe(cfg_base, 0x20, chips, type) == NULL)
return ret; return ret;
...@@ -2269,7 +2269,7 @@ static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned sho ...@@ -2269,7 +2269,7 @@ static int __init smsc_superio_paged(const struct smsc_chip *chips, unsigned sho
static int __init smsc_access(unsigned short cfg_base, unsigned char reg) static int __init smsc_access(unsigned short cfg_base, unsigned char reg)
{ {
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
outb(reg, cfg_base); outb(reg, cfg_base);
return inb(cfg_base) != reg ? -1 : 0; return inb(cfg_base) != reg ? -1 : 0;
...@@ -2279,7 +2279,7 @@ static const struct smsc_chip * __init smsc_ircc_probe(unsigned short cfg_base, ...@@ -2279,7 +2279,7 @@ static const struct smsc_chip * __init smsc_ircc_probe(unsigned short cfg_base,
{ {
u8 devid, xdevid, rev; u8 devid, xdevid, rev;
IRDA_DEBUG(1, "%s\n", __func__); pr_debug("%s\n", __func__);
/* Leave configuration */ /* Leave configuration */
...@@ -2534,9 +2534,8 @@ static int __init preconfigure_smsc_chip(struct ...@@ -2534,9 +2534,8 @@ static int __init preconfigure_smsc_chip(struct
outb(LPC47N227_CFGACCESSKEY, iobase); // enter configuration state outb(LPC47N227_CFGACCESSKEY, iobase); // enter configuration state
outb(SMSCSIOFLAT_DEVICEID_REG, iobase); // set for device ID outb(SMSCSIOFLAT_DEVICEID_REG, iobase); // set for device ID
tmpbyte = inb(iobase +1); // Read device ID tmpbyte = inb(iobase +1); // Read device ID
IRDA_DEBUG(0, pr_debug("Detected Chip id: 0x%02x, setting up registers...\n",
"Detected Chip id: 0x%02x, setting up registers...\n", tmpbyte);
tmpbyte);
/* Disable UART1 and set up SIR I/O port */ /* Disable UART1 and set up SIR I/O port */
outb(0x24, iobase); // select CR24 - UART1 base addr outb(0x24, iobase); // select CR24 - UART1 base addr
...@@ -2682,7 +2681,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev, ...@@ -2682,7 +2681,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
default: default:
tmpbyte |= 0x01; /* COM2 default */ tmpbyte |= 0x01; /* COM2 default */
} }
IRDA_DEBUG(1, "COM_DEC (write): 0x%02x\n", tmpbyte); pr_debug("COM_DEC (write): 0x%02x\n", tmpbyte);
pci_write_config_byte(dev, COM_DEC, tmpbyte); pci_write_config_byte(dev, COM_DEC, tmpbyte);
/* Enable Low Pin Count interface */ /* Enable Low Pin Count interface */
...@@ -2710,7 +2709,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev, ...@@ -2710,7 +2709,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
} }
tmpword &= 0xfffd; /* disable LPC COMB */ tmpword &= 0xfffd; /* disable LPC COMB */
tmpword |= 0x0001; /* set bit 0 : enable LPC COMA addr range (GEN2) */ tmpword |= 0x0001; /* set bit 0 : enable LPC COMA addr range (GEN2) */
IRDA_DEBUG(1, "LPC_EN (write): 0x%04x\n", tmpword); pr_debug("LPC_EN (write): 0x%04x\n", tmpword);
pci_write_config_word(dev, LPC_EN, tmpword); pci_write_config_word(dev, LPC_EN, tmpword);
/* /*
...@@ -2755,7 +2754,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev, ...@@ -2755,7 +2754,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
default: default:
break; /* do not change settings */ break; /* do not change settings */
} }
IRDA_DEBUG(1, "PCI_DMA_C (write): 0x%04x\n", tmpword); pr_debug("PCI_DMA_C (write): 0x%04x\n", tmpword);
pci_write_config_word(dev, PCI_DMA_C, tmpword); pci_write_config_word(dev, PCI_DMA_C, tmpword);
/* /*
...@@ -2766,7 +2765,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev, ...@@ -2766,7 +2765,7 @@ static int __init preconfigure_through_82801(struct pci_dev *dev,
*/ */
tmpword = conf->fir_io & 0xfff8; tmpword = conf->fir_io & 0xfff8;
tmpword |= 0x0001; tmpword |= 0x0001;
IRDA_DEBUG(1, "GEN2_DEC (write): 0x%04x\n", tmpword); pr_debug("GEN2_DEC (write): 0x%04x\n", tmpword);
pci_write_config_word(dev, GEN2_DEC, tmpword); pci_write_config_word(dev, GEN2_DEC, tmpword);
/* Pre-configure chip */ /* Pre-configure chip */
......
...@@ -63,8 +63,8 @@ static int __init tekram_sir_init(void) ...@@ -63,8 +63,8 @@ static int __init tekram_sir_init(void)
{ {
if (tekram_delay < 1 || tekram_delay > 500) if (tekram_delay < 1 || tekram_delay > 500)
tekram_delay = 200; tekram_delay = 200;
IRDA_DEBUG(1, "%s - using %d ms delay\n", pr_debug("%s - using %d ms delay\n",
tekram.driver_name, tekram_delay); tekram.driver_name, tekram_delay);
return irda_register_dongle(&tekram); return irda_register_dongle(&tekram);
} }
...@@ -77,8 +77,6 @@ static int tekram_open(struct sir_dev *dev) ...@@ -77,8 +77,6 @@ static int tekram_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __func__);
sirdev_set_dtr_rts(dev, TRUE, TRUE); sirdev_set_dtr_rts(dev, TRUE, TRUE);
qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200; qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
...@@ -92,8 +90,6 @@ static int tekram_open(struct sir_dev *dev) ...@@ -92,8 +90,6 @@ static int tekram_open(struct sir_dev *dev)
static int tekram_close(struct sir_dev *dev) static int tekram_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -130,8 +126,6 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -130,8 +126,6 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed)
u8 byte; u8 byte;
static int ret = 0; static int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__);
switch(state) { switch(state) {
case SIRDEV_STATE_DONGLE_SPEED: case SIRDEV_STATE_DONGLE_SPEED:
...@@ -205,8 +199,6 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -205,8 +199,6 @@ static int tekram_change_speed(struct sir_dev *dev, unsigned speed)
static int tekram_reset(struct sir_dev *dev) static int tekram_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Clear DTR, Set RTS */ /* Clear DTR, Set RTS */
sirdev_set_dtr_rts(dev, FALSE, TRUE); sirdev_set_dtr_rts(dev, FALSE, TRUE);
......
...@@ -168,8 +168,8 @@ static int __init toim3232_sir_init(void) ...@@ -168,8 +168,8 @@ static int __init toim3232_sir_init(void)
{ {
if (toim3232delay < 1 || toim3232delay > 500) if (toim3232delay < 1 || toim3232delay > 500)
toim3232delay = 200; toim3232delay = 200;
IRDA_DEBUG(1, "%s - using %d ms delay\n", pr_debug("%s - using %d ms delay\n",
toim3232.driver_name, toim3232delay); toim3232.driver_name, toim3232delay);
return irda_register_dongle(&toim3232); return irda_register_dongle(&toim3232);
} }
...@@ -182,8 +182,6 @@ static int toim3232_open(struct sir_dev *dev) ...@@ -182,8 +182,6 @@ static int toim3232_open(struct sir_dev *dev)
{ {
struct qos_info *qos = &dev->qos; struct qos_info *qos = &dev->qos;
IRDA_DEBUG(2, "%s()\n", __func__);
/* Pull the lines high to start with. /* Pull the lines high to start with.
* *
* For the IR320ST-2, we need to charge the main supply capacitor to * For the IR320ST-2, we need to charge the main supply capacitor to
...@@ -210,8 +208,6 @@ static int toim3232_open(struct sir_dev *dev) ...@@ -210,8 +208,6 @@ static int toim3232_open(struct sir_dev *dev)
static int toim3232_close(struct sir_dev *dev) static int toim3232_close(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Power off dongle */ /* Power off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
...@@ -242,8 +238,6 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -242,8 +238,6 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed)
u8 byte; u8 byte;
static int ret = 0; static int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__);
switch(state) { switch(state) {
case SIRDEV_STATE_DONGLE_SPEED: case SIRDEV_STATE_DONGLE_SPEED:
...@@ -345,8 +339,6 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed) ...@@ -345,8 +339,6 @@ static int toim3232_change_speed(struct sir_dev *dev, unsigned speed)
static int toim3232_reset(struct sir_dev *dev) static int toim3232_reset(struct sir_dev *dev)
{ {
IRDA_DEBUG(2, "%s()\n", __func__);
/* Switch off both DTR and RTS to switch off dongle */ /* Switch off both DTR and RTS to switch off dongle */
sirdev_set_dtr_rts(dev, FALSE, FALSE); sirdev_set_dtr_rts(dev, FALSE, FALSE);
......
...@@ -144,12 +144,10 @@ static int __init via_ircc_init(void) ...@@ -144,12 +144,10 @@ static int __init via_ircc_init(void)
{ {
int rc; int rc;
IRDA_DEBUG(3, "%s()\n", __func__);
rc = pci_register_driver(&via_driver); rc = pci_register_driver(&via_driver);
if (rc < 0) { if (rc < 0) {
IRDA_DEBUG(0, "%s(): error rc = %d, returning -ENODEV...\n", pr_debug("%s(): error rc = %d, returning -ENODEV...\n",
__func__, rc); __func__, rc);
return -ENODEV; return -ENODEV;
} }
return 0; return 0;
...@@ -162,11 +160,11 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id) ...@@ -162,11 +160,11 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
u16 Chipset,FirDRQ1,FirDRQ0,FirIRQ,FirIOBase; u16 Chipset,FirDRQ1,FirDRQ0,FirIRQ,FirIOBase;
chipio_t info; chipio_t info;
IRDA_DEBUG(2, "%s(): Device ID=(0X%X)\n", __func__, id->device); pr_debug("%s(): Device ID=(0X%X)\n", __func__, id->device);
rc = pci_enable_device (pcidev); rc = pci_enable_device (pcidev);
if (rc) { if (rc) {
IRDA_DEBUG(0, "%s(): error rc = %d\n", __func__, rc); pr_debug("%s(): error rc = %d\n", __func__, rc);
return -ENODEV; return -ENODEV;
} }
...@@ -177,7 +175,7 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id) ...@@ -177,7 +175,7 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
Chipset=0x3076; Chipset=0x3076;
if (Chipset==0x3076) { if (Chipset==0x3076) {
IRDA_DEBUG(2, "%s(): Chipset = 3076\n", __func__); pr_debug("%s(): Chipset = 3076\n", __func__);
WriteLPCReg(7,0x0c ); WriteLPCReg(7,0x0c );
temp=ReadLPCReg(0x30);//check if BIOS Enable Fir temp=ReadLPCReg(0x30);//check if BIOS Enable Fir
...@@ -213,7 +211,7 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id) ...@@ -213,7 +211,7 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
} else } else
rc = -ENODEV; //IR not turn on rc = -ENODEV; //IR not turn on
} else { //Not VT1211 } else { //Not VT1211
IRDA_DEBUG(2, "%s(): Chipset = 3096\n", __func__); pr_debug("%s(): Chipset = 3096\n", __func__);
pci_read_config_byte(pcidev,0x67,&bTmp);//check if BIOS Enable Fir pci_read_config_byte(pcidev,0x67,&bTmp);//check if BIOS Enable Fir
if((bTmp&0x01)==1) { // BIOS enable FIR if((bTmp&0x01)==1) { // BIOS enable FIR
...@@ -252,14 +250,12 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id) ...@@ -252,14 +250,12 @@ static int via_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
rc = -ENODEV; //IR not turn on !!!!! rc = -ENODEV; //IR not turn on !!!!!
}//Not VT1211 }//Not VT1211
IRDA_DEBUG(2, "%s(): End - rc = %d\n", __func__, rc); pr_debug("%s(): End - rc = %d\n", __func__, rc);
return rc; return rc;
} }
static void __exit via_ircc_cleanup(void) static void __exit via_ircc_cleanup(void)
{ {
IRDA_DEBUG(3, "%s()\n", __func__);
/* Cleanup all instances of the driver */ /* Cleanup all instances of the driver */
pci_unregister_driver (&via_driver); pci_unregister_driver (&via_driver);
} }
...@@ -289,8 +285,6 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t *info, unsigned int id) ...@@ -289,8 +285,6 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t *info, unsigned int id)
struct via_ircc_cb *self; struct via_ircc_cb *self;
int err; int err;
IRDA_DEBUG(3, "%s()\n", __func__);
/* Allocate new instance of the driver */ /* Allocate new instance of the driver */
dev = alloc_irdadev(sizeof(struct via_ircc_cb)); dev = alloc_irdadev(sizeof(struct via_ircc_cb));
if (dev == NULL) if (dev == NULL)
...@@ -316,8 +310,8 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t *info, unsigned int id) ...@@ -316,8 +310,8 @@ static int via_ircc_open(struct pci_dev *pdev, chipio_t *info, unsigned int id)
/* Reserve the ioports that we need */ /* Reserve the ioports that we need */
if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) { if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) {
IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n", pr_debug("%s(), can't get iobase of 0x%03x\n",
__func__, self->io.fir_base); __func__, self->io.fir_base);
err = -ENODEV; err = -ENODEV;
goto err_out1; goto err_out1;
} }
...@@ -423,8 +417,6 @@ static void via_remove_one(struct pci_dev *pdev) ...@@ -423,8 +417,6 @@ static void via_remove_one(struct pci_dev *pdev)
struct via_ircc_cb *self = pci_get_drvdata(pdev); struct via_ircc_cb *self = pci_get_drvdata(pdev);
int iobase; int iobase;
IRDA_DEBUG(3, "%s()\n", __func__);
iobase = self->io.fir_base; iobase = self->io.fir_base;
ResetChip(iobase, 5); //hardware reset. ResetChip(iobase, 5); //hardware reset.
...@@ -432,8 +424,8 @@ static void via_remove_one(struct pci_dev *pdev) ...@@ -432,8 +424,8 @@ static void via_remove_one(struct pci_dev *pdev)
unregister_netdev(self->netdev); unregister_netdev(self->netdev);
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
IRDA_DEBUG(2, "%s(), Releasing Region %03x\n", pr_debug("%s(), Releasing Region %03x\n",
__func__, self->io.fir_base); __func__, self->io.fir_base);
release_region(self->io.fir_base, self->io.fir_ext); release_region(self->io.fir_base, self->io.fir_ext);
if (self->tx_buff.head) if (self->tx_buff.head)
dma_free_coherent(&pdev->dev, self->tx_buff.truesize, dma_free_coherent(&pdev->dev, self->tx_buff.truesize,
...@@ -458,8 +450,6 @@ static void via_hw_init(struct via_ircc_cb *self) ...@@ -458,8 +450,6 @@ static void via_hw_init(struct via_ircc_cb *self)
{ {
int iobase = self->io.fir_base; int iobase = self->io.fir_base;
IRDA_DEBUG(3, "%s()\n", __func__);
SetMaxRxPacketSize(iobase, 0x0fff); //set to max:4095 SetMaxRxPacketSize(iobase, 0x0fff); //set to max:4095
// FIFO Init // FIFO Init
EnRXFIFOReadyInt(iobase, OFF); EnRXFIFOReadyInt(iobase, OFF);
...@@ -528,8 +518,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed, ...@@ -528,8 +518,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed,
/* speed is unused, as we use IsSIROn()/IsMIROn() */ /* speed is unused, as we use IsSIROn()/IsMIROn() */
speed = speed; speed = speed;
IRDA_DEBUG(1, "%s(): change_dongle_speed to %d for 0x%x, %d\n", pr_debug("%s(): change_dongle_speed to %d for 0x%x, %d\n",
__func__, speed, iobase, dongle_id); __func__, speed, iobase, dongle_id);
switch (dongle_id) { switch (dongle_id) {
...@@ -618,7 +608,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed, ...@@ -618,7 +608,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed,
case 0x11: /* Temic TFDS4500 */ case 0x11: /* Temic TFDS4500 */
IRDA_DEBUG(2, "%s: Temic TFDS4500: One RX pin, TX normal, RX inverted.\n", __func__); pr_debug("%s: Temic TFDS4500: One RX pin, TX normal, RX inverted\n",
__func__);
UseOneRX(iobase, ON); //use ONE RX....RX1 UseOneRX(iobase, ON); //use ONE RX....RX1
InvertTX(iobase, OFF); InvertTX(iobase, OFF);
...@@ -636,7 +627,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed, ...@@ -636,7 +627,8 @@ static void via_ircc_change_dongle_speed(int iobase, int speed,
SlowIRRXLowActive(iobase, OFF); SlowIRRXLowActive(iobase, OFF);
} else{ } else{
IRDA_DEBUG(0, "%s: Warning: TFDS4500 not running in SIR mode !\n", __func__); pr_debug("%s: Warning: TFDS4500 not running in SIR mode !\n",
__func__);
} }
break; break;
...@@ -673,7 +665,7 @@ static void via_ircc_change_speed(struct via_ircc_cb *self, __u32 speed) ...@@ -673,7 +665,7 @@ static void via_ircc_change_speed(struct via_ircc_cb *self, __u32 speed)
iobase = self->io.fir_base; iobase = self->io.fir_base;
/* Update accounting for new speed */ /* Update accounting for new speed */
self->io.speed = speed; self->io.speed = speed;
IRDA_DEBUG(1, "%s: change_speed to %d bps.\n", __func__, speed); pr_debug("%s: change_speed to %d bps.\n", __func__, speed);
WriteReg(iobase, I_ST_CT_0, 0x0); WriteReg(iobase, I_ST_CT_0, 0x0);
...@@ -903,10 +895,10 @@ static int via_ircc_dma_xmit(struct via_ircc_cb *self, u16 iobase) ...@@ -903,10 +895,10 @@ static int via_ircc_dma_xmit(struct via_ircc_cb *self, u16 iobase)
((u8 *)self->tx_fifo.queue[self->tx_fifo.ptr].start - ((u8 *)self->tx_fifo.queue[self->tx_fifo.ptr].start -
self->tx_buff.head) + self->tx_buff_dma, self->tx_buff.head) + self->tx_buff_dma,
self->tx_fifo.queue[self->tx_fifo.ptr].len, DMA_TX_MODE); self->tx_fifo.queue[self->tx_fifo.ptr].len, DMA_TX_MODE);
IRDA_DEBUG(1, "%s: tx_fifo.ptr=%x,len=%x,tx_fifo.len=%x..\n", pr_debug("%s: tx_fifo.ptr=%x,len=%x,tx_fifo.len=%x..\n",
__func__, self->tx_fifo.ptr, __func__, self->tx_fifo.ptr,
self->tx_fifo.queue[self->tx_fifo.ptr].len, self->tx_fifo.queue[self->tx_fifo.ptr].len,
self->tx_fifo.len); self->tx_fifo.len);
SetSendByte(iobase, self->tx_fifo.queue[self->tx_fifo.ptr].len); SetSendByte(iobase, self->tx_fifo.queue[self->tx_fifo.ptr].len);
RXStart(iobase, OFF); RXStart(iobase, OFF);
...@@ -927,8 +919,6 @@ static int via_ircc_dma_xmit_complete(struct via_ircc_cb *self) ...@@ -927,8 +919,6 @@ static int via_ircc_dma_xmit_complete(struct via_ircc_cb *self)
int iobase; int iobase;
u8 Tx_status; u8 Tx_status;
IRDA_DEBUG(3, "%s()\n", __func__);
iobase = self->io.fir_base; iobase = self->io.fir_base;
/* Disable DMA */ /* Disable DMA */
// DisableDmaChannel(self->io.dma); // DisableDmaChannel(self->io.dma);
...@@ -958,10 +948,9 @@ static int via_ircc_dma_xmit_complete(struct via_ircc_cb *self) ...@@ -958,10 +948,9 @@ static int via_ircc_dma_xmit_complete(struct via_ircc_cb *self)
self->tx_fifo.ptr++; self->tx_fifo.ptr++;
} }
} }
IRDA_DEBUG(1, pr_debug("%s: tx_fifo.len=%x ,tx_fifo.ptr=%x,tx_fifo.free=%x...\n",
"%s: tx_fifo.len=%x ,tx_fifo.ptr=%x,tx_fifo.free=%x...\n", __func__,
__func__, self->tx_fifo.len, self->tx_fifo.ptr, self->tx_fifo.free);
self->tx_fifo.len, self->tx_fifo.ptr, self->tx_fifo.free);
/* F01_S /* F01_S
// Any frames to be sent back-to-back? // Any frames to be sent back-to-back?
if (self->tx_fifo.len) { if (self->tx_fifo.len) {
...@@ -996,8 +985,6 @@ static int via_ircc_dma_receive(struct via_ircc_cb *self) ...@@ -996,8 +985,6 @@ static int via_ircc_dma_receive(struct via_ircc_cb *self)
iobase = self->io.fir_base; iobase = self->io.fir_base;
IRDA_DEBUG(3, "%s()\n", __func__);
self->tx_fifo.len = self->tx_fifo.ptr = self->tx_fifo.free = 0; self->tx_fifo.len = self->tx_fifo.ptr = self->tx_fifo.free = 0;
self->tx_fifo.tail = self->tx_buff.head; self->tx_fifo.tail = self->tx_buff.head;
self->RxDataReady = 0; self->RxDataReady = 0;
...@@ -1079,15 +1066,15 @@ static int via_ircc_dma_receive_complete(struct via_ircc_cb *self, ...@@ -1079,15 +1066,15 @@ static int via_ircc_dma_receive_complete(struct via_ircc_cb *self,
if (len == 0) if (len == 0)
return TRUE; //interrupt only, data maybe move by RxT return TRUE; //interrupt only, data maybe move by RxT
if (((len - 4) < 2) || ((len - 4) > 2048)) { if (((len - 4) < 2) || ((len - 4) > 2048)) {
IRDA_DEBUG(1, "%s(): Trouble:len=%x,CurCount=%x,LastCount=%x..\n", pr_debug("%s(): Trouble:len=%x,CurCount=%x,LastCount=%x\n",
__func__, len, RxCurCount(iobase, self), __func__, len, RxCurCount(iobase, self),
self->RxLastCount); self->RxLastCount);
hwreset(self); hwreset(self);
return FALSE; return FALSE;
} }
IRDA_DEBUG(2, "%s(): fifo.len=%x,len=%x,CurCount=%x..\n", pr_debug("%s(): fifo.len=%x,len=%x,CurCount=%x..\n",
__func__, __func__,
st_fifo->len, len - 4, RxCurCount(iobase, self)); st_fifo->len, len - 4, RxCurCount(iobase, self));
st_fifo->entries[st_fifo->tail].status = status; st_fifo->entries[st_fifo->tail].status = status;
st_fifo->entries[st_fifo->tail].len = len; st_fifo->entries[st_fifo->tail].len = len;
...@@ -1134,8 +1121,8 @@ F01_E */ ...@@ -1134,8 +1121,8 @@ F01_E */
skb_put(skb, len - 4); skb_put(skb, len - 4);
skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4); skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4);
IRDA_DEBUG(2, "%s(): len=%x.rx_buff=%p\n", __func__, pr_debug("%s(): len=%x.rx_buff=%p\n", __func__,
len - 4, self->rx_buff.data); len - 4, self->rx_buff.data);
// Move to next frame // Move to next frame
self->rx_buff.data += len; self->rx_buff.data += len;
...@@ -1164,7 +1151,7 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase) ...@@ -1164,7 +1151,7 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase)
len = GetRecvByte(iobase, self); len = GetRecvByte(iobase, self);
IRDA_DEBUG(2, "%s(): len=%x\n", __func__, len); pr_debug("%s(): len=%x\n", __func__, len);
if ((len - 4) < 2) { if ((len - 4) < 2) {
self->netdev->stats.rx_dropped++; self->netdev->stats.rx_dropped++;
...@@ -1249,8 +1236,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase) ...@@ -1249,8 +1236,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
skb_put(skb, len - 4); skb_put(skb, len - 4);
skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4); skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4);
IRDA_DEBUG(2, "%s(): len=%x.head=%x\n", __func__, pr_debug("%s(): len=%x.head=%x\n", __func__,
len - 4, st_fifo->head); len - 4, st_fifo->head);
// Move to next frame // Move to next frame
self->rx_buff.data += len; self->rx_buff.data += len;
...@@ -1263,10 +1250,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase) ...@@ -1263,10 +1250,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
} //while } //while
self->RetryCount = 0; self->RetryCount = 0;
IRDA_DEBUG(2, pr_debug("%s(): End of upload HostStatus=%x,RxStatus=%x\n",
"%s(): End of upload HostStatus=%x,RxStatus=%x\n", __func__, GetHostStatus(iobase), GetRXStatus(iobase));
__func__,
GetHostStatus(iobase), GetRXStatus(iobase));
/* /*
* if frame is receive complete at this routine ,then upload * if frame is receive complete at this routine ,then upload
...@@ -1304,12 +1289,12 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id) ...@@ -1304,12 +1289,12 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id)
spin_lock(&self->lock); spin_lock(&self->lock);
iHostIntType = GetHostStatus(iobase); iHostIntType = GetHostStatus(iobase);
IRDA_DEBUG(4, "%s(): iHostIntType %02x: %s %s %s %02x\n", pr_debug("%s(): iHostIntType %02x: %s %s %s %02x\n",
__func__, iHostIntType, __func__, iHostIntType,
(iHostIntType & 0x40) ? "Timer" : "", (iHostIntType & 0x40) ? "Timer" : "",
(iHostIntType & 0x20) ? "Tx" : "", (iHostIntType & 0x20) ? "Tx" : "",
(iHostIntType & 0x10) ? "Rx" : "", (iHostIntType & 0x10) ? "Rx" : "",
(iHostIntType & 0x0e) >> 1); (iHostIntType & 0x0e) >> 1);
if ((iHostIntType & 0x40) != 0) { //Timer Event if ((iHostIntType & 0x40) != 0) { //Timer Event
self->EventFlag.TimeOut++; self->EventFlag.TimeOut++;
...@@ -1334,12 +1319,12 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id) ...@@ -1334,12 +1319,12 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id)
if ((iHostIntType & 0x20) != 0) { //Tx Event if ((iHostIntType & 0x20) != 0) { //Tx Event
iTxIntType = GetTXStatus(iobase); iTxIntType = GetTXStatus(iobase);
IRDA_DEBUG(4, "%s(): iTxIntType %02x: %s %s %s %s\n", pr_debug("%s(): iTxIntType %02x: %s %s %s %s\n",
__func__, iTxIntType, __func__, iTxIntType,
(iTxIntType & 0x08) ? "FIFO underr." : "", (iTxIntType & 0x08) ? "FIFO underr." : "",
(iTxIntType & 0x04) ? "EOM" : "", (iTxIntType & 0x04) ? "EOM" : "",
(iTxIntType & 0x02) ? "FIFO ready" : "", (iTxIntType & 0x02) ? "FIFO ready" : "",
(iTxIntType & 0x01) ? "Early EOM" : ""); (iTxIntType & 0x01) ? "Early EOM" : "");
if (iTxIntType & 0x4) { if (iTxIntType & 0x4) {
self->EventFlag.EOMessage++; // read and will auto clean self->EventFlag.EOMessage++; // read and will auto clean
...@@ -1358,17 +1343,17 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id) ...@@ -1358,17 +1343,17 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id)
/* Check if DMA has finished */ /* Check if DMA has finished */
iRxIntType = GetRXStatus(iobase); iRxIntType = GetRXStatus(iobase);
IRDA_DEBUG(4, "%s(): iRxIntType %02x: %s %s %s %s %s %s %s\n", pr_debug("%s(): iRxIntType %02x: %s %s %s %s %s %s %s\n",
__func__, iRxIntType, __func__, iRxIntType,
(iRxIntType & 0x80) ? "PHY err." : "", (iRxIntType & 0x80) ? "PHY err." : "",
(iRxIntType & 0x40) ? "CRC err" : "", (iRxIntType & 0x40) ? "CRC err" : "",
(iRxIntType & 0x20) ? "FIFO overr." : "", (iRxIntType & 0x20) ? "FIFO overr." : "",
(iRxIntType & 0x10) ? "EOF" : "", (iRxIntType & 0x10) ? "EOF" : "",
(iRxIntType & 0x08) ? "RxData" : "", (iRxIntType & 0x08) ? "RxData" : "",
(iRxIntType & 0x02) ? "RxMaxLen" : "", (iRxIntType & 0x02) ? "RxMaxLen" : "",
(iRxIntType & 0x01) ? "SIR bad" : ""); (iRxIntType & 0x01) ? "SIR bad" : "");
if (!iRxIntType) if (!iRxIntType)
IRDA_DEBUG(3, "%s(): RxIRQ =0\n", __func__); pr_debug("%s(): RxIRQ =0\n", __func__);
if (iRxIntType & 0x10) { if (iRxIntType & 0x10) {
if (via_ircc_dma_receive_complete(self, iobase)) { if (via_ircc_dma_receive_complete(self, iobase)) {
...@@ -1377,10 +1362,9 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id) ...@@ -1377,10 +1362,9 @@ static irqreturn_t via_ircc_interrupt(int dummy, void *dev_id)
} }
} // No ERR } // No ERR
else { //ERR else { //ERR
IRDA_DEBUG(4, "%s(): RxIRQ ERR:iRxIntType=%x,HostIntType=%x,CurCount=%x,RxLastCount=%x_____\n", pr_debug("%s(): RxIRQ ERR:iRxIntType=%x,HostIntType=%x,CurCount=%x,RxLastCount=%x_____\n",
__func__, iRxIntType, iHostIntType, __func__, iRxIntType, iHostIntType,
RxCurCount(iobase, self), RxCurCount(iobase, self), self->RxLastCount);
self->RxLastCount);
if (iRxIntType & 0x20) { //FIFO OverRun ERR if (iRxIntType & 0x20) { //FIFO OverRun ERR
ResetChip(iobase, 0); ResetChip(iobase, 0);
...@@ -1403,8 +1387,6 @@ static void hwreset(struct via_ircc_cb *self) ...@@ -1403,8 +1387,6 @@ static void hwreset(struct via_ircc_cb *self)
int iobase; int iobase;
iobase = self->io.fir_base; iobase = self->io.fir_base;
IRDA_DEBUG(3, "%s()\n", __func__);
ResetChip(iobase, 5); ResetChip(iobase, 5);
EnableDMA(iobase, OFF); EnableDMA(iobase, OFF);
EnableTX(iobase, OFF); EnableTX(iobase, OFF);
...@@ -1448,7 +1430,7 @@ static int via_ircc_is_receiving(struct via_ircc_cb *self) ...@@ -1448,7 +1430,7 @@ static int via_ircc_is_receiving(struct via_ircc_cb *self)
if (CkRxRecv(iobase, self)) if (CkRxRecv(iobase, self))
status = TRUE; status = TRUE;
IRDA_DEBUG(2, "%s(): status=%x....\n", __func__, status); pr_debug("%s(): status=%x....\n", __func__, status);
return status; return status;
} }
...@@ -1466,8 +1448,6 @@ static int via_ircc_net_open(struct net_device *dev) ...@@ -1466,8 +1448,6 @@ static int via_ircc_net_open(struct net_device *dev)
int iobase; int iobase;
char hwname[32]; char hwname[32];
IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev); self = netdev_priv(dev);
dev->stats.rx_packets = 0; dev->stats.rx_packets = 0;
...@@ -1533,8 +1513,6 @@ static int via_ircc_net_close(struct net_device *dev) ...@@ -1533,8 +1513,6 @@ static int via_ircc_net_close(struct net_device *dev)
struct via_ircc_cb *self; struct via_ircc_cb *self;
int iobase; int iobase;
IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev); self = netdev_priv(dev);
IRDA_ASSERT(self != NULL, return 0;); IRDA_ASSERT(self != NULL, return 0;);
...@@ -1577,8 +1555,8 @@ static int via_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, ...@@ -1577,8 +1555,8 @@ static int via_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq,
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev); self = netdev_priv(dev);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_DEBUG(1, "%s(), %s, (cmd=0x%X)\n", __func__, dev->name, pr_debug("%s(), %s, (cmd=0x%X)\n", __func__, dev->name,
cmd); cmd);
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
spin_lock_irqsave(&self->lock, flags); spin_lock_irqsave(&self->lock, flags);
switch (cmd) { switch (cmd) {
......
...@@ -556,7 +556,7 @@ static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd) ...@@ -556,7 +556,7 @@ static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd)
crclen = (idev->mode==IFF_FIR) ? sizeof(u32) : sizeof(u16); crclen = (idev->mode==IFF_FIR) ? sizeof(u32) : sizeof(u16);
len -= crclen; /* remove trailing CRC */ len -= crclen; /* remove trailing CRC */
if (len <= 0) { if (len <= 0) {
IRDA_DEBUG(0, "%s: strange frame (len=%d)\n", __func__, len); pr_debug("%s: strange frame (len=%d)\n", __func__, len);
ret |= VLSI_RX_DROP; ret |= VLSI_RX_DROP;
goto done; goto done;
} }
...@@ -571,7 +571,7 @@ static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd) ...@@ -571,7 +571,7 @@ static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd)
*/ */
le16_to_cpus(rd->buf+len); le16_to_cpus(rd->buf+len);
if (irda_calc_crc16(INIT_FCS,rd->buf,len+crclen) != GOOD_FCS) { if (irda_calc_crc16(INIT_FCS,rd->buf,len+crclen) != GOOD_FCS) {
IRDA_DEBUG(0, "%s: crc error\n", __func__); pr_debug("%s: crc error\n", __func__);
ret |= VLSI_RX_CRC; ret |= VLSI_RX_CRC;
goto done; goto done;
} }
...@@ -689,7 +689,7 @@ static void vlsi_unarm_rx(vlsi_irda_dev_t *idev) ...@@ -689,7 +689,7 @@ static void vlsi_unarm_rx(vlsi_irda_dev_t *idev)
if (rd_is_active(rd)) { if (rd_is_active(rd)) {
rd_set_status(rd, 0); rd_set_status(rd, 0);
if (rd_get_count(rd)) { if (rd_get_count(rd)) {
IRDA_DEBUG(0, "%s - dropping rx packet\n", __func__); pr_debug("%s - dropping rx packet\n", __func__);
ret = -VLSI_RX_DROP; ret = -VLSI_RX_DROP;
} }
rd_set_count(rd, 0); rd_set_count(rd, 0);
...@@ -764,7 +764,7 @@ static int vlsi_set_baud(vlsi_irda_dev_t *idev, unsigned iobase) ...@@ -764,7 +764,7 @@ static int vlsi_set_baud(vlsi_irda_dev_t *idev, unsigned iobase)
int fifocnt; int fifocnt;
baudrate = idev->new_baud; baudrate = idev->new_baud;
IRDA_DEBUG(2, "%s: %d -> %d\n", __func__, idev->baud, idev->new_baud); pr_debug("%s: %d -> %d\n", __func__, idev->baud, idev->new_baud);
if (baudrate == 4000000) { if (baudrate == 4000000) {
mode = IFF_FIR; mode = IFF_FIR;
config = IRCFG_FIR; config = IRCFG_FIR;
...@@ -798,7 +798,7 @@ static int vlsi_set_baud(vlsi_irda_dev_t *idev, unsigned iobase) ...@@ -798,7 +798,7 @@ static int vlsi_set_baud(vlsi_irda_dev_t *idev, unsigned iobase)
fifocnt = inw(iobase+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK; fifocnt = inw(iobase+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK;
if (fifocnt != 0) { if (fifocnt != 0) {
IRDA_DEBUG(0, "%s: rx fifo not empty(%d)\n", __func__, fifocnt); pr_debug("%s: rx fifo not empty(%d)\n", __func__, fifocnt);
} }
outw(0, iobase+VLSI_PIO_IRENABLE); outw(0, iobase+VLSI_PIO_IRENABLE);
...@@ -1022,7 +1022,8 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb, ...@@ -1022,7 +1022,8 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb,
fifocnt = inw(ndev->base_addr+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK; fifocnt = inw(ndev->base_addr+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK;
if (fifocnt != 0) { if (fifocnt != 0) {
IRDA_DEBUG(0, "%s: rx fifo not empty(%d)\n", __func__, fifocnt); pr_debug("%s: rx fifo not empty(%d)\n",
__func__, fifocnt);
} }
config = inw(iobase+VLSI_PIO_IRCFG); config = inw(iobase+VLSI_PIO_IRCFG);
...@@ -1034,7 +1035,7 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb, ...@@ -1034,7 +1035,7 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb,
if (ring_put(r) == NULL) { if (ring_put(r) == NULL) {
netif_stop_queue(ndev); netif_stop_queue(ndev);
IRDA_DEBUG(3, "%s: tx ring full - queue stopped\n", __func__); pr_debug("%s: tx ring full - queue stopped\n", __func__);
} }
spin_unlock_irqrestore(&idev->lock, flags); spin_unlock_irqrestore(&idev->lock, flags);
...@@ -1099,8 +1100,8 @@ static void vlsi_tx_interrupt(struct net_device *ndev) ...@@ -1099,8 +1100,8 @@ static void vlsi_tx_interrupt(struct net_device *ndev)
fifocnt = inw(iobase+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK; fifocnt = inw(iobase+VLSI_PIO_RCVBCNT) & RCVBCNT_MASK;
if (fifocnt != 0) { if (fifocnt != 0) {
IRDA_DEBUG(0, "%s: rx fifo not empty(%d)\n", pr_debug("%s: rx fifo not empty(%d)\n",
__func__, fifocnt); __func__, fifocnt);
} }
outw(config | IRCFG_ENTX, iobase+VLSI_PIO_IRCFG); outw(config | IRCFG_ENTX, iobase+VLSI_PIO_IRCFG);
} }
...@@ -1109,7 +1110,7 @@ static void vlsi_tx_interrupt(struct net_device *ndev) ...@@ -1109,7 +1110,7 @@ static void vlsi_tx_interrupt(struct net_device *ndev)
if (netif_queue_stopped(ndev) && !idev->new_baud) { if (netif_queue_stopped(ndev) && !idev->new_baud) {
netif_wake_queue(ndev); netif_wake_queue(ndev);
IRDA_DEBUG(3, "%s: queue awoken\n", __func__); pr_debug("%s: queue awoken\n", __func__);
} }
} }
...@@ -1133,7 +1134,7 @@ static void vlsi_unarm_tx(vlsi_irda_dev_t *idev) ...@@ -1133,7 +1134,7 @@ static void vlsi_unarm_tx(vlsi_irda_dev_t *idev)
dev_kfree_skb_any(rd->skb); dev_kfree_skb_any(rd->skb);
rd->skb = NULL; rd->skb = NULL;
} }
IRDA_DEBUG(0, "%s - dropping tx packet\n", __func__); pr_debug("%s - dropping tx packet\n", __func__);
ret = -VLSI_TX_DROP; ret = -VLSI_TX_DROP;
} }
else else
...@@ -1191,8 +1192,8 @@ static int vlsi_start_clock(struct pci_dev *pdev) ...@@ -1191,8 +1192,8 @@ static int vlsi_start_clock(struct pci_dev *pdev)
else /* was: clksrc=0(auto) */ else /* was: clksrc=0(auto) */
clksrc = 3; /* fallback to 40MHz XCLK (OB800) */ clksrc = 3; /* fallback to 40MHz XCLK (OB800) */
IRDA_DEBUG(0, "%s: PLL not locked, fallback to clksrc=%d\n", pr_debug("%s: PLL not locked, fallback to clksrc=%d\n",
__func__, clksrc); __func__, clksrc);
} }
else else
clksrc = 1; /* got successful PLL lock */ clksrc = 1; /* got successful PLL lock */
......
...@@ -110,8 +110,6 @@ static int __init w83977af_init(void) ...@@ -110,8 +110,6 @@ static int __init w83977af_init(void)
{ {
int i; int i;
IRDA_DEBUG(0, "%s()\n", __func__ );
for (i=0; i < ARRAY_SIZE(dev_self) && io[i] < 2000; i++) { for (i=0; i < ARRAY_SIZE(dev_self) && io[i] < 2000; i++) {
if (w83977af_open(i, io[i], irq[i], dma[i]) == 0) if (w83977af_open(i, io[i], irq[i], dma[i]) == 0)
return 0; return 0;
...@@ -129,8 +127,6 @@ static void __exit w83977af_cleanup(void) ...@@ -129,8 +127,6 @@ static void __exit w83977af_cleanup(void)
{ {
int i; int i;
IRDA_DEBUG(4, "%s()\n", __func__ );
for (i=0; i < ARRAY_SIZE(dev_self); i++) { for (i=0; i < ARRAY_SIZE(dev_self); i++) {
if (dev_self[i]) if (dev_self[i])
w83977af_close(dev_self[i]); w83977af_close(dev_self[i]);
...@@ -157,12 +153,10 @@ static int w83977af_open(int i, unsigned int iobase, unsigned int irq, ...@@ -157,12 +153,10 @@ static int w83977af_open(int i, unsigned int iobase, unsigned int irq,
struct w83977af_ir *self; struct w83977af_ir *self;
int err; int err;
IRDA_DEBUG(0, "%s()\n", __func__ );
/* Lock the port that we need */ /* Lock the port that we need */
if (!request_region(iobase, CHIP_IO_EXTENT, driver_name)) { if (!request_region(iobase, CHIP_IO_EXTENT, driver_name)) {
IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n", pr_debug("%s(), can't get iobase of 0x%03x\n",
__func__ , iobase); __func__ , iobase);
return -ENODEV; return -ENODEV;
} }
...@@ -269,8 +263,6 @@ static int w83977af_close(struct w83977af_ir *self) ...@@ -269,8 +263,6 @@ static int w83977af_close(struct w83977af_ir *self)
{ {
int iobase; int iobase;
IRDA_DEBUG(0, "%s()\n", __func__ );
iobase = self->io.fir_base; iobase = self->io.fir_base;
#ifdef CONFIG_USE_W977_PNP #ifdef CONFIG_USE_W977_PNP
...@@ -289,8 +281,8 @@ static int w83977af_close(struct w83977af_ir *self) ...@@ -289,8 +281,8 @@ static int w83977af_close(struct w83977af_ir *self)
unregister_netdev(self->netdev); unregister_netdev(self->netdev);
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n", pr_debug("%s(), Releasing Region %03x\n",
__func__ , self->io.fir_base); __func__ , self->io.fir_base);
release_region(self->io.fir_base, self->io.fir_ext); release_region(self->io.fir_base, self->io.fir_ext);
if (self->tx_buff.head) if (self->tx_buff.head)
...@@ -312,7 +304,6 @@ static int w83977af_probe(int iobase, int irq, int dma) ...@@ -312,7 +304,6 @@ static int w83977af_probe(int iobase, int irq, int dma)
int i; int i;
for (i=0; i < 2; i++) { for (i=0; i < 2; i++) {
IRDA_DEBUG( 0, "%s()\n", __func__ );
#ifdef CONFIG_USE_W977_PNP #ifdef CONFIG_USE_W977_PNP
/* Enter PnP configuration mode */ /* Enter PnP configuration mode */
w977_efm_enter(efbase[i]); w977_efm_enter(efbase[i]);
...@@ -399,7 +390,7 @@ static int w83977af_probe(int iobase, int irq, int dma) ...@@ -399,7 +390,7 @@ static int w83977af_probe(int iobase, int irq, int dma)
return 0; return 0;
} else { } else {
/* Try next extented function register address */ /* Try next extented function register address */
IRDA_DEBUG( 0, "%s(), Wrong chip version", __func__ ); pr_debug("%s(), Wrong chip version", __func__);
} }
} }
return -1; return -1;
...@@ -435,19 +426,19 @@ static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed) ...@@ -435,19 +426,19 @@ static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
case 115200: outb(0x01, iobase+ABLL); break; case 115200: outb(0x01, iobase+ABLL); break;
case 576000: case 576000:
ir_mode = HCR_MIR_576; ir_mode = HCR_MIR_576;
IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __func__ ); pr_debug("%s(), handling baud of 576000\n", __func__);
break; break;
case 1152000: case 1152000:
ir_mode = HCR_MIR_1152; ir_mode = HCR_MIR_1152;
IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __func__ ); pr_debug("%s(), handling baud of 1152000\n", __func__);
break; break;
case 4000000: case 4000000:
ir_mode = HCR_FIR; ir_mode = HCR_FIR;
IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __func__ ); pr_debug("%s(), handling baud of 4000000\n", __func__);
break; break;
default: default:
ir_mode = HCR_FIR; ir_mode = HCR_FIR;
IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", __func__ , speed); pr_debug("%s(), unknown baud rate of %d\n", __func__ , speed);
break; break;
} }
...@@ -498,8 +489,8 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb, ...@@ -498,8 +489,8 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
iobase = self->io.fir_base; iobase = self->io.fir_base;
IRDA_DEBUG(4, "%s(%ld), skb->len=%d\n", __func__ , jiffies, pr_debug("%s(%ld), skb->len=%d\n", __func__ , jiffies,
(int) skb->len); (int)skb->len);
/* Lock transmit buffer */ /* Lock transmit buffer */
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -526,7 +517,7 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb, ...@@ -526,7 +517,7 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
self->tx_buff.len = skb->len; self->tx_buff.len = skb->len;
mtt = irda_get_mtt(skb); mtt = irda_get_mtt(skb);
IRDA_DEBUG(4, "%s(%ld), mtt=%d\n", __func__ , jiffies, mtt); pr_debug("%s(%ld), mtt=%d\n", __func__ , jiffies, mtt);
if (mtt) if (mtt)
udelay(mtt); udelay(mtt);
...@@ -560,7 +551,7 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb, ...@@ -560,7 +551,7 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
static void w83977af_dma_write(struct w83977af_ir *self, int iobase) static void w83977af_dma_write(struct w83977af_ir *self, int iobase)
{ {
__u8 set; __u8 set;
IRDA_DEBUG(4, "%s(), len=%d\n", __func__ , self->tx_buff.len); pr_debug("%s(), len=%d\n", __func__ , self->tx_buff.len);
/* Save current set */ /* Save current set */
set = inb(iobase+SSR); set = inb(iobase+SSR);
...@@ -595,19 +586,16 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -595,19 +586,16 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
int actual = 0; int actual = 0;
__u8 set; __u8 set;
IRDA_DEBUG(4, "%s()\n", __func__ );
/* Save current bank */ /* Save current bank */
set = inb(iobase+SSR); set = inb(iobase+SSR);
switch_bank(iobase, SET0); switch_bank(iobase, SET0);
if (!(inb_p(iobase+USR) & USR_TSRE)) { if (!(inb_p(iobase+USR) & USR_TSRE)) {
IRDA_DEBUG(4, pr_debug("%s(), warning, FIFO not empty yet!\n", __func__);
"%s(), warning, FIFO not empty yet!\n", __func__ );
fifo_size -= 17; fifo_size -= 17;
IRDA_DEBUG(4, "%s(), %d bytes left in tx fifo\n", pr_debug("%s(), %d bytes left in tx fifo\n",
__func__ , fifo_size); __func__ , fifo_size);
} }
/* Fill FIFO with current frame */ /* Fill FIFO with current frame */
...@@ -616,8 +604,8 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -616,8 +604,8 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
outb(buf[actual++], iobase+TBR); outb(buf[actual++], iobase+TBR);
} }
IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n", pr_debug("%s(), fifo_size %d ; %d sent of %d\n",
__func__ , fifo_size, actual, len); __func__ , fifo_size, actual, len);
/* Restore bank */ /* Restore bank */
outb(set, iobase+SSR); outb(set, iobase+SSR);
...@@ -637,7 +625,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self) ...@@ -637,7 +625,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
int iobase; int iobase;
__u8 set; __u8 set;
IRDA_DEBUG(4, "%s(%ld)\n", __func__ , jiffies); pr_debug("%s(%ld)\n", __func__ , jiffies);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
...@@ -652,7 +640,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self) ...@@ -652,7 +640,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
/* Check for underrun! */ /* Check for underrun! */
if (inb(iobase+AUDR) & AUDR_UNDR) { if (inb(iobase+AUDR) & AUDR_UNDR) {
IRDA_DEBUG(0, "%s(), Transmit underrun!\n", __func__ ); pr_debug("%s(), Transmit underrun!\n", __func__);
self->netdev->stats.tx_errors++; self->netdev->stats.tx_errors++;
self->netdev->stats.tx_fifo_errors++; self->netdev->stats.tx_fifo_errors++;
...@@ -693,7 +681,7 @@ static int w83977af_dma_receive(struct w83977af_ir *self) ...@@ -693,7 +681,7 @@ static int w83977af_dma_receive(struct w83977af_ir *self)
#endif #endif
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_DEBUG(4, "%s\n", __func__ ); pr_debug("%s\n", __func__);
iobase= self->io.fir_base; iobase= self->io.fir_base;
...@@ -764,7 +752,7 @@ static int w83977af_dma_receive_complete(struct w83977af_ir *self) ...@@ -764,7 +752,7 @@ static int w83977af_dma_receive_complete(struct w83977af_ir *self)
__u8 set; __u8 set;
__u8 status; __u8 status;
IRDA_DEBUG(4, "%s\n", __func__ ); pr_debug("%s\n", __func__);
st_fifo = &self->st_fifo; st_fifo = &self->st_fifo;
...@@ -881,8 +869,6 @@ static void w83977af_pio_receive(struct w83977af_ir *self) ...@@ -881,8 +869,6 @@ static void w83977af_pio_receive(struct w83977af_ir *self)
__u8 byte = 0x00; __u8 byte = 0x00;
int iobase; int iobase;
IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -908,7 +894,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr) ...@@ -908,7 +894,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
__u8 set; __u8 set;
int iobase; int iobase;
IRDA_DEBUG(4, "%s(), isr=%#x\n", __func__ , isr); pr_debug("%s(), isr=%#x\n", __func__ , isr);
iobase = self->io.fir_base; iobase = self->io.fir_base;
/* Transmit FIFO low on data */ /* Transmit FIFO low on data */
...@@ -944,8 +930,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr) ...@@ -944,8 +930,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
if (isr & ISR_TXEMP_I) { if (isr & ISR_TXEMP_I) {
/* Check if we need to change the speed? */ /* Check if we need to change the speed? */
if (self->new_speed) { if (self->new_speed) {
IRDA_DEBUG(2, pr_debug("%s(), Changing speed!\n", __func__);
"%s(), Changing speed!\n", __func__ );
w83977af_change_speed(self, self->new_speed); w83977af_change_speed(self, self->new_speed);
self->new_speed = 0; self->new_speed = 0;
} }
...@@ -1127,7 +1112,6 @@ static int w83977af_net_open(struct net_device *dev) ...@@ -1127,7 +1112,6 @@ static int w83977af_net_open(struct net_device *dev)
char hwname[32]; char hwname[32];
__u8 set; __u8 set;
IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev); self = netdev_priv(dev);
...@@ -1190,8 +1174,6 @@ static int w83977af_net_close(struct net_device *dev) ...@@ -1190,8 +1174,6 @@ static int w83977af_net_close(struct net_device *dev)
int iobase; int iobase;
__u8 set; __u8 set;
IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(dev != NULL, return -1;); IRDA_ASSERT(dev != NULL, return -1;);
self = netdev_priv(dev); self = netdev_priv(dev);
...@@ -1245,7 +1227,7 @@ static int w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1245,7 +1227,7 @@ static int w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd); pr_debug("%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd);
spin_lock_irqsave(&self->lock, flags); spin_lock_irqsave(&self->lock, flags);
......
...@@ -55,16 +55,6 @@ typedef __u32 magic_t; ...@@ -55,16 +55,6 @@ typedef __u32 magic_t;
#endif #endif
#ifdef CONFIG_IRDA_DEBUG #ifdef CONFIG_IRDA_DEBUG
extern unsigned int irda_debug;
/* use 0 for production, 1 for verification, >2 for debug */
#define IRDA_DEBUG_LEVEL 0
#define IRDA_DEBUG(n, args...) \
do { if (irda_debug >= (n)) \
printk(KERN_DEBUG args); \
} while (0)
#define IRDA_ASSERT(expr, func) \ #define IRDA_ASSERT(expr, func) \
do { if(!(expr)) { \ do { if(!(expr)) { \
printk( "Assertion failed! %s:%s:%d %s\n", \ printk( "Assertion failed! %s:%s:%d %s\n", \
...@@ -72,7 +62,6 @@ do { if(!(expr)) { \ ...@@ -72,7 +62,6 @@ do { if(!(expr)) { \
func } } while (0) func } } while (0)
#define IRDA_ASSERT_LABEL(label) label #define IRDA_ASSERT_LABEL(label) label
#else #else
#define IRDA_DEBUG(n, args...) do { } while (0)
#define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0) #define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0)
#define IRDA_ASSERT_LABEL(label) #define IRDA_ASSERT_LABEL(label)
#endif /* CONFIG_IRDA_DEBUG */ #endif /* CONFIG_IRDA_DEBUG */
......
...@@ -303,7 +303,7 @@ static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state) ...@@ -303,7 +303,7 @@ static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state)
if (!self || self->magic != LAP_MAGIC) if (!self || self->magic != LAP_MAGIC)
return; return;
IRDA_DEBUG(4, "next LAP state = %s\n", irlap_state[state]); pr_debug("next LAP state = %s\n", irlap_state[state]);
*/ */
self->state = state; self->state = state;
} }
......
此差异已折叠。
...@@ -112,8 +112,6 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log) ...@@ -112,8 +112,6 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)
{ {
discovery_t *discovery; discovery_t *discovery;
IRDA_DEBUG(4, "%s()\n", __func__);
/* /*
* If log is missing this means that IrLAP was unable to perform the * If log is missing this means that IrLAP was unable to perform the
* discovery, so restart discovery again with just the half timeout * discovery, so restart discovery again with just the half timeout
...@@ -159,8 +157,6 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force) ...@@ -159,8 +157,6 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force)
int i = 0; /* How many we expired */ int i = 0; /* How many we expired */
IRDA_ASSERT(log != NULL, return;); IRDA_ASSERT(log != NULL, return;);
IRDA_DEBUG(4, "%s()\n", __func__);
spin_lock_irqsave(&log->hb_spinlock, flags); spin_lock_irqsave(&log->hb_spinlock, flags);
discovery = (discovery_t *) hashbin_get_first(log); discovery = (discovery_t *) hashbin_get_first(log);
...@@ -232,10 +228,10 @@ void irlmp_dump_discoveries(hashbin_t *log) ...@@ -232,10 +228,10 @@ void irlmp_dump_discoveries(hashbin_t *log)
discovery = (discovery_t *) hashbin_get_first(log); discovery = (discovery_t *) hashbin_get_first(log);
while (discovery != NULL) { while (discovery != NULL) {
IRDA_DEBUG(0, "Discovery:\n"); pr_debug("Discovery:\n");
IRDA_DEBUG(0, " daddr=%08x\n", discovery->data.daddr); pr_debug(" daddr=%08x\n", discovery->data.daddr);
IRDA_DEBUG(0, " saddr=%08x\n", discovery->data.saddr); pr_debug(" saddr=%08x\n", discovery->data.saddr);
IRDA_DEBUG(0, " nickname=%s\n", discovery->data.info); pr_debug(" nickname=%s\n", discovery->data.info);
discovery = (discovery_t *) hashbin_get_next(log); discovery = (discovery_t *) hashbin_get_next(log);
} }
......
...@@ -91,8 +91,6 @@ static int __init ircomm_init(void) ...@@ -91,8 +91,6 @@ static int __init ircomm_init(void)
static void __exit ircomm_cleanup(void) static void __exit ircomm_cleanup(void)
{ {
IRDA_DEBUG(2, "%s()\n", __func__ );
hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
...@@ -111,8 +109,8 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line) ...@@ -111,8 +109,8 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
struct ircomm_cb *self = NULL; struct ircomm_cb *self = NULL;
int ret; int ret;
IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ , pr_debug("%s(), service_type=0x%02x\n", __func__ ,
service_type); service_type);
IRDA_ASSERT(ircomm != NULL, return NULL;); IRDA_ASSERT(ircomm != NULL, return NULL;);
...@@ -155,8 +153,6 @@ EXPORT_SYMBOL(ircomm_open); ...@@ -155,8 +153,6 @@ EXPORT_SYMBOL(ircomm_open);
*/ */
static int __ircomm_close(struct ircomm_cb *self) static int __ircomm_close(struct ircomm_cb *self)
{ {
IRDA_DEBUG(2, "%s()\n", __func__ );
/* Disconnect link if any */ /* Disconnect link if any */
ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
...@@ -191,8 +187,6 @@ int ircomm_close(struct ircomm_cb *self) ...@@ -191,8 +187,6 @@ int ircomm_close(struct ircomm_cb *self)
IRDA_ASSERT(self != NULL, return -EIO;); IRDA_ASSERT(self != NULL, return -EIO;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;);
IRDA_DEBUG(0, "%s()\n", __func__ );
entry = hashbin_remove(ircomm, self->line, NULL); entry = hashbin_remove(ircomm, self->line, NULL);
IRDA_ASSERT(entry == self, return -1;); IRDA_ASSERT(entry == self, return -1;);
...@@ -216,8 +210,6 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel, ...@@ -216,8 +210,6 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel,
struct ircomm_info info; struct ircomm_info info;
int ret; int ret;
IRDA_DEBUG(2 , "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -243,8 +235,6 @@ EXPORT_SYMBOL(ircomm_connect_request); ...@@ -243,8 +235,6 @@ EXPORT_SYMBOL(ircomm_connect_request);
void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info) struct ircomm_info *info)
{ {
IRDA_DEBUG(2, "%s()\n", __func__ );
/* /*
* If there are any data hiding in the control channel, we must * If there are any data hiding in the control channel, we must
* deliver it first. The side effect is that the control channel * deliver it first. The side effect is that the control channel
...@@ -255,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -255,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
info->qos, info->max_data_size, info->qos, info->max_data_size,
info->max_header_size, skb); info->max_header_size, skb);
else { else {
IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); pr_debug("%s(), missing handler\n", __func__);
} }
} }
...@@ -272,8 +262,6 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata) ...@@ -272,8 +262,6 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
IRDA_DEBUG(4, "%s()\n", __func__ );
ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL);
return ret; return ret;
...@@ -290,15 +278,13 @@ EXPORT_SYMBOL(ircomm_connect_response); ...@@ -290,15 +278,13 @@ EXPORT_SYMBOL(ircomm_connect_response);
void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info) struct ircomm_info *info)
{ {
IRDA_DEBUG(4, "%s()\n", __func__ );
if (self->notify.connect_confirm ) if (self->notify.connect_confirm )
self->notify.connect_confirm(self->notify.instance, self->notify.connect_confirm(self->notify.instance,
self, info->qos, self, info->qos,
info->max_data_size, info->max_data_size,
info->max_header_size, skb); info->max_header_size, skb);
else { else {
IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); pr_debug("%s(), missing handler\n", __func__);
} }
} }
...@@ -312,8 +298,6 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -312,8 +298,6 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb)
{ {
int ret; int ret;
IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -EFAULT;); IRDA_ASSERT(self != NULL, return -EFAULT;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
IRDA_ASSERT(skb != NULL, return -EFAULT;); IRDA_ASSERT(skb != NULL, return -EFAULT;);
...@@ -333,14 +317,12 @@ EXPORT_SYMBOL(ircomm_data_request); ...@@ -333,14 +317,12 @@ EXPORT_SYMBOL(ircomm_data_request);
*/ */
void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(skb->len > 0, return;); IRDA_ASSERT(skb->len > 0, return;);
if (self->notify.data_indication) if (self->notify.data_indication)
self->notify.data_indication(self->notify.instance, self, skb); self->notify.data_indication(self->notify.instance, self, skb);
else { else {
IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); pr_debug("%s(), missing handler\n", __func__);
} }
} }
...@@ -365,8 +347,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -365,8 +347,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
* fine * fine
*/ */
if (unlikely(skb->len < (clen + 1))) { if (unlikely(skb->len < (clen + 1))) {
IRDA_DEBUG(2, "%s() throwing away illegal frame\n", pr_debug("%s() throwing away illegal frame\n",
__func__ ); __func__);
return; return;
} }
...@@ -384,8 +366,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -384,8 +366,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
if (skb->len) if (skb->len)
ircomm_data_indication(self, skb); ircomm_data_indication(self, skb);
else { else {
IRDA_DEBUG(4, "%s(), data was control info only!\n", pr_debug("%s(), data was control info only!\n",
__func__ ); __func__);
} }
} }
...@@ -399,8 +381,6 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -399,8 +381,6 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb)
{ {
int ret; int ret;
IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -EFAULT;); IRDA_ASSERT(self != NULL, return -EFAULT;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
IRDA_ASSERT(skb != NULL, return -EFAULT;); IRDA_ASSERT(skb != NULL, return -EFAULT;);
...@@ -421,8 +401,6 @@ EXPORT_SYMBOL(ircomm_control_request); ...@@ -421,8 +401,6 @@ EXPORT_SYMBOL(ircomm_control_request);
static void ircomm_control_indication(struct ircomm_cb *self, static void ircomm_control_indication(struct ircomm_cb *self,
struct sk_buff *skb, int clen) struct sk_buff *skb, int clen)
{ {
IRDA_DEBUG(2, "%s()\n", __func__ );
/* Use udata for delivering data on the control channel */ /* Use udata for delivering data on the control channel */
if (self->notify.udata_indication) { if (self->notify.udata_indication) {
struct sk_buff *ctrl_skb; struct sk_buff *ctrl_skb;
...@@ -442,7 +420,7 @@ static void ircomm_control_indication(struct ircomm_cb *self, ...@@ -442,7 +420,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
* see ircomm_tty_control_indication(). */ * see ircomm_tty_control_indication(). */
dev_kfree_skb(ctrl_skb); dev_kfree_skb(ctrl_skb);
} else { } else {
IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); pr_debug("%s(), missing handler\n", __func__);
} }
} }
...@@ -457,8 +435,6 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata) ...@@ -457,8 +435,6 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata)
struct ircomm_info info; struct ircomm_info info;
int ret; int ret;
IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -478,15 +454,13 @@ EXPORT_SYMBOL(ircomm_disconnect_request); ...@@ -478,15 +454,13 @@ EXPORT_SYMBOL(ircomm_disconnect_request);
void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info) struct ircomm_info *info)
{ {
IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(info != NULL, return;); IRDA_ASSERT(info != NULL, return;);
if (self->notify.disconnect_indication) { if (self->notify.disconnect_indication) {
self->notify.disconnect_indication(self->notify.instance, self, self->notify.disconnect_indication(self->notify.instance, self,
info->reason, skb); info->reason, skb);
} else { } else {
IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); pr_debug("%s(), missing handler\n", __func__);
} }
} }
...@@ -498,8 +472,6 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -498,8 +472,6 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
*/ */
void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow)
{ {
IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
......
...@@ -106,8 +106,8 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -106,8 +106,8 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_connect_indication(self, skb, info); ircomm_connect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(4, "%s(), unknown event: %s\n", __func__ , pr_debug("%s(), unknown event: %s\n", __func__ ,
ircomm_event[event]); ircomm_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
return ret; return ret;
...@@ -136,8 +136,8 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -136,8 +136,8 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_disconnect_indication(self, skb, info); ircomm_disconnect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event: %s\n", __func__ , pr_debug("%s(), unknown event: %s\n", __func__ ,
ircomm_event[event]); ircomm_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
return ret; return ret;
...@@ -169,8 +169,8 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -169,8 +169,8 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_disconnect_indication(self, skb, info); ircomm_disconnect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ , pr_debug("%s(), unknown event = %s\n", __func__ ,
ircomm_event[event]); ircomm_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
return ret; return ret;
...@@ -211,8 +211,8 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -211,8 +211,8 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
ret = self->issue.disconnect_request(self, skb, info); ret = self->issue.disconnect_request(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ , pr_debug("%s(), unknown event = %s\n", __func__ ,
ircomm_event[event]); ircomm_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
return ret; return ret;
...@@ -227,8 +227,8 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -227,8 +227,8 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
struct sk_buff *skb, struct ircomm_info *info) struct sk_buff *skb, struct ircomm_info *info)
{ {
IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __func__ , pr_debug("%s: state=%s, event=%s\n", __func__ ,
ircomm_state[self->state], ircomm_event[event]); ircomm_state[self->state], ircomm_event[event]);
return (*state[self->state])(self, event, skb, info); return (*state[self->state])(self, event, skb, info);
} }
...@@ -243,6 +243,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state) ...@@ -243,6 +243,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state)
{ {
self->state = state; self->state = state;
IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __func__ , pr_debug("%s: next state=%s, service type=%d\n", __func__ ,
ircomm_state[self->state], self->service_type); ircomm_state[self->state], self->service_type);
} }
...@@ -52,8 +52,6 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self, ...@@ -52,8 +52,6 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(0, "%s()\n", __func__ );
/* Don't forget to refcount it - should be NULL anyway */ /* Don't forget to refcount it - should be NULL anyway */
if(userdata) if(userdata)
skb_get(userdata); skb_get(userdata);
...@@ -74,8 +72,6 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self, ...@@ -74,8 +72,6 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self,
{ {
struct sk_buff *tx_skb; struct sk_buff *tx_skb;
IRDA_DEBUG(0, "%s()\n", __func__ );
/* Any userdata supplied? */ /* Any userdata supplied? */
if (userdata == NULL) { if (userdata == NULL) {
tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
...@@ -107,8 +103,6 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self, ...@@ -107,8 +103,6 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self,
struct sk_buff *tx_skb; struct sk_buff *tx_skb;
int ret; int ret;
IRDA_DEBUG(0, "%s()\n", __func__ );
if (!userdata) { if (!userdata) {
tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
if (!tx_skb) if (!tx_skb)
...@@ -144,13 +138,11 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb) ...@@ -144,13 +138,11 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
cb = (struct irda_skb_cb *) skb->cb; cb = (struct irda_skb_cb *) skb->cb;
IRDA_DEBUG(2, "%s()\n", __func__ );
line = cb->line; line = cb->line;
self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL);
if (!self) { if (!self) {
IRDA_DEBUG(2, "%s(), didn't find myself\n", __func__ ); pr_debug("%s(), didn't find myself\n", __func__);
return; return;
} }
...@@ -160,7 +152,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb) ...@@ -160,7 +152,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
self->pkt_count--; self->pkt_count--;
if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) {
IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __func__ ); pr_debug("%s(), asking TTY to start again!\n", __func__);
self->flow_status = FLOW_START; self->flow_status = FLOW_START;
if (self->notify.flow_indication) if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance, self->notify.flow_indication(self->notify.instance,
...@@ -187,7 +179,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, ...@@ -187,7 +179,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
cb->line = self->line; cb->line = self->line;
IRDA_DEBUG(4, "%s(), sending frame\n", __func__ ); pr_debug("%s(), sending frame\n", __func__);
/* Don't forget to refcount it - see ircomm_tty_do_softint() */ /* Don't forget to refcount it - see ircomm_tty_do_softint() */
skb_get(skb); skb_get(skb);
...@@ -196,7 +188,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, ...@@ -196,7 +188,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
skb->destructor = ircomm_lmp_flow_control; skb->destructor = ircomm_lmp_flow_control;
if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) {
IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __func__ ); pr_debug("%s(), asking TTY to slow down!\n", __func__);
self->flow_status = FLOW_STOP; self->flow_status = FLOW_STOP;
if (self->notify.flow_indication) if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance, self->notify.flow_indication(self->notify.instance,
...@@ -222,8 +214,6 @@ static int ircomm_lmp_data_indication(void *instance, void *sap, ...@@ -222,8 +214,6 @@ static int ircomm_lmp_data_indication(void *instance, void *sap,
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
IRDA_ASSERT(skb != NULL, return -1;); IRDA_ASSERT(skb != NULL, return -1;);
...@@ -252,8 +242,6 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap, ...@@ -252,8 +242,6 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
IRDA_ASSERT(skb != NULL, return;); IRDA_ASSERT(skb != NULL, return;);
...@@ -285,8 +273,6 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap, ...@@ -285,8 +273,6 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *)instance; struct ircomm_cb *self = (struct ircomm_cb *)instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
IRDA_ASSERT(skb != NULL, return;); IRDA_ASSERT(skb != NULL, return;);
...@@ -315,8 +301,6 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap, ...@@ -315,8 +301,6 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -338,8 +322,6 @@ int ircomm_open_lsap(struct ircomm_cb *self) ...@@ -338,8 +322,6 @@ int ircomm_open_lsap(struct ircomm_cb *self)
{ {
notify_t notify; notify_t notify;
IRDA_DEBUG(0, "%s()\n", __func__ );
/* Register callbacks */ /* Register callbacks */
irda_notify_init(&notify); irda_notify_init(&notify);
notify.data_indication = ircomm_lmp_data_indication; notify.data_indication = ircomm_lmp_data_indication;
...@@ -351,7 +333,7 @@ int ircomm_open_lsap(struct ircomm_cb *self) ...@@ -351,7 +333,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0); self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0);
if (!self->lsap) { if (!self->lsap) {
IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __func__ ); pr_debug("%sfailed to allocate tsap\n", __func__);
return -1; return -1;
} }
self->slsap_sel = self->lsap->slsap_sel; self->slsap_sel = self->lsap->slsap_sel;
......
...@@ -101,8 +101,6 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) ...@@ -101,8 +101,6 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
struct sk_buff *skb; struct sk_buff *skb;
int count; int count;
IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
...@@ -139,7 +137,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) ...@@ -139,7 +137,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(2, "%s(), skb->len=%d\n", __func__ , skb->len); pr_debug("%s(), skb->len=%d\n", __func__ , skb->len);
if (flush) { if (flush) {
/* ircomm_tty_do_softint will take care of the rest */ /* ircomm_tty_do_softint will take care of the rest */
...@@ -173,12 +171,11 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, ...@@ -173,12 +171,11 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
/* Find all common service types */ /* Find all common service types */
service_type &= self->service_type; service_type &= self->service_type;
if (!service_type) { if (!service_type) {
IRDA_DEBUG(2, pr_debug("%s(), No common service type to use!\n", __func__);
"%s(), No common service type to use!\n", __func__ );
return -1; return -1;
} }
IRDA_DEBUG(0, "%s(), services in common=%02x\n", __func__ , pr_debug("%s(), services in common=%02x\n", __func__ ,
service_type); service_type);
/* /*
* Now choose a preferred service type of those available * Now choose a preferred service type of those available
...@@ -192,8 +189,8 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, ...@@ -192,8 +189,8 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
else if (service_type & IRCOMM_3_WIRE_RAW) else if (service_type & IRCOMM_3_WIRE_RAW)
self->settings.service_type = IRCOMM_3_WIRE_RAW; self->settings.service_type = IRCOMM_3_WIRE_RAW;
IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __func__ , pr_debug("%s(), resulting service type=0x%02x\n", __func__ ,
self->settings.service_type); self->settings.service_type);
/* /*
* Now the line is ready for some communication. Check if we are a * Now the line is ready for some communication. Check if we are a
...@@ -235,8 +232,8 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get) ...@@ -235,8 +232,8 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get)
else { else {
self->settings.port_type = (__u8) param->pv.i; self->settings.port_type = (__u8) param->pv.i;
IRDA_DEBUG(0, "%s(), port type=%d\n", __func__ , pr_debug("%s(), port type=%d\n", __func__ ,
self->settings.port_type); self->settings.port_type);
} }
return 0; return 0;
} }
...@@ -255,9 +252,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get) ...@@ -255,9 +252,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get)
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get) { if (get) {
IRDA_DEBUG(0, "%s(), not imp!\n", __func__ ); pr_debug("%s(), not imp!\n", __func__);
} else { } else {
IRDA_DEBUG(0, "%s(), port-name=%s\n", __func__ , param->pv.c); pr_debug("%s(), port-name=%s\n", __func__ , param->pv.c);
strncpy(self->settings.port_name, param->pv.c, 32); strncpy(self->settings.port_name, param->pv.c, 32);
} }
...@@ -282,7 +279,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get) ...@@ -282,7 +279,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get)
else else
self->settings.data_rate = param->pv.i; self->settings.data_rate = param->pv.i;
IRDA_DEBUG(2, "%s(), data rate = %d\n", __func__ , param->pv.i); pr_debug("%s(), data rate = %d\n", __func__ , param->pv.i);
return 0; return 0;
} }
...@@ -328,7 +325,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param, ...@@ -328,7 +325,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param,
else else
self->settings.flow_control = (__u8) param->pv.i; self->settings.flow_control = (__u8) param->pv.i;
IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __func__ , (__u8) param->pv.i); pr_debug("%s(), flow control = 0x%02x\n", __func__ , (__u8)param->pv.i);
return 0; return 0;
} }
...@@ -354,8 +351,8 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get) ...@@ -354,8 +351,8 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get)
self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; self->settings.xonxoff[1] = (__u16) param->pv.i >> 8;
} }
IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ , pr_debug("%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ ,
param->pv.i & 0xff, param->pv.i >> 8); param->pv.i & 0xff, param->pv.i >> 8);
return 0; return 0;
} }
...@@ -381,8 +378,8 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) ...@@ -381,8 +378,8 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
self->settings.enqack[1] = (__u16) param->pv.i >> 8; self->settings.enqack[1] = (__u16) param->pv.i >> 8;
} }
IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ , pr_debug("%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ ,
param->pv.i & 0xff, param->pv.i >> 8); param->pv.i & 0xff, param->pv.i >> 8);
return 0; return 0;
} }
...@@ -396,7 +393,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) ...@@ -396,7 +393,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
static int ircomm_param_line_status(void *instance, irda_param_t *param, static int ircomm_param_line_status(void *instance, irda_param_t *param,
int get) int get)
{ {
IRDA_DEBUG(2, "%s(), not impl.\n", __func__ ); pr_debug("%s(), not impl.\n", __func__);
return 0; return 0;
} }
...@@ -457,7 +454,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) ...@@ -457,7 +454,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
__u8 dce; __u8 dce;
IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __func__ , (__u8) param->pv.i); pr_debug("%s(), dce = 0x%02x\n", __func__ , (__u8)param->pv.i);
dce = (__u8) param->pv.i; dce = (__u8) param->pv.i;
...@@ -469,7 +466,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) ...@@ -469,7 +466,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
/* Check if any of the settings have changed */ /* Check if any of the settings have changed */
if (dce & 0x0f) { if (dce & 0x0f) {
if (dce & IRCOMM_DELTA_CTS) { if (dce & IRCOMM_DELTA_CTS) {
IRDA_DEBUG(2, "%s(), CTS\n", __func__ ); pr_debug("%s(), CTS\n", __func__);
} }
} }
......
...@@ -76,8 +76,6 @@ int ircomm_open_tsap(struct ircomm_cb *self) ...@@ -76,8 +76,6 @@ int ircomm_open_tsap(struct ircomm_cb *self)
{ {
notify_t notify; notify_t notify;
IRDA_DEBUG(4, "%s()\n", __func__ );
/* Register callbacks */ /* Register callbacks */
irda_notify_init(&notify); irda_notify_init(&notify);
notify.data_indication = ircomm_ttp_data_indication; notify.data_indication = ircomm_ttp_data_indication;
...@@ -91,7 +89,7 @@ int ircomm_open_tsap(struct ircomm_cb *self) ...@@ -91,7 +89,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT,
&notify); &notify);
if (!self->tsap) { if (!self->tsap) {
IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __func__ ); pr_debug("%sfailed to allocate tsap\n", __func__);
return -1; return -1;
} }
self->slsap_sel = self->tsap->stsap_sel; self->slsap_sel = self->tsap->stsap_sel;
...@@ -119,8 +117,6 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self, ...@@ -119,8 +117,6 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, "%s()\n", __func__ );
/* Don't forget to refcount it - should be NULL anyway */ /* Don't forget to refcount it - should be NULL anyway */
if(userdata) if(userdata)
skb_get(userdata); skb_get(userdata);
...@@ -143,8 +139,6 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self, ...@@ -143,8 +139,6 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self,
{ {
int ret; int ret;
IRDA_DEBUG(4, "%s()\n", __func__ );
/* Don't forget to refcount it - should be NULL anyway */ /* Don't forget to refcount it - should be NULL anyway */
if(userdata) if(userdata)
skb_get(userdata); skb_get(userdata);
...@@ -171,7 +165,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self, ...@@ -171,7 +165,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self,
IRDA_ASSERT(skb != NULL, return -1;); IRDA_ASSERT(skb != NULL, return -1;);
IRDA_DEBUG(2, "%s(), clen=%d\n", __func__ , clen); pr_debug("%s(), clen=%d\n", __func__ , clen);
/* /*
* Insert clen field, currently we either send data only, or control * Insert clen field, currently we either send data only, or control
...@@ -206,8 +200,6 @@ static int ircomm_ttp_data_indication(void *instance, void *sap, ...@@ -206,8 +200,6 @@ static int ircomm_ttp_data_indication(void *instance, void *sap,
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
IRDA_ASSERT(skb != NULL, return -1;); IRDA_ASSERT(skb != NULL, return -1;);
...@@ -229,8 +221,6 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap, ...@@ -229,8 +221,6 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
IRDA_ASSERT(skb != NULL, return;); IRDA_ASSERT(skb != NULL, return;);
...@@ -270,8 +260,6 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap, ...@@ -270,8 +260,6 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *)instance; struct ircomm_cb *self = (struct ircomm_cb *)instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
IRDA_ASSERT(skb != NULL, return;); IRDA_ASSERT(skb != NULL, return;);
...@@ -329,8 +317,6 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap, ...@@ -329,8 +317,6 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -354,8 +340,6 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap, ...@@ -354,8 +340,6 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap,
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
......
此差异已折叠。
此差异已折叠。
...@@ -56,8 +56,6 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self, ...@@ -56,8 +56,6 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self,
unsigned int cflag, cval; unsigned int cflag, cval;
int baud; int baud;
IRDA_DEBUG(2, "%s()\n", __func__ );
if (!self->ircomm) if (!self->ircomm)
return; return;
...@@ -150,8 +148,6 @@ void ircomm_tty_set_termios(struct tty_struct *tty, ...@@ -150,8 +148,6 @@ void ircomm_tty_set_termios(struct tty_struct *tty,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned int cflag = tty->termios.c_cflag; unsigned int cflag = tty->termios.c_cflag;
IRDA_DEBUG(2, "%s()\n", __func__ );
if ((cflag == old_termios->c_cflag) && if ((cflag == old_termios->c_cflag) &&
(RELEVANT_IFLAG(tty->termios.c_iflag) == (RELEVANT_IFLAG(tty->termios.c_iflag) ==
RELEVANT_IFLAG(old_termios->c_iflag))) RELEVANT_IFLAG(old_termios->c_iflag)))
...@@ -199,8 +195,6 @@ int ircomm_tty_tiocmget(struct tty_struct *tty) ...@@ -199,8 +195,6 @@ int ircomm_tty_tiocmget(struct tty_struct *tty)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned int result; unsigned int result;
IRDA_DEBUG(2, "%s()\n", __func__ );
if (tty->flags & (1 << TTY_IO_ERROR)) if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO; return -EIO;
...@@ -224,8 +218,6 @@ int ircomm_tty_tiocmset(struct tty_struct *tty, ...@@ -224,8 +218,6 @@ int ircomm_tty_tiocmset(struct tty_struct *tty,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
IRDA_DEBUG(2, "%s()\n", __func__ );
if (tty->flags & (1 << TTY_IO_ERROR)) if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO; return -EIO;
...@@ -266,8 +258,6 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, ...@@ -266,8 +258,6 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
if (!retinfo) if (!retinfo)
return -EFAULT; return -EFAULT;
IRDA_DEBUG(2, "%s()\n", __func__ );
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
info.line = self->line; info.line = self->line;
info.flags = self->port.flags; info.flags = self->port.flags;
...@@ -302,8 +292,6 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, ...@@ -302,8 +292,6 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self,
struct serial_struct new_serial; struct serial_struct new_serial;
struct ircomm_tty_cb old_state, *state; struct ircomm_tty_cb old_state, *state;
IRDA_DEBUG(0, "%s()\n", __func__ );
if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
return -EFAULT; return -EFAULT;
...@@ -376,8 +364,6 @@ int ircomm_tty_ioctl(struct tty_struct *tty, ...@@ -376,8 +364,6 @@ int ircomm_tty_ioctl(struct tty_struct *tty,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __func__ );
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
(cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) { (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
...@@ -393,11 +379,11 @@ int ircomm_tty_ioctl(struct tty_struct *tty, ...@@ -393,11 +379,11 @@ int ircomm_tty_ioctl(struct tty_struct *tty,
ret = ircomm_tty_set_serial_info(self, (struct serial_struct __user *) arg); ret = ircomm_tty_set_serial_info(self, (struct serial_struct __user *) arg);
break; break;
case TIOCMIWAIT: case TIOCMIWAIT:
IRDA_DEBUG(0, "(), TIOCMIWAIT, not impl!\n"); pr_debug("(), TIOCMIWAIT, not impl!\n");
break; break;
case TIOCGICOUNT: case TIOCGICOUNT:
IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __func__ ); pr_debug("%s(), TIOCGICOUNT not impl!\n", __func__);
#if 0 #if 0
save_flags(flags); cli(); save_flags(flags); cli();
cnow = driver->icount; cnow = driver->icount;
......
...@@ -90,8 +90,6 @@ static void leftover_dongle(void *arg) ...@@ -90,8 +90,6 @@ static void leftover_dongle(void *arg)
void irda_device_cleanup(void) void irda_device_cleanup(void)
{ {
IRDA_DEBUG(4, "%s()\n", __func__);
hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete); hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete);
hashbin_delete(dongles, leftover_dongle); hashbin_delete(dongles, leftover_dongle);
...@@ -107,7 +105,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status) ...@@ -107,7 +105,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
{ {
struct irlap_cb *self; struct irlap_cb *self;
IRDA_DEBUG(4, "%s(%s)\n", __func__, status ? "TRUE" : "FALSE"); pr_debug("%s(%s)\n", __func__, status ? "TRUE" : "FALSE");
self = (struct irlap_cb *) dev->atalk_ptr; self = (struct irlap_cb *) dev->atalk_ptr;
...@@ -127,7 +125,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status) ...@@ -127,7 +125,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
irlap_start_mbusy_timer(self, SMALLBUSY_TIMEOUT); irlap_start_mbusy_timer(self, SMALLBUSY_TIMEOUT);
else else
irlap_start_mbusy_timer(self, MEDIABUSY_TIMEOUT); irlap_start_mbusy_timer(self, MEDIABUSY_TIMEOUT);
IRDA_DEBUG( 4, "Media busy!\n"); pr_debug("Media busy!\n");
} else { } else {
self->media_busy = FALSE; self->media_busy = FALSE;
irlap_stop_mbusy_timer(self); irlap_stop_mbusy_timer(self);
...@@ -147,8 +145,6 @@ int irda_device_is_receiving(struct net_device *dev) ...@@ -147,8 +145,6 @@ int irda_device_is_receiving(struct net_device *dev)
struct if_irda_req req; struct if_irda_req req;
int ret; int ret;
IRDA_DEBUG(2, "%s()\n", __func__);
if (!dev->netdev_ops->ndo_do_ioctl) { if (!dev->netdev_ops->ndo_do_ioctl) {
net_err_ratelimited("%s: do_ioctl not impl. by device driver\n", net_err_ratelimited("%s: do_ioctl not impl. by device driver\n",
__func__); __func__);
...@@ -192,8 +188,6 @@ static int irda_task_kick(struct irda_task *task) ...@@ -192,8 +188,6 @@ static int irda_task_kick(struct irda_task *task)
int count = 0; int count = 0;
int timeout; int timeout;
IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(task != NULL, return -1;); IRDA_ASSERT(task != NULL, return -1;);
IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
...@@ -241,8 +235,8 @@ static int irda_task_kick(struct irda_task *task) ...@@ -241,8 +235,8 @@ static int irda_task_kick(struct irda_task *task)
irda_task_timer_expired); irda_task_timer_expired);
finished = FALSE; finished = FALSE;
} else { } else {
IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n", pr_debug("%s(), not finished, and no timeout!\n",
__func__); __func__);
finished = FALSE; finished = FALSE;
} }
...@@ -259,8 +253,6 @@ static void irda_task_timer_expired(void *data) ...@@ -259,8 +253,6 @@ static void irda_task_timer_expired(void *data)
{ {
struct irda_task *task; struct irda_task *task;
IRDA_DEBUG(2, "%s()\n", __func__);
task = data; task = data;
irda_task_kick(task); irda_task_kick(task);
......
此差异已折叠。
此差异已折叠。
...@@ -48,8 +48,6 @@ struct ias_object *irias_new_object( char *name, int id) ...@@ -48,8 +48,6 @@ struct ias_object *irias_new_object( char *name, int id)
{ {
struct ias_object *obj; struct ias_object *obj;
IRDA_DEBUG( 4, "%s()\n", __func__);
obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC);
if (obj == NULL) { if (obj == NULL) {
net_warn_ratelimited("%s(), Unable to allocate object!\n", net_warn_ratelimited("%s(), Unable to allocate object!\n",
...@@ -134,8 +132,8 @@ int irias_delete_object(struct ias_object *obj) ...@@ -134,8 +132,8 @@ int irias_delete_object(struct ias_object *obj)
/* Remove from list */ /* Remove from list */
node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj);
if (!node) if (!node)
IRDA_DEBUG( 0, "%s(), object already removed!\n", pr_debug("%s(), object already removed!\n",
__func__); __func__);
/* Destroy */ /* Destroy */
__irias_delete_object(obj); __irias_delete_object(obj);
...@@ -287,8 +285,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name, ...@@ -287,8 +285,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
} }
if ( attrib->value->type != new_value->type) { if ( attrib->value->type != new_value->type) {
IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n", pr_debug("%s(), changing value type not allowed!\n",
__func__); __func__);
spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
return -1; return -1;
} }
...@@ -533,8 +531,6 @@ struct ias_value *irias_new_missing_value(void) ...@@ -533,8 +531,6 @@ struct ias_value *irias_new_missing_value(void)
*/ */
void irias_delete_value(struct ias_value *value) void irias_delete_value(struct ias_value *value)
{ {
IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(value != NULL, return;); IRDA_ASSERT(value != NULL, return;);
switch (value->type) { switch (value->type) {
...@@ -551,7 +547,7 @@ void irias_delete_value(struct ias_value *value) ...@@ -551,7 +547,7 @@ void irias_delete_value(struct ias_value *value)
kfree(value->t.oct_seq); kfree(value->t.oct_seq);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown value type!\n", __func__); pr_debug("%s(), Unknown value type!\n", __func__);
break; break;
} }
kfree(value); kfree(value);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -110,8 +110,6 @@ static int irlan_eth_open(struct net_device *dev) ...@@ -110,8 +110,6 @@ static int irlan_eth_open(struct net_device *dev)
{ {
struct irlan_cb *self = netdev_priv(dev); struct irlan_cb *self = netdev_priv(dev);
IRDA_DEBUG(2, "%s()\n", __func__);
/* Ready to play! */ /* Ready to play! */
netif_stop_queue(dev); /* Wait until data link is ready */ netif_stop_queue(dev); /* Wait until data link is ready */
...@@ -137,8 +135,6 @@ static int irlan_eth_close(struct net_device *dev) ...@@ -137,8 +135,6 @@ static int irlan_eth_close(struct net_device *dev)
{ {
struct irlan_cb *self = netdev_priv(dev); struct irlan_cb *self = netdev_priv(dev);
IRDA_DEBUG(2, "%s()\n", __func__);
/* Stop device */ /* Stop device */
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -231,8 +227,8 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb) ...@@ -231,8 +227,8 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb)
return 0; return 0;
} }
if (skb->len < ETH_HLEN) { if (skb->len < ETH_HLEN) {
IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n", pr_debug("%s() : IrLAN frame too short (%d)\n",
__func__, skb->len); __func__, skb->len);
dev->stats.rx_dropped++; dev->stats.rx_dropped++;
dev_kfree_skb(skb); dev_kfree_skb(skb);
return 0; return 0;
...@@ -281,9 +277,9 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) ...@@ -281,9 +277,9 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
IRDA_ASSERT(dev != NULL, return;); IRDA_ASSERT(dev != NULL, return;);
IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __func__, pr_debug("%s() : flow %s ; running %d\n", __func__,
flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START", flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START",
netif_running(dev)); netif_running(dev));
switch (flow) { switch (flow) {
case FLOW_STOP: case FLOW_STOP:
...@@ -310,11 +306,9 @@ static void irlan_eth_set_multicast_list(struct net_device *dev) ...@@ -310,11 +306,9 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
{ {
struct irlan_cb *self = netdev_priv(dev); struct irlan_cb *self = netdev_priv(dev);
IRDA_DEBUG(2, "%s()\n", __func__);
/* Check if data channel has been connected yet */ /* Check if data channel has been connected yet */
if (self->client.state != IRLAN_DATA) { if (self->client.state != IRLAN_DATA) {
IRDA_DEBUG(1, "%s(), delaying!\n", __func__); pr_debug("%s(), delaying!\n", __func__);
return; return;
} }
...@@ -324,18 +318,18 @@ static void irlan_eth_set_multicast_list(struct net_device *dev) ...@@ -324,18 +318,18 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
} else if ((dev->flags & IFF_ALLMULTI) || } else if ((dev->flags & IFF_ALLMULTI) ||
netdev_mc_count(dev) > HW_MAX_ADDRS) { netdev_mc_count(dev) > HW_MAX_ADDRS) {
/* Disable promiscuous mode, use normal mode. */ /* Disable promiscuous mode, use normal mode. */
IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__); pr_debug("%s(), Setting multicast filter\n", __func__);
/* hardware_set_filter(NULL); */ /* hardware_set_filter(NULL); */
irlan_set_multicast_filter(self, TRUE); irlan_set_multicast_filter(self, TRUE);
} else if (!netdev_mc_empty(dev)) { } else if (!netdev_mc_empty(dev)) {
IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__); pr_debug("%s(), Setting multicast filter\n", __func__);
/* Walk the address list, and load the filter */ /* Walk the address list, and load the filter */
/* hardware_set_filter(dev->mc_list); */ /* hardware_set_filter(dev->mc_list); */
irlan_set_multicast_filter(self, TRUE); irlan_set_multicast_filter(self, TRUE);
} else { } else {
IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __func__); pr_debug("%s(), Clearing multicast filter\n", __func__);
irlan_set_multicast_filter(self, FALSE); irlan_set_multicast_filter(self, FALSE);
} }
......
...@@ -40,7 +40,7 @@ const char * const irlan_state[] = { ...@@ -40,7 +40,7 @@ const char * const irlan_state[] = {
void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
{ {
IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]); pr_debug("%s(), %s\n", __func__ , irlan_state[state]);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) ...@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state) void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state)
{ {
IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]); pr_debug("%s(), %s\n", __func__ , irlan_state[state]);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册