| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * w6692.c mISDN driver for Winbond w6692 based cards |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * based on the w6692 I4L driver from Petr Novak <petr.novak@i.cz> |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Copyright 2009 by Karsten Keil <keil@isdn4linux.de> |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 11 | | - * published by the Free Software Foundation. |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 16 | | - * GNU General Public License for more details. |
|---|
| 17 | | - * |
|---|
| 18 | | - * You should have received a copy of the GNU General Public License |
|---|
| 19 | | - * along with this program; if not, write to the Free Software |
|---|
| 20 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 21 | | - * |
|---|
| 22 | 9 | */ |
|---|
| 23 | 10 | |
|---|
| 24 | 11 | #include <linux/interrupt.h> |
|---|
| .. | .. |
|---|
| 369 | 356 | card->dch.err_rx++; |
|---|
| 370 | 357 | #endif |
|---|
| 371 | 358 | } |
|---|
| 372 | | - if (card->dch.rx_skb) |
|---|
| 373 | | - dev_kfree_skb(card->dch.rx_skb); |
|---|
| 359 | + dev_kfree_skb(card->dch.rx_skb); |
|---|
| 374 | 360 | card->dch.rx_skb = NULL; |
|---|
| 375 | 361 | WriteW6692(card, W_D_CMDR, W_D_CMDR_RACK | W_D_CMDR_RRST); |
|---|
| 376 | 362 | } else { |
|---|
| .. | .. |
|---|
| 389 | 375 | if (card->dch.tx_skb && card->dch.tx_idx < card->dch.tx_skb->len) { |
|---|
| 390 | 376 | W6692_fill_Dfifo(card); |
|---|
| 391 | 377 | } else { |
|---|
| 392 | | - if (card->dch.tx_skb) |
|---|
| 393 | | - dev_kfree_skb(card->dch.tx_skb); |
|---|
| 378 | + dev_kfree_skb(card->dch.tx_skb); |
|---|
| 394 | 379 | if (get_next_dframe(&card->dch)) |
|---|
| 395 | 380 | W6692_fill_Dfifo(card); |
|---|
| 396 | 381 | } |
|---|
| .. | .. |
|---|
| 481 | 466 | WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT); |
|---|
| 482 | 467 | if (wch->bch.rx_skb) |
|---|
| 483 | 468 | skb_trim(wch->bch.rx_skb, 0); |
|---|
| 484 | | - pr_warning("%s.B%d: No bufferspace for %d bytes\n", |
|---|
| 485 | | - card->name, wch->bch.nr, count); |
|---|
| 469 | + pr_warn("%s.B%d: No bufferspace for %d bytes\n", |
|---|
| 470 | + card->name, wch->bch.nr, count); |
|---|
| 486 | 471 | return; |
|---|
| 487 | 472 | } |
|---|
| 488 | 473 | ptr = skb_put(wch->bch.rx_skb, count); |
|---|
| .. | .. |
|---|
| 649 | 634 | if (wch->bch.tx_skb && wch->bch.tx_idx < wch->bch.tx_skb->len) { |
|---|
| 650 | 635 | W6692_fill_Bfifo(wch); |
|---|
| 651 | 636 | } else { |
|---|
| 652 | | - if (wch->bch.tx_skb) |
|---|
| 653 | | - dev_kfree_skb(wch->bch.tx_skb); |
|---|
| 637 | + dev_kfree_skb(wch->bch.tx_skb); |
|---|
| 654 | 638 | if (get_next_bframe(&wch->bch)) { |
|---|
| 655 | 639 | W6692_fill_Bfifo(wch); |
|---|
| 656 | 640 | test_and_clear_bit(FLG_TX_EMPTY, &wch->bch.Flags); |
|---|
| .. | .. |
|---|
| 745 | 729 | wch->bch.nr, star); |
|---|
| 746 | 730 | } |
|---|
| 747 | 731 | if (star & W_B_STAR_XDOW) { |
|---|
| 748 | | - pr_warning("%s: B%d XDOW proto=%x\n", card->name, |
|---|
| 749 | | - wch->bch.nr, wch->bch.state); |
|---|
| 732 | + pr_warn("%s: B%d XDOW proto=%x\n", card->name, |
|---|
| 733 | + wch->bch.nr, wch->bch.state); |
|---|
| 750 | 734 | #ifdef ERROR_STATISTIC |
|---|
| 751 | 735 | wch->bch.err_xdu++; |
|---|
| 752 | 736 | #endif |
|---|
| .. | .. |
|---|
| 763 | 747 | return; /* handle XDOW only once */ |
|---|
| 764 | 748 | } |
|---|
| 765 | 749 | if (stat & W_B_EXI_XDUN) { |
|---|
| 766 | | - pr_warning("%s: B%d XDUN proto=%x\n", card->name, |
|---|
| 767 | | - wch->bch.nr, wch->bch.state); |
|---|
| 750 | + pr_warn("%s: B%d XDUN proto=%x\n", card->name, |
|---|
| 751 | + wch->bch.nr, wch->bch.state); |
|---|
| 768 | 752 | #ifdef ERROR_STATISTIC |
|---|
| 769 | 753 | wch->bch.err_xdu++; |
|---|
| 770 | 754 | #endif |
|---|