.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * mISDNisar.c ISAR (Siemens PSB 7110) specific functions |
---|
3 | 4 | * |
---|
4 | 5 | * Author Karsten Keil (keil@isdn4linux.de) |
---|
5 | 6 | * |
---|
6 | 7 | * Copyright 2009 by Karsten Keil <keil@isdn4linux.de> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, |
---|
13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | | - * GNU General Public License for more details. |
---|
16 | | - * |
---|
17 | | - * You should have received a copy of the GNU General Public License |
---|
18 | | - * along with this program; if not, write to the Free Software |
---|
19 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
20 | | - * |
---|
21 | 8 | */ |
---|
22 | 9 | |
---|
23 | 10 | /* define this to enable static debug messages, if you kernel supports |
---|
.. | .. |
---|
40 | 27 | |
---|
41 | 28 | #define DEBUG_HW_FIRMWARE_FIFO 0x10000 |
---|
42 | 29 | |
---|
43 | | -static const u8 faxmodulation_s[] = "3,24,48,72,73,74,96,97,98,121,122,145,146"; |
---|
44 | 30 | static const u8 faxmodulation[] = {3, 24, 48, 72, 73, 74, 96, 97, 98, 121, |
---|
45 | 31 | 122, 145, 146}; |
---|
46 | 32 | #define FAXMODCNT 13 |
---|
.. | .. |
---|
235 | 221 | goto reterror; |
---|
236 | 222 | } |
---|
237 | 223 | if (!poll_mbox(isar, 1000)) { |
---|
238 | | - pr_warning("ISAR poll_mbox dkey failed\n"); |
---|
| 224 | + pr_warn("ISAR poll_mbox dkey failed\n"); |
---|
239 | 225 | ret = -ETIME; |
---|
240 | 226 | goto reterror; |
---|
241 | 227 | } |
---|
.. | .. |
---|
445 | 431 | case ISDN_P_B_MODEM_ASYNC: |
---|
446 | 432 | maxlen = bchannel_get_rxbuf(&ch->bch, ch->is->clsb); |
---|
447 | 433 | if (maxlen < 0) { |
---|
448 | | - pr_warning("%s.B%d: No bufferspace for %d bytes\n", |
---|
449 | | - ch->is->name, ch->bch.nr, ch->is->clsb); |
---|
| 434 | + pr_warn("%s.B%d: No bufferspace for %d bytes\n", |
---|
| 435 | + ch->is->name, ch->bch.nr, ch->is->clsb); |
---|
450 | 436 | ch->is->write_reg(ch->is->hw, ISAR_IIA, 0); |
---|
451 | 437 | break; |
---|
452 | 438 | } |
---|
.. | .. |
---|
456 | 442 | case ISDN_P_B_HDLC: |
---|
457 | 443 | maxlen = bchannel_get_rxbuf(&ch->bch, ch->is->clsb); |
---|
458 | 444 | if (maxlen < 0) { |
---|
459 | | - pr_warning("%s.B%d: No bufferspace for %d bytes\n", |
---|
460 | | - ch->is->name, ch->bch.nr, ch->is->clsb); |
---|
| 445 | + pr_warn("%s.B%d: No bufferspace for %d bytes\n", |
---|
| 446 | + ch->is->name, ch->bch.nr, ch->is->clsb); |
---|
461 | 447 | ch->is->write_reg(ch->is->hw, ISAR_IIA, 0); |
---|
462 | 448 | break; |
---|
463 | 449 | } |
---|
.. | .. |
---|
703 | 689 | } |
---|
704 | 690 | } |
---|
705 | 691 | } |
---|
706 | | - if (ch->bch.tx_skb) |
---|
707 | | - dev_kfree_skb(ch->bch.tx_skb); |
---|
| 692 | + dev_kfree_skb(ch->bch.tx_skb); |
---|
708 | 693 | if (get_next_bframe(&ch->bch)) { |
---|
709 | 694 | isar_fill_fifo(ch); |
---|
710 | 695 | test_and_clear_bit(FLG_TX_EMPTY, &ch->bch.Flags); |
---|
.. | .. |
---|
758 | 743 | } |
---|
759 | 744 | } |
---|
760 | 745 | |
---|
761 | | -const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200", "NODEF4", |
---|
| 746 | +static const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200", "NODEF4", |
---|
762 | 747 | "300", "600", "1200", "2400", "4800", "7200", |
---|
763 | 748 | "9600nt", "9600t", "12000", "14400", "WRONG"}; |
---|
764 | | -const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21", |
---|
| 749 | +static const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21", |
---|
765 | 750 | "Bell103", "V23", "Bell202", "V17", "V29", "V27ter"}; |
---|
766 | 751 | |
---|
767 | 752 | static void |
---|
.. | .. |
---|
972 | 957 | break; |
---|
973 | 958 | case PCTRL_CMD_FTM: |
---|
974 | 959 | p1 = 2; |
---|
975 | | - /* fall through */ |
---|
| 960 | + fallthrough; |
---|
976 | 961 | case PCTRL_CMD_FTH: |
---|
977 | 962 | send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, |
---|
978 | 963 | PCTRL_CMD_SILON, 1, &p1); |
---|
.. | .. |
---|
1178 | 1163 | send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG, |
---|
1179 | 1164 | PMOD_DTMF, 1, param); |
---|
1180 | 1165 | } |
---|
1181 | | - /* fall through */ |
---|
| 1166 | + fallthrough; |
---|
1182 | 1167 | case ISDN_P_B_MODEM_ASYNC: |
---|
1183 | 1168 | ctrl = PMOD_DATAMODEM; |
---|
1184 | 1169 | if (test_bit(FLG_ORIGIN, &ch->bch.Flags)) { |
---|
.. | .. |
---|
1270 | 1255 | case ISDN_P_B_MODEM_ASYNC: |
---|
1271 | 1256 | case ISDN_P_B_T30_FAX: |
---|
1272 | 1257 | cmsb |= IOM_CTRL_RCV; |
---|
1273 | | - /* fall through */ |
---|
| 1258 | + fallthrough; |
---|
1274 | 1259 | case ISDN_P_B_L2DTMF: |
---|
1275 | 1260 | if (test_bit(FLG_DTMFSEND, &ch->bch.Flags)) |
---|
1276 | 1261 | cmsb |= IOM_CTRL_RCV; |
---|
.. | .. |
---|
1563 | 1548 | ich->is->name, hh->id); |
---|
1564 | 1549 | ret = -EINVAL; |
---|
1565 | 1550 | } |
---|
1566 | | - /* fall through */ |
---|
| 1551 | + fallthrough; |
---|
1567 | 1552 | default: |
---|
1568 | 1553 | pr_info("%s: %s unknown prim(%x,%x)\n", |
---|
1569 | 1554 | ich->is->name, __func__, hh->prim, hh->id); |
---|