X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fisdn%2Ftpam%2Ftpam_queues.c;h=35add91b83a2fcbfe0ca3644057b08fa23591f31;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9b55684dde0c6dc9b8e744f8bf9ca82d3375e4ea;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/isdn/tpam/tpam_queues.c b/drivers/isdn/tpam/tpam_queues.c index 9b55684dd..35add91b8 100644 --- a/drivers/isdn/tpam/tpam_queues.c +++ b/drivers/isdn/tpam/tpam_queues.c @@ -30,7 +30,7 @@ static int tpam_sendpacket(tpam_card *card, tpam_channel *channel); */ void tpam_enqueue(tpam_card *card, struct sk_buff *skb) { - dprintk("TurboPAM(tpam_enqueue): card=%d\n", card->id); + pr_debug("TurboPAM(tpam_enqueue): card=%d\n", card->id); /* queue the sk_buff on the board's send queue */ skb_queue_tail(&card->sendq, skb); @@ -49,7 +49,7 @@ void tpam_enqueue(tpam_card *card, struct sk_buff *skb) { */ void tpam_enqueue_data(tpam_channel *channel, struct sk_buff *skb) { - dprintk("TurboPAM(tpam_enqueue_data): card=%d, channel=%d\n", + pr_debug("TurboPAM(tpam_enqueue_data): card=%d, channel=%d\n", channel->card->id, channel->num); /* if existant, queue the sk_buff on the channel's send queue */ @@ -84,30 +84,30 @@ irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs) pci_mpb mpb; skb_header *skbh; - dprintk("TurboPAM(tpam_irq): IRQ received, card=%d\n", card->id); + pr_debug("TurboPAM(tpam_irq): IRQ received, card=%d\n", card->id); /* grab the board lock */ spin_lock(&card->lock); /* get the message type */ - ackupload = copy_from_pam_dword(card, (void *)TPAM_ACKUPLOAD_REGISTER); + ackupload = copy_from_pam_dword(card, TPAM_ACKUPLOAD_REGISTER); /* acknowledge the interrupt */ - copy_to_pam_dword(card, (void *)TPAM_INTERRUPTACK_REGISTER, 0); + copy_to_pam_dword(card, TPAM_INTERRUPTACK_REGISTER, 0); readl(card->bar0 + TPAM_HINTACK_REGISTER); if (!ackupload) { /* it is a new message from the board */ - dprintk("TurboPAM(tpam_irq): message received, card=%d\n", + pr_debug("TurboPAM(tpam_irq): message received, card=%d\n", card->id); /* get the upload pointer */ uploadptr = copy_from_pam_dword(card, - (void *)TPAM_UPLOADPTR_REGISTER); + TPAM_UPLOADPTR_REGISTER); /* get the beginning of the message (pci_mpb part) */ - copy_from_pam(card, &mpb, (void *)uploadptr, sizeof(pci_mpb)); + copy_from_pam(card, &mpb, uploadptr, sizeof(pci_mpb)); /* allocate the sk_buff */ if (!(skb = alloc_skb(sizeof(skb_header) + sizeof(pci_mpb) + @@ -131,13 +131,13 @@ irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs) /* copy the TLV block into the sk_buff */ copy_from_pam(card, skb_put(skb, mpb.actualBlockTLVSize), - (void *)uploadptr + sizeof(pci_mpb), + uploadptr + sizeof(pci_mpb), mpb.actualBlockTLVSize); /* if existent, copy the data block into the sk_buff */ if (mpb.actualDataSize) copy_from_pam(card, skb_put(skb, mpb.actualDataSize), - (void *)uploadptr + sizeof(pci_mpb) + 4096, + uploadptr + sizeof(pci_mpb) + 4096, mpb.actualDataSize); /* wait for the board to become ready */ @@ -154,7 +154,7 @@ irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs) } while (hpic & 0x00000002); /* acknowledge the message */ - copy_to_pam_dword(card, (void *)TPAM_ACKDOWNLOAD_REGISTER, + copy_to_pam_dword(card, TPAM_ACKDOWNLOAD_REGISTER, 0xffffffff); readl(card->bar0 + TPAM_DSPINT_REGISTER); @@ -176,7 +176,7 @@ irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs) else { /* it is a ack from the board */ - dprintk("TurboPAM(tpam_irq): message acknowledged, card=%d\n", + pr_debug("TurboPAM(tpam_irq): message acknowledged, card=%d\n", card->id); /* board is not busy anymore */ @@ -231,7 +231,7 @@ void tpam_recv_tq(tpam_card *card) { tpam_recv_U3DataInd(card, skb); break; default: - dprintk("TurboPAM(tpam_recv_tq): " + pr_debug("TurboPAM(tpam_recv_tq): " "unknown messageID %d, card=%d\n", p->messageID, card->id); break; @@ -286,13 +286,13 @@ static int tpam_sendpacket(tpam_card *card, tpam_channel *channel) { skb_header *skbh; u32 waiting_too_long; - dprintk("TurboPAM(tpam_sendpacket), card=%d, channel=%d\n", + pr_debug("TurboPAM(tpam_sendpacket), card=%d, channel=%d\n", card->id, channel ? channel->num : -1); if (channel) { /* dequeue a packet from the channel's send queue */ if (!(skb = skb_dequeue(&channel->sendq))) { - dprintk("TurboPAM(tpam_sendpacket): " + pr_debug("TurboPAM(tpam_sendpacket): " "card=%d, channel=%d, no packet\n", card->id, channel->num); return 0; @@ -301,7 +301,7 @@ static int tpam_sendpacket(tpam_card *card, tpam_channel *channel) { /* if the channel is not ready to receive, requeue the packet * and return 0 to give a chance to another channel */ if (!channel->readytoreceive) { - dprintk("TurboPAM(tpam_sendpacket): " + pr_debug("TurboPAM(tpam_sendpacket): " "card=%d, channel=%d, channel not ready\n", card->id, channel->num); skb_queue_head(&channel->sendq, skb); @@ -314,7 +314,7 @@ static int tpam_sendpacket(tpam_card *card, tpam_channel *channel) { /* if the board is busy, requeue the packet and return 1 since * there is no need to try another channel */ if (card->busy) { - dprintk("TurboPAM(tpam_sendpacket): " + pr_debug("TurboPAM(tpam_sendpacket): " "card=%d, channel=%d, card busy\n", card->id, channel->num); skb_queue_head(&channel->sendq, skb); @@ -325,7 +325,7 @@ static int tpam_sendpacket(tpam_card *card, tpam_channel *channel) { else { /* dequeue a packet from the board's send queue */ if (!(skb = skb_dequeue(&card->sendq))) { - dprintk("TurboPAM(tpam_sendpacket): " + pr_debug("TurboPAM(tpam_sendpacket): " "card=%d, no packet\n", card->id); return 0; } @@ -336,7 +336,7 @@ static int tpam_sendpacket(tpam_card *card, tpam_channel *channel) { /* if the board is busy, requeue the packet and return 1 since * there is no need to try another channel */ if (card->busy) { - dprintk("TurboPAM(tpam_sendpacket): " + pr_debug("TurboPAM(tpam_sendpacket): " "card=%d, card busy\n", card->id); skb_queue_head(&card->sendq, skb); spin_unlock_irq(&card->lock); @@ -357,20 +357,19 @@ static int tpam_sendpacket(tpam_card *card, tpam_channel *channel) { } while (hpic & 0x00000002); skbh = (skb_header *)skb->data; - dprintk("TurboPAM(tpam_sendpacket): " + pr_debug("TurboPAM(tpam_sendpacket): " "card=%d, card ready, sending %d/%d bytes\n", card->id, skbh->size, skbh->data_size); /* get the board's download pointer */ - downloadptr = copy_from_pam_dword(card, - (void *)TPAM_DOWNLOADPTR_REGISTER); + downloadptr = copy_from_pam_dword(card, TPAM_DOWNLOADPTR_REGISTER); /* copy the packet to the board at the downloadptr location */ - copy_to_pam(card, (void *)downloadptr, skb->data + sizeof(skb_header), + copy_to_pam(card, downloadptr, skb->data + sizeof(skb_header), skbh->size); if (skbh->data_size) /* if there is some data in the packet, copy it too */ - copy_to_pam(card, (void *)downloadptr + sizeof(pci_mpb) + 4096, + copy_to_pam(card, downloadptr + sizeof(pci_mpb) + 4096, skb->data + sizeof(skb_header) + skbh->size, skbh->data_size); @@ -378,7 +377,7 @@ static int tpam_sendpacket(tpam_card *card, tpam_channel *channel) { card->busy = 1; /* interrupt the board */ - copy_to_pam_dword(card, (void *)TPAM_ACKDOWNLOAD_REGISTER, 0); + copy_to_pam_dword(card, TPAM_ACKDOWNLOAD_REGISTER, 0); readl(card->bar0 + TPAM_DSPINT_REGISTER); /* release the lock */