diff options
author | Karsten Keil <keil@b1-systems.de> | 2009-05-22 07:04:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-25 03:55:45 -0400 |
commit | eac74af9b547e29c9634ed5eff4d514349e73310 (patch) | |
tree | 61842b3efc3acc8ef6e0f5d7feadd69f447a6cf5 /drivers/isdn/hardware/mISDN/hfcpci.c | |
parent | 7245a2fe3c10ed7c2e9b1c8a83af5919c0cc0a89 (diff) |
mISDN: Cleanup debug messages
This patch make debug printk's KERN_DEBUG and also fix some
codestyle issues.
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/hfcpci.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcpci.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 60dc92562c6d..776afc8c9270 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
@@ -257,7 +257,7 @@ reset_hfcpci(struct hfc_pci *hc) | |||
257 | Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); | 257 | Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); |
258 | 258 | ||
259 | /* Clear already pending ints */ | 259 | /* Clear already pending ints */ |
260 | if (Read_hfc(hc, HFCPCI_INT_S1)); | 260 | val = Read_hfc(hc, HFCPCI_INT_S1); |
261 | 261 | ||
262 | /* set NT/TE mode */ | 262 | /* set NT/TE mode */ |
263 | hfcpci_setmode(hc); | 263 | hfcpci_setmode(hc); |
@@ -499,7 +499,8 @@ receive_dmsg(struct hfc_pci *hc) | |||
499 | df->f2 = ((df->f2 + 1) & MAX_D_FRAMES) | | 499 | df->f2 = ((df->f2 + 1) & MAX_D_FRAMES) | |
500 | (MAX_D_FRAMES + 1); /* next buffer */ | 500 | (MAX_D_FRAMES + 1); /* next buffer */ |
501 | df->za[df->f2 & D_FREG_MASK].z2 = | 501 | df->za[df->f2 & D_FREG_MASK].z2 = |
502 | cpu_to_le16((le16_to_cpu(zp->z2) + rcnt) & (D_FIFO_SIZE - 1)); | 502 | cpu_to_le16((le16_to_cpu(zp->z2) + rcnt) & |
503 | (D_FIFO_SIZE - 1)); | ||
503 | } else { | 504 | } else { |
504 | dch->rx_skb = mI_alloc_skb(rcnt - 3, GFP_ATOMIC); | 505 | dch->rx_skb = mI_alloc_skb(rcnt - 3, GFP_ATOMIC); |
505 | if (!dch->rx_skb) { | 506 | if (!dch->rx_skb) { |
@@ -966,6 +967,7 @@ static void | |||
966 | ph_state_nt(struct dchannel *dch) | 967 | ph_state_nt(struct dchannel *dch) |
967 | { | 968 | { |
968 | struct hfc_pci *hc = dch->hw; | 969 | struct hfc_pci *hc = dch->hw; |
970 | u_char val; | ||
969 | 971 | ||
970 | if (dch->debug) | 972 | if (dch->debug) |
971 | printk(KERN_DEBUG "%s: NT newstate %x\n", | 973 | printk(KERN_DEBUG "%s: NT newstate %x\n", |
@@ -979,7 +981,7 @@ ph_state_nt(struct dchannel *dch) | |||
979 | hc->hw.int_m1 &= ~HFCPCI_INTS_TIMER; | 981 | hc->hw.int_m1 &= ~HFCPCI_INTS_TIMER; |
980 | Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); | 982 | Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); |
981 | /* Clear already pending ints */ | 983 | /* Clear already pending ints */ |
982 | if (Read_hfc(hc, HFCPCI_INT_S1)); | 984 | val = Read_hfc(hc, HFCPCI_INT_S1); |
983 | Write_hfc(hc, HFCPCI_STATES, 4 | HFCPCI_LOAD_STATE); | 985 | Write_hfc(hc, HFCPCI_STATES, 4 | HFCPCI_LOAD_STATE); |
984 | udelay(10); | 986 | udelay(10); |
985 | Write_hfc(hc, HFCPCI_STATES, 4); | 987 | Write_hfc(hc, HFCPCI_STATES, 4); |
@@ -1268,8 +1270,7 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol) | |||
1268 | rx_slot = (bc>>8) & 0xff; | 1270 | rx_slot = (bc>>8) & 0xff; |
1269 | tx_slot = (bc>>16) & 0xff; | 1271 | tx_slot = (bc>>16) & 0xff; |
1270 | bc = bc & 0xff; | 1272 | bc = bc & 0xff; |
1271 | } else if (test_bit(HFC_CFG_PCM, &hc->cfg) && | 1273 | } else if (test_bit(HFC_CFG_PCM, &hc->cfg) && (protocol > ISDN_P_NONE)) |
1272 | (protocol > ISDN_P_NONE)) | ||
1273 | printk(KERN_WARNING "%s: no pcm channel id but HFC_CFG_PCM\n", | 1274 | printk(KERN_WARNING "%s: no pcm channel id but HFC_CFG_PCM\n", |
1274 | __func__); | 1275 | __func__); |
1275 | if (hc->chanlimit > 1) { | 1276 | if (hc->chanlimit > 1) { |
@@ -1327,8 +1328,8 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol) | |||
1327 | case (ISDN_P_B_RAW): | 1328 | case (ISDN_P_B_RAW): |
1328 | bch->state = protocol; | 1329 | bch->state = protocol; |
1329 | bch->nr = bc; | 1330 | bch->nr = bc; |
1330 | hfcpci_clear_fifo_rx(hc, (fifo2 & 2)?1:0); | 1331 | hfcpci_clear_fifo_rx(hc, (fifo2 & 2) ? 1 : 0); |
1331 | hfcpci_clear_fifo_tx(hc, (fifo2 & 2)?1:0); | 1332 | hfcpci_clear_fifo_tx(hc, (fifo2 & 2) ? 1 : 0); |
1332 | if (bc & 2) { | 1333 | if (bc & 2) { |
1333 | hc->hw.sctrl |= SCTRL_B2_ENA; | 1334 | hc->hw.sctrl |= SCTRL_B2_ENA; |
1334 | hc->hw.sctrl_r |= SCTRL_B2_ENA; | 1335 | hc->hw.sctrl_r |= SCTRL_B2_ENA; |
@@ -1362,8 +1363,8 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol) | |||
1362 | case (ISDN_P_B_HDLC): | 1363 | case (ISDN_P_B_HDLC): |
1363 | bch->state = protocol; | 1364 | bch->state = protocol; |
1364 | bch->nr = bc; | 1365 | bch->nr = bc; |
1365 | hfcpci_clear_fifo_rx(hc, (fifo2 & 2)?1:0); | 1366 | hfcpci_clear_fifo_rx(hc, (fifo2 & 2) ? 1 : 0); |
1366 | hfcpci_clear_fifo_tx(hc, (fifo2 & 2)?1:0); | 1367 | hfcpci_clear_fifo_tx(hc, (fifo2 & 2) ? 1 : 0); |
1367 | if (bc & 2) { | 1368 | if (bc & 2) { |
1368 | hc->hw.sctrl |= SCTRL_B2_ENA; | 1369 | hc->hw.sctrl |= SCTRL_B2_ENA; |
1369 | hc->hw.sctrl_r |= SCTRL_B2_ENA; | 1370 | hc->hw.sctrl_r |= SCTRL_B2_ENA; |
@@ -1457,7 +1458,7 @@ set_hfcpci_rxtest(struct bchannel *bch, int protocol, int chan) | |||
1457 | switch (protocol) { | 1458 | switch (protocol) { |
1458 | case (ISDN_P_B_RAW): | 1459 | case (ISDN_P_B_RAW): |
1459 | bch->state = protocol; | 1460 | bch->state = protocol; |
1460 | hfcpci_clear_fifo_rx(hc, (chan & 2)?1:0); | 1461 | hfcpci_clear_fifo_rx(hc, (chan & 2) ? 1 : 0); |
1461 | if (chan & 2) { | 1462 | if (chan & 2) { |
1462 | hc->hw.sctrl_r |= SCTRL_B2_ENA; | 1463 | hc->hw.sctrl_r |= SCTRL_B2_ENA; |
1463 | hc->hw.fifo_en |= HFCPCI_FIFOEN_B2RX; | 1464 | hc->hw.fifo_en |= HFCPCI_FIFOEN_B2RX; |
@@ -1482,7 +1483,7 @@ set_hfcpci_rxtest(struct bchannel *bch, int protocol, int chan) | |||
1482 | break; | 1483 | break; |
1483 | case (ISDN_P_B_HDLC): | 1484 | case (ISDN_P_B_HDLC): |
1484 | bch->state = protocol; | 1485 | bch->state = protocol; |
1485 | hfcpci_clear_fifo_rx(hc, (chan & 2)?1:0); | 1486 | hfcpci_clear_fifo_rx(hc, (chan & 2) ? 1 : 0); |
1486 | if (chan & 2) { | 1487 | if (chan & 2) { |
1487 | hc->hw.sctrl_r |= SCTRL_B2_ENA; | 1488 | hc->hw.sctrl_r |= SCTRL_B2_ENA; |
1488 | hc->hw.last_bfifo_cnt[1] = 0; | 1489 | hc->hw.last_bfifo_cnt[1] = 0; |
@@ -2047,7 +2048,8 @@ setup_hw(struct hfc_pci *hc) | |||
2047 | printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n"); | 2048 | printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n"); |
2048 | return 1; | 2049 | return 1; |
2049 | } | 2050 | } |
2050 | hc->hw.pci_io = (char __iomem *)(unsigned long)hc->pdev->resource[1].start; | 2051 | hc->hw.pci_io = |
2052 | (char __iomem *)(unsigned long)hc->pdev->resource[1].start; | ||
2051 | 2053 | ||
2052 | if (!hc->hw.pci_io) { | 2054 | if (!hc->hw.pci_io) { |
2053 | printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n"); | 2055 | printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n"); |
@@ -2289,7 +2291,7 @@ hfc_remove_pci(struct pci_dev *pdev) | |||
2289 | release_card(card); | 2291 | release_card(card); |
2290 | else | 2292 | else |
2291 | if (debug) | 2293 | if (debug) |
2292 | printk(KERN_WARNING "%s: drvdata already removed\n", | 2294 | printk(KERN_DEBUG "%s: drvdata already removed\n", |
2293 | __func__); | 2295 | __func__); |
2294 | } | 2296 | } |
2295 | 2297 | ||