summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/mISDN
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-20 21:04:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-20 21:04:47 -0700
commit3b59bf081622b6446db77ad06c93fe23677bc533 (patch)
tree3f4bb5a27c90cc86994a1f6d3c53fbf9208003cb /drivers/isdn/hardware/mISDN
parente45836fafe157df137a837093037f741ad8f4c90 (diff)
parentbbdb32cb5b73597386913d052165423b9d736145 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking merge from David Miller: "1) Move ixgbe driver over to purely page based buffering on receive. From Alexander Duyck. 2) Add receive packet steering support to e1000e, from Bruce Allan. 3) Convert TCP MD5 support over to RCU, from Eric Dumazet. 4) Reduce cpu usage in handling out-of-order TCP packets on modern systems, also from Eric Dumazet. 5) Support the IP{,V6}_UNICAST_IF socket options, making the wine folks happy, from Erich Hoover. 6) Support VLAN trunking from guests in hyperv driver, from Haiyang Zhang. 7) Support byte-queue-limtis in r8169, from Igor Maravic. 8) Outline code intended for IP_RECVTOS in IP_PKTOPTIONS existed but was never properly implemented, Jiri Benc fixed that. 9) 64-bit statistics support in r8169 and 8139too, from Junchang Wang. 10) Support kernel side dump filtering by ctmark in netfilter ctnetlink, from Pablo Neira Ayuso. 11) Support byte-queue-limits in gianfar driver, from Paul Gortmaker. 12) Add new peek socket options to assist with socket migration, from Pavel Emelyanov. 13) Add sch_plug packet scheduler whose queue is controlled by userland daemons using explicit freeze and release commands. From Shriram Rajagopalan. 14) Fix FCOE checksum offload handling on transmit, from Yi Zou." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1846 commits) Fix pppol2tp getsockname() Remove printk from rds_sendmsg ipv6: fix incorrent ipv6 ipsec packet fragment cpsw: Hook up default ndo_change_mtu. net: qmi_wwan: fix build error due to cdc-wdm dependecy netdev: driver: ethernet: Add TI CPSW driver netdev: driver: ethernet: add cpsw address lookup engine support phy: add am79c874 PHY support mlx4_core: fix race on comm channel bonding: send igmp report for its master fs_enet: Add MPC5125 FEC support and PHY interface selection net: bpf_jit: fix BPF_S_LDX_B_MSH compilation net: update the usage of CHECKSUM_UNNECESSARY fcoe: use CHECKSUM_UNNECESSARY instead of CHECKSUM_PARTIAL on tx net: do not do gso for CHECKSUM_UNNECESSARY in netif_needs_gso ixgbe: Fix issues with SR-IOV loopback when flow control is disabled net/hyperv: Fix the code handling tx busy ixgbe: fix namespace issues when FCoE/DCB is not enabled rtlwifi: Remove unused ETH_ADDR_LEN defines igbvf: Use ETH_ALEN ... Fix up fairly trivial conflicts in drivers/isdn/gigaset/interface.c and drivers/net/usb/{Kconfig,qmi_wwan.c} as per David.
Diffstat (limited to 'drivers/isdn/hardware/mISDN')
-rw-r--r--drivers/isdn/hardware/mISDN/avmfritz.c68
-rw-r--r--drivers/isdn/hardware/mISDN/hfc_multi.h47
-rw-r--r--drivers/isdn/hardware/mISDN/hfc_multi_8xx.h28
-rw-r--r--drivers/isdn/hardware/mISDN/hfc_pci.h18
-rw-r--r--drivers/isdn/hardware/mISDN/hfcmulti.c1364
-rw-r--r--drivers/isdn/hardware/mISDN/hfcpci.c356
-rw-r--r--drivers/isdn/hardware/mISDN/hfcsusb.c415
-rw-r--r--drivers/isdn/hardware/mISDN/hfcsusb.h120
-rw-r--r--drivers/isdn/hardware/mISDN/iohelper.h136
-rw-r--r--drivers/isdn/hardware/mISDN/isar.h2
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNinfineon.c36
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNipac.c112
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNisar.c208
-rw-r--r--drivers/isdn/hardware/mISDN/netjet.c98
-rw-r--r--drivers/isdn/hardware/mISDN/netjet.h1
-rw-r--r--drivers/isdn/hardware/mISDN/speedfax.c22
-rw-r--r--drivers/isdn/hardware/mISDN/w6692.c86
17 files changed, 1557 insertions, 1560 deletions
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c
index 861b6511f3e..05ed4d0cb18 100644
--- a/drivers/isdn/hardware/mISDN/avmfritz.c
+++ b/drivers/isdn/hardware/mISDN/avmfritz.c
@@ -257,10 +257,10 @@ static struct bchannel *
Sel_BCS(struct fritzcard *fc, u32 channel)
{
if (test_bit(FLG_ACTIVE, &fc->bch[0].Flags) &&
- (fc->bch[0].nr & channel))
+ (fc->bch[0].nr & channel))
return &fc->bch[0];
else if (test_bit(FLG_ACTIVE, &fc->bch[1].Flags) &&
- (fc->bch[1].nr & channel))
+ (fc->bch[1].nr & channel))
return &fc->bch[1];
else
return NULL;
@@ -277,7 +277,7 @@ __write_ctrl_pci(struct fritzcard *fc, struct hdlc_hw *hdlc, u32 channel) {
static inline void
__write_ctrl_pciv2(struct fritzcard *fc, struct hdlc_hw *hdlc, u32 channel) {
outl(hdlc->ctrl.ctrl, fc->addr + (channel == 2 ? AVM_HDLC_STATUS_2 :
- AVM_HDLC_STATUS_1));
+ AVM_HDLC_STATUS_1));
}
void
@@ -287,7 +287,7 @@ write_ctrl(struct bchannel *bch, int which) {
hdlc = &fc->hdlc[(bch->nr - 1) & 1];
pr_debug("%s: hdlc %c wr%x ctrl %x\n", fc->name, '@' + bch->nr,
- which, hdlc->ctrl.ctrl);
+ which, hdlc->ctrl.ctrl);
switch (fc->type) {
case AVM_FRITZ_PCIV2:
__write_ctrl_pciv2(fc, hdlc, bch->nr);
@@ -310,7 +310,7 @@ static inline u32
__read_status_pciv2(u_long addr, u32 channel)
{
return inl(addr + (channel == 2 ? AVM_HDLC_STATUS_2 :
- AVM_HDLC_STATUS_1));
+ AVM_HDLC_STATUS_1));
}
@@ -349,7 +349,7 @@ modehdlc(struct bchannel *bch, int protocol)
hdlc = &fc->hdlc[(bch->nr - 1) & 1];
pr_debug("%s: hdlc %c protocol %x-->%x ch %d\n", fc->name,
- '@' + bch->nr, bch->state, protocol, bch->nr);
+ '@' + bch->nr, bch->state, protocol, bch->nr);
hdlc->ctrl.ctrl = 0;
switch (protocol) {
case -1: /* used for init */
@@ -411,14 +411,14 @@ hdlc_empty_fifo(struct bchannel *bch, int count)
}
if ((bch->rx_skb->len + count) > bch->maxlen) {
pr_debug("%s: overrun %d\n", fc->name,
- bch->rx_skb->len + count);
+ bch->rx_skb->len + count);
return;
}
p = skb_put(bch->rx_skb, count);
ptr = (u32 *)p;
if (AVM_FRITZ_PCIV2 == fc->type)
addr = fc->addr + (bch->nr == 2 ?
- AVM_HDLC_FIFO_2 : AVM_HDLC_FIFO_1);
+ AVM_HDLC_FIFO_2 : AVM_HDLC_FIFO_1);
else {
addr = fc->addr + CHIP_WINDOW;
outl(bch->nr == 2 ? AVM_HDLC_2 : AVM_HDLC_1, fc->addr);
@@ -431,7 +431,7 @@ hdlc_empty_fifo(struct bchannel *bch, int count)
}
if (debug & DEBUG_HW_BFIFO) {
snprintf(fc->log, LOG_SIZE, "B%1d-recv %s %d ",
- bch->nr, fc->name, count);
+ bch->nr, fc->name, count);
print_hex_dump_bytes(fc->log, DUMP_PREFIX_OFFSET, p, count);
}
}
@@ -460,14 +460,14 @@ hdlc_fill_fifo(struct bchannel *bch)
hdlc->ctrl.sr.cmd |= HDLC_CMD_XME;
}
pr_debug("%s: %s %d/%d/%d", fc->name, __func__, count,
- bch->tx_idx, bch->tx_skb->len);
+ bch->tx_idx, bch->tx_skb->len);
ptr = (u32 *)p;
bch->tx_idx += count;
hdlc->ctrl.sr.xml = ((count == HDLC_FIFO_SIZE) ? 0 : count);
if (AVM_FRITZ_PCIV2 == fc->type) {
__write_ctrl_pciv2(fc, hdlc, bch->nr);
addr = fc->addr + (bch->nr == 2 ?
- AVM_HDLC_FIFO_2 : AVM_HDLC_FIFO_1);
+ AVM_HDLC_FIFO_2 : AVM_HDLC_FIFO_1);
} else {
__write_ctrl_pci(fc, hdlc, bch->nr);
addr = fc->addr + CHIP_WINDOW;
@@ -480,7 +480,7 @@ hdlc_fill_fifo(struct bchannel *bch)
}
if (debug & DEBUG_HW_BFIFO) {
snprintf(fc->log, LOG_SIZE, "B%1d-send %s %d ",
- bch->nr, fc->name, count);
+ bch->nr, fc->name, count);
print_hex_dump_bytes(fc->log, DUMP_PREFIX_OFFSET, p, count);
}
}
@@ -528,14 +528,14 @@ HDLC_irq(struct bchannel *bch, u32 stat)
if (!bch->rx_skb)
goto handle_tx;
if ((stat & HDLC_STAT_RME) || test_bit(FLG_TRANSPARENT,
- &bch->Flags)) {
+ &bch->Flags)) {
if (((stat & HDLC_STAT_CRCVFRRAB) ==
- HDLC_STAT_CRCVFR) ||
+ HDLC_STAT_CRCVFR) ||
test_bit(FLG_TRANSPARENT, &bch->Flags)) {
recv_Bchannel(bch, 0);
} else {
pr_debug("%s: got invalid frame\n",
- fc->name);
+ fc->name);
skb_trim(bch->rx_skb, 0);
}
}
@@ -549,11 +549,11 @@ handle_tx:
*/
if (bch->tx_skb)
pr_debug("%s: ch%d XDU len(%d) idx(%d) Flags(%lx)\n",
- fc->name, bch->nr, bch->tx_skb->len,
- bch->tx_idx, bch->Flags);
+ fc->name, bch->nr, bch->tx_skb->len,
+ bch->tx_idx, bch->Flags);
else
pr_debug("%s: ch%d XDU no tx_skb Flags(%lx)\n",
- fc->name, bch->nr, bch->Flags);
+ fc->name, bch->nr, bch->Flags);
if (bch->tx_skb && bch->tx_skb->len) {
if (!test_bit(FLG_TRANSPARENT, &bch->Flags))
bch->tx_idx = 0;
@@ -685,7 +685,7 @@ avm_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
spin_unlock_irqrestore(&fc->lock, flags);
if (!ret)
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
break;
case PH_DEACTIVATE_REQ:
spin_lock_irqsave(&fc->lock, flags);
@@ -693,7 +693,7 @@ avm_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
modehdlc(bch, ISDN_P_NONE);
spin_unlock_irqrestore(&fc->lock, flags);
_queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
ret = 0;
break;
}
@@ -749,7 +749,7 @@ reset_avm(struct fritzcard *fc)
mdelay(1);
if (debug & DEBUG_HW)
pr_notice("%s: S0/S1 %x/%x\n", fc->name,
- inb(fc->addr + 2), inb(fc->addr + 3));
+ inb(fc->addr + 2), inb(fc->addr + 3));
}
static int
@@ -761,10 +761,10 @@ init_card(struct fritzcard *fc)
reset_avm(fc); /* disable IRQ */
if (fc->type == AVM_FRITZ_PCIV2)
ret = request_irq(fc->irq, avm_fritzv2_interrupt,
- IRQF_SHARED, fc->name, fc);
+ IRQF_SHARED, fc->name, fc);
else
ret = request_irq(fc->irq, avm_fritz_interrupt,
- IRQF_SHARED, fc->name, fc);
+ IRQF_SHARED, fc->name, fc);
if (ret) {
pr_info("%s: couldn't get interrupt %d\n",
fc->name, fc->irq);
@@ -795,7 +795,7 @@ init_card(struct fritzcard *fc)
msleep_interruptible(10);
if (debug & DEBUG_HW)
pr_notice("%s: IRQ %d count %d\n", fc->name,
- fc->irq, fc->irqcnt);
+ fc->irq, fc->irqcnt);
if (!fc->irqcnt) {
pr_info("%s: IRQ(%d) getting no IRQs during init %d\n",
fc->name, fc->irq, 3 - cnt);
@@ -817,7 +817,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
case MISDN_CTRL_GETOP:
cq->op = 0;
break;
- /* Nothing implemented yet */
+ /* Nothing implemented yet */
case MISDN_CTRL_FILL_EMPTY:
default:
pr_info("%s: %s unknown Op %x\n", fc->name, __func__, cq->op);
@@ -931,7 +931,7 @@ avm_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
break;
case CLOSE_CHANNEL:
pr_debug("%s: dev(%d) close from %p\n", fc->name, dch->dev.id,
- __builtin_return_address(0));
+ __builtin_return_address(0));
module_put(THIS_MODULE);
break;
case CONTROL_CHANNEL:
@@ -939,7 +939,7 @@ avm_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
break;
default:
pr_debug("%s: %s unknown command %x\n",
- fc->name, __func__, cmd);
+ fc->name, __func__, cmd);
return -EINVAL;
}
return err;
@@ -963,7 +963,7 @@ setup_fritz(struct fritzcard *fc)
if (debug & DEBUG_HW) {
pr_notice("%s: PCI stat %#x\n", fc->name, val);
pr_notice("%s: PCI Class %X Rev %d\n", fc->name,
- val & 0xff, (val >> 8) & 0xff);
+ val & 0xff, (val >> 8) & 0xff);
pr_notice("%s: HDLC version %x\n", fc->name, ver & 0xf);
}
ASSIGN_FUNC(V1, ISAC, fc->isac);
@@ -975,7 +975,7 @@ setup_fritz(struct fritzcard *fc)
if (debug & DEBUG_HW) {
pr_notice("%s: PCI V2 stat %#x\n", fc->name, val);
pr_notice("%s: PCI V2 Class %X Rev %d\n", fc->name,
- val & 0xff, (val>>8) & 0xff);
+ val & 0xff, (val >> 8) & 0xff);
pr_notice("%s: HDLC version %x\n", fc->name, ver & 0xf);
}
ASSIGN_FUNC(V2, ISAC, fc->isac);
@@ -987,8 +987,8 @@ setup_fritz(struct fritzcard *fc)
return -ENODEV;
}
pr_notice("%s: %s config irq:%d base:0x%X\n", fc->name,
- (fc->type == AVM_FRITZ_PCI) ? "AVM Fritz!CARD PCI" :
- "AVM Fritz!CARD PCIv2", fc->irq, fc->addr);
+ (fc->type == AVM_FRITZ_PCI) ? "AVM Fritz!CARD PCI" :
+ "AVM Fritz!CARD PCIv2", fc->irq, fc->addr);
return 0;
}
@@ -1035,7 +1035,7 @@ setup_instance(struct fritzcard *card)
mISDNisac_init(&card->isac, card);
card->isac.dch.dev.Bprotocols = (1 << (ISDN_P_B_RAW & ISDN_P_B_MASK)) |
- (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
+ (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
card->isac.dch.dev.D.ctrl = avm_dctrl;
for (i = 0; i < 2; i++) {
card->bch[i].nr = i + 1;
@@ -1051,7 +1051,7 @@ setup_instance(struct fritzcard *card)
if (err)
goto error;
err = mISDN_register_device(&card->isac.dch.dev, &card->pdev->dev,
- card->name);
+ card->name);
if (err)
goto error_reg;
err = init_card(card);
@@ -1097,7 +1097,7 @@ fritzpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
pr_notice("mISDN: found adapter %s at %s\n",
- (char *) ent->driver_data, pci_name(pdev));
+ (char *) ent->driver_data, pci_name(pdev));
card->addr = pci_resource_start(pdev, 1);
card->irq = pdev->irq;
diff --git a/drivers/isdn/hardware/mISDN/hfc_multi.h b/drivers/isdn/hardware/mISDN/hfc_multi.h
index 0c773866efc..b0588acbb47 100644
--- a/drivers/isdn/hardware/mISDN/hfc_multi.h
+++ b/drivers/isdn/hardware/mISDN/hfc_multi.h
@@ -33,13 +33,13 @@
*/
/*
-#define MAX_FRAME_SIZE 2048
+ #define MAX_FRAME_SIZE 2048
*/
struct hfc_chan {
struct dchannel *dch; /* link if channel is a D-channel */
struct bchannel *bch; /* link if channel is a B-channel */
- int port; /* the interface port this */
+ int port; /* the interface port this */
/* channel is associated with */
int nt_timer; /* -1 if off, 0 if elapsed, >0 if running */
int los, ais, slip_tx, slip_rx, rdi; /* current alarms */
@@ -89,7 +89,7 @@ struct hfcm_hw {
#define HFC_CFG_REPORT_RDI 8 /* the card should report remote alarm */
#define HFC_CFG_DTMF 9 /* enable DTMF-detection */
#define HFC_CFG_CRC4 10 /* disable CRC-4 Multiframe mode, */
- /* use double frame instead. */
+/* use double frame instead. */
#define HFC_TYPE_E1 1 /* controller is HFC-E1 */
#define HFC_TYPE_4S 4 /* controller is HFC-4S */
@@ -109,9 +109,9 @@ struct hfcm_hw {
#define HFC_CHIP_E1CLOCK_GET 10 /* always get clock from E1 interface */
#define HFC_CHIP_E1CLOCK_PUT 11 /* always put clock from E1 interface */
#define HFC_CHIP_WATCHDOG 12 /* whether we should send signals */
- /* to the watchdog */
+/* to the watchdog */
#define HFC_CHIP_B410P 13 /* whether we have a b410p with echocan in */
- /* hw */
+/* hw */
#define HFC_CHIP_PLXSD 14 /* whether we have a Speech-Design PLX */
#define HFC_CHIP_EMBSD 15 /* whether we have a SD Embedded board */
@@ -148,26 +148,26 @@ struct hfc_multi {
int io_mode; /* selects mode */
#ifdef HFC_REGISTER_DEBUG
void (*HFC_outb)(struct hfc_multi *hc, u_char reg,
- u_char val, const char *function, int line);
+ u_char val, const char *function, int line);
void (*HFC_outb_nodebug)(struct hfc_multi *hc, u_char reg,
- u_char val, const char *function, int line);
+ u_char val, const char *function, int line);
u_char (*HFC_inb)(struct hfc_multi *hc, u_char reg,
- const char *function, int line);
+ const char *function, int line);
u_char (*HFC_inb_nodebug)(struct hfc_multi *hc, u_char reg,
- const char *function, int line);
+ const char *function, int line);
u_short (*HFC_inw)(struct hfc_multi *hc, u_char reg,
- const char *function, int line);
+ const char *function, int line);
u_short (*HFC_inw_nodebug)(struct hfc_multi *hc, u_char reg,
- const char *function, int line);
+ const char *function, int line);
void (*HFC_wait)(struct hfc_multi *hc,
- const char *function, int line);
+ const char *function, int line);
void (*HFC_wait_nodebug)(struct hfc_multi *hc,
- const char *function, int line);
+ const char *function, int line);
#else
void (*HFC_outb)(struct hfc_multi *hc, u_char reg,
- u_char val);
+ u_char val);
void (*HFC_outb_nodebug)(struct hfc_multi *hc, u_char reg,
- u_char val);
+ u_char val);
u_char (*HFC_inb)(struct hfc_multi *hc, u_char reg);
u_char (*HFC_inb_nodebug)(struct hfc_multi *hc, u_char reg);
u_short (*HFC_inw)(struct hfc_multi *hc, u_char reg);
@@ -176,9 +176,9 @@ struct hfc_multi {
void (*HFC_wait_nodebug)(struct hfc_multi *hc);
#endif
void (*read_fifo)(struct hfc_multi *hc, u_char *data,
- int len);
+ int len);
void (*write_fifo)(struct hfc_multi *hc, u_char *data,
- int len);
+ int len);
u_long pci_origmembase, plx_origmembase;
void __iomem *pci_membase; /* PCI memory */
void __iomem *plx_membase; /* PLX memory */
@@ -211,10 +211,10 @@ struct hfc_multi {
/* an optical Interface */
int dslot; /* channel # of d-channel (E1) default 16 */
- u_long wdcount; /* every 500 ms we need to */
+ u_long wdcount; /* every 500 ms we need to */
/* send the watchdog a signal */
u_char wdbyte; /* watchdog toggle byte */
- u_int activity[8]; /* if there is any action on this */
+ u_int activity[8]; /* if there is any action on this */
/* port (will be cleared after */
/* showing led-states) */
int e1_state; /* keep track of last state */
@@ -268,7 +268,7 @@ struct hfc_multi {
#define PLX_DSP_RES_N PLX_GPIO8
/* GPIO4..8 Enable & Set to OUT, SLAVE_EN_N = 1 */
#define PLX_GPIOC_INIT (PLX_GPIO4_DIR | PLX_GPIO5_DIR | PLX_GPIO6_DIR \
- | PLX_GPIO7_DIR | PLX_GPIO8_DIR | PLX_SLAVE_EN_N)
+ | PLX_GPIO7_DIR | PLX_GPIO8_DIR | PLX_SLAVE_EN_N)
/* PLX Interrupt Control/STATUS */
#define PLX_INTCSR_LINTI1_ENABLE 0x01
@@ -290,7 +290,7 @@ struct hfc_multi {
/* write only registers */
#define R_CIRM 0x00
#define R_CTRL 0x01
-#define R_BRG_PCM_CFG 0x02
+#define R_BRG_PCM_CFG 0x02
#define R_RAM_ADDR0 0x08
#define R_RAM_ADDR1 0x09
#define R_RAM_ADDR2 0x0A
@@ -687,8 +687,8 @@ struct hfc_multi {
#define V_NEG_CLK 0x08
#define V_HCLK 0x10
/*
-#define V_JATT_AUTO_DEL 0x20
-#define V_JATT_AUTO 0x40
+ #define V_JATT_AUTO_DEL 0x20
+ #define V_JATT_AUTO 0x40
*/
#define V_JATT_OFF 0x80
/* R_STATE */
@@ -1230,4 +1230,3 @@ struct hfc_register_names {
{"R_IRQ_FIFO_BL7", 0xCF},
};
#endif /* HFC_REGISTER_DEBUG */
-
diff --git a/drivers/isdn/hardware/mISDN/hfc_multi_8xx.h b/drivers/isdn/hardware/mISDN/hfc_multi_8xx.h
index 45ddced956d..0eafe9f04fc 100644
--- a/drivers/isdn/hardware/mISDN/hfc_multi_8xx.h
+++ b/drivers/isdn/hardware/mISDN/hfc_multi_8xx.h
@@ -16,9 +16,9 @@
static void
#ifdef HFC_REGISTER_DEBUG
HFC_outb_embsd(struct hfc_multi *hc, u_char reg, u_char val,
- const char *function, int line)
+ const char *function, int line)
#else
-HFC_outb_embsd(struct hfc_multi *hc, u_char reg, u_char val)
+ HFC_outb_embsd(struct hfc_multi *hc, u_char reg, u_char val)
#endif
{
hc->immap->im_ioport.iop_padat |= PA_XHFC_A0;
@@ -30,7 +30,7 @@ static u_char
#ifdef HFC_REGISTER_DEBUG
HFC_inb_embsd(struct hfc_multi *hc, u_char reg, const char *function, int line)
#else
-HFC_inb_embsd(struct hfc_multi *hc, u_char reg)
+ HFC_inb_embsd(struct hfc_multi *hc, u_char reg)
#endif
{
hc->immap->im_ioport.iop_padat |= PA_XHFC_A0;
@@ -42,7 +42,7 @@ static u_short
#ifdef HFC_REGISTER_DEBUG
HFC_inw_embsd(struct hfc_multi *hc, u_char reg, const char *function, int line)
#else
-HFC_inw_embsd(struct hfc_multi *hc, u_char reg)
+ HFC_inw_embsd(struct hfc_multi *hc, u_char reg)
#endif
{
hc->immap->im_ioport.iop_padat |= PA_XHFC_A0;
@@ -54,7 +54,7 @@ static void
#ifdef HFC_REGISTER_DEBUG
HFC_wait_embsd(struct hfc_multi *hc, const char *function, int line)
#else
-HFC_wait_embsd(struct hfc_multi *hc)
+ HFC_wait_embsd(struct hfc_multi *hc)
#endif
{
hc->immap->im_ioport.iop_padat |= PA_XHFC_A0;
@@ -96,8 +96,8 @@ static int
setup_embedded(struct hfc_multi *hc, struct hm_map *m)
{
printk(KERN_INFO
- "HFC-multi: card manufacturer: '%s' card name: '%s' clock: %s\n",
- m->vendor_name, m->card_name, m->clock2 ? "double" : "normal");
+ "HFC-multi: card manufacturer: '%s' card name: '%s' clock: %s\n",
+ m->vendor_name, m->card_name, m->clock2 ? "double" : "normal");
hc->pci_dev = NULL;
if (m->clock2)
@@ -129,20 +129,20 @@ setup_embedded(struct hfc_multi *hc, struct hm_map *m)
hc->write_fifo = write_fifo_embsd;
hc->xhfc_origmembase = XHFC_MEMBASE + XHFC_OFFSET * hc->id;
hc->xhfc_membase = (u_char *)ioremap(hc->xhfc_origmembase,
- XHFC_MEMSIZE);
+ XHFC_MEMSIZE);
if (!hc->xhfc_membase) {
printk(KERN_WARNING
- "HFC-multi: failed to remap xhfc address space. "
- "(internal error)\n");
+ "HFC-multi: failed to remap xhfc address space. "
+ "(internal error)\n");
return -EIO;
}
hc->xhfc_memaddr = (u_long *)(hc->xhfc_membase + 4);
hc->xhfc_memdata = (u_long *)(hc->xhfc_membase);
printk(KERN_INFO
- "HFC-multi: xhfc_membase:%#lx xhfc_origmembase:%#lx "
- "xhfc_memaddr:%#lx xhfc_memdata:%#lx\n",
- (u_long)hc->xhfc_membase, hc->xhfc_origmembase,
- (u_long)hc->xhfc_memaddr, (u_long)hc->xhfc_memdata);
+ "HFC-multi: xhfc_membase:%#lx xhfc_origmembase:%#lx "
+ "xhfc_memaddr:%#lx xhfc_memdata:%#lx\n",
+ (u_long)hc->xhfc_membase, hc->xhfc_origmembase,
+ (u_long)hc->xhfc_memaddr, (u_long)hc->xhfc_memdata);
break;
default:
printk(KERN_WARNING "HFC-multi: Invalid IO mode.\n");
diff --git a/drivers/isdn/hardware/mISDN/hfc_pci.h b/drivers/isdn/hardware/mISDN/hfc_pci.h
index 3132ddc99fc..411cd10772e 100644
--- a/drivers/isdn/hardware/mISDN/hfc_pci.h
+++ b/drivers/isdn/hardware/mISDN/hfc_pci.h
@@ -58,7 +58,7 @@
/* GCI/IOM bus configuration registers */
#define HFCPCI_MST_EMOD 0xB4
#define HFCPCI_MST_MODE 0xB8
-#define HFCPCI_CONNECT 0xBC
+#define HFCPCI_CONNECT 0xBC
/* Interrupt and status registers */
@@ -189,18 +189,18 @@ struct zt {
struct dfifo {
u_char data[D_FIFO_SIZE]; /* FIFO data space */
- u_char fill1[0x20A0-D_FIFO_SIZE]; /* reserved, do not use */
+ u_char fill1[0x20A0 - D_FIFO_SIZE]; /* reserved, do not use */
u_char f1, f2; /* f pointers */
- u_char fill2[0x20C0-0x20A2]; /* reserved, do not use */
+ u_char fill2[0x20C0 - 0x20A2]; /* reserved, do not use */
/* mask index with D_FREG_MASK for access */
- struct zt za[MAX_D_FRAMES+1];
- u_char fill3[0x4000-0x2100]; /* align 16K */
+ struct zt za[MAX_D_FRAMES + 1];
+ u_char fill3[0x4000 - 0x2100]; /* align 16K */
};
struct bzfifo {
- struct zt za[MAX_B_FRAMES+1]; /* only range 0x0..0x1F allowed */
+ struct zt za[MAX_B_FRAMES + 1]; /* only range 0x0..0x1F allowed */
u_char f1, f2; /* f pointers */
- u_char fill[0x2100-0x2082]; /* alignment */
+ u_char fill[0x2100 - 0x2082]; /* alignment */
};
@@ -224,5 +224,5 @@ union fifo_area {
u_char fill[32768];
};
-#define Write_hfc(a, b, c) (writeb(c, (a->hw.pci_io)+b))
-#define Read_hfc(a, b) (readb((a->hw.pci_io)+b))
+#define Write_hfc(a, b, c) (writeb(c, (a->hw.pci_io) + b))
+#define Read_hfc(a, b) (readb((a->hw.pci_io) + b))
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index a440d7fff0a..033223180b5 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -142,7 +142,7 @@
*
* hwid:
* NOTE: only one hwid value must be given once
- * Enable special embedded devices with XHFC controllers.
+ * Enable special embedded devices with XHFC controllers.
*/
/*
@@ -161,8 +161,8 @@
#include <linux/mISDNdsp.h>
/*
-#define IRQCOUNT_DEBUG
-#define IRQ_DEBUG
+ #define IRQCOUNT_DEBUG
+ #define IRQ_DEBUG
*/
#include "hfc_multi.h"
@@ -237,21 +237,21 @@ module_param_array(port, uint, NULL, S_IRUGO | S_IWUSR);
module_param(hwid, uint, S_IRUGO | S_IWUSR); /* The hardware ID */
#ifdef HFC_REGISTER_DEBUG
-#define HFC_outb(hc, reg, val) \
+#define HFC_outb(hc, reg, val) \
(hc->HFC_outb(hc, reg, val, __func__, __LINE__))
-#define HFC_outb_nodebug(hc, reg, val) \
+#define HFC_outb_nodebug(hc, reg, val) \
(hc->HFC_outb_nodebug(hc, reg, val, __func__, __LINE__))
-#define HFC_inb(hc, reg) \
+#define HFC_inb(hc, reg) \
(hc->HFC_inb(hc, reg, __func__, __LINE__))
-#define HFC_inb_nodebug(hc, reg) \
+#define HFC_inb_nodebug(hc, reg) \
(hc->HFC_inb_nodebug(hc, reg, __func__, __LINE__))
-#define HFC_inw(hc, reg) \
+#define HFC_inw(hc, reg) \
(hc->HFC_inw(hc, reg, __func__, __LINE__))
-#define HFC_inw_nodebug(hc, reg) \
+#define HFC_inw_nodebug(hc, reg) \
(hc->HFC_inw_nodebug(hc, reg, __func__, __LINE__))
-#define HFC_wait(hc) \
+#define HFC_wait(hc) \
(hc->HFC_wait(hc, __func__, __LINE__))
-#define HFC_wait_nodebug(hc) \
+#define HFC_wait_nodebug(hc) \
(hc->HFC_wait_nodebug(hc, __func__, __LINE__))
#else
#define HFC_outb(hc, reg, val) (hc->HFC_outb(hc, reg, val))
@@ -274,7 +274,7 @@ static void
HFC_outb_pcimem(struct hfc_multi *hc, u_char reg, u_char val,
const char *function, int line)
#else
-HFC_outb_pcimem(struct hfc_multi *hc, u_char reg, u_char val)
+ HFC_outb_pcimem(struct hfc_multi *hc, u_char reg, u_char val)
#endif
{
writeb(val, hc->pci_membase + reg);
@@ -283,7 +283,7 @@ static u_char
#ifdef HFC_REGISTER_DEBUG
HFC_inb_pcimem(struct hfc_multi *hc, u_char reg, const char *function, int line)
#else
-HFC_inb_pcimem(struct hfc_multi *hc, u_char reg)
+ HFC_inb_pcimem(struct hfc_multi *hc, u_char reg)
#endif
{
return readb(hc->pci_membase + reg);
@@ -292,7 +292,7 @@ static u_short
#ifdef HFC_REGISTER_DEBUG
HFC_inw_pcimem(struct hfc_multi *hc, u_char reg, const char *function, int line)
#else
-HFC_inw_pcimem(struct hfc_multi *hc, u_char reg)
+ HFC_inw_pcimem(struct hfc_multi *hc, u_char reg)
#endif
{
return readw(hc->pci_membase + reg);
@@ -301,7 +301,7 @@ static void
#ifdef HFC_REGISTER_DEBUG
HFC_wait_pcimem(struct hfc_multi *hc, const char *function, int line)
#else
-HFC_wait_pcimem(struct hfc_multi *hc)
+ HFC_wait_pcimem(struct hfc_multi *hc)
#endif
{
while (readb(hc->pci_membase + R_STATUS) & V_BUSY)
@@ -312,9 +312,9 @@ HFC_wait_pcimem(struct hfc_multi *hc)
static void
#ifdef HFC_REGISTER_DEBUG
HFC_outb_regio(struct hfc_multi *hc, u_char reg, u_char val,
- const char *function, int line)
+ const char *function, int line)
#else
-HFC_outb_regio(struct hfc_multi *hc, u_char reg, u_char val)
+ HFC_outb_regio(struct hfc_multi *hc, u_char reg, u_char val)
#endif
{
outb(reg, hc->pci_iobase + 4);
@@ -324,7 +324,7 @@ static u_char
#ifdef HFC_REGISTER_DEBUG
HFC_inb_regio(struct hfc_multi *hc, u_char reg, const char *function, int line)
#else
-HFC_inb_regio(struct hfc_multi *hc, u_char reg)
+ HFC_inb_regio(struct hfc_multi *hc, u_char reg)
#endif
{
outb(reg, hc->pci_iobase + 4);
@@ -334,7 +334,7 @@ static u_short
#ifdef HFC_REGISTER_DEBUG
HFC_inw_regio(struct hfc_multi *hc, u_char reg, const char *function, int line)
#else
-HFC_inw_regio(struct hfc_multi *hc, u_char reg)
+ HFC_inw_regio(struct hfc_multi *hc, u_char reg)
#endif
{
outb(reg, hc->pci_iobase + 4);
@@ -344,7 +344,7 @@ static void
#ifdef HFC_REGISTER_DEBUG
HFC_wait_regio(struct hfc_multi *hc, const char *function, int line)
#else
-HFC_wait_regio(struct hfc_multi *hc)
+ HFC_wait_regio(struct hfc_multi *hc)
#endif
{
outb(R_STATUS, hc->pci_iobase + 4);
@@ -355,7 +355,7 @@ HFC_wait_regio(struct hfc_multi *hc)
#ifdef HFC_REGISTER_DEBUG
static void
HFC_outb_debug(struct hfc_multi *hc, u_char reg, u_char val,
- const char *function, int line)
+ const char *function, int line)
{
char regname[256] = "", bits[9] = "xxxxxxxx";
int i;
@@ -377,8 +377,8 @@ HFC_outb_debug(struct hfc_multi *hc, u_char reg, u_char val,
bits[1] = '0' + (!!(val & 64));
bits[0] = '0' + (!!(val & 128));
printk(KERN_DEBUG
- "HFC_outb(chip %d, %02x=%s, 0x%02x=%s); in %s() line %d\n",
- hc->id, reg, regname, val, bits, function, line);
+ "HFC_outb(chip %d, %02x=%s, 0x%02x=%s); in %s() line %d\n",
+ hc->id, reg, regname, val, bits, function, line);
HFC_outb_nodebug(hc, reg, val);
}
static u_char
@@ -407,8 +407,8 @@ HFC_inb_debug(struct hfc_multi *hc, u_char reg, const char *function, int line)
bits[1] = '0' + (!!(val & 64));
bits[0] = '0' + (!!(val & 128));
printk(KERN_DEBUG
- "HFC_inb(chip %d, %02x=%s) = 0x%02x=%s; in %s() line %d\n",
- hc->id, reg, regname, val, bits, function, line);
+ "HFC_inb(chip %d, %02x=%s) = 0x%02x=%s; in %s() line %d\n",
+ hc->id, reg, regname, val, bits, function, line);
return val;
}
static u_short
@@ -429,15 +429,15 @@ HFC_inw_debug(struct hfc_multi *hc, u_char reg, const char *function, int line)
strcpy(regname, "register");
printk(KERN_DEBUG
- "HFC_inw(chip %d, %02x=%s) = 0x%04x; in %s() line %d\n",
- hc->id, reg, regname, val, function, line);
+ "HFC_inw(chip %d, %02x=%s) = 0x%04x; in %s() line %d\n",
+ hc->id, reg, regname, val, function, line);
return val;
}
static void
HFC_wait_debug(struct hfc_multi *hc, const char *function, int line)
{
printk(KERN_DEBUG "HFC_wait(chip %d); in %s() line %d\n",
- hc->id, function, line);
+ hc->id, function, line);
HFC_wait_nodebug(hc);
}
#endif
@@ -446,13 +446,13 @@ HFC_wait_debug(struct hfc_multi *hc, const char *function, int line)
static void
write_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
{
- outb(A_FIFO_DATA0, (hc->pci_iobase)+4);
- while (len>>2) {
+ outb(A_FIFO_DATA0, (hc->pci_iobase) + 4);
+ while (len >> 2) {
outl(cpu_to_le32(*(u32 *)data), hc->pci_iobase);
data += 4;
len -= 4;
}
- while (len>>1) {
+ while (len >> 1) {
outw(cpu_to_le16(*(u16 *)data), hc->pci_iobase);
data += 2;
len -= 2;
@@ -467,15 +467,15 @@ write_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
static void
write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
{
- while (len>>2) {
+ while (len >> 2) {
writel(cpu_to_le32(*(u32 *)data),
- hc->pci_membase + A_FIFO_DATA0);
+ hc->pci_membase + A_FIFO_DATA0);
data += 4;
len -= 4;
}
- while (len>>1) {
+ while (len >> 1) {
writew(cpu_to_le16(*(u16 *)data),
- hc->pci_membase + A_FIFO_DATA0);
+ hc->pci_membase + A_FIFO_DATA0);
data += 2;
len -= 2;
}
@@ -490,13 +490,13 @@ write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
static void
read_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
{
- outb(A_FIFO_DATA0, (hc->pci_iobase)+4);
- while (len>>2) {
+ outb(A_FIFO_DATA0, (hc->pci_iobase) + 4);
+ while (len >> 2) {
*(u32 *)data = le32_to_cpu(inl(hc->pci_iobase));
data += 4;
len -= 4;
}
- while (len>>1) {
+ while (len >> 1) {
*(u16 *)data = le16_to_cpu(inw(hc->pci_iobase));
data += 2;
len -= 2;
@@ -512,13 +512,13 @@ read_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
static void
read_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
{
- while (len>>2) {
+ while (len >> 2) {
*(u32 *)data =
le32_to_cpu(readl(hc->pci_membase + A_FIFO_DATA0));
data += 4;
len -= 4;
}
- while (len>>1) {
+ while (len >> 1) {
*(u16 *)data =
le16_to_cpu(readw(hc->pci_membase + A_FIFO_DATA0));
data += 2;
@@ -607,7 +607,7 @@ writepcibridge(struct hfc_multi *hc, unsigned char address, unsigned char data)
outw(cipv, hc->pci_iobase + 4);
/* define a 32 bit dword with 4 identical bytes for write sequence */
datav = data | ((__u32) data << 8) | ((__u32) data << 16) |
- ((__u32) data << 24);
+ ((__u32) data << 24);
/*
* write this 32 bit dword to the bridge data port
@@ -699,7 +699,7 @@ vpm_in(struct hfc_multi *c, int which, unsigned short addr)
inline void
vpm_out(struct hfc_multi *c, int which, unsigned short addr,
- unsigned char data)
+ unsigned char data)
{
vpm_write_address(c, addr);
@@ -717,11 +717,11 @@ vpm_out(struct hfc_multi *c, int which, unsigned short addr,
disablepcibridge(c);
{
- unsigned char regin;
- regin = vpm_in(c, which, addr);
- if (regin != data)
- printk(KERN_DEBUG "Wrote 0x%x to register 0x%x but got back "
- "0x%x\n", data, addr, regin);
+ unsigned char regin;
+ regin = vpm_in(c, which, addr);
+ if (regin != data)
+ printk(KERN_DEBUG "Wrote 0x%x to register 0x%x but got back "
+ "0x%x\n", data, addr, regin);
}
}
@@ -853,16 +853,16 @@ vpm_echocan_on(struct hfc_multi *hc, int ch, int taps)
#ifdef TXADJ
skb = _alloc_mISDN_skb(PH_CONTROL_IND, HFC_VOL_CHANGE_TX,
- sizeof(int), &txadj, GFP_ATOMIC);
+ sizeof(int), &txadj, GFP_ATOMIC);
if (skb)
recv_Bchannel_skb(bch, skb);
#endif
- timeslot = ((ch/4)*8) + ((ch%4)*4) + 1;
+ timeslot = ((ch / 4) * 8) + ((ch % 4) * 4) + 1;
unit = ch % 4;
printk(KERN_NOTICE "vpm_echocan_on called taps [%d] on timeslot %d\n",
- taps, timeslot);
+ taps, timeslot);
vpm_out(hc, unit, timeslot, 0x7e);
}
@@ -886,16 +886,16 @@ vpm_echocan_off(struct hfc_multi *hc, int ch)
#ifdef TXADJ
skb = _alloc_mISDN_skb(PH_CONTROL_IND, HFC_VOL_CHANGE_TX,
- sizeof(int), &txadj, GFP_ATOMIC);
+ sizeof(int), &txadj, GFP_ATOMIC);
if (skb)
recv_Bchannel_skb(bch, skb);
#endif
- timeslot = ((ch/4)*8) + ((ch%4)*4) + 1;
+ timeslot = ((ch / 4) * 8) + ((ch % 4) * 4) + 1;
unit = ch % 4;
printk(KERN_NOTICE "vpm_echocan_off called on timeslot %d\n",
- timeslot);
+ timeslot);
/* FILLME */
vpm_out(hc, unit, timeslot, 0x01);
}
@@ -920,7 +920,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG "%s: RESYNC(syncmaster=0x%p)\n",
- __func__, syncmaster);
+ __func__, syncmaster);
/* select new master */
if (newmaster) {
@@ -949,7 +949,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
if (hc->ctype == HFC_TYPE_E1) {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG
- "Schedule SYNC_I\n");
+ "Schedule SYNC_I\n");
hc->e1_resync |= 1; /* get SYNC_I */
}
}
@@ -960,7 +960,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
hc = newmaster;
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG "id=%d (0x%p) = syncronized with "
- "interface.\n", hc->id, hc);
+ "interface.\n", hc->id, hc);
/* Enable new sync master */
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
@@ -968,7 +968,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
writel(pv, plx_acc_32);
/* switch to jatt PLL, if not disabled by RX_SYNC */
if (hc->ctype == HFC_TYPE_E1
- && !test_bit(HFC_CHIP_RX_SYNC, &hc->chip)) {
+ && !test_bit(HFC_CHIP_RX_SYNC, &hc->chip)) {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG "Schedule jatt PLL\n");
hc->e1_resync |= 2; /* switch to jatt */
@@ -978,20 +978,20 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
hc = pcmmaster;
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG
- "id=%d (0x%p) = PCM master syncronized "
- "with QUARTZ\n", hc->id, hc);
+ "id=%d (0x%p) = PCM master syncronized "
+ "with QUARTZ\n", hc->id, hc);
if (hc->ctype == HFC_TYPE_E1) {
/* Use the crystal clock for the PCM
master card */
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG
- "Schedule QUARTZ for HFC-E1\n");
+ "Schedule QUARTZ for HFC-E1\n");
hc->e1_resync |= 4; /* switch quartz */
} else {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG
- "QUARTZ is automatically "
- "enabled by HFC-%dS\n", hc->ctype);
+ "QUARTZ is automatically "
+ "enabled by HFC-%dS\n", hc->ctype);
}
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
@@ -1000,7 +1000,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
} else
if (!rm)
printk(KERN_ERR "%s no pcm master, this MUST "
- "not happen!\n", __func__);
+ "not happen!\n", __func__);
}
syncmaster = newmaster;
@@ -1016,16 +1016,16 @@ plxsd_checksync(struct hfc_multi *hc, int rm)
if (syncmaster == NULL) {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG "%s: GOT sync on card %d"
- " (id=%d)\n", __func__, hc->id + 1,
- hc->id);
+ " (id=%d)\n", __func__, hc->id + 1,
+ hc->id);
hfcmulti_resync(hc, hc, rm);
}
} else {
if (syncmaster == hc) {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG "%s: LOST sync on card %d"
- " (id=%d)\n", __func__, hc->id + 1,
- hc->id);
+ " (id=%d)\n", __func__, hc->id + 1,
+ hc->id);
hfcmulti_resync(hc, NULL, rm);
}
}
@@ -1057,7 +1057,7 @@ release_io_hfcmulti(struct hfc_multi *hc)
if (test_bit(HFC_CHIP_PLXSD, &hc->chip) && hc->plx_membase) {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG "%s: release PLXSD card %d\n",
- __func__, hc->id + 1);
+ __func__, hc->id + 1);
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
writel(PLX_GPIOC_INIT, plx_acc_32);
@@ -1073,7 +1073,7 @@ release_io_hfcmulti(struct hfc_multi *hc)
writel(pv, plx_acc_32);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: PCM off: PLX_GPIO=%x\n",
- __func__, pv);
+ __func__, pv);
spin_unlock_irqrestore(&plx_lock, plx_flags);
}
@@ -1131,22 +1131,22 @@ init_chip(struct hfc_multi *hc)
}
rev = HFC_inb(hc, R_CHIP_RV);
printk(KERN_INFO
- "HFC_multi: detected HFC with chip ID=0x%lx revision=%ld%s\n",
- val, rev, (rev == 0 && (hc->ctype != HFC_TYPE_XHFC)) ?
- " (old FIFO handling)" : "");
+ "HFC_multi: detected HFC with chip ID=0x%lx revision=%ld%s\n",
+ val, rev, (rev == 0 && (hc->ctype != HFC_TYPE_XHFC)) ?
+ " (old FIFO handling)" : "");
if (hc->ctype != HFC_TYPE_XHFC && rev == 0) {
test_and_set_bit(HFC_CHIP_REVISION0, &hc->chip);
printk(KERN_WARNING
- "HFC_multi: NOTE: Your chip is revision 0, "
- "ask Cologne Chip for update. Newer chips "
- "have a better FIFO handling. Old chips "
- "still work but may have slightly lower "
- "HDLC transmit performance.\n");
+ "HFC_multi: NOTE: Your chip is revision 0, "
+ "ask Cologne Chip for update. Newer chips "
+ "have a better FIFO handling. Old chips "
+ "still work but may have slightly lower "
+ "HDLC transmit performance.\n");
}
if (rev > 1) {
printk(KERN_WARNING "HFC_multi: WARNING: This driver doesn't "
- "consider chip revision = %ld. The chip / "
- "bridge may not work.\n", rev);
+ "consider chip revision = %ld. The chip / "
+ "bridge may not work.\n", rev);
}
/* set s-ram size */
@@ -1157,7 +1157,7 @@ init_chip(struct hfc_multi *hc)
if (test_bit(HFC_CHIP_EXRAM_128, &hc->chip)) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: changing to 128K extenal RAM\n",
- __func__);
+ __func__);
hc->hw.r_ctrl |= V_EXT_RAM;
hc->hw.r_ram_sz = 1;
hc->Flen = 0x20;
@@ -1168,7 +1168,7 @@ init_chip(struct hfc_multi *hc)
if (test_bit(HFC_CHIP_EXRAM_512, &hc->chip)) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: changing to 512K extenal RAM\n",
- __func__);
+ __func__);
hc->hw.r_ctrl |= V_EXT_RAM;
hc->hw.r_ram_sz = 2;
hc->Flen = 0x20;
@@ -1190,7 +1190,7 @@ init_chip(struct hfc_multi *hc)
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG "%s: initializing PLXSD card %d\n",
- __func__, hc->id + 1);
+ __func__, hc->id + 1);
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
writel(PLX_GPIOC_INIT, plx_acc_32);
@@ -1207,7 +1207,7 @@ init_chip(struct hfc_multi *hc)
spin_unlock_irqrestore(&plx_lock, plx_flags);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: slave/term: PLX_GPIO=%x\n",
- __func__, pv);
+ __func__, pv);
/*
* If we are the 3rd PLXSD card or higher, we must turn
* termination of last PLXSD card off.
@@ -1225,8 +1225,8 @@ init_chip(struct hfc_multi *hc)
if (plx_count >= 3) {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG "%s: card %d is between, so "
- "we disable termination\n",
- __func__, plx_last_hc->id + 1);
+ "we disable termination\n",
+ __func__, plx_last_hc->id + 1);
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = plx_last_hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
@@ -1235,8 +1235,8 @@ init_chip(struct hfc_multi *hc)
spin_unlock_irqrestore(&plx_lock, plx_flags);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: term off: PLX_GPIO=%x\n",
- __func__, pv);
+ "%s: term off: PLX_GPIO=%x\n",
+ __func__, pv);
}
spin_unlock_irqrestore(&HFClock, hfc_flags);
hc->hw.r_pcm_md0 = V_F0_LEN; /* shift clock for DSP */
@@ -1253,24 +1253,24 @@ init_chip(struct hfc_multi *hc)
if (test_bit(HFC_CHIP_PCM_SLAVE, &hc->chip)) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: setting PCM into slave mode\n",
- __func__);
+ __func__);
} else
- if (test_bit(HFC_CHIP_PCM_MASTER, &hc->chip) && !plxsd_master) {
- if (debug & DEBUG_HFCMULTI_INIT)
- printk(KERN_DEBUG "%s: setting PCM into master mode\n",
- __func__);
- hc->hw.r_pcm_md0 |= V_PCM_MD;
- } else {
- if (debug & DEBUG_HFCMULTI_INIT)
- printk(KERN_DEBUG "%s: performing PCM auto detect\n",
- __func__);
- }
+ if (test_bit(HFC_CHIP_PCM_MASTER, &hc->chip) && !plxsd_master) {
+ if (debug & DEBUG_HFCMULTI_INIT)
+ printk(KERN_DEBUG "%s: setting PCM into master mode\n",
+ __func__);
+ hc->hw.r_pcm_md0 |= V_PCM_MD;
+ } else {
+ if (debug & DEBUG_HFCMULTI_INIT)
+ printk(KERN_DEBUG "%s: performing PCM auto detect\n",
+ __func__);
+ }
/* soft reset */
HFC_outb(hc, R_CTRL, hc->hw.r_ctrl);
if (hc->ctype == HFC_TYPE_XHFC)
HFC_outb(hc, 0x0C /* R_FIFO_THRES */,
- 0x11 /* 16 Bytes TX/RX */);
+ 0x11 /* 16 Bytes TX/RX */);
else
HFC_outb(hc, R_RAM_SZ, hc->hw.r_ram_sz);
HFC_outb(hc, R_FIFO_MD, 0);
@@ -1298,13 +1298,13 @@ init_chip(struct hfc_multi *hc)
pv |= PLX_SYNC_O_EN;
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: master: PLX_GPIO=%x\n",
- __func__, pv);
+ __func__, pv);
} else {
pv &= ~(PLX_MASTER_EN | PLX_SLAVE_EN_N);
pv &= ~PLX_SYNC_O_EN;
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: slave: PLX_GPIO=%x\n",
- __func__, pv);
+ __func__, pv);
}
writel(pv, plx_acc_32);
spin_unlock_irqrestore(&plx_lock, plx_flags);
@@ -1338,7 +1338,7 @@ init_chip(struct hfc_multi *hc)
if (test_bit(HFC_CHIP_CLOCK2, &hc->chip)) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: setting double clock\n", __func__);
+ "%s: setting double clock\n", __func__);
HFC_outb(hc, R_BRG_PCM_CFG, V_PCM_CLK);
}
@@ -1360,48 +1360,48 @@ init_chip(struct hfc_multi *hc)
val += HFC_inb(hc, R_F0_CNTH) << 8;
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "HFC_multi F0_CNT %ld after reset\n", val);
+ "HFC_multi F0_CNT %ld after reset\n", val);
spin_unlock_irqrestore(&hc->lock, flags);
set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((HZ/100)?:1); /* Timeout minimum 10ms */
+ schedule_timeout((HZ / 100) ? : 1); /* Timeout minimum 10ms */
spin_lock_irqsave(&hc->lock, flags);
val2 = HFC_inb(hc, R_F0_CNTL);
val2 += HFC_inb(hc, R_F0_CNTH) << 8;
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "HFC_multi F0_CNT %ld after 10 ms (1st try)\n",
- val2);
- if (val2 >= val+8) { /* 1 ms */
+ "HFC_multi F0_CNT %ld after 10 ms (1st try)\n",
+ val2);
+ if (val2 >= val + 8) { /* 1 ms */
/* it counts, so we keep the pcm mode */
if (test_bit(HFC_CHIP_PCM_MASTER, &hc->chip))
printk(KERN_INFO "controller is PCM bus MASTER\n");
else
- if (test_bit(HFC_CHIP_PCM_SLAVE, &hc->chip))
- printk(KERN_INFO "controller is PCM bus SLAVE\n");
- else {
- test_and_set_bit(HFC_CHIP_PCM_SLAVE, &hc->chip);
- printk(KERN_INFO "controller is PCM bus SLAVE "
- "(auto detected)\n");
- }
+ if (test_bit(HFC_CHIP_PCM_SLAVE, &hc->chip))
+ printk(KERN_INFO "controller is PCM bus SLAVE\n");
+ else {
+ test_and_set_bit(HFC_CHIP_PCM_SLAVE, &hc->chip);
+ printk(KERN_INFO "controller is PCM bus SLAVE "
+ "(auto detected)\n");
+ }
} else {
/* does not count */
if (test_bit(HFC_CHIP_PCM_MASTER, &hc->chip)) {
-controller_fail:
+ controller_fail:
printk(KERN_ERR "HFC_multi ERROR, getting no 125us "
- "pulse. Seems that controller fails.\n");
+ "pulse. Seems that controller fails.\n");
err = -EIO;
goto out;
}
if (test_bit(HFC_CHIP_PCM_SLAVE, &hc->chip)) {
printk(KERN_INFO "controller is PCM bus SLAVE "
- "(ignoring missing PCM clock)\n");
+ "(ignoring missing PCM clock)\n");
} else {
/* only one pcm master */
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)
- && plxsd_master) {
+ && plxsd_master) {
printk(KERN_ERR "HFC_multi ERROR, no clock "
- "on another Speech Design card found. "
- "Please be sure to connect PCM cable.\n");
+ "on another Speech Design card found. "
+ "Please be sure to connect PCM cable.\n");
err = -EIO;
goto out;
}
@@ -1416,24 +1416,24 @@ controller_fail:
spin_unlock_irqrestore(&plx_lock, plx_flags);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: master: "
- "PLX_GPIO=%x\n", __func__, pv);
+ "PLX_GPIO=%x\n", __func__, pv);
}
hc->hw.r_pcm_md0 |= V_PCM_MD;
HFC_outb(hc, R_PCM_MD0, hc->hw.r_pcm_md0 | 0x00);
spin_unlock_irqrestore(&hc->lock, flags);
set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((HZ/100)?:1); /* Timeout min. 10ms */
+ schedule_timeout((HZ / 100) ?: 1); /* Timeout min. 10ms */
spin_lock_irqsave(&hc->lock, flags);
val2 = HFC_inb(hc, R_F0_CNTL);
val2 += HFC_inb(hc, R_F0_CNTH) << 8;
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "HFC_multi F0_CNT %ld after "
- "10 ms (2nd try)\n", val2);
- if (val2 >= val+8) { /* 1 ms */
+ "10 ms (2nd try)\n", val2);
+ if (val2 >= val + 8) { /* 1 ms */
test_and_set_bit(HFC_CHIP_PCM_MASTER,
- &hc->chip);
+ &hc->chip);
printk(KERN_INFO "controller is PCM bus MASTER "
- "(auto detected)\n");
+ "(auto detected)\n");
} else
goto controller_fail;
}
@@ -1451,21 +1451,21 @@ controller_fail:
spin_unlock_irqrestore(&plx_lock, plx_flags);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: reset off: PLX_GPIO=%x\n",
- __func__, pv);
+ __func__, pv);
}
/* pcm id */
if (hc->pcm)
printk(KERN_INFO "controller has given PCM BUS ID %d\n",
- hc->pcm);
+ hc->pcm);
else {
if (test_bit(HFC_CHIP_PCM_MASTER, &hc->chip)
- || test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
+ || test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
PCM_cnt++; /* SD has proprietary bridging */
}
hc->pcm = PCM_cnt;
printk(KERN_INFO "controller has PCM BUS ID %d "
- "(auto selected)\n", hc->pcm);
+ "(auto selected)\n", hc->pcm);
}
/* set up timer */
@@ -1480,7 +1480,7 @@ controller_fail:
if (test_bit(HFC_CHIP_DTMF, &hc->chip)) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: enabling DTMF detection "
- "for all B-channel\n", __func__);
+ "for all B-channel\n", __func__);
hc->hw.r_dtmf = V_DTMF_EN | V_DTMF_STOP;
if (test_bit(HFC_CHIP_ULAW, &hc->chip))
hc->hw.r_dtmf |= V_ULAW_SEL;
@@ -1527,8 +1527,8 @@ controller_fail:
if (hc->masterclk >= 0) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: setting ST master clock "
- "to port %d (0..%d)\n",
- __func__, hc->masterclk, hc->ports-1);
+ "to port %d (0..%d)\n",
+ __func__, hc->masterclk, hc->ports - 1);
hc->hw.r_st_sync |= (hc->masterclk | V_AUTO_SYNC);
HFC_outb(hc, R_ST_SYNC, hc->hw.r_st_sync);
}
@@ -1539,7 +1539,7 @@ controller_fail:
HFC_outb(hc, R_IRQMSK_MISC, hc->hw.r_irqmsk_misc);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "r_irqmsk_misc.2: 0x%x\n",
- hc->hw.r_irqmsk_misc);
+ hc->hw.r_irqmsk_misc);
/* RAM access test */
HFC_outb(hc, R_RAM_ADDR0, 0);
@@ -1547,7 +1547,7 @@ controller_fail:
HFC_outb(hc, R_RAM_ADDR2, 0);
for (i = 0; i < 256; i++) {
HFC_outb_nodebug(hc, R_RAM_ADDR0, i);
- HFC_outb_nodebug(hc, R_RAM_DATA, ((i*3)&0xff));
+ HFC_outb_nodebug(hc, R_RAM_DATA, ((i * 3) & 0xff));
}
for (i = 0; i < 256; i++) {
HFC_outb_nodebug(hc, R_RAM_ADDR0, i);
@@ -1555,8 +1555,8 @@ controller_fail:
rval = HFC_inb_nodebug(hc, R_INT_DATA);
if (rval != ((i * 3) & 0xff)) {
printk(KERN_DEBUG
- "addr:%x val:%x should:%x\n", i, rval,
- (i * 3) & 0xff);
+ "addr:%x val:%x should:%x\n", i, rval,
+ (i * 3) & 0xff);
err++;
}
}
@@ -1585,9 +1585,9 @@ hfcmulti_watchdog(struct hfc_multi *hc)
if (hc->wdcount > 10) {
hc->wdcount = 0;
hc->wdbyte = hc->wdbyte == V_GPIO_OUT2 ?
- V_GPIO_OUT3 : V_GPIO_OUT2;
+ V_GPIO_OUT3 : V_GPIO_OUT2;
- /* printk("Sending Watchdog Kill %x\n",hc->wdbyte); */
+ /* printk("Sending Watchdog Kill %x\n",hc->wdbyte); */
HFC_outb(hc, R_GPIO_EN0, V_GPIO_EN2 | V_GPIO_EN3);
HFC_outb(hc, R_GPIO_OUT0, hc->wdbyte);
}
@@ -1623,10 +1623,10 @@ hfcmulti_leds(struct hfc_multi *hc)
*/
if (hc->chan[hc->dslot].sync != 2) { /* no frame sync */
if (hc->chan[hc->dslot].dch->dev.D.protocol
- != ISDN_P_NT_E1) {
+ != ISDN_P_NT_E1) {
led[0] = 1;
led[1] = 1;
- } else if (hc->ledcount>>11) {
+ } else if (hc->ledcount >> 11) {
led[0] = 1;
led[1] = 1;
} else {
@@ -1643,7 +1643,7 @@ hfcmulti_leds(struct hfc_multi *hc)
led[3] = 1;
}
leds = (led[0] | (led[1]<<2) | (led[2]<<1) | (led[3]<<3))^0xF;
- /* leds are inverted */
+ /* leds are inverted */
if (leds != (int)hc->ledstate) {
HFC_outb_nodebug(hc, R_GPIO_OUT1, leds);
hc->ledstate = leds;
@@ -1674,7 +1674,7 @@ hfcmulti_leds(struct hfc_multi *hc)
/* TE mode: led red */
led[i] = 2;
else
- if (hc->ledcount>>11)
+ if (hc->ledcount >> 11)
/* led red */
led[i] = 2;
else
@@ -1700,9 +1700,9 @@ hfcmulti_leds(struct hfc_multi *hc)
}
} else {
leds = ((led[3] > 0) << 0) | ((led[1] > 0) << 1) |
- ((led[0] > 0) << 2) | ((led[2] > 0) << 3) |
- ((led[3] & 1) << 4) | ((led[1] & 1) << 5) |
- ((led[0] & 1) << 6) | ((led[2] & 1) << 7);
+ ((led[0] > 0) << 2) | ((led[2] > 0) << 3) |
+ ((led[3] & 1) << 4) | ((led[1] & 1) << 5) |
+ ((led[0] & 1) << 6) | ((led[2] & 1) << 7);
if (leds != (int)hc->ledstate) {
HFC_outb_nodebug(hc, R_GPIO_EN1, leds & 0x0F);
HFC_outb_nodebug(hc, R_GPIO_OUT1, leds >> 4);
@@ -1746,13 +1746,13 @@ hfcmulti_leds(struct hfc_multi *hc)
}
- leds = (led[0] > 0) | ((led[1] > 0)<<1) | ((led[0]&1)<<2)
- | ((led[1]&1)<<3);
+ leds = (led[0] > 0) | ((led[1] > 0) << 1) | ((led[0]&1) << 2)
+ | ((led[1]&1) << 3);
if (leds != (int)hc->ledstate) {
HFC_outb_nodebug(hc, R_GPIO_EN1,
- ((led[0] > 0) << 2) | ((led[1] > 0) << 3));
+ ((led[0] > 0) << 2) | ((led[1] > 0) << 3));
HFC_outb_nodebug(hc, R_GPIO_OUT1,
- ((led[0] & 1) << 2) | ((led[1] & 1) << 3));
+ ((led[0] & 1) << 2) | ((led[1] & 1) << 3));
hc->ledstate = leds;
}
break;
@@ -1784,7 +1784,7 @@ hfcmulti_leds(struct hfc_multi *hc)
leddw = lled << 24 | lled << 16 | lled << 8 | lled;
if (leddw != hc->ledstate) {
/* HFC_outb(hc, R_BRG_PCM_CFG, 1);
- HFC_outb(c, R_BRG_PCM_CFG, (0x0 << 6) | 0x3); */
+ HFC_outb(c, R_BRG_PCM_CFG, (0x0 << 6) | 0x3); */
/* was _io before */
HFC_outb_nodebug(hc, R_BRG_PCM_CFG, 1 | V_PCM_CLK);
outw(0x4000, hc->pci_iobase + 4);
@@ -1826,16 +1826,16 @@ hfcmulti_dtmf(struct hfc_multi *hc)
continue;
if (debug & DEBUG_HFCMULTI_DTMF)
printk(KERN_DEBUG "%s: dtmf channel %d:",
- __func__, ch);
+ __func__, ch);
coeff = &(hc->chan[ch].coeff[hc->chan[ch].coeff_count * 16]);
dtmf = 1;
for (co = 0; co < 8; co++) {
/* read W(n-1) coefficient */
- addr = hc->DTMFbase + ((co<<7) | (ch<<2));
+ addr = hc->DTMFbase + ((co << 7) | (ch << 2));
HFC_outb_nodebug(hc, R_RAM_ADDR0, addr);
- HFC_outb_nodebug(hc, R_RAM_ADDR1, addr>>8);
- HFC_outb_nodebug(hc, R_RAM_ADDR2, (addr>>16)
- | V_ADDR_INC);
+ HFC_outb_nodebug(hc, R_RAM_ADDR1, addr >> 8);
+ HFC_outb_nodebug(hc, R_RAM_ADDR2, (addr >> 16)
+ | V_ADDR_INC);
w_float = HFC_inb_nodebug(hc, R_RAM_DATA);
w_float |= (HFC_inb_nodebug(hc, R_RAM_DATA) << 8);
if (debug & DEBUG_HFCMULTI_DTMF)
@@ -1845,14 +1845,14 @@ hfcmulti_dtmf(struct hfc_multi *hc)
mantissa = w_float & 0x0fff;
if (w_float & 0x8000)
mantissa |= 0xfffff000;
- exponent = (w_float>>12) & 0x7;
+ exponent = (w_float >> 12) & 0x7;
if (exponent) {
mantissa ^= 0x1000;
- mantissa <<= (exponent-1);
+ mantissa <<= (exponent - 1);
}
/* store coefficient */
- coeff[co<<1] = mantissa;
+ coeff[co << 1] = mantissa;
/* read W(n) coefficient */
w_float = HFC_inb_nodebug(hc, R_RAM_DATA);
@@ -1864,27 +1864,27 @@ hfcmulti_dtmf(struct hfc_multi *hc)
mantissa = w_float & 0x0fff;
if (w_float & 0x8000)
mantissa |= 0xfffff000;
- exponent = (w_float>>12) & 0x7;
+ exponent = (w_float >> 12) & 0x7;
if (exponent) {
mantissa ^= 0x1000;
- mantissa <<= (exponent-1);
+ mantissa <<= (exponent - 1);
}
/* store coefficient */
- coeff[(co<<1)|1] = mantissa;
+ coeff[(co << 1) | 1] = mantissa;
}
if (debug & DEBUG_HFCMULTI_DTMF)
printk(" DTMF ready %08x %08x %08x %08x "
- "%08x %08x %08x %08x\n",
- coeff[0], coeff[1], coeff[2], coeff[3],
- coeff[4], coeff[5], coeff[6], coeff[7]);
+ "%08x %08x %08x %08x\n",
+ coeff[0], coeff[1], coeff[2], coeff[3],
+ coeff[4], coeff[5], coeff[6], coeff[7]);
hc->chan[ch].coeff_count++;
if (hc->chan[ch].coeff_count == 8) {
hc->chan[ch].coeff_count = 0;
skb = mI_alloc_skb(512, GFP_ATOMIC);
if (!skb) {
printk(KERN_DEBUG "%s: No memory for skb\n",
- __func__);
+ __func__);
continue;
}
hh = mISDN_HEAD_P(skb);
@@ -1966,8 +1966,8 @@ next_frame:
while (f2 != (temp = HFC_inb_nodebug(hc, A_F2))) {
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG
- "%s(card %d): reread f2 because %d!=%d\n",
- __func__, hc->id + 1, temp, f2);
+ "%s(card %d): reread f2 because %d!=%d\n",
+ __func__, hc->id + 1, temp, f2);
f2 = temp; /* repeat until F2 is equal */
}
Fspace = f2 - f1 - 1;
@@ -1999,7 +1999,7 @@ next_frame:
while (z2 != (temp = (HFC_inw_nodebug(hc, A_Z2) - hc->Zmin))) {
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG "%s(card %d): reread z2 because "
- "%d!=%d\n", __func__, hc->id + 1, temp, z2);
+ "%d!=%d\n", __func__, hc->id + 1, temp, z2);
z2 = temp; /* repeat unti Z2 is equal */
}
hc->chan[ch].Zfill = z1 - z2;
@@ -2023,28 +2023,28 @@ next_frame:
*txpending && slot_tx >= 0) {
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG
- "%s: reconnecting PCM due to no "
- "more FIFO data: channel %d "
- "slot_tx %d\n",
- __func__, ch, slot_tx);
+ "%s: reconnecting PCM due to no "
+ "more FIFO data: channel %d "
+ "slot_tx %d\n",
+ __func__, ch, slot_tx);
/* connect slot */
if (hc->ctype == HFC_TYPE_XHFC)
HFC_outb(hc, A_CON_HDLC, 0xc0
- | 0x07 << 2 | V_HDLC_TRP | V_IFF);
- /* Enable FIFO, no interrupt */
+ | 0x07 << 2 | V_HDLC_TRP | V_IFF);
+ /* Enable FIFO, no interrupt */
else
HFC_outb(hc, A_CON_HDLC, 0xc0 | 0x00 |
- V_HDLC_TRP | V_IFF);
- HFC_outb_nodebug(hc, R_FIFO, ch<<1 | 1);
+ V_HDLC_TRP | V_IFF);
+ HFC_outb_nodebug(hc, R_FIFO, ch << 1 | 1);
HFC_wait_nodebug(hc);
if (hc->ctype == HFC_TYPE_XHFC)
HFC_outb(hc, A_CON_HDLC, 0xc0
- | 0x07 << 2 | V_HDLC_TRP | V_IFF);
- /* Enable FIFO, no interrupt */
+ | 0x07 << 2 | V_HDLC_TRP | V_IFF);
+ /* Enable FIFO, no interrupt */
else
HFC_outb(hc, A_CON_HDLC, 0xc0 | 0x00 |
- V_HDLC_TRP | V_IFF);
- HFC_outb_nodebug(hc, R_FIFO, ch<<1);
+ V_HDLC_TRP | V_IFF);
+ HFC_outb_nodebug(hc, R_FIFO, ch << 1);
HFC_wait_nodebug(hc);
}
*txpending = 0;
@@ -2054,10 +2054,10 @@ next_frame:
/* "fill fifo if empty" feature */
if (bch && test_bit(FLG_FILLEMPTY, &bch->Flags)
- && !test_bit(FLG_HDLC, &bch->Flags) && z2 == z1) {
+ && !test_bit(FLG_HDLC, &bch->Flags) && z2 == z1) {
if (debug & DEBUG_HFCMULTI_FILL)
printk(KERN_DEBUG "%s: buffer empty, so we have "
- "underrun\n", __func__);
+ "underrun\n", __func__);
/* fill buffer, to prevent future underrun */
hc->write_fifo(hc, hc->silence_data, poll >> 1);
Zspace -= (poll >> 1);
@@ -2065,29 +2065,29 @@ next_frame:
/* if audio data and connected slot */
if (bch && (!test_bit(FLG_HDLC, &bch->Flags)) && (!*txpending)
- && slot_tx >= 0) {
+ && slot_tx >= 0) {
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG "%s: disconnecting PCM due to "
- "FIFO data: channel %d slot_tx %d\n",
- __func__, ch, slot_tx);
+ "FIFO data: channel %d slot_tx %d\n",
+ __func__, ch, slot_tx);
/* disconnect slot */
if (hc->ctype == HFC_TYPE_XHFC)
HFC_outb(hc, A_CON_HDLC, 0x80
- | 0x07 << 2 | V_HDLC_TRP | V_IFF);
- /* Enable FIFO, no interrupt */
+ | 0x07 << 2 | V_HDLC_TRP | V_IFF);
+ /* Enable FIFO, no interrupt */
else
HFC_outb(hc, A_CON_HDLC, 0x80 | 0x00 |
- V_HDLC_TRP | V_IFF);
- HFC_outb_nodebug(hc, R_FIFO, ch<<1 | 1);
+ V_HDLC_TRP | V_IFF);
+ HFC_outb_nodebug(hc, R_FIFO, ch << 1 | 1);
HFC_wait_nodebug(hc);
if (hc->ctype == HFC_TYPE_XHFC)
HFC_outb(hc, A_CON_HDLC, 0x80
- | 0x07 << 2 | V_HDLC_TRP | V_IFF);
- /* Enable FIFO, no interrupt */
+ | 0x07 << 2 | V_HDLC_TRP | V_IFF);
+ /* Enable FIFO, no interrupt */
else
HFC_outb(hc, A_CON_HDLC, 0x80 | 0x00 |
- V_HDLC_TRP | V_IFF);
- HFC_outb_nodebug(hc, R_FIFO, ch<<1);
+ V_HDLC_TRP | V_IFF);
+ HFC_outb_nodebug(hc, R_FIFO, ch << 1);
HFC_wait_nodebug(hc);
}
*txpending = 1;
@@ -2107,9 +2107,9 @@ next_frame:
ii = Zspace + i;
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG "%s(card %d): fifo(%d) has %d bytes space "
- "left (z1=%04x, z2=%04x) sending %d of %d bytes %s\n",
- __func__, hc->id + 1, ch, Zspace, z1, z2, ii-i, len-i,
- temp ? "HDLC" : "TRANS");
+ "left (z1=%04x, z2=%04x) sending %d of %d bytes %s\n",
+ __func__, hc->id + 1, ch, Zspace, z1, z2, ii-i, len-i,
+ temp ? "HDLC" : "TRANS");
/* Have to prep the audio data */
hc->write_fifo(hc, d, ii - i);
@@ -2189,9 +2189,9 @@ next_frame:
(hc->chan[ch].protocol == ISDN_P_B_RAW) &&
(hc->chan[ch].slot_rx < 0) &&
(hc->chan[ch].slot_tx < 0))
- HFC_outb_nodebug(hc, R_FIFO, 0x20 | (ch<<1) | 1);
+ HFC_outb_nodebug(hc, R_FIFO, 0x20 | (ch << 1) | 1);
else
- HFC_outb_nodebug(hc, R_FIFO, (ch<<1)|1);
+ HFC_outb_nodebug(hc, R_FIFO, (ch << 1) | 1);
HFC_wait_nodebug(hc);
/* ignore if rx is off BUT change fifo (above) to start pending TX */
@@ -2203,8 +2203,8 @@ next_frame:
while (f1 != (temp = HFC_inb_nodebug(hc, A_F1))) {
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG
- "%s(card %d): reread f1 because %d!=%d\n",
- __func__, hc->id + 1, temp, f1);
+ "%s(card %d): reread f1 because %d!=%d\n",
+ __func__, hc->id + 1, temp, f1);
f1 = temp; /* repeat until F1 is equal */
}
f2 = HFC_inb_nodebug(hc, A_F2);
@@ -2213,7 +2213,7 @@ next_frame:
while (z1 != (temp = (HFC_inw_nodebug(hc, A_Z1) - hc->Zmin))) {
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG "%s(card %d): reread z2 because "
- "%d!=%d\n", __func__, hc->id + 1, temp, z2);
+ "%d!=%d\n", __func__, hc->id + 1, temp, z2);
z1 = temp; /* repeat until Z1 is equal */
}
z2 = HFC_inw_nodebug(hc, A_Z2) - hc->Zmin;
@@ -2231,7 +2231,7 @@ next_frame:
*sp = mI_alloc_skb(maxlen + 3, GFP_ATOMIC);
if (*sp == NULL) {
printk(KERN_DEBUG "%s: No mem for rx_skb\n",
- __func__);
+ __func__);
return;
}
}
@@ -2242,16 +2242,16 @@ next_frame:
if (dch || test_bit(FLG_HDLC, &bch->Flags)) {
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG "%s(card %d): fifo(%d) reading %d "
- "bytes (z1=%04x, z2=%04x) HDLC %s (f1=%d, f2=%d) "
- "got=%d (again %d)\n", __func__, hc->id + 1, ch,
- Zsize, z1, z2, (f1 == f2) ? "fragment" : "COMPLETE",
- f1, f2, Zsize + (*sp)->len, again);
+ "bytes (z1=%04x, z2=%04x) HDLC %s (f1=%d, f2=%d) "
+ "got=%d (again %d)\n", __func__, hc->id + 1, ch,
+ Zsize, z1, z2, (f1 == f2) ? "fragment" : "COMPLETE",
+ f1, f2, Zsize + (*sp)->len, again);
/* HDLC */
if ((Zsize + (*sp)->len) > (maxlen + 3)) {
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG
- "%s(card %d): hdlc-frame too large.\n",
- __func__, hc->id + 1);
+ "%s(card %d): hdlc-frame too large.\n",
+ __func__, hc->id + 1);
skb_trim(*sp, 0);
HFC_outb_nodebug(hc, R_INC_RES_FIFO, V_RES_F);
HFC_wait_nodebug(hc);
@@ -2268,8 +2268,8 @@ next_frame:
if ((*sp)->len < 4) {
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG
- "%s(card %d): Frame below minimum "
- "size\n", __func__, hc->id + 1);
+ "%s(card %d): Frame below minimum "
+ "size\n", __func__, hc->id + 1);
skb_trim(*sp, 0);
goto next_frame;
}
@@ -2277,7 +2277,7 @@ next_frame:
if ((*sp)->data[(*sp)->len - 1]) {
if (debug & DEBUG_HFCMULTI_CRC)
printk(KERN_DEBUG
- "%s: CRC-error\n", __func__);
+ "%s: CRC-error\n", __func__);
skb_trim(*sp, 0);
goto next_frame;
}
@@ -2287,11 +2287,11 @@ next_frame:
*sp = mI_alloc_skb(skb->len, GFP_ATOMIC);
if (*sp) {
memcpy(skb_put(*sp, skb->len),
- skb->data, skb->len);
+ skb->data, skb->len);
skb_trim(skb, 0);
} else {
printk(KERN_DEBUG "%s: No mem\n",
- __func__);
+ __func__);
*sp = skb;
skb = NULL;
}
@@ -2300,7 +2300,7 @@ next_frame:
}
if (debug & DEBUG_HFCMULTI_FIFO) {
printk(KERN_DEBUG "%s(card %d):",
- __func__, hc->id + 1);
+ __func__, hc->id + 1);
temp = 0;
while (temp < (*sp)->len)
printk(" %02x", (*sp)->data[temp++]);
@@ -2325,7 +2325,7 @@ next_frame:
*sp = mI_alloc_skb(skb->len, GFP_ATOMIC);
if (*sp) {
memcpy(skb_put(*sp, skb->len),
- skb->data, skb->len);
+ skb->data, skb->len);
skb_trim(skb, 0);
} else {
printk(KERN_DEBUG "%s: No mem\n", __func__);
@@ -2337,9 +2337,9 @@ next_frame:
}
if (debug & DEBUG_HFCMULTI_FIFO)
printk(KERN_DEBUG
- "%s(card %d): fifo(%d) reading %d bytes "
- "(z1=%04x, z2=%04x) TRANS\n",
- __func__, hc->id + 1, ch, Zsize, z1, z2);
+ "%s(card %d): fifo(%d) reading %d bytes "
+ "(z1=%04x, z2=%04x) TRANS\n",
+ __func__, hc->id + 1, ch, Zsize, z1, z2);
/* only bch is transparent */
recv_Bchannel(bch, hc->chan[ch].Zfill);
*sp = skb;
@@ -2362,7 +2362,7 @@ signal_state_up(struct dchannel *dch, int info, char *msg)
id = TEI_SAPI | (GROUP_TEI << 8); /* manager address */
skb = _alloc_mISDN_skb(MPH_INFORMATION_IND, id, sizeof(data), &data,
- GFP_ATOMIC);
+ GFP_ATOMIC);
if (!skb)
return;
recv_Dchannel_skb(dch, skb);
@@ -2395,10 +2395,10 @@ handle_timer_irq(struct hfc_multi *hc)
if (hc->e1_resync & 4) {
if (debug & DEBUG_HFCMULTI_PLXSD)
printk(KERN_DEBUG
- "Enable QUARTZ for HFC-E1\n");
+ "Enable QUARTZ for HFC-E1\n");
/* set jatt to quartz */
HFC_outb(hc, R_SYNC_CTRL, V_EXT_CLK_SYNC
- | V_JATT_OFF);
+ | V_JATT_OFF);
/* switch to JATT, in case it is not already */
HFC_outb(hc, R_SYNC_OUT, 0);
}
@@ -2417,14 +2417,14 @@ handle_timer_irq(struct hfc_multi *hc)
dch = hc->chan[ch].dch;
if (!(--hc->chan[ch].nt_timer)) {
schedule_event(dch,
- FLG_PHCHANGE);
+ FLG_PHCHANGE);
if (debug &
DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG
- "%s: nt_timer at "
- "state %x\n",
- __func__,
- dch->state);
+ "%s: nt_timer at "
+ "state %x\n",
+ __func__,
+ dch->state);
}
}
}
@@ -2436,10 +2436,10 @@ handle_timer_irq(struct hfc_multi *hc)
temp = HFC_inb_nodebug(hc, R_SYNC_STA) & V_SIG_LOS;
if (!temp && hc->chan[hc->dslot].los)
signal_state_up(dch, L1_SIGNAL_LOS_ON,
- "LOS detected");
+ "LOS detected");
if (temp && !hc->chan[hc->dslot].los)
signal_state_up(dch, L1_SIGNAL_LOS_OFF,
- "LOS gone");
+ "LOS gone");
hc->chan[hc->dslot].los = temp;
}
if (test_bit(HFC_CFG_REPORT_AIS, &hc->chan[hc->dslot].cfg)) {
@@ -2447,10 +2447,10 @@ handle_timer_irq(struct hfc_multi *hc)
temp = HFC_inb_nodebug(hc, R_SYNC_STA) & V_AIS;
if (!temp && hc->chan[hc->dslot].ais)
signal_state_up(dch, L1_SIGNAL_AIS_ON,
- "AIS detected");
+ "AIS detected");
if (temp && !hc->chan[hc->dslot].ais)
signal_state_up(dch, L1_SIGNAL_AIS_OFF,
- "AIS gone");
+ "AIS gone");
hc->chan[hc->dslot].ais = temp;
}
if (test_bit(HFC_CFG_REPORT_SLIP, &hc->chan[hc->dslot].cfg)) {
@@ -2458,12 +2458,12 @@ handle_timer_irq(struct hfc_multi *hc)
temp = HFC_inb_nodebug(hc, R_SLIP) & V_FOSLIP_RX;
if (!temp && hc->chan[hc->dslot].slip_rx)
signal_state_up(dch, L1_SIGNAL_SLIP_RX,
- " bit SLIP detected RX");
+ " bit SLIP detected RX");
hc->chan[hc->dslot].slip_rx = temp;
temp = HFC_inb_nodebug(hc, R_SLIP) & V_FOSLIP_TX;
if (!temp && hc->chan[hc->dslot].slip_tx)
signal_state_up(dch, L1_SIGNAL_SLIP_TX,
- " bit SLIP detected TX");
+ " bit SLIP detected TX");
hc->chan[hc->dslot].slip_tx = temp;
}
if (test_bit(HFC_CFG_REPORT_RDI, &hc->chan[hc->dslot].cfg)) {
@@ -2471,10 +2471,10 @@ handle_timer_irq(struct hfc_multi *hc)
temp = HFC_inb_nodebug(hc, R_RX_SL0_0) & V_A;
if (!temp && hc->chan[hc->dslot].rdi)
signal_state_up(dch, L1_SIGNAL_RDI_ON,
- "RDI detected");
+ "RDI detected");
if (temp && !hc->chan[hc->dslot].rdi)
signal_state_up(dch, L1_SIGNAL_RDI_OFF,
- "RDI gone");
+ "RDI gone");
hc->chan[hc->dslot].rdi = temp;
}
temp = HFC_inb_nodebug(hc, R_JATT_DIR);
@@ -2483,13 +2483,13 @@ handle_timer_irq(struct hfc_multi *hc)
if ((temp & 0x60) == 0x60) {
if (debug & DEBUG_HFCMULTI_SYNC)
printk(KERN_DEBUG
- "%s: (id=%d) E1 now "
- "in clock sync\n",
- __func__, hc->id);
+ "%s: (id=%d) E1 now "
+ "in clock sync\n",
+ __func__, hc->id);
HFC_outb(hc, R_RX_OFF,
- hc->chan[hc->dslot].jitter | V_RX_INIT);
+ hc->chan[hc->dslot].jitter | V_RX_INIT);
HFC_outb(hc, R_TX_OFF,
- hc->chan[hc->dslot].jitter | V_RX_INIT);
+ hc->chan[hc->dslot].jitter | V_RX_INIT);
hc->chan[hc->dslot].sync = 1;
goto check_framesync;
}
@@ -2498,20 +2498,20 @@ handle_timer_irq(struct hfc_multi *hc)
if ((temp & 0x60) != 0x60) {
if (debug & DEBUG_HFCMULTI_SYNC)
printk(KERN_DEBUG
- "%s: (id=%d) E1 "
- "lost clock sync\n",
- __func__, hc->id);
+ "%s: (id=%d) E1 "
+ "lost clock sync\n",
+ __func__, hc->id);
hc->chan[hc->dslot].sync = 0;
break;
}
-check_framesync:
+ check_framesync:
temp = HFC_inb_nodebug(hc, R_SYNC_STA);
if (temp == 0x27) {
if (debug & DEBUG_HFCMULTI_SYNC)
printk(KERN_DEBUG
- "%s: (id=%d) E1 "
- "now in frame sync\n",
- __func__, hc->id);
+ "%s: (id=%d) E1 "
+ "now in frame sync\n",
+ __func__, hc->id);
hc->chan[hc->dslot].sync = 2;
}
break;
@@ -2519,9 +2519,9 @@ check_framesync:
if ((temp & 0x60) != 0x60) {
if (debug & DEBUG_HFCMULTI_SYNC)
printk(KERN_DEBUG
- "%s: (id=%d) E1 lost "
- "clock & frame sync\n",
- __func__, hc->id);
+ "%s: (id=%d) E1 lost "
+ "clock & frame sync\n",
+ __func__, hc->id);
hc->chan[hc->dslot].sync = 0;
break;
}
@@ -2529,9 +2529,9 @@ check_framesync:
if (temp != 0x27) {
if (debug & DEBUG_HFCMULTI_SYNC)
printk(KERN_DEBUG
- "%s: (id=%d) E1 "
- "lost frame sync\n",
- __func__, hc->id);
+ "%s: (id=%d) E1 "
+ "lost frame sync\n",
+ __func__, hc->id);
hc->chan[hc->dslot].sync = 1;
}
break;
@@ -2559,30 +2559,30 @@ ph_state_irq(struct hfc_multi *hc, u_char r_irq_statech)
dch = hc->chan[ch].dch;
if (r_irq_statech & 1) {
HFC_outb_nodebug(hc, R_ST_SEL,
- hc->chan[ch].port);
+ hc->chan[ch].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
/* undocumented: status changes during read */
st_status = HFC_inb_nodebug(hc, A_ST_RD_STATE);
while (st_status != (temp =
- HFC_inb_nodebug(hc, A_ST_RD_STATE))) {
+ HFC_inb_nodebug(hc, A_ST_RD_STATE))) {
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG "%s: reread "
- "STATE because %d!=%d\n",
- __func__, temp,
- st_status);
+ "STATE because %d!=%d\n",
+ __func__, temp,
+ st_status);
st_status = temp; /* repeat */
}
/* Speech Design TE-sync indication */
if (test_bit(HFC_CHIP_PLXSD, &hc->chip) &&
- dch->dev.D.protocol == ISDN_P_TE_S0) {
+ dch->dev.D.protocol == ISDN_P_TE_S0) {
if (st_status & V_FR_SYNC_ST)
hc->syncronized |=
- (1 << hc->chan[ch].port);
+ (1 << hc->chan[ch].port);
else
hc->syncronized &=
- ~(1 << hc->chan[ch].port);
+ ~(1 << hc->chan[ch].port);
}
dch->state = st_status & 0x0f;
if (dch->dev.D.protocol == ISDN_P_NT_S0)
@@ -2591,19 +2591,19 @@ ph_state_irq(struct hfc_multi *hc, u_char r_irq_statech)
active = 7;
if (dch->state == active) {
HFC_outb_nodebug(hc, R_FIFO,
- (ch << 1) | 1);
+ (ch << 1) | 1);
HFC_wait_nodebug(hc);
HFC_outb_nodebug(hc,
- R_INC_RES_FIFO, V_RES_F);
+ R_INC_RES_FIFO, V_RES_F);
HFC_wait_nodebug(hc);
dch->tx_idx = 0;
}
schedule_event(dch, FLG_PHCHANGE);
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG
- "%s: S/T newstate %x port %d\n",
- __func__, dch->state,
- hc->chan[ch].port);
+ "%s: S/T newstate %x port %d\n",
+ __func__, dch->state,
+ hc->chan[ch].port);
}
r_irq_statech >>= 1;
}
@@ -2665,7 +2665,7 @@ hfcmulti_interrupt(int intno, void *dev_id)
{
#ifdef IRQCOUNT_DEBUG
static int iq1 = 0, iq2 = 0, iq3 = 0, iq4 = 0,
- iq5 = 0, iq6 = 0, iqcnt = 0;
+ iq5 = 0, iq6 = 0, iqcnt = 0;
#endif
struct hfc_multi *hc = dev_id;
struct dchannel *dch;
@@ -2686,7 +2686,7 @@ hfcmulti_interrupt(int intno, void *dev_id)
#ifdef IRQ_DEBUG
if (irqsem)
printk(KERN_ERR "irq for card %d during irq from "
- "card %d, this is no bug.\n", hc->id + 1, irqsem);
+ "card %d, this is no bug.\n", hc->id + 1, irqsem);
irqsem = hc->id + 1;
#endif
#ifdef CONFIG_MISDN_HFCMULTI_8xx
@@ -2719,14 +2719,14 @@ hfcmulti_interrupt(int intno, void *dev_id)
iq6++;
if (iqcnt++ > 5000) {
printk(KERN_ERR "iq1:%x iq2:%x iq3:%x iq4:%x iq5:%x iq6:%x\n",
- iq1, iq2, iq3, iq4, iq5, iq6);
+ iq1, iq2, iq3, iq4, iq5, iq6);
iqcnt = 0;
}
#endif
if (!r_irq_statech &&
!(status & (V_DTMF_STA | V_LOST_STA | V_EXT_IRQSTA |
- V_MISC_IRQSTA | V_FR_IRQSTA))) {
+ V_MISC_IRQSTA | V_FR_IRQSTA))) {
/* irq is not for us */
goto irq_notforus;
}
@@ -2751,7 +2751,7 @@ hfcmulti_interrupt(int intno, void *dev_id)
dch = hc->chan[hc->dslot].dch;
e1_syncsta = HFC_inb_nodebug(hc, R_SYNC_STA);
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)
- && hc->e1_getclock) {
+ && hc->e1_getclock) {
if (e1_syncsta & V_FR_SYNC_E1)
hc->syncronized = 1;
else
@@ -2760,12 +2760,12 @@ hfcmulti_interrupt(int intno, void *dev_id)
/* undocumented: status changes during read */
dch->state = HFC_inb_nodebug(hc, R_E1_RD_STA);
while (dch->state != (temp =
- HFC_inb_nodebug(hc, R_E1_RD_STA))) {
+ HFC_inb_nodebug(hc, R_E1_RD_STA))) {
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG "%s: reread "
- "STATE because %d!=%d\n",
- __func__, temp,
- dch->state);
+ "STATE because %d!=%d\n",
+ __func__, temp,
+ dch->state);
dch->state = temp; /* repeat */
}
dch->state = HFC_inb_nodebug(hc, R_E1_RD_STA)
@@ -2773,8 +2773,8 @@ hfcmulti_interrupt(int intno, void *dev_id)
schedule_event(dch, FLG_PHCHANGE);
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG
- "%s: E1 (id=%d) newstate %x\n",
- __func__, hc->id, dch->state);
+ "%s: E1 (id=%d) newstate %x\n",
+ __func__, hc->id, dch->state);
if (test_bit(HFC_CHIP_PLXSD, &hc->chip))
plxsd_checksync(hc, 0);
}
@@ -2792,7 +2792,7 @@ hfcmulti_interrupt(int intno, void *dev_id)
static int irq_proc_cnt;
if (!irq_proc_cnt++)
printk(KERN_DEBUG "%s: got V_IRQ_PROC -"
- " this should not happen\n", __func__);
+ " this should not happen\n", __func__);
}
}
@@ -2841,7 +2841,7 @@ hfcmulti_dbusy_timer(struct hfc_multi *hc)
*/
static int
mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
- int bank_tx, int slot_rx, int bank_rx)
+ int bank_tx, int slot_rx, int bank_rx)
{
int flow_tx = 0, flow_rx = 0, routing = 0;
int oslot_tx, oslot_rx;
@@ -2855,28 +2855,28 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG
- "%s: card %d channel %d protocol %x slot old=%d new=%d "
- "bank new=%d (TX) slot old=%d new=%d bank new=%d (RX)\n",
- __func__, hc->id, ch, protocol, oslot_tx, slot_tx,
- bank_tx, oslot_rx, slot_rx, bank_rx);
+ "%s: card %d channel %d protocol %x slot old=%d new=%d "
+ "bank new=%d (TX) slot old=%d new=%d bank new=%d (RX)\n",
+ __func__, hc->id, ch, protocol, oslot_tx, slot_tx,
+ bank_tx, oslot_rx, slot_rx, bank_rx);
if (oslot_tx >= 0 && slot_tx != oslot_tx) {
/* remove from slot */
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG "%s: remove from slot %d (TX)\n",
- __func__, oslot_tx);
- if (hc->slot_owner[oslot_tx<<1] == ch) {
+ __func__, oslot_tx);
+ if (hc->slot_owner[oslot_tx << 1] == ch) {
HFC_outb(hc, R_SLOT, oslot_tx << 1);
HFC_outb(hc, A_SL_CFG, 0);
if (hc->ctype != HFC_TYPE_XHFC)
HFC_outb(hc, A_CONF, 0);
- hc->slot_owner[oslot_tx<<1] = -1;
+ hc->slot_owner[oslot_tx << 1] = -1;
} else {
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG
- "%s: we are not owner of this tx slot "
- "anymore, channel %d is.\n",
- __func__, hc->slot_owner[oslot_tx<<1]);
+ "%s: we are not owner of this tx slot "
+ "anymore, channel %d is.\n",
+ __func__, hc->slot_owner[oslot_tx << 1]);
}
}
@@ -2884,8 +2884,8 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
/* remove from slot */
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG
- "%s: remove from slot %d (RX)\n",
- __func__, oslot_rx);
+ "%s: remove from slot %d (RX)\n",
+ __func__, oslot_rx);
if (hc->slot_owner[(oslot_rx << 1) | 1] == ch) {
HFC_outb(hc, R_SLOT, (oslot_rx << 1) | V_SL_DIR);
HFC_outb(hc, A_SL_CFG, 0);
@@ -2893,10 +2893,10 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
} else {
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG
- "%s: we are not owner of this rx slot "
- "anymore, channel %d is.\n",
- __func__,
- hc->slot_owner[(oslot_rx << 1) | 1]);
+ "%s: we are not owner of this rx slot "
+ "anymore, channel %d is.\n",
+ __func__,
+ hc->slot_owner[(oslot_rx << 1) | 1]);
}
}
@@ -2917,14 +2917,14 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
routing = 0x40; /* loop */
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG "%s: put channel %d to slot %d bank"
- " %d flow %02x routing %02x conf %d (TX)\n",
- __func__, ch, slot_tx, bank_tx,
- flow_tx, routing, conf);
+ " %d flow %02x routing %02x conf %d (TX)\n",
+ __func__, ch, slot_tx, bank_tx,
+ flow_tx, routing, conf);
HFC_outb(hc, R_SLOT, slot_tx << 1);
- HFC_outb(hc, A_SL_CFG, (ch<<1) | routing);
+ HFC_outb(hc, A_SL_CFG, (ch << 1) | routing);
if (hc->ctype != HFC_TYPE_XHFC)
HFC_outb(hc, A_CONF,
- (conf < 0) ? 0 : (conf | V_CONF_SL));
+ (conf < 0) ? 0 : (conf | V_CONF_SL));
hc->slot_owner[slot_tx << 1] = ch;
hc->chan[ch].slot_tx = slot_tx;
hc->chan[ch].bank_tx = bank_tx;
@@ -2946,12 +2946,12 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
routing = 0x40; /* loop */
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG "%s: put channel %d to slot %d bank"
- " %d flow %02x routing %02x conf %d (RX)\n",
- __func__, ch, slot_rx, bank_rx,
- flow_rx, routing, conf);
- HFC_outb(hc, R_SLOT, (slot_rx<<1) | V_SL_DIR);
- HFC_outb(hc, A_SL_CFG, (ch<<1) | V_CH_DIR | routing);
- hc->slot_owner[(slot_rx<<1)|1] = ch;
+ " %d flow %02x routing %02x conf %d (RX)\n",
+ __func__, ch, slot_rx, bank_rx,
+ flow_rx, routing, conf);
+ HFC_outb(hc, R_SLOT, (slot_rx << 1) | V_SL_DIR);
+ HFC_outb(hc, A_SL_CFG, (ch << 1) | V_CH_DIR | routing);
+ hc->slot_owner[(slot_rx << 1) | 1] = ch;
hc->chan[ch].slot_rx = slot_rx;
hc->chan[ch].bank_rx = bank_rx;
}
@@ -2967,7 +2967,7 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
HFC_outb(hc, R_INC_RES_FIFO, V_RES_F);
HFC_wait(hc);
/* disable RX fifo */
- HFC_outb(hc, R_FIFO, (ch<<1)|1);
+ HFC_outb(hc, R_FIFO, (ch << 1) | 1);
HFC_wait(hc);
HFC_outb(hc, A_CON_HDLC, flow_rx | 0x00);
HFC_outb(hc, A_SUBCH_CFG, 0);
@@ -2976,17 +2976,17 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
HFC_wait(hc);
if (hc->chan[ch].bch && hc->ctype != HFC_TYPE_E1) {
hc->hw.a_st_ctrl0[hc->chan[ch].port] &=
- ((ch & 0x3) == 0) ? ~V_B1_EN : ~V_B2_EN;
+ ((ch & 0x3) == 0) ? ~V_B1_EN : ~V_B2_EN;
HFC_outb(hc, R_ST_SEL, hc->chan[ch].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
HFC_outb(hc, A_ST_CTRL0,
- hc->hw.a_st_ctrl0[hc->chan[ch].port]);
+ hc->hw.a_st_ctrl0[hc->chan[ch].port]);
}
if (hc->chan[ch].bch) {
test_and_clear_bit(FLG_HDLC, &hc->chan[ch].bch->Flags);
test_and_clear_bit(FLG_TRANSPARENT,
- &hc->chan[ch].bch->Flags);
+ &hc->chan[ch].bch->Flags);
}
break;
case (ISDN_P_B_RAW): /* B-channel */
@@ -2996,20 +2996,20 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
(hc->chan[ch].slot_tx < 0)) {
printk(KERN_DEBUG
- "Setting B-channel %d to echo cancelable "
- "state on PCM slot %d\n", ch,
- ((ch / 4) * 8) + ((ch % 4) * 4) + 1);
+ "Setting B-channel %d to echo cancelable "
+ "state on PCM slot %d\n", ch,
+ ((ch / 4) * 8) + ((ch % 4) * 4) + 1);
printk(KERN_DEBUG
- "Enabling pass through for channel\n");
+ "Enabling pass through for channel\n");
vpm_out(hc, ch, ((ch / 4) * 8) +
- ((ch % 4) * 4) + 1, 0x01);
+ ((ch % 4) * 4) + 1, 0x01);
/* rx path */
/* S/T -> PCM */
HFC_outb(hc, R_FIFO, (ch << 1));
HFC_wait(hc);
HFC_outb(hc, A_CON_HDLC, 0xc0 | V_HDLC_TRP | V_IFF);
HFC_outb(hc, R_SLOT, (((ch / 4) * 8) +
- ((ch % 4) * 4) + 1) << 1);
+ ((ch % 4) * 4) + 1) << 1);
HFC_outb(hc, A_SL_CFG, 0x80 | (ch << 1));
/* PCM -> FIFO */
@@ -3021,7 +3021,7 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
HFC_outb(hc, R_INC_RES_FIFO, V_RES_F);
HFC_wait(hc);
HFC_outb(hc, R_SLOT, ((((ch / 4) * 8) +
- ((ch % 4) * 4) + 1) << 1) | 1);
+ ((ch % 4) * 4) + 1) << 1) | 1);
HFC_outb(hc, A_SL_CFG, 0x80 | 0x20 | (ch << 1) | 1);
/* tx path */
@@ -3030,7 +3030,7 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
HFC_wait(hc);
HFC_outb(hc, A_CON_HDLC, 0xc0 | V_HDLC_TRP | V_IFF);
HFC_outb(hc, R_SLOT, ((((ch / 4) * 8) +
- ((ch % 4) * 4)) << 1) | 1);
+ ((ch % 4) * 4)) << 1) | 1);
HFC_outb(hc, A_SL_CFG, 0x80 | 0x40 | (ch << 1) | 1);
/* FIFO -> PCM */
@@ -3044,7 +3044,7 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
/* tx silence */
HFC_outb_nodebug(hc, A_FIFO_DATA0_NOINC, hc->silence);
HFC_outb(hc, R_SLOT, (((ch / 4) * 8) +
- ((ch % 4) * 4)) << 1);
+ ((ch % 4) * 4)) << 1);
HFC_outb(hc, A_SL_CFG, 0x80 | 0x20 | (ch << 1));
} else {
/* enable TX fifo */
@@ -3052,11 +3052,11 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
HFC_wait(hc);
if (hc->ctype == HFC_TYPE_XHFC)
HFC_outb(hc, A_CON_HDLC, flow_tx | 0x07 << 2 |
- V_HDLC_TRP | V_IFF);
- /* Enable FIFO, no interrupt */
+ V_HDLC_TRP | V_IFF);
+ /* Enable FIFO, no interrupt */
else
HFC_outb(hc, A_CON_HDLC, flow_tx | 0x00 |
- V_HDLC_TRP | V_IFF);
+ V_HDLC_TRP | V_IFF);
HFC_outb(hc, A_SUBCH_CFG, 0);
HFC_outb(hc, A_IRQ_MSK, 0);
HFC_outb(hc, R_INC_RES_FIFO, V_RES_F);
@@ -3064,15 +3064,15 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
/* tx silence */
HFC_outb_nodebug(hc, A_FIFO_DATA0_NOINC, hc->silence);
/* enable RX fifo */
- HFC_outb(hc, R_FIFO, (ch<<1)|1);
+ HFC_outb(hc, R_FIFO, (ch << 1) | 1);
HFC_wait(hc);
if (hc->ctype == HFC_TYPE_XHFC)
HFC_outb(hc, A_CON_HDLC, flow_rx | 0x07 << 2 |
- V_HDLC_TRP);
- /* Enable FIFO, no interrupt*/
+ V_HDLC_TRP);
+ /* Enable FIFO, no interrupt*/
else
HFC_outb(hc, A_CON_HDLC, flow_rx | 0x00 |
- V_HDLC_TRP);
+ V_HDLC_TRP);
HFC_outb(hc, A_SUBCH_CFG, 0);
HFC_outb(hc, A_IRQ_MSK, 0);
HFC_outb(hc, R_INC_RES_FIFO, V_RES_F);
@@ -3080,16 +3080,16 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
}
if (hc->ctype != HFC_TYPE_E1) {
hc->hw.a_st_ctrl0[hc->chan[ch].port] |=
- ((ch & 0x3) == 0) ? V_B1_EN : V_B2_EN;
+ ((ch & 0x3) == 0) ? V_B1_EN : V_B2_EN;
HFC_outb(hc, R_ST_SEL, hc->chan[ch].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
HFC_outb(hc, A_ST_CTRL0,
- hc->hw.a_st_ctrl0[hc->chan[ch].port]);
+ hc->hw.a_st_ctrl0[hc->chan[ch].port]);
}
if (hc->chan[ch].bch)
test_and_set_bit(FLG_TRANSPARENT,
- &hc->chan[ch].bch->Flags);
+ &hc->chan[ch].bch->Flags);
break;
case (ISDN_P_B_HDLC): /* B-channel */
case (ISDN_P_TE_S0): /* D-channel */
@@ -3097,7 +3097,7 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
case (ISDN_P_TE_E1):
case (ISDN_P_NT_E1):
/* enable TX fifo */
- HFC_outb(hc, R_FIFO, ch<<1);
+ HFC_outb(hc, R_FIFO, ch << 1);
HFC_wait(hc);
if (hc->ctype == HFC_TYPE_E1 || hc->chan[ch].bch) {
/* E1 or B-channel */
@@ -3112,7 +3112,7 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
HFC_outb(hc, R_INC_RES_FIFO, V_RES_F);
HFC_wait(hc);
/* enable RX fifo */
- HFC_outb(hc, R_FIFO, (ch<<1)|1);
+ HFC_outb(hc, R_FIFO, (ch << 1) | 1);
HFC_wait(hc);
HFC_outb(hc, A_CON_HDLC, flow_rx | 0x04);
if (hc->ctype == HFC_TYPE_E1 || hc->chan[ch].bch)
@@ -3126,18 +3126,18 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
test_and_set_bit(FLG_HDLC, &hc->chan[ch].bch->Flags);
if (hc->ctype != HFC_TYPE_E1) {
hc->hw.a_st_ctrl0[hc->chan[ch].port] |=
- ((ch&0x3) == 0) ? V_B1_EN : V_B2_EN;
+ ((ch & 0x3) == 0) ? V_B1_EN : V_B2_EN;
HFC_outb(hc, R_ST_SEL, hc->chan[ch].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
HFC_outb(hc, A_ST_CTRL0,
- hc->hw.a_st_ctrl0[hc->chan[ch].port]);
+ hc->hw.a_st_ctrl0[hc->chan[ch].port]);
}
}
break;
default:
printk(KERN_DEBUG "%s: protocol not known %x\n",
- __func__, protocol);
+ __func__, protocol);
hc->chan[ch].protocol = ISDN_P_NONE;
return -ENOPROTOOPT;
}
@@ -3152,7 +3152,7 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
static void
hfcmulti_pcm(struct hfc_multi *hc, int ch, int slot_tx, int bank_tx,
- int slot_rx, int bank_rx)
+ int slot_rx, int bank_rx)
{
if (slot_tx < 0 || slot_rx < 0 || bank_tx < 0 || bank_rx < 0) {
/* disable PCM */
@@ -3162,7 +3162,7 @@ hfcmulti_pcm(struct hfc_multi *hc, int ch, int slot_tx, int bank_tx,
/* enable pcm */
mode_hfcmulti(hc, ch, hc->chan[ch].protocol, slot_tx, bank_tx,
- slot_rx, bank_rx);
+ slot_rx, bank_rx);
}
/*
@@ -3177,8 +3177,8 @@ hfcmulti_conf(struct hfc_multi *hc, int ch, int num)
else
hc->chan[ch].conf = -1;
mode_hfcmulti(hc, ch, hc->chan[ch].protocol, hc->chan[ch].slot_tx,
- hc->chan[ch].bank_tx, hc->chan[ch].slot_rx,
- hc->chan[ch].bank_rx);
+ hc->chan[ch].bank_tx, hc->chan[ch].slot_rx,
+ hc->chan[ch].bank_rx);
}
@@ -3207,8 +3207,8 @@ hfcm_l1callback(struct dchannel *dch, u_int cmd)
if (hc->ctype == HFC_TYPE_E1) {
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
- "%s: HW_RESET_REQ no BRI\n",
- __func__);
+ "%s: HW_RESET_REQ no BRI\n",
+ __func__);
} else {
HFC_outb(hc, R_ST_SEL, hc->chan[dch->slot].port);
/* undocumented: delay after R_ST_SEL */
@@ -3216,8 +3216,8 @@ hfcm_l1callback(struct dchannel *dch, u_int cmd)
HFC_outb(hc, A_ST_WR_STATE, V_ST_LD_STA | 3); /* F3 */
udelay(6); /* wait at least 5,21us */
HFC_outb(hc, A_ST_WR_STATE, 3);
- HFC_outb(hc, A_ST_WR_STATE, 3 | (V_ST_ACT*3));
- /* activate */
+ HFC_outb(hc, A_ST_WR_STATE, 3 | (V_ST_ACT * 3));
+ /* activate */
}
spin_unlock_irqrestore(&hc->lock, flags);
l1_event(dch->l1, HW_POWERUP_IND);
@@ -3228,17 +3228,17 @@ hfcm_l1callback(struct dchannel *dch, u_int cmd)
if (hc->ctype == HFC_TYPE_E1) {
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
- "%s: HW_DEACT_REQ no BRI\n",
- __func__);
+ "%s: HW_DEACT_REQ no BRI\n",
+ __func__);
} else {
HFC_outb(hc, R_ST_SEL, hc->chan[dch->slot].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
- HFC_outb(hc, A_ST_WR_STATE, V_ST_ACT*2);
- /* deactivate */
+ HFC_outb(hc, A_ST_WR_STATE, V_ST_ACT * 2);
+ /* deactivate */
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
hc->syncronized &=
- ~(1 << hc->chan[dch->slot].port);
+ ~(1 << hc->chan[dch->slot].port);
plxsd_checksync(hc, 0);
}
}
@@ -3262,8 +3262,8 @@ hfcm_l1callback(struct dchannel *dch, u_int cmd)
if (hc->ctype == HFC_TYPE_E1) {
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
- "%s: HW_POWERUP_REQ no BRI\n",
- __func__);
+ "%s: HW_POWERUP_REQ no BRI\n",
+ __func__);
} else {
HFC_outb(hc, R_ST_SEL, hc->chan[dch->slot].port);
/* undocumented: delay after R_ST_SEL */
@@ -3277,17 +3277,17 @@ hfcm_l1callback(struct dchannel *dch, u_int cmd)
case PH_ACTIVATE_IND:
test_and_set_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
case PH_DEACTIVATE_IND:
test_and_clear_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
default:
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: unknown command %x\n",
- __func__, cmd);
+ __func__, cmd);
return -1;
}
return 0;
@@ -3332,27 +3332,27 @@ handle_dmsg(struct mISDNchannel *ch, struct sk_buff *skb)
ret = 0;
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
- "%s: PH_ACTIVATE port %d (0..%d)\n",
- __func__, hc->chan[dch->slot].port,
- hc->ports-1);
+ "%s: PH_ACTIVATE port %d (0..%d)\n",
+ __func__, hc->chan[dch->slot].port,
+ hc->ports - 1);
/* start activation */
if (hc->ctype == HFC_TYPE_E1) {
ph_state_change(dch);
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG
- "%s: E1 report state %x \n",
- __func__, dch->state);
+ "%s: E1 report state %x \n",
+ __func__, dch->state);
} else {
HFC_outb(hc, R_ST_SEL,
- hc->chan[dch->slot].port);
+ hc->chan[dch->slot].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
HFC_outb(hc, A_ST_WR_STATE, V_ST_LD_STA | 1);
- /* G1 */
+ /* G1 */
udelay(6); /* wait at least 5,21us */
HFC_outb(hc, A_ST_WR_STATE, 1);
HFC_outb(hc, A_ST_WR_STATE, 1 |
- (V_ST_ACT*3)); /* activate */
+ (V_ST_ACT * 3)); /* activate */
dch->state = 1;
}
spin_unlock_irqrestore(&hc->lock, flags);
@@ -3365,22 +3365,22 @@ handle_dmsg(struct mISDNchannel *ch, struct sk_buff *skb)
spin_lock_irqsave(&hc->lock, flags);
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
- "%s: PH_DEACTIVATE port %d (0..%d)\n",
- __func__, hc->chan[dch->slot].port,
- hc->ports-1);
+ "%s: PH_DEACTIVATE port %d (0..%d)\n",
+ __func__, hc->chan[dch->slot].port,
+ hc->ports - 1);
/* start deactivation */
if (hc->ctype == HFC_TYPE_E1) {
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
- "%s: PH_DEACTIVATE no BRI\n",
- __func__);
+ "%s: PH_DEACTIVATE no BRI\n",
+ __func__);
} else {
HFC_outb(hc, R_ST_SEL,
- hc->chan[dch->slot].port);
+ hc->chan[dch->slot].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
HFC_outb(hc, A_ST_WR_STATE, V_ST_ACT * 2);
- /* deactivate */
+ /* deactivate */
dch->state = 1;
}
skb_queue_purge(&dch->squeue);
@@ -3460,28 +3460,28 @@ handle_bmsg(struct mISDNchannel *ch, struct sk_buff *skb)
case PH_ACTIVATE_REQ:
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: PH_ACTIVATE ch %d (0..32)\n",
- __func__, bch->slot);
+ __func__, bch->slot);
spin_lock_irqsave(&hc->lock, flags);
/* activate B-channel if not already activated */
if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) {
hc->chan[bch->slot].txpending = 0;
ret = mode_hfcmulti(hc, bch->slot,
- ch->protocol,
- hc->chan[bch->slot].slot_tx,
- hc->chan[bch->slot].bank_tx,
- hc->chan[bch->slot].slot_rx,
- hc->chan[bch->slot].bank_rx);
+ ch->protocol,
+ hc->chan[bch->slot].slot_tx,
+ hc->chan[bch->slot].bank_tx,
+ hc->chan[bch->slot].slot_rx,
+ hc->chan[bch->slot].bank_rx);
if (!ret) {
if (ch->protocol == ISDN_P_B_RAW && !hc->dtmf
- && test_bit(HFC_CHIP_DTMF, &hc->chip)) {
+ && test_bit(HFC_CHIP_DTMF, &hc->chip)) {
/* start decoder */
hc->dtmf = 1;
if (debug & DEBUG_HFCMULTI_DTMF)
printk(KERN_DEBUG
- "%s: start dtmf decoder\n",
- __func__);
+ "%s: start dtmf decoder\n",
+ __func__);
HFC_outb(hc, R_DTMF, hc->hw.r_dtmf |
- V_RST_DTMF);
+ V_RST_DTMF);
}
}
} else
@@ -3489,7 +3489,7 @@ handle_bmsg(struct mISDNchannel *ch, struct sk_buff *skb)
spin_unlock_irqrestore(&hc->lock, flags);
if (!ret)
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0, NULL,
- GFP_KERNEL);
+ GFP_KERNEL);
break;
case PH_CONTROL_REQ:
spin_lock_irqsave(&hc->lock, flags);
@@ -3497,20 +3497,20 @@ handle_bmsg(struct mISDNchannel *ch, struct sk_buff *skb)
case HFC_SPL_LOOP_ON: /* set sample loop */
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
- "%s: HFC_SPL_LOOP_ON (len = %d)\n",
- __func__, skb->len);
+ "%s: HFC_SPL_LOOP_ON (len = %d)\n",
+ __func__, skb->len);
ret = 0;
break;
case HFC_SPL_LOOP_OFF: /* set silence */
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: HFC_SPL_LOOP_OFF\n",
- __func__);
+ __func__);
ret = 0;
break;
default:
printk(KERN_ERR
- "%s: unknown PH_CONTROL_REQ info %x\n",
- __func__, hh->id);
+ "%s: unknown PH_CONTROL_REQ info %x\n",
+ __func__, hh->id);
ret = -EINVAL;
}
spin_unlock_irqrestore(&hc->lock, flags);
@@ -3518,7 +3518,7 @@ handle_bmsg(struct mISDNchannel *ch, struct sk_buff *skb)
case PH_DEACTIVATE_REQ:
deactivate_bchannel(bch); /* locked there */
_queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0, NULL,
- GFP_KERNEL);
+ GFP_KERNEL);
ret = 0;
break;
}
@@ -3559,18 +3559,18 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
}
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: RX_OFF request (nr=%d off=%d)\n",
- __func__, bch->nr, hc->chan[bch->slot].rx_off);
+ __func__, bch->nr, hc->chan[bch->slot].rx_off);
break;
case MISDN_CTRL_FILL_EMPTY: /* fill fifo, if empty */
test_and_set_bit(FLG_FILLEMPTY, &bch->Flags);
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: FILL_EMPTY request (nr=%d "
- "off=%d)\n", __func__, bch->nr, !!cq->p1);
+ "off=%d)\n", __func__, bch->nr, !!cq->p1);
break;
case MISDN_CTRL_HW_FEATURES: /* fill features structure */
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: HW_FEATURE request\n",
- __func__);
+ __func__);
/* create confirm */
features->hfc_id = hc->id;
if (test_bit(HFC_CHIP_DTMF, &hc->chip))
@@ -3593,40 +3593,40 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
bank_rx = cq->p2 >> 8;
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG
- "%s: HFC_PCM_CONN slot %d bank %d (TX) "
- "slot %d bank %d (RX)\n",
- __func__, slot_tx, bank_tx,
- slot_rx, bank_rx);
+ "%s: HFC_PCM_CONN slot %d bank %d (TX) "
+ "slot %d bank %d (RX)\n",
+ __func__, slot_tx, bank_tx,
+ slot_rx, bank_rx);
if (slot_tx < hc->slots && bank_tx <= 2 &&
slot_rx < hc->slots && bank_rx <= 2)
hfcmulti_pcm(hc, bch->slot,
- slot_tx, bank_tx, slot_rx, bank_rx);
+ slot_tx, bank_tx, slot_rx, bank_rx);
else {
printk(KERN_WARNING
- "%s: HFC_PCM_CONN slot %d bank %d (TX) "
- "slot %d bank %d (RX) out of range\n",
- __func__, slot_tx, bank_tx,
- slot_rx, bank_rx);
+ "%s: HFC_PCM_CONN slot %d bank %d (TX) "
+ "slot %d bank %d (RX) out of range\n",
+ __func__, slot_tx, bank_tx,
+ slot_rx, bank_rx);
ret = -EINVAL;
}
break;
case MISDN_CTRL_HFC_PCM_DISC: /* release interface from pcm timeslot */
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: HFC_PCM_DISC\n",
- __func__);
+ __func__);
hfcmulti_pcm(hc, bch->slot, -1, 0, -1, 0);
break;
case MISDN_CTRL_HFC_CONF_JOIN: /* join conference (0..7) */
num = cq->p1 & 0xff;
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: HFC_CONF_JOIN conf %d\n",
- __func__, num);
+ __func__, num);
if (num <= 7)
hfcmulti_conf(hc, bch->slot, num);
else {
printk(KERN_WARNING
- "%s: HW_CONF_JOIN conf %d out of range\n",
- __func__, num);
+ "%s: HW_CONF_JOIN conf %d out of range\n",
+ __func__, num);
ret = -EINVAL;
}
break;
@@ -3647,7 +3647,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
case MISDN_CTRL_HFC_ECHOCAN_OFF:
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: HFC_ECHOCAN_OFF\n",
- __func__);
+ __func__);
if (test_bit(HFC_CHIP_B410P, &hc->chip))
vpm_echocan_off(hc, bch->slot);
else
@@ -3655,7 +3655,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
break;
default:
printk(KERN_WARNING "%s: unknown Op %x\n",
- __func__, cq->op);
+ __func__, cq->op);
ret = -EINVAL;
break;
}
@@ -3672,7 +3672,7 @@ hfcm_bctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
if (bch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: cmd:%x %p\n",
- __func__, cmd, arg);
+ __func__, cmd, arg);
switch (cmd) {
case CLOSE_CHANNEL:
test_and_clear_bit(FLG_OPEN, &bch->Flags);
@@ -3690,7 +3690,7 @@ hfcm_bctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
break;
default:
printk(KERN_WARNING "%s: unknown prim(%x)\n",
- __func__, cmd);
+ __func__, cmd);
}
return err;
}
@@ -3717,13 +3717,13 @@ ph_state_change(struct dchannel *dch)
if (dch->dev.D.protocol == ISDN_P_TE_E1) {
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG
- "%s: E1 TE (id=%d) newstate %x\n",
- __func__, hc->id, dch->state);
+ "%s: E1 TE (id=%d) newstate %x\n",
+ __func__, hc->id, dch->state);
} else {
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG
- "%s: E1 NT (id=%d) newstate %x\n",
- __func__, hc->id, dch->state);
+ "%s: E1 NT (id=%d) newstate %x\n",
+ __func__, hc->id, dch->state);
}
switch (dch->state) {
case (1):
@@ -3731,16 +3731,16 @@ ph_state_change(struct dchannel *dch)
for (i = 1; i <= 31; i++) {
/* reset fifos on e1 activation */
HFC_outb_nodebug(hc, R_FIFO,
- (i << 1) | 1);
+ (i << 1) | 1);
HFC_wait_nodebug(hc);
HFC_outb_nodebug(hc, R_INC_RES_FIFO,
- V_RES_F);
+ V_RES_F);
HFC_wait_nodebug(hc);
}
}
test_and_set_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, PH_ACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
break;
default:
@@ -3748,15 +3748,15 @@ ph_state_change(struct dchannel *dch)
return;
test_and_clear_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, PH_DEACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
}
hc->e1_state = dch->state;
} else {
if (dch->dev.D.protocol == ISDN_P_TE_S0) {
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG
- "%s: S/T TE newstate %x\n",
- __func__, dch->state);
+ "%s: S/T TE newstate %x\n",
+ __func__, dch->state);
switch (dch->state) {
case (0):
l1_event(dch->l1, HW_RESET_IND);
@@ -3778,38 +3778,38 @@ ph_state_change(struct dchannel *dch)
} else {
if (debug & DEBUG_HFCMULTI_STATE)
printk(KERN_DEBUG "%s: S/T NT newstate %x\n",
- __func__, dch->state);
+ __func__, dch->state);
switch (dch->state) {
case (2):
if (hc->chan[ch].nt_timer == 0) {
hc->chan[ch].nt_timer = -1;
HFC_outb(hc, R_ST_SEL,
- hc->chan[ch].port);
+ hc->chan[ch].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
HFC_outb(hc, A_ST_WR_STATE, 4 |
- V_ST_LD_STA); /* G4 */
+ V_ST_LD_STA); /* G4 */
udelay(6); /* wait at least 5,21us */
HFC_outb(hc, A_ST_WR_STATE, 4);
dch->state = 4;
} else {
/* one extra count for the next event */
hc->chan[ch].nt_timer =
- nt_t1_count[poll_timer] + 1;
+ nt_t1_count[poll_timer] + 1;
HFC_outb(hc, R_ST_SEL,
- hc->chan[ch].port);
+ hc->chan[ch].port);
/* undocumented: delay after R_ST_SEL */
udelay(1);
/* allow G2 -> G3 transition */
HFC_outb(hc, A_ST_WR_STATE, 2 |
- V_SET_G2_G3);
+ V_SET_G2_G3);
}
break;
case (1):
hc->chan[ch].nt_timer = -1;
test_and_clear_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, PH_DEACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
break;
case (4):
hc->chan[ch].nt_timer = -1;
@@ -3818,7 +3818,7 @@ ph_state_change(struct dchannel *dch)
hc->chan[ch].nt_timer = -1;
test_and_set_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, PH_ACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
break;
}
}
@@ -3845,7 +3845,7 @@ hfcmulti_initmode(struct dchannel *dch)
hc->chan[hc->dslot].conf = -1;
if (hc->dslot) {
mode_hfcmulti(hc, hc->dslot, dch->dev.D.protocol,
- -1, 0, -1, 0);
+ -1, 0, -1, 0);
dch->timer.function = (void *) hfcmulti_dbusy_timer;
dch->timer.data = (long) dch;
init_timer(&dch->timer);
@@ -3887,13 +3887,13 @@ hfcmulti_initmode(struct dchannel *dch)
if (dch->dev.D.protocol == ISDN_P_NT_E1) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: E1 port is NT-mode\n",
- __func__);
+ __func__);
r_e1_wr_sta = 0; /* G0 */
hc->e1_getclock = 0;
} else {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: E1 port is TE-mode\n",
- __func__);
+ __func__);
r_e1_wr_sta = 0; /* F0 */
hc->e1_getclock = 1;
}
@@ -3909,26 +3909,26 @@ hfcmulti_initmode(struct dchannel *dch)
/* SLAVE (clock master) */
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: E1 port is clock master "
- "(clock from PCM)\n", __func__);
+ "%s: E1 port is clock master "
+ "(clock from PCM)\n", __func__);
HFC_outb(hc, R_SYNC_CTRL, V_EXT_CLK_SYNC | V_PCM_SYNC);
} else {
if (hc->e1_getclock) {
/* MASTER (clock slave) */
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: E1 port is clock slave "
- "(clock to PCM)\n", __func__);
+ "%s: E1 port is clock slave "
+ "(clock to PCM)\n", __func__);
HFC_outb(hc, R_SYNC_CTRL, V_SYNC_OFFS);
} else {
/* MASTER (clock master) */
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: E1 port is "
- "clock master "
- "(clock from QUARTZ)\n",
- __func__);
+ "clock master "
+ "(clock from QUARTZ)\n",
+ __func__);
HFC_outb(hc, R_SYNC_CTRL, V_EXT_CLK_SYNC |
- V_PCM_SYNC | V_JATT_OFF);
+ V_PCM_SYNC | V_JATT_OFF);
HFC_outb(hc, R_SYNC_OUT, 0);
}
}
@@ -3970,8 +3970,8 @@ hfcmulti_initmode(struct dchannel *dch)
if (dch->dev.D.protocol == ISDN_P_NT_S0) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: ST port %d is NT-mode\n",
- __func__, pt);
+ "%s: ST port %d is NT-mode\n",
+ __func__, pt);
/* clock delay */
HFC_outb(hc, A_ST_CLK_DLY, clockdelay_nt);
a_st_wr_state = 1; /* G1 */
@@ -3979,8 +3979,8 @@ hfcmulti_initmode(struct dchannel *dch)
} else {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: ST port %d is TE-mode\n",
- __func__, pt);
+ "%s: ST port %d is TE-mode\n",
+ __func__, pt);
/* clock delay */
HFC_outb(hc, A_ST_CLK_DLY, clockdelay_te);
a_st_wr_state = 2; /* F2 */
@@ -3991,7 +3991,7 @@ hfcmulti_initmode(struct dchannel *dch)
if (hc->ctype == HFC_TYPE_XHFC) {
hc->hw.a_st_ctrl0[pt] |= 0x40 /* V_ST_PU_CTRL */;
HFC_outb(hc, 0x35 /* A_ST_CTRL3 */,
- 0x7c << 1 /* V_ST_PULSE */);
+ 0x7c << 1 /* V_ST_PULSE */);
}
/* line setup */
HFC_outb(hc, A_ST_CTRL0, hc->hw.a_st_ctrl0[pt]);
@@ -4013,7 +4013,7 @@ hfcmulti_initmode(struct dchannel *dch)
/* unset sync on port */
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
hc->syncronized &=
- ~(1 << hc->chan[dch->slot].port);
+ ~(1 << hc->chan[dch->slot].port);
plxsd_checksync(hc, 0);
}
}
@@ -4024,21 +4024,21 @@ hfcmulti_initmode(struct dchannel *dch)
static int
open_dchannel(struct hfc_multi *hc, struct dchannel *dch,
- struct channel_req *rq)
+ struct channel_req *rq)
{
int err = 0;
u_long flags;
if (debug & DEBUG_HW_OPEN)
printk(KERN_DEBUG "%s: dev(%d) open from %p\n", __func__,
- dch->dev.id, __builtin_return_address(0));
+ dch->dev.id, __builtin_return_address(0));
if (rq->protocol == ISDN_P_NONE)
return -EINVAL;
if ((dch->dev.D.protocol != ISDN_P_NONE) &&
(dch->dev.D.protocol != rq->protocol)) {
if (debug & DEBUG_HFCMULTI_MODE)
printk(KERN_DEBUG "%s: change protocol %x to %x\n",
- __func__, dch->dev.D.protocol, rq->protocol);
+ __func__, dch->dev.D.protocol, rq->protocol);
}
if ((dch->dev.D.protocol == ISDN_P_TE_S0) &&
(rq->protocol != ISDN_P_TE_S0))
@@ -4060,7 +4060,7 @@ open_dchannel(struct hfc_multi *hc, struct dchannel *dch,
((rq->protocol == ISDN_P_NT_E1) && (dch->state == 1)) ||
((rq->protocol == ISDN_P_TE_E1) && (dch->state == 1))) {
_queue_data(&dch->dev.D, PH_ACTIVATE_IND, MISDN_ID_ANY,
- 0, NULL, GFP_KERNEL);
+ 0, NULL, GFP_KERNEL);
}
rq->ch = &dch->dev.D;
if (!try_module_get(THIS_MODULE))
@@ -4070,7 +4070,7 @@ open_dchannel(struct hfc_multi *hc, struct dchannel *dch,
static int
open_bchannel(struct hfc_multi *hc, struct dchannel *dch,
- struct channel_req *rq)
+ struct channel_req *rq)
{
struct bchannel *bch;
int ch;
@@ -4086,7 +4086,7 @@ open_bchannel(struct hfc_multi *hc, struct dchannel *dch,
bch = hc->chan[ch].bch;
if (!bch) {
printk(KERN_ERR "%s:internal error ch %d has no bch\n",
- __func__, ch);
+ __func__, ch);
return -EINVAL;
}
if (test_and_set_bit(FLG_OPEN, &bch->Flags))
@@ -4119,8 +4119,8 @@ channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)
wd_mode = !!(cq->p1 >> 4);
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: MISDN_CTRL_HFC_WD_INIT mode %s"
- ", counter 0x%x\n", __func__,
- wd_mode ? "AUTO" : "MANUAL", wd_cnt);
+ ", counter 0x%x\n", __func__,
+ wd_mode ? "AUTO" : "MANUAL", wd_cnt);
/* set the watchdog timer */
HFC_outb(hc, R_TI_WD, poll_timer | (wd_cnt << 4));
hc->hw.r_bert_wd_md = (wd_mode ? V_AUTO_WD_RES : 0);
@@ -4139,12 +4139,12 @@ channel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)
case MISDN_CTRL_HFC_WD_RESET: /* reset the watchdog counter */
if (debug & DEBUG_HFCMULTI_MSG)
printk(KERN_DEBUG "%s: MISDN_CTRL_HFC_WD_RESET\n",
- __func__);
+ __func__);
HFC_outb(hc, R_BERT_WD_MD, hc->hw.r_bert_wd_md | V_WD_RES);
break;
default:
printk(KERN_WARNING "%s: unknown Op %x\n",
- __func__, cq->op);
+ __func__, cq->op);
ret = -EINVAL;
break;
}
@@ -4163,7 +4163,7 @@ hfcm_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: cmd:%x %p\n",
- __func__, cmd, arg);
+ __func__, cmd, arg);
switch (cmd) {
case OPEN_CHANNEL:
rq = arg;
@@ -4193,8 +4193,8 @@ hfcm_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
case CLOSE_CHANNEL:
if (debug & DEBUG_HW_OPEN)
printk(KERN_DEBUG "%s: dev(%d) close from %p\n",
- __func__, dch->dev.id,
- __builtin_return_address(0));
+ __func__, dch->dev.id,
+ __builtin_return_address(0));
module_put(THIS_MODULE);
break;
case CONTROL_CHANNEL:
@@ -4205,7 +4205,7 @@ hfcm_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
default:
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: unknown command %x\n",
- __func__, cmd);
+ __func__, cmd);
err = -EINVAL;
}
return err;
@@ -4246,9 +4246,9 @@ init_card(struct hfc_multi *hc)
spin_unlock_irqrestore(&hc->lock, flags);
if (request_irq(hc->irq, hfcmulti_interrupt, IRQF_SHARED,
- "HFC-multi", hc)) {
+ "HFC-multi", hc)) {
printk(KERN_WARNING "mISDN: Could not get interrupt %d.\n",
- hc->irq);
+ hc->irq);
hc->irq = 0;
return -EIO;
}
@@ -4257,13 +4257,13 @@ init_card(struct hfc_multi *hc)
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc = hc->plx_membase + PLX_INTCSR;
writew((PLX_INTCSR_PCIINT_ENABLE | PLX_INTCSR_LINTI1_ENABLE),
- plx_acc); /* enable PCI & LINT1 irq */
+ plx_acc); /* enable PCI & LINT1 irq */
spin_unlock_irqrestore(&plx_lock, plx_flags);
}
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: IRQ %d count %d\n",
- __func__, hc->irq, hc->irqcnt);
+ __func__, hc->irq, hc->irqcnt);
err = init_chip(hc);
if (err)
goto error;
@@ -4277,14 +4277,14 @@ init_card(struct hfc_multi *hc)
spin_unlock_irqrestore(&hc->lock, flags);
/* printk(KERN_DEBUG "no master irq set!!!\n"); */
set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((100*HZ)/1000); /* Timeout 100ms */
+ schedule_timeout((100 * HZ) / 1000); /* Timeout 100ms */
/* turn IRQ off until chip is completely initialized */
spin_lock_irqsave(&hc->lock, flags);
disable_hwirq(hc);
spin_unlock_irqrestore(&hc->lock, flags);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: IRQ %d count %d\n",
- __func__, hc->irq, hc->irqcnt);
+ __func__, hc->irq, hc->irqcnt);
if (hc->irqcnt) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: done\n", __func__);
@@ -4297,7 +4297,7 @@ init_card(struct hfc_multi *hc)
}
printk(KERN_ERR "HFC PCI: IRQ(%d) getting no interrupts during init.\n",
- hc->irq);
+ hc->irq);
err = -EIO;
@@ -4327,13 +4327,13 @@ error:
static int
setup_pci(struct hfc_multi *hc, struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
struct hm_map *m = (struct hm_map *)ent->driver_data;
printk(KERN_INFO
- "HFC-multi: card manufacturer: '%s' card name: '%s' clock: %s\n",
- m->vendor_name, m->card_name, m->clock2 ? "double" : "normal");
+ "HFC-multi: card manufacturer: '%s' card name: '%s' clock: %s\n",
+ m->vendor_name, m->card_name, m->clock2 ? "double" : "normal");
hc->pci_dev = pdev;
if (m->clock2)
@@ -4380,7 +4380,7 @@ setup_pci(struct hfc_multi *hc, struct pci_dev *pdev,
if (!hc->plx_origmembase) {
printk(KERN_WARNING
- "HFC-multi: No IO-Memory for PCI PLX bridge found\n");
+ "HFC-multi: No IO-Memory for PCI PLX bridge found\n");
pci_disable_device(hc->pci_dev);
return -EIO;
}
@@ -4388,20 +4388,20 @@ setup_pci(struct hfc_multi *hc, struct pci_dev *pdev,
hc->plx_membase = ioremap(hc->plx_origmembase, 0x80);
if (!hc->plx_membase) {
printk(KERN_WARNING
- "HFC-multi: failed to remap plx address space. "
- "(internal error)\n");
+ "HFC-multi: failed to remap plx address space. "
+ "(internal error)\n");
pci_disable_device(hc->pci_dev);
return -EIO;
}
printk(KERN_INFO
- "HFC-multi: plx_membase:%#lx plx_origmembase:%#lx\n",
- (u_long)hc->plx_membase, hc->plx_origmembase);
+ "HFC-multi: plx_membase:%#lx plx_origmembase:%#lx\n",
+ (u_long)hc->plx_membase, hc->plx_origmembase);
hc->pci_origmembase = hc->pci_dev->resource[2].start;
- /* MEMBASE 1 is PLX PCI Bridge */
+ /* MEMBASE 1 is PLX PCI Bridge */
if (!hc->pci_origmembase) {
printk(KERN_WARNING
- "HFC-multi: No IO-Memory for PCI card found\n");
+ "HFC-multi: No IO-Memory for PCI card found\n");
pci_disable_device(hc->pci_dev);
return -EIO;
}
@@ -4409,16 +4409,16 @@ setup_pci(struct hfc_multi *hc, struct pci_dev *pdev,
hc->pci_membase = ioremap(hc->pci_origmembase, 0x400);
if (!hc->pci_membase) {
printk(KERN_WARNING "HFC-multi: failed to remap io "
- "address space. (internal error)\n");
+ "address space. (internal error)\n");
pci_disable_device(hc->pci_dev);
return -EIO;
}
printk(KERN_INFO
- "card %d: defined at MEMBASE %#lx (%#lx) IRQ %d HZ %d "
- "leds-type %d\n",
- hc->id, (u_long)hc->pci_membase, hc->pci_origmembase,
- hc->pci_dev->irq, HZ, hc->leds);
+ "card %d: defined at MEMBASE %#lx (%#lx) IRQ %d HZ %d "
+ "leds-type %d\n",
+ hc->id, (u_long)hc->pci_membase, hc->pci_origmembase,
+ hc->pci_dev->irq, HZ, hc->leds);
pci_write_config_word(hc->pci_dev, PCI_COMMAND, PCI_ENA_MEMIO);
break;
case HFC_IO_MODE_PCIMEM:
@@ -4431,7 +4431,7 @@ setup_pci(struct hfc_multi *hc, struct pci_dev *pdev,
hc->pci_origmembase = hc->pci_dev->resource[1].start;
if (!hc->pci_origmembase) {
printk(KERN_WARNING
- "HFC-multi: No IO-Memory for PCI card found\n");
+ "HFC-multi: No IO-Memory for PCI card found\n");
pci_disable_device(hc->pci_dev);
return -EIO;
}
@@ -4439,14 +4439,14 @@ setup_pci(struct hfc_multi *hc, struct pci_dev *pdev,
hc->pci_membase = ioremap(hc->pci_origmembase, 256);
if (!hc->pci_membase) {
printk(KERN_WARNING
- "HFC-multi: failed to remap io address space. "
- "(internal error)\n");
+ "HFC-multi: failed to remap io address space. "
+ "(internal error)\n");
pci_disable_device(hc->pci_dev);
return -EIO;
}
printk(KERN_INFO "card %d: defined at MEMBASE %#lx (%#lx) IRQ "
- "%d HZ %d leds-type %d\n", hc->id, (u_long)hc->pci_membase,
- hc->pci_origmembase, hc->pci_dev->irq, HZ, hc->leds);
+ "%d HZ %d leds-type %d\n", hc->id, (u_long)hc->pci_membase,
+ hc->pci_origmembase, hc->pci_dev->irq, HZ, hc->leds);
pci_write_config_word(hc->pci_dev, PCI_COMMAND, PCI_ENA_MEMIO);
break;
case HFC_IO_MODE_REGIO:
@@ -4459,23 +4459,23 @@ setup_pci(struct hfc_multi *hc, struct pci_dev *pdev,
hc->pci_iobase = (u_int) hc->pci_dev->resource[0].start;
if (!hc->pci_iobase) {
printk(KERN_WARNING
- "HFC-multi: No IO for PCI card found\n");
+ "HFC-multi: No IO for PCI card found\n");
pci_disable_device(hc->pci_dev);
return -EIO;
}
if (!request_region(hc->pci_iobase, 8, "hfcmulti")) {
printk(KERN_WARNING "HFC-multi: failed to request "
- "address space at 0x%08lx (internal error)\n",
- hc->pci_iobase);
+ "address space at 0x%08lx (internal error)\n",
+ hc->pci_iobase);
pci_disable_device(hc->pci_dev);
return -EIO;
}
printk(KERN_INFO
- "%s %s: defined at IOBASE %#x IRQ %d HZ %d leds-type %d\n",
- m->vendor_name, m->card_name, (u_int) hc->pci_iobase,
- hc->pci_dev->irq, HZ, hc->leds);
+ "%s %s: defined at IOBASE %#x IRQ %d HZ %d leds-type %d\n",
+ m->vendor_name, m->card_name, (u_int) hc->pci_iobase,
+ hc->pci_dev->irq, HZ, hc->leds);
pci_write_config_word(hc->pci_dev, PCI_COMMAND, PCI_ENA_REGIO);
break;
default:
@@ -4508,17 +4508,17 @@ release_port(struct hfc_multi *hc, struct dchannel *dch)
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: entered for port %d\n",
- __func__, pt + 1);
+ __func__, pt + 1);
if (pt >= hc->ports) {
printk(KERN_WARNING "%s: ERROR port out of range (%d).\n",
- __func__, pt + 1);
+ __func__, pt + 1);
return;
}
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: releasing port=%d\n",
- __func__, pt + 1);
+ __func__, pt + 1);
if (dch->dev.D.protocol == ISDN_P_TE_S0)
l1_event(dch->l1, CLOSE_CHANNEL);
@@ -4548,8 +4548,8 @@ release_port(struct hfc_multi *hc, struct dchannel *dch)
if (hc->chan[i].bch) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: free port %d channel %d\n",
- __func__, hc->chan[i].port+1, i);
+ "%s: free port %d channel %d\n",
+ __func__, hc->chan[i].port + 1, i);
pb = hc->chan[i].bch;
hc->chan[i].bch = NULL;
spin_unlock_irqrestore(&hc->lock, flags);
@@ -4563,16 +4563,16 @@ release_port(struct hfc_multi *hc, struct dchannel *dch)
/* remove sync */
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
hc->syncronized &=
- ~(1 << hc->chan[ci].port);
+ ~(1 << hc->chan[ci].port);
plxsd_checksync(hc, 1);
}
/* free channels */
if (hc->chan[ci - 2].bch) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: free port %d channel %d\n",
- __func__, hc->chan[ci - 2].port+1,
- ci - 2);
+ "%s: free port %d channel %d\n",
+ __func__, hc->chan[ci - 2].port + 1,
+ ci - 2);
pb = hc->chan[ci - 2].bch;
hc->chan[ci - 2].bch = NULL;
spin_unlock_irqrestore(&hc->lock, flags);
@@ -4584,9 +4584,9 @@ release_port(struct hfc_multi *hc, struct dchannel *dch)
if (hc->chan[ci - 1].bch) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: free port %d channel %d\n",
- __func__, hc->chan[ci - 1].port+1,
- ci - 1);
+ "%s: free port %d channel %d\n",
+ __func__, hc->chan[ci - 1].port + 1,
+ ci - 1);
pb = hc->chan[ci - 1].bch;
hc->chan[ci - 1].bch = NULL;
spin_unlock_irqrestore(&hc->lock, flags);
@@ -4616,7 +4616,7 @@ release_card(struct hfc_multi *hc)
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: release card (%d) entered\n",
- __func__, hc->id);
+ __func__, hc->id);
/* unregister clock source */
if (hc->iclock)
@@ -4635,7 +4635,7 @@ release_card(struct hfc_multi *hc)
/* disable D-channels & B-channels */
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: disable all channels (d and b)\n",
- __func__);
+ __func__);
for (ch = 0; ch <= 31; ch++) {
if (hc->chan[ch].dch)
release_port(hc, hc->chan[ch].dch);
@@ -4645,7 +4645,7 @@ release_card(struct hfc_multi *hc)
if (hc->irq) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: free irq %d\n",
- __func__, hc->irq);
+ __func__, hc->irq);
free_irq(hc->irq, hc);
hc->irq = 0;
@@ -4654,7 +4654,7 @@ release_card(struct hfc_multi *hc)
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: remove instance from list\n",
- __func__);
+ __func__);
list_del(&hc->list);
if (debug & DEBUG_HFCMULTI_INIT)
@@ -4664,7 +4664,7 @@ release_card(struct hfc_multi *hc)
kfree(hc);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: card successfully removed\n",
- __func__);
+ __func__);
}
static int
@@ -4683,7 +4683,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
dch->hw = hc;
dch->dev.Dprotocols = (1 << ISDN_P_TE_E1) | (1 << ISDN_P_NT_E1);
dch->dev.Bprotocols = (1 << (ISDN_P_B_RAW & ISDN_P_B_MASK)) |
- (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
+ (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
dch->dev.D.send = handle_dmsg;
dch->dev.D.ctrl = hfcm_dctrl;
dch->dev.nrbchan = (hc->dslot) ? 30 : 31;
@@ -4697,14 +4697,14 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL);
if (!bch) {
printk(KERN_ERR "%s: no memory for bchannel\n",
- __func__);
+ __func__);
ret = -ENOMEM;
goto free_chan;
}
hc->chan[ch].coeff = kzalloc(512, GFP_KERNEL);
if (!hc->chan[ch].coeff) {
printk(KERN_ERR "%s: no memory for coeffs\n",
- __func__);
+ __func__);
ret = -ENOMEM;
kfree(bch);
goto free_chan;
@@ -4726,93 +4726,93 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
if (port[Port_cnt] & 0x001) {
if (!m->opticalsupport) {
printk(KERN_INFO
- "This board has no optical "
- "support\n");
+ "This board has no optical "
+ "support\n");
} else {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: PORT set optical "
- "interfacs: card(%d) "
- "port(%d)\n",
- __func__,
- HFC_cnt + 1, 1);
+ "%s: PORT set optical "
+ "interfacs: card(%d) "
+ "port(%d)\n",
+ __func__,
+ HFC_cnt + 1, 1);
test_and_set_bit(HFC_CFG_OPTICAL,
- &hc->chan[hc->dslot].cfg);
+ &hc->chan[hc->dslot].cfg);
}
}
/* set LOS report */
if (port[Port_cnt] & 0x004) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: PORT set "
- "LOS report: card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
+ "LOS report: card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
test_and_set_bit(HFC_CFG_REPORT_LOS,
- &hc->chan[hc->dslot].cfg);
+ &hc->chan[hc->dslot].cfg);
}
/* set AIS report */
if (port[Port_cnt] & 0x008) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: PORT set "
- "AIS report: card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
+ "AIS report: card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
test_and_set_bit(HFC_CFG_REPORT_AIS,
- &hc->chan[hc->dslot].cfg);
+ &hc->chan[hc->dslot].cfg);
}
/* set SLIP report */
if (port[Port_cnt] & 0x010) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: PORT set SLIP report: "
- "card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
+ "%s: PORT set SLIP report: "
+ "card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
test_and_set_bit(HFC_CFG_REPORT_SLIP,
- &hc->chan[hc->dslot].cfg);
+ &hc->chan[hc->dslot].cfg);
}
/* set RDI report */
if (port[Port_cnt] & 0x020) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: PORT set RDI report: "
- "card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
+ "%s: PORT set RDI report: "
+ "card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
test_and_set_bit(HFC_CFG_REPORT_RDI,
- &hc->chan[hc->dslot].cfg);
+ &hc->chan[hc->dslot].cfg);
}
/* set CRC-4 Mode */
if (!(port[Port_cnt] & 0x100)) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: PORT turn on CRC4 report:"
- " card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
+ " card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
test_and_set_bit(HFC_CFG_CRC4,
- &hc->chan[hc->dslot].cfg);
+ &hc->chan[hc->dslot].cfg);
} else {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: PORT turn off CRC4"
- " report: card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
+ " report: card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
}
/* set forced clock */
if (port[Port_cnt] & 0x0200) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: PORT force getting clock from "
- "E1: card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
+ "E1: card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
test_and_set_bit(HFC_CHIP_E1CLOCK_GET, &hc->chip);
} else
- if (port[Port_cnt] & 0x0400) {
- if (debug & DEBUG_HFCMULTI_INIT)
- printk(KERN_DEBUG "%s: PORT force putting clock to "
- "E1: card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
- test_and_set_bit(HFC_CHIP_E1CLOCK_PUT, &hc->chip);
- }
+ if (port[Port_cnt] & 0x0400) {
+ if (debug & DEBUG_HFCMULTI_INIT)
+ printk(KERN_DEBUG "%s: PORT force putting clock to "
+ "E1: card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
+ test_and_set_bit(HFC_CHIP_E1CLOCK_PUT, &hc->chip);
+ }
/* set JATT PLL */
if (port[Port_cnt] & 0x0800) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: PORT disable JATT PLL on "
- "E1: card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, 1);
+ "E1: card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, 1);
test_and_set_bit(HFC_CHIP_RX_SYNC, &hc->chip);
}
/* set elastic jitter buffer */
@@ -4820,10 +4820,10 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
hc->chan[hc->dslot].jitter = (port[Port_cnt]>>12) & 0x3;
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: PORT set elastic "
- "buffer to %d: card(%d) port(%d)\n",
- __func__, hc->chan[hc->dslot].jitter,
- HFC_cnt + 1, 1);
+ "%s: PORT set elastic "
+ "buffer to %d: card(%d) port(%d)\n",
+ __func__, hc->chan[hc->dslot].jitter,
+ HFC_cnt + 1, 1);
} else
hc->chan[hc->dslot].jitter = 2; /* default */
snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-e1.%d", HFC_cnt + 1);
@@ -4853,7 +4853,7 @@ init_multi_port(struct hfc_multi *hc, int pt)
dch->hw = hc;
dch->dev.Dprotocols = (1 << ISDN_P_TE_S0) | (1 << ISDN_P_NT_S0);
dch->dev.Bprotocols = (1 << (ISDN_P_B_RAW & ISDN_P_B_MASK)) |
- (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
+ (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
dch->dev.D.send = handle_dmsg;
dch->dev.D.ctrl = hfcm_dctrl;
dch->dev.nrbchan = 2;
@@ -4866,14 +4866,14 @@ init_multi_port(struct hfc_multi *hc, int pt)
bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL);
if (!bch) {
printk(KERN_ERR "%s: no memory for bchannel\n",
- __func__);
+ __func__);
ret = -ENOMEM;
goto free_chan;
}
hc->chan[i + ch].coeff = kzalloc(512, GFP_KERNEL);
if (!hc->chan[i + ch].coeff) {
printk(KERN_ERR "%s: no memory for coeffs\n",
- __func__);
+ __func__);
ret = -ENOMEM;
kfree(bch);
goto free_chan;
@@ -4895,22 +4895,22 @@ init_multi_port(struct hfc_multi *hc, int pt)
if (port[Port_cnt] & 0x001) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: PROTOCOL set master clock: "
- "card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, pt + 1);
+ "%s: PROTOCOL set master clock: "
+ "card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, pt + 1);
if (dch->dev.D.protocol != ISDN_P_TE_S0) {
printk(KERN_ERR "Error: Master clock "
- "for port(%d) of card(%d) is only"
- " possible with TE-mode\n",
- pt + 1, HFC_cnt + 1);
+ "for port(%d) of card(%d) is only"
+ " possible with TE-mode\n",
+ pt + 1, HFC_cnt + 1);
ret = -EINVAL;
goto free_chan;
}
if (hc->masterclk >= 0) {
printk(KERN_ERR "Error: Master clock "
- "for port(%d) of card(%d) already "
- "defined for port(%d)\n",
- pt + 1, HFC_cnt + 1, hc->masterclk+1);
+ "for port(%d) of card(%d) already "
+ "defined for port(%d)\n",
+ pt + 1, HFC_cnt + 1, hc->masterclk + 1);
ret = -EINVAL;
goto free_chan;
}
@@ -4920,29 +4920,29 @@ init_multi_port(struct hfc_multi *hc, int pt)
if (port[Port_cnt] & 0x002) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: PROTOCOL set non capacitive "
- "transmitter: card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, pt + 1);
+ "%s: PROTOCOL set non capacitive "
+ "transmitter: card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, pt + 1);
test_and_set_bit(HFC_CFG_NONCAP_TX,
- &hc->chan[i + 2].cfg);
+ &hc->chan[i + 2].cfg);
}
/* disable E-channel */
if (port[Port_cnt] & 0x004) {
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: PROTOCOL disable E-channel: "
- "card(%d) port(%d)\n",
- __func__, HFC_cnt + 1, pt + 1);
+ "%s: PROTOCOL disable E-channel: "
+ "card(%d) port(%d)\n",
+ __func__, HFC_cnt + 1, pt + 1);
test_and_set_bit(HFC_CFG_DIS_ECHANNEL,
- &hc->chan[i + 2].cfg);
+ &hc->chan[i + 2].cfg);
}
if (hc->ctype == HFC_TYPE_XHFC) {
snprintf(name, MISDN_MAX_IDLEN - 1, "xhfc.%d-%d",
- HFC_cnt + 1, pt + 1);
+ HFC_cnt + 1, pt + 1);
ret = mISDN_register_device(&dch->dev, NULL, name);
} else {
snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-%ds.%d-%d",
- hc->ctype, HFC_cnt + 1, pt + 1);
+ hc->ctype, HFC_cnt + 1, pt + 1);
ret = mISDN_register_device(&dch->dev, &hc->pci_dev->dev, name);
}
if (ret)
@@ -4956,7 +4956,7 @@ free_chan:
static int
hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *ent)
{
int ret_err = 0;
int pt;
@@ -4967,22 +4967,22 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
if (HFC_cnt >= MAX_CARDS) {
printk(KERN_ERR "too many cards (max=%d).\n",
- MAX_CARDS);
+ MAX_CARDS);
return -EINVAL;
}
if ((type[HFC_cnt] & 0xff) && (type[HFC_cnt] & 0xff) != m->type) {
printk(KERN_WARNING "HFC-MULTI: Card '%s:%s' type %d found but "
- "type[%d] %d was supplied as module parameter\n",
- m->vendor_name, m->card_name, m->type, HFC_cnt,
- type[HFC_cnt] & 0xff);
+ "type[%d] %d was supplied as module parameter\n",
+ m->vendor_name, m->card_name, m->type, HFC_cnt,
+ type[HFC_cnt] & 0xff);
printk(KERN_WARNING "HFC-MULTI: Load module without parameters "
- "first, to see cards and their types.");
+ "first, to see cards and their types.");
return -EINVAL;
}
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG "%s: Registering %s:%s chip type %d (0x%x)\n",
- __func__, m->vendor_name, m->card_name, m->type,
- type[HFC_cnt]);
+ __func__, m->vendor_name, m->card_name, m->type,
+ type[HFC_cnt]);
/* allocate card+fifo structure */
hc = kzalloc(sizeof(struct hfc_multi), GFP_KERNEL);
@@ -5000,13 +5000,13 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
if (dslot[HFC_cnt] < 0 && hc->ctype == HFC_TYPE_E1) {
hc->dslot = 0;
printk(KERN_INFO "HFC-E1 card has disabled D-channel, but "
- "31 B-channels\n");
+ "31 B-channels\n");
}
if (dslot[HFC_cnt] > 0 && dslot[HFC_cnt] < 32
&& hc->ctype == HFC_TYPE_E1) {
hc->dslot = dslot[HFC_cnt];
printk(KERN_INFO "HFC-E1 card has alternating D-channel on "
- "time slot %d\n", dslot[HFC_cnt]);
+ "time slot %d\n", dslot[HFC_cnt]);
} else
hc->dslot = 16;
@@ -5019,7 +5019,7 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
hc->silence = 0x2a; /* alaw silence */
if ((poll >> 1) > sizeof(hc->silence_data)) {
printk(KERN_ERR "HFCMULTI error: silence_data too small, "
- "please fix\n");
+ "please fix\n");
return -EINVAL;
}
for (i = 0; i < (poll >> 1); i++)
@@ -5086,7 +5086,7 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
for (pt = 0; pt < hc->ports; pt++) {
if (Port_cnt >= MAX_PORTS) {
printk(KERN_ERR "too many ports (max=%d).\n",
- MAX_PORTS);
+ MAX_PORTS);
ret_err = -EINVAL;
goto free_card;
}
@@ -5096,9 +5096,9 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
ret_err = init_multi_port(hc, pt);
if (debug & DEBUG_HFCMULTI_INIT)
printk(KERN_DEBUG
- "%s: Registering D-channel, card(%d) port(%d)"
- "result %d\n",
- __func__, HFC_cnt + 1, pt, ret_err);
+ "%s: Registering D-channel, card(%d) port(%d)"
+ "result %d\n",
+ __func__, HFC_cnt + 1, pt, ret_err);
if (ret_err) {
while (pt) { /* release already registered ports */
@@ -5129,7 +5129,7 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
pmj = ~pmj & 0xf;
printk(KERN_INFO "%s: %s DIPs(0x%x) jumpers(0x%x)\n",
- m->vendor_name, m->card_name, dips, pmj);
+ m->vendor_name, m->card_name, dips, pmj);
break;
case DIP_8S:
/*
@@ -5151,16 +5151,16 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
/* disable PCI auxbridge function */
HFC_outb(hc, R_BRG_PCM_CFG, V_PCM_CLK);
printk(KERN_INFO "%s: %s DIPs(0x%x)\n",
- m->vendor_name, m->card_name, dips);
+ m->vendor_name, m->card_name, dips);
break;
case DIP_E1:
/*
* get DIP Setting for beroNet E1 cards
* DIP Setting: collect GPI 4/5/6/7 (R_GPI_IN0)
*/
- dips = (~HFC_inb(hc, R_GPI_IN0) & 0xF0)>>4;
+ dips = (~HFC_inb(hc, R_GPI_IN0) & 0xF0) >> 4;
printk(KERN_INFO "%s: %s DIPs(0x%x)\n",
- m->vendor_name, m->card_name, dips);
+ m->vendor_name, m->card_name, dips);
break;
}
@@ -5203,9 +5203,9 @@ static void __devexit hfc_remove_pci(struct pci_dev *pdev)
if (debug)
printk(KERN_INFO "removing hfc_multi card vendor:%x "
- "device:%x subvendor:%x subdevice:%x\n",
- pdev->vendor, pdev->device,
- pdev->subsystem_vendor, pdev->subsystem_device);
+ "device:%x subvendor:%x subdevice:%x\n",
+ pdev->vendor, pdev->device,
+ pdev->subsystem_vendor, pdev->subsystem_device);
if (card) {
spin_lock_irqsave(&HFClock, flags);
@@ -5214,7 +5214,7 @@ static void __devexit hfc_remove_pci(struct pci_dev *pdev)
} else {
if (debug)
printk(KERN_DEBUG "%s: drvdata already removed\n",
- __func__);
+ __func__);
}
}
@@ -5225,50 +5225,50 @@ static void __devexit hfc_remove_pci(struct pci_dev *pdev)
#define VENDOR_PRIM "PrimuX"
static const struct hm_map hfcm_map[] = {
-/*0*/ {VENDOR_BN, "HFC-1S Card (mini PCI)", 4, 1, 1, 3, 0, DIP_4S, 0, 0},
-/*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S, 0, 0},
-/*2*/ {VENDOR_BN, "HFC-2S Card (mini PCI)", 4, 2, 1, 3, 0, DIP_4S, 0, 0},
-/*3*/ {VENDOR_BN, "HFC-4S Card", 4, 4, 1, 2, 0, DIP_4S, 0, 0},
-/*4*/ {VENDOR_BN, "HFC-4S Card (mini PCI)", 4, 4, 1, 2, 0, 0, 0, 0},
-/*5*/ {VENDOR_CCD, "HFC-4S Eval (old)", 4, 4, 0, 0, 0, 0, 0, 0},
-/*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, DIP_4S, 0, 0},
-/*7*/ {VENDOR_CCD, "HFC-4S", 4, 4, 1, 2, 0, 0, 0, 0},
-/*8*/ {VENDOR_DIG, "HFC-4S Card", 4, 4, 0, 2, 0, 0, HFC_IO_MODE_REGIO, 0},
-/*9*/ {VENDOR_CCD, "HFC-4S Swyx 4xS0 SX2 QuadBri", 4, 4, 1, 2, 0, 0, 0, 0},
-/*10*/ {VENDOR_JH, "HFC-4S (junghanns 2.0)", 4, 4, 1, 2, 0, 0, 0, 0},
-/*11*/ {VENDOR_PRIM, "HFC-2S Primux Card", 4, 2, 0, 0, 0, 0, 0, 0},
-
-/*12*/ {VENDOR_BN, "HFC-8S Card", 8, 8, 1, 0, 0, 0, 0, 0},
-/*13*/ {VENDOR_BN, "HFC-8S Card (+)", 8, 8, 1, 8, 0, DIP_8S,
- HFC_IO_MODE_REGIO, 0},
-/*14*/ {VENDOR_CCD, "HFC-8S Eval (old)", 8, 8, 0, 0, 0, 0, 0, 0},
-/*15*/ {VENDOR_CCD, "HFC-8S IOB4ST Recording", 8, 8, 1, 0, 0, 0, 0, 0},
-
-/*16*/ {VENDOR_CCD, "HFC-8S IOB8ST", 8, 8, 1, 0, 0, 0, 0, 0},
-/*17*/ {VENDOR_CCD, "HFC-8S", 8, 8, 1, 0, 0, 0, 0, 0},
-/*18*/ {VENDOR_CCD, "HFC-8S", 8, 8, 1, 0, 0, 0, 0, 0},
-
-/*19*/ {VENDOR_BN, "HFC-E1 Card", 1, 1, 0, 1, 0, DIP_E1, 0, 0},
-/*20*/ {VENDOR_BN, "HFC-E1 Card (mini PCI)", 1, 1, 0, 1, 0, 0, 0, 0},
-/*21*/ {VENDOR_BN, "HFC-E1+ Card (Dual)", 1, 1, 0, 1, 0, DIP_E1, 0, 0},
-/*22*/ {VENDOR_BN, "HFC-E1 Card (Dual)", 1, 1, 0, 1, 0, DIP_E1, 0, 0},
-
-/*23*/ {VENDOR_CCD, "HFC-E1 Eval (old)", 1, 1, 0, 0, 0, 0, 0, 0},
-/*24*/ {VENDOR_CCD, "HFC-E1 IOB1E1", 1, 1, 0, 1, 0, 0, 0, 0},
-/*25*/ {VENDOR_CCD, "HFC-E1", 1, 1, 0, 1, 0, 0, 0, 0},
-
-/*26*/ {VENDOR_CCD, "HFC-4S Speech Design", 4, 4, 0, 0, 0, 0,
- HFC_IO_MODE_PLXSD, 0},
-/*27*/ {VENDOR_CCD, "HFC-E1 Speech Design", 1, 1, 0, 0, 0, 0,
- HFC_IO_MODE_PLXSD, 0},
-/*28*/ {VENDOR_CCD, "HFC-4S OpenVox", 4, 4, 1, 0, 0, 0, 0, 0},
-/*29*/ {VENDOR_CCD, "HFC-2S OpenVox", 4, 2, 1, 0, 0, 0, 0, 0},
-/*30*/ {VENDOR_CCD, "HFC-8S OpenVox", 8, 8, 1, 0, 0, 0, 0, 0},
-/*31*/ {VENDOR_CCD, "XHFC-4S Speech Design", 5, 4, 0, 0, 0, 0,
- HFC_IO_MODE_EMBSD, XHFC_IRQ},
-/*32*/ {VENDOR_JH, "HFC-8S (junghanns)", 8, 8, 1, 0, 0, 0, 0, 0},
-/*33*/ {VENDOR_BN, "HFC-2S Beronet Card PCIe", 4, 2, 1, 3, 0, DIP_4S, 0, 0},
-/*34*/ {VENDOR_BN, "HFC-4S Beronet Card PCIe", 4, 4, 1, 2, 0, DIP_4S, 0, 0},
+ /*0*/ {VENDOR_BN, "HFC-1S Card (mini PCI)", 4, 1, 1, 3, 0, DIP_4S, 0, 0},
+ /*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S, 0, 0},
+ /*2*/ {VENDOR_BN, "HFC-2S Card (mini PCI)", 4, 2, 1, 3, 0, DIP_4S, 0, 0},
+ /*3*/ {VENDOR_BN, "HFC-4S Card", 4, 4, 1, 2, 0, DIP_4S, 0, 0},
+ /*4*/ {VENDOR_BN, "HFC-4S Card (mini PCI)", 4, 4, 1, 2, 0, 0, 0, 0},
+ /*5*/ {VENDOR_CCD, "HFC-4S Eval (old)", 4, 4, 0, 0, 0, 0, 0, 0},
+ /*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, DIP_4S, 0, 0},
+ /*7*/ {VENDOR_CCD, "HFC-4S", 4, 4, 1, 2, 0, 0, 0, 0},
+ /*8*/ {VENDOR_DIG, "HFC-4S Card", 4, 4, 0, 2, 0, 0, HFC_IO_MODE_REGIO, 0},
+ /*9*/ {VENDOR_CCD, "HFC-4S Swyx 4xS0 SX2 QuadBri", 4, 4, 1, 2, 0, 0, 0, 0},
+ /*10*/ {VENDOR_JH, "HFC-4S (junghanns 2.0)", 4, 4, 1, 2, 0, 0, 0, 0},
+ /*11*/ {VENDOR_PRIM, "HFC-2S Primux Card", 4, 2, 0, 0, 0, 0, 0, 0},
+
+ /*12*/ {VENDOR_BN, "HFC-8S Card", 8, 8, 1, 0, 0, 0, 0, 0},
+ /*13*/ {VENDOR_BN, "HFC-8S Card (+)", 8, 8, 1, 8, 0, DIP_8S,
+ HFC_IO_MODE_REGIO, 0},
+ /*14*/ {VENDOR_CCD, "HFC-8S Eval (old)", 8, 8, 0, 0, 0, 0, 0, 0},
+ /*15*/ {VENDOR_CCD, "HFC-8S IOB4ST Recording", 8, 8, 1, 0, 0, 0, 0, 0},
+
+ /*16*/ {VENDOR_CCD, "HFC-8S IOB8ST", 8, 8, 1, 0, 0, 0, 0, 0},
+ /*17*/ {VENDOR_CCD, "HFC-8S", 8, 8, 1, 0, 0, 0, 0, 0},
+ /*18*/ {VENDOR_CCD, "HFC-8S", 8, 8, 1, 0, 0, 0, 0, 0},
+
+ /*19*/ {VENDOR_BN, "HFC-E1 Card", 1, 1, 0, 1, 0, DIP_E1, 0, 0},
+ /*20*/ {VENDOR_BN, "HFC-E1 Card (mini PCI)", 1, 1, 0, 1, 0, 0, 0, 0},
+ /*21*/ {VENDOR_BN, "HFC-E1+ Card (Dual)", 1, 1, 0, 1, 0, DIP_E1, 0, 0},
+ /*22*/ {VENDOR_BN, "HFC-E1 Card (Dual)", 1, 1, 0, 1, 0, DIP_E1, 0, 0},
+
+ /*23*/ {VENDOR_CCD, "HFC-E1 Eval (old)", 1, 1, 0, 0, 0, 0, 0, 0},
+ /*24*/ {VENDOR_CCD, "HFC-E1 IOB1E1", 1, 1, 0, 1, 0, 0, 0, 0},
+ /*25*/ {VENDOR_CCD, "HFC-E1", 1, 1, 0, 1, 0, 0, 0, 0},
+
+ /*26*/ {VENDOR_CCD, "HFC-4S Speech Design", 4, 4, 0, 0, 0, 0,
+ HFC_IO_MODE_PLXSD, 0},
+ /*27*/ {VENDOR_CCD, "HFC-E1 Speech Design", 1, 1, 0, 0, 0, 0,
+ HFC_IO_MODE_PLXSD, 0},
+ /*28*/ {VENDOR_CCD, "HFC-4S OpenVox", 4, 4, 1, 0, 0, 0, 0, 0},
+ /*29*/ {VENDOR_CCD, "HFC-2S OpenVox", 4, 2, 1, 0, 0, 0, 0, 0},
+ /*30*/ {VENDOR_CCD, "HFC-8S OpenVox", 8, 8, 1, 0, 0, 0, 0, 0},
+ /*31*/ {VENDOR_CCD, "XHFC-4S Speech Design", 5, 4, 0, 0, 0, 0,
+ HFC_IO_MODE_EMBSD, XHFC_IRQ},
+ /*32*/ {VENDOR_JH, "HFC-8S (junghanns)", 8, 8, 1, 0, 0, 0, 0, 0},
+ /*33*/ {VENDOR_BN, "HFC-2S Beronet Card PCIe", 4, 2, 1, 3, 0, DIP_4S, 0, 0},
+ /*34*/ {VENDOR_BN, "HFC-4S Beronet Card PCIe", 4, 4, 1, 2, 0, DIP_4S, 0, 0},
};
#undef H
@@ -5277,83 +5277,83 @@ static struct pci_device_id hfmultipci_ids[] __devinitdata = {
/* Cards with HFC-4S Chip */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BN1SM, 0, 0, H(0)}, /* BN1S mini PCI */
+ PCI_SUBDEVICE_ID_CCD_BN1SM, 0, 0, H(0)}, /* BN1S mini PCI */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BN2S, 0, 0, H(1)}, /* BN2S */
+ PCI_SUBDEVICE_ID_CCD_BN2S, 0, 0, H(1)}, /* BN2S */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BN2SM, 0, 0, H(2)}, /* BN2S mini PCI */
+ PCI_SUBDEVICE_ID_CCD_BN2SM, 0, 0, H(2)}, /* BN2S mini PCI */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BN4S, 0, 0, H(3)}, /* BN4S */
+ PCI_SUBDEVICE_ID_CCD_BN4S, 0, 0, H(3)}, /* BN4S */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BN4SM, 0, 0, H(4)}, /* BN4S mini PCI */
+ PCI_SUBDEVICE_ID_CCD_BN4SM, 0, 0, H(4)}, /* BN4S mini PCI */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_DEVICE_ID_CCD_HFC4S, 0, 0, H(5)}, /* Old Eval */
+ PCI_DEVICE_ID_CCD_HFC4S, 0, 0, H(5)}, /* Old Eval */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_IOB4ST, 0, 0, H(6)}, /* IOB4ST */
+ PCI_SUBDEVICE_ID_CCD_IOB4ST, 0, 0, H(6)}, /* IOB4ST */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_HFC4S, 0, 0, H(7)}, /* 4S */
+ PCI_SUBDEVICE_ID_CCD_HFC4S, 0, 0, H(7)}, /* 4S */
{ PCI_VENDOR_ID_DIGIUM, PCI_DEVICE_ID_DIGIUM_HFC4S,
- PCI_VENDOR_ID_DIGIUM, PCI_DEVICE_ID_DIGIUM_HFC4S, 0, 0, H(8)},
+ PCI_VENDOR_ID_DIGIUM, PCI_DEVICE_ID_DIGIUM_HFC4S, 0, 0, H(8)},
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_SWYX4S, 0, 0, H(9)}, /* 4S Swyx */
+ PCI_SUBDEVICE_ID_CCD_SWYX4S, 0, 0, H(9)}, /* 4S Swyx */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_JH4S20, 0, 0, H(10)},
+ PCI_SUBDEVICE_ID_CCD_JH4S20, 0, 0, H(10)},
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_PMX2S, 0, 0, H(11)}, /* Primux */
+ PCI_SUBDEVICE_ID_CCD_PMX2S, 0, 0, H(11)}, /* Primux */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_OV4S, 0, 0, H(28)}, /* OpenVox 4 */
+ PCI_SUBDEVICE_ID_CCD_OV4S, 0, 0, H(28)}, /* OpenVox 4 */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_OV2S, 0, 0, H(29)}, /* OpenVox 2 */
+ PCI_SUBDEVICE_ID_CCD_OV2S, 0, 0, H(29)}, /* OpenVox 2 */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- 0xb761, 0, 0, H(33)}, /* BN2S PCIe */
+ 0xb761, 0, 0, H(33)}, /* BN2S PCIe */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,
- 0xb762, 0, 0, H(34)}, /* BN4S PCIe */
+ 0xb762, 0, 0, H(34)}, /* BN4S PCIe */
/* Cards with HFC-8S Chip */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BN8S, 0, 0, H(12)}, /* BN8S */
+ PCI_SUBDEVICE_ID_CCD_BN8S, 0, 0, H(12)}, /* BN8S */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BN8SP, 0, 0, H(13)}, /* BN8S+ */
+ PCI_SUBDEVICE_ID_CCD_BN8SP, 0, 0, H(13)}, /* BN8S+ */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_DEVICE_ID_CCD_HFC8S, 0, 0, H(14)}, /* old Eval */
+ PCI_DEVICE_ID_CCD_HFC8S, 0, 0, H(14)}, /* old Eval */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_IOB8STR, 0, 0, H(15)}, /* IOB8ST Recording */
+ PCI_SUBDEVICE_ID_CCD_IOB8STR, 0, 0, H(15)}, /* IOB8ST Recording */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_IOB8ST, 0, 0, H(16)}, /* IOB8ST */
+ PCI_SUBDEVICE_ID_CCD_IOB8ST, 0, 0, H(16)}, /* IOB8ST */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_IOB8ST_1, 0, 0, H(17)}, /* IOB8ST */
+ PCI_SUBDEVICE_ID_CCD_IOB8ST_1, 0, 0, H(17)}, /* IOB8ST */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_HFC8S, 0, 0, H(18)}, /* 8S */
+ PCI_SUBDEVICE_ID_CCD_HFC8S, 0, 0, H(18)}, /* 8S */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_OV8S, 0, 0, H(30)}, /* OpenVox 8 */
+ PCI_SUBDEVICE_ID_CCD_OV8S, 0, 0, H(30)}, /* OpenVox 8 */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_JH8S, 0, 0, H(32)}, /* Junganns 8S */
+ PCI_SUBDEVICE_ID_CCD_JH8S, 0, 0, H(32)}, /* Junganns 8S */
/* Cards with HFC-E1 Chip */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BNE1, 0, 0, H(19)}, /* BNE1 */
+ PCI_SUBDEVICE_ID_CCD_BNE1, 0, 0, H(19)}, /* BNE1 */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BNE1M, 0, 0, H(20)}, /* BNE1 mini PCI */
+ PCI_SUBDEVICE_ID_CCD_BNE1M, 0, 0, H(20)}, /* BNE1 mini PCI */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BNE1DP, 0, 0, H(21)}, /* BNE1 + (Dual) */
+ PCI_SUBDEVICE_ID_CCD_BNE1DP, 0, 0, H(21)}, /* BNE1 + (Dual) */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_BNE1D, 0, 0, H(22)}, /* BNE1 (Dual) */
+ PCI_SUBDEVICE_ID_CCD_BNE1D, 0, 0, H(22)}, /* BNE1 (Dual) */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
- PCI_DEVICE_ID_CCD_HFCE1, 0, 0, H(23)}, /* Old Eval */
+ PCI_DEVICE_ID_CCD_HFCE1, 0, 0, H(23)}, /* Old Eval */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_IOB1E1, 0, 0, H(24)}, /* IOB1E1 */
+ PCI_SUBDEVICE_ID_CCD_IOB1E1, 0, 0, H(24)}, /* IOB1E1 */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_HFCE1, 0, 0, H(25)}, /* E1 */
+ PCI_SUBDEVICE_ID_CCD_HFCE1, 0, 0, H(25)}, /* E1 */
{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_SPD4S, 0, 0, H(26)}, /* PLX PCI Bridge */
+ PCI_SUBDEVICE_ID_CCD_SPD4S, 0, 0, H(26)}, /* PLX PCI Bridge */
{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_SPDE1, 0, 0, H(27)}, /* PLX PCI Bridge */
+ PCI_SUBDEVICE_ID_CCD_SPDE1, 0, 0, H(27)}, /* PLX PCI Bridge */
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
- PCI_SUBDEVICE_ID_CCD_JHSE1, 0, 0, H(25)}, /* Junghanns E1 */
+ PCI_SUBDEVICE_ID_CCD_JHSE1, 0, 0, H(25)}, /* Junghanns E1 */
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_HFC4S), 0 },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_HFC8S), 0 },
@@ -5371,16 +5371,16 @@ hfcmulti_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
int ret;
if (m == NULL && ent->vendor == PCI_VENDOR_ID_CCD && (
- ent->device == PCI_DEVICE_ID_CCD_HFC4S ||
- ent->device == PCI_DEVICE_ID_CCD_HFC8S ||
- ent->device == PCI_DEVICE_ID_CCD_HFCE1)) {
+ ent->device == PCI_DEVICE_ID_CCD_HFC4S ||
+ ent->device == PCI_DEVICE_ID_CCD_HFC8S ||
+ ent->device == PCI_DEVICE_ID_CCD_HFCE1)) {
printk(KERN_ERR
- "Unknown HFC multiport controller (vendor:%04x device:%04x "
- "subvendor:%04x subdevice:%04x)\n", pdev->vendor,
- pdev->device, pdev->subsystem_vendor,
- pdev->subsystem_device);
+ "Unknown HFC multiport controller (vendor:%04x device:%04x "
+ "subvendor:%04x subdevice:%04x)\n", pdev->vendor,
+ pdev->device, pdev->subsystem_vendor,
+ pdev->subsystem_device);
printk(KERN_ERR
- "Please contact the driver maintainer for support.\n");
+ "Please contact the driver maintainer for support.\n");
return -ENODEV;
}
ret = hfcmulti_init(m, pdev, ent);
@@ -5453,7 +5453,7 @@ HFCmulti_init(void)
break;
default:
printk(KERN_ERR
- "%s: Wrong poll value (%d).\n", __func__, poll);
+ "%s: Wrong poll value (%d).\n", __func__, poll);
err = -EINVAL;
return err;
@@ -5485,7 +5485,7 @@ HFCmulti_init(void)
err = hfcmulti_init(&m, NULL, NULL);
if (err) {
printk(KERN_ERR "error registering embedded driver: "
- "%x\n", err);
+ "%x\n", err);
return err;
}
HFC_cnt++;
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index 3261de18a91..d055ae7fa04 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -109,11 +109,11 @@ struct hfcPCI_hw {
unsigned char bswapped;
unsigned char protocol;
int nt_timer;
- unsigned char __iomem *pci_io; /* start of PCI IO memory */
+ unsigned char __iomem *pci_io; /* start of PCI IO memory */
dma_addr_t dmahandle;
void *fifos; /* FIFO memory */
int last_bfifo_cnt[2];
- /* marker saving last b-fifo frame count */
+ /* marker saving last b-fifo frame count */
struct timer_list timer;
};
@@ -216,7 +216,7 @@ reset_hfcpci(struct hfc_pci *hc)
disable_hwirq(hc);
/* enable memory ports + busmaster */
pci_write_config_word(hc->pdev, PCI_COMMAND,
- PCI_ENA_MEMIO + PCI_ENA_MASTER);
+ PCI_ENA_MEMIO + PCI_ENA_MASTER);
val = Read_hfc(hc, HFCPCI_STATUS);
printk(KERN_DEBUG "HFC-PCI status(%x) before reset\n", val);
hc->hw.cirm = HFCPCI_RESET; /* Reset On */
@@ -255,7 +255,7 @@ reset_hfcpci(struct hfc_pci *hc)
Write_hfc(hc, HFCPCI_CTMT, hc->hw.ctmt);
hc->hw.int_m1 = HFCPCI_INTS_DTRANS | HFCPCI_INTS_DREC |
- HFCPCI_INTS_L1STATE | HFCPCI_INTS_TIMER;
+ HFCPCI_INTS_L1STATE | HFCPCI_INTS_TIMER;
Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1);
/* Clear already pending ints */
@@ -319,10 +319,10 @@ static struct bchannel *
Sel_BCS(struct hfc_pci *hc, int channel)
{
if (test_bit(FLG_ACTIVE, &hc->bch[0].Flags) &&
- (hc->bch[0].nr & channel))
+ (hc->bch[0].nr & channel))
return &hc->bch[0];
else if (test_bit(FLG_ACTIVE, &hc->bch[1].Flags) &&
- (hc->bch[1].nr & channel))
+ (hc->bch[1].nr & channel))
return &hc->bch[1];
else
return NULL;
@@ -352,7 +352,7 @@ hfcpci_clear_fifo_rx(struct hfc_pci *hc, int fifo)
bzr->f2 = bzr->f1; /* init F pointers to remain constant */
bzr->za[MAX_B_FRAMES].z1 = cpu_to_le16(B_FIFO_SIZE + B_SUB_VAL - 1);
bzr->za[MAX_B_FRAMES].z2 = cpu_to_le16(
- le16_to_cpu(bzr->za[MAX_B_FRAMES].z1));
+ le16_to_cpu(bzr->za[MAX_B_FRAMES].z1));
if (fifo_state)
hc->hw.fifo_en |= fifo_state;
Write_hfc(hc, HFCPCI_FIFO_EN, hc->hw.fifo_en);
@@ -378,11 +378,11 @@ static void hfcpci_clear_fifo_tx(struct hfc_pci *hc, int fifo)
Write_hfc(hc, HFCPCI_FIFO_EN, hc->hw.fifo_en);
if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG "hfcpci_clear_fifo_tx%d f1(%x) f2(%x) "
- "z1(%x) z2(%x) state(%x)\n",
- fifo, bzt->f1, bzt->f2,
- le16_to_cpu(bzt->za[MAX_B_FRAMES].z1),
- le16_to_cpu(bzt->za[MAX_B_FRAMES].z2),
- fifo_state);
+ "z1(%x) z2(%x) state(%x)\n",
+ fifo, bzt->f1, bzt->f2,
+ le16_to_cpu(bzt->za[MAX_B_FRAMES].z1),
+ le16_to_cpu(bzt->za[MAX_B_FRAMES].z2),
+ fifo_state);
bzt->f2 = MAX_B_FRAMES;
bzt->f1 = bzt->f2; /* init F pointers to remain constant */
bzt->za[MAX_B_FRAMES].z1 = cpu_to_le16(B_FIFO_SIZE + B_SUB_VAL - 1);
@@ -392,10 +392,10 @@ static void hfcpci_clear_fifo_tx(struct hfc_pci *hc, int fifo)
Write_hfc(hc, HFCPCI_FIFO_EN, hc->hw.fifo_en);
if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG
- "hfcpci_clear_fifo_tx%d f1(%x) f2(%x) z1(%x) z2(%x)\n",
- fifo, bzt->f1, bzt->f2,
- le16_to_cpu(bzt->za[MAX_B_FRAMES].z1),
- le16_to_cpu(bzt->za[MAX_B_FRAMES].z2));
+ "hfcpci_clear_fifo_tx%d f1(%x) f2(%x) z1(%x) z2(%x)\n",
+ fifo, bzt->f1, bzt->f2,
+ le16_to_cpu(bzt->za[MAX_B_FRAMES].z1),
+ le16_to_cpu(bzt->za[MAX_B_FRAMES].z2));
}
/*
@@ -403,7 +403,7 @@ static void hfcpci_clear_fifo_tx(struct hfc_pci *hc, int fifo)
*/
static void
hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz,
- u_char *bdata, int count)
+ u_char *bdata, int count)
{
u_char *ptr, *ptr1, new_f2;
int maxlen, new_z2;
@@ -420,7 +420,7 @@ hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz,
(*(bdata + (le16_to_cpu(zp->z1) - B_SUB_VAL)))) {
if (bch->debug & DEBUG_HW)
printk(KERN_DEBUG "hfcpci_empty_fifo: incoming packet "
- "invalid length %d or crc\n", count);
+ "invalid length %d or crc\n", count);
#ifdef ERROR_STATISTIC
bch->err_inv++;
#endif
@@ -439,10 +439,10 @@ hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz,
maxlen = count; /* complete transfer */
else
maxlen = B_FIFO_SIZE + B_SUB_VAL -
- le16_to_cpu(zp->z2); /* maximum */
+ le16_to_cpu(zp->z2); /* maximum */
ptr1 = bdata + (le16_to_cpu(zp->z2) - B_SUB_VAL);
- /* start of data */
+ /* start of data */
memcpy(ptr, ptr1, maxlen); /* copy data */
count -= maxlen;
@@ -480,33 +480,33 @@ receive_dmsg(struct hfc_pci *hc)
rcnt++;
if (dch->debug & DEBUG_HW_DCHANNEL)
printk(KERN_DEBUG
- "hfcpci recd f1(%d) f2(%d) z1(%x) z2(%x) cnt(%d)\n",
- df->f1, df->f2,
- le16_to_cpu(zp->z1),
- le16_to_cpu(zp->z2),
- rcnt);
+ "hfcpci recd f1(%d) f2(%d) z1(%x) z2(%x) cnt(%d)\n",
+ df->f1, df->f2,
+ le16_to_cpu(zp->z1),
+ le16_to_cpu(zp->z2),
+ rcnt);
if ((rcnt > MAX_DFRAME_LEN + 3) || (rcnt < 4) ||
(df->data[le16_to_cpu(zp->z1)])) {
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG
- "empty_fifo hfcpci paket inv. len "
- "%d or crc %d\n",
- rcnt,
- df->data[le16_to_cpu(zp->z1)]);
+ "empty_fifo hfcpci paket inv. len "
+ "%d or crc %d\n",
+ rcnt,
+ df->data[le16_to_cpu(zp->z1)]);
#ifdef ERROR_STATISTIC
cs->err_rx++;
#endif
df->f2 = ((df->f2 + 1) & MAX_D_FRAMES) |
- (MAX_D_FRAMES + 1); /* next buffer */
+ (MAX_D_FRAMES + 1); /* next buffer */
df->za[df->f2 & D_FREG_MASK].z2 =
- cpu_to_le16((le16_to_cpu(zp->z2) + rcnt) &
- (D_FIFO_SIZE - 1));
+ cpu_to_le16((le16_to_cpu(zp->z2) + rcnt) &
+ (D_FIFO_SIZE - 1));
} else {
dch->rx_skb = mI_alloc_skb(rcnt - 3, GFP_ATOMIC);
if (!dch->rx_skb) {
printk(KERN_WARNING
- "HFC-PCI: D receive out of memory\n");
+ "HFC-PCI: D receive out of memory\n");
break;
}
total = rcnt;
@@ -517,10 +517,10 @@ receive_dmsg(struct hfc_pci *hc)
maxlen = rcnt; /* complete transfer */
else
maxlen = D_FIFO_SIZE - le16_to_cpu(zp->z2);
- /* maximum */
+ /* maximum */
ptr1 = df->data + le16_to_cpu(zp->z2);
- /* start of data */
+ /* start of data */
memcpy(ptr, ptr1, maxlen); /* copy data */
rcnt -= maxlen;
@@ -530,9 +530,9 @@ receive_dmsg(struct hfc_pci *hc)
memcpy(ptr, ptr1, rcnt); /* rest */
}
df->f2 = ((df->f2 + 1) & MAX_D_FRAMES) |
- (MAX_D_FRAMES + 1); /* next buffer */
+ (MAX_D_FRAMES + 1); /* next buffer */
df->za[df->f2 & D_FREG_MASK].z2 = cpu_to_le16((
- le16_to_cpu(zp->z2) + total) & (D_FIFO_SIZE - 1));
+ le16_to_cpu(zp->z2) + total) & (D_FIFO_SIZE - 1));
recv_Dchannel(dch);
}
}
@@ -544,9 +544,9 @@ receive_dmsg(struct hfc_pci *hc)
*/
static void
hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *rxbz,
- struct bzfifo *txbz, u_char *bdata)
+ struct bzfifo *txbz, u_char *bdata)
{
- __le16 *z1r, *z2r, *z1t, *z2t;
+ __le16 *z1r, *z2r, *z1t, *z2t;
int new_z2, fcnt_rx, fcnt_tx, maxlen;
u_char *ptr, *ptr1;
@@ -573,9 +573,9 @@ hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *rxbz,
fcnt_tx = le16_to_cpu(*z2t) - le16_to_cpu(*z1t);
if (fcnt_tx <= 0)
fcnt_tx += B_FIFO_SIZE;
- /* fcnt_tx contains available bytes in tx-fifo */
+ /* fcnt_tx contains available bytes in tx-fifo */
fcnt_tx = B_FIFO_SIZE - fcnt_tx;
- /* remaining bytes to send (bytes in tx-fifo) */
+ /* remaining bytes to send (bytes in tx-fifo) */
bch->rx_skb = mI_alloc_skb(fcnt_rx, GFP_ATOMIC);
if (bch->rx_skb) {
@@ -584,10 +584,10 @@ hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *rxbz,
maxlen = fcnt_rx; /* complete transfer */
else
maxlen = B_FIFO_SIZE + B_SUB_VAL - le16_to_cpu(*z2r);
- /* maximum */
+ /* maximum */
ptr1 = bdata + (le16_to_cpu(*z2r) - B_SUB_VAL);
- /* start of data */
+ /* start of data */
memcpy(ptr, ptr1, maxlen); /* copy data */
fcnt_rx -= maxlen;
@@ -632,7 +632,7 @@ Begin:
if (rxbz->f1 != rxbz->f2) {
if (bch->debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG "hfcpci rec ch(%x) f1(%d) f2(%d)\n",
- bch->nr, rxbz->f1, rxbz->f2);
+ bch->nr, rxbz->f1, rxbz->f2);
zp = &rxbz->za[rxbz->f2];
rcnt = le16_to_cpu(zp->z1) - le16_to_cpu(zp->z2);
@@ -641,9 +641,9 @@ Begin:
rcnt++;
if (bch->debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG
- "hfcpci rec ch(%x) z1(%x) z2(%x) cnt(%d)\n",
- bch->nr, le16_to_cpu(zp->z1),
- le16_to_cpu(zp->z2), rcnt);
+ "hfcpci rec ch(%x) z1(%x) z2(%x) cnt(%d)\n",
+ bch->nr, le16_to_cpu(zp->z1),
+ le16_to_cpu(zp->z2), rcnt);
hfcpci_empty_bfifo(bch, rxbz, bdata, rcnt);
rcnt = rxbz->f1 - rxbz->f2;
if (rcnt < 0)
@@ -691,15 +691,15 @@ hfcpci_fill_dfifo(struct hfc_pci *hc)
if (dch->debug & DEBUG_HW_DFIFO)
printk(KERN_DEBUG "%s:f1(%d) f2(%d) z1(f1)(%x)\n", __func__,
- df->f1, df->f2,
- le16_to_cpu(df->za[df->f1 & D_FREG_MASK].z1));
+ df->f1, df->f2,
+ le16_to_cpu(df->za[df->f1 & D_FREG_MASK].z1));
fcnt = df->f1 - df->f2; /* frame count actually buffered */
if (fcnt < 0)
fcnt += (MAX_D_FRAMES + 1); /* if wrap around */
if (fcnt > (MAX_D_FRAMES - 1)) {
if (dch->debug & DEBUG_HW_DCHANNEL)
printk(KERN_DEBUG
- "hfcpci_fill_Dfifo more as 14 frames\n");
+ "hfcpci_fill_Dfifo more as 14 frames\n");
#ifdef ERROR_STATISTIC
cs->err_tx++;
#endif
@@ -707,25 +707,25 @@ hfcpci_fill_dfifo(struct hfc_pci *hc)
}
/* now determine free bytes in FIFO buffer */
maxlen = le16_to_cpu(df->za[df->f2 & D_FREG_MASK].z2) -
- le16_to_cpu(df->za[df->f1 & D_FREG_MASK].z1) - 1;
+ le16_to_cpu(df->za[df->f1 & D_FREG_MASK].z1) - 1;
if (maxlen <= 0)
maxlen += D_FIFO_SIZE; /* count now contains available bytes */
if (dch->debug & DEBUG_HW_DCHANNEL)
printk(KERN_DEBUG "hfcpci_fill_Dfifo count(%d/%d)\n",
- count, maxlen);
+ count, maxlen);
if (count > maxlen) {
if (dch->debug & DEBUG_HW_DCHANNEL)
printk(KERN_DEBUG "hfcpci_fill_Dfifo no fifo mem\n");
return;
}
new_z1 = (le16_to_cpu(df->za[df->f1 & D_FREG_MASK].z1) + count) &
- (D_FIFO_SIZE - 1);
+ (D_FIFO_SIZE - 1);
new_f1 = ((df->f1 + 1) & D_FREG_MASK) | (D_FREG_MASK + 1);
src = dch->tx_skb->data + dch->tx_idx; /* source pointer */
dst = df->data + le16_to_cpu(df->za[df->f1 & D_FREG_MASK].z1);
maxlen = D_FIFO_SIZE - le16_to_cpu(df->za[df->f1 & D_FREG_MASK].z1);
- /* end fifo */
+ /* end fifo */
if (maxlen > count)
maxlen = count; /* limit size */
memcpy(dst, src, maxlen); /* first copy */
@@ -737,9 +737,9 @@ hfcpci_fill_dfifo(struct hfc_pci *hc)
memcpy(dst, src, count);
}
df->za[new_f1 & D_FREG_MASK].z1 = cpu_to_le16(new_z1);
- /* for next buffer */
+ /* for next buffer */
df->za[df->f1 & D_FREG_MASK].z1 = cpu_to_le16(new_z1);
- /* new pos actual buffer */
+ /* new pos actual buffer */
df->f1 = new_f1; /* next frame */
dch->tx_idx = dch->tx_skb->len;
}
@@ -750,7 +750,7 @@ hfcpci_fill_dfifo(struct hfc_pci *hc)
static void
hfcpci_fill_fifo(struct bchannel *bch)
{
- struct hfc_pci *hc = bch->hw;
+ struct hfc_pci *hc = bch->hw;
int maxlen, fcnt;
int count, new_z1;
struct bzfifo *bz;
@@ -776,35 +776,35 @@ hfcpci_fill_fifo(struct bchannel *bch)
z2t = z1t + 1;
if (bch->debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG "hfcpci_fill_fifo_trans ch(%x) "
- "cnt(%d) z1(%x) z2(%x)\n", bch->nr, count,
- le16_to_cpu(*z1t), le16_to_cpu(*z2t));
+ "cnt(%d) z1(%x) z2(%x)\n", bch->nr, count,
+ le16_to_cpu(*z1t), le16_to_cpu(*z2t));
fcnt = le16_to_cpu(*z2t) - le16_to_cpu(*z1t);
if (fcnt <= 0)
fcnt += B_FIFO_SIZE;
- /* fcnt contains available bytes in fifo */
+ /* fcnt contains available bytes in fifo */
fcnt = B_FIFO_SIZE - fcnt;
- /* remaining bytes to send (bytes in fifo) */
+ /* remaining bytes to send (bytes in fifo) */
/* "fill fifo if empty" feature */
if (test_bit(FLG_FILLEMPTY, &bch->Flags) && !fcnt) {
/* printk(KERN_DEBUG "%s: buffer empty, so we have "
- "underrun\n", __func__); */
+ "underrun\n", __func__); */
/* fill buffer, to prevent future underrun */
count = HFCPCI_FILLEMPTY;
new_z1 = le16_to_cpu(*z1t) + count;
- /* new buffer Position */
+ /* new buffer Position */
if (new_z1 >= (B_FIFO_SIZE + B_SUB_VAL))
new_z1 -= B_FIFO_SIZE; /* buffer wrap */
dst = bdata + (le16_to_cpu(*z1t) - B_SUB_VAL);
maxlen = (B_FIFO_SIZE + B_SUB_VAL) - le16_to_cpu(*z1t);
- /* end of fifo */
+ /* end of fifo */
if (bch->debug & DEBUG_HW_BFIFO)
printk(KERN_DEBUG "hfcpci_FFt fillempty "
- "fcnt(%d) maxl(%d) nz1(%x) dst(%p)\n",
- fcnt, maxlen, new_z1, dst);
+ "fcnt(%d) maxl(%d) nz1(%x) dst(%p)\n",
+ fcnt, maxlen, new_z1, dst);
fcnt += count;
if (maxlen > count)
- maxlen = count; /* limit size */
+ maxlen = count; /* limit size */
memset(dst, 0x2a, maxlen); /* first copy */
count -= maxlen; /* remaining bytes */
if (count) {
@@ -814,7 +814,7 @@ hfcpci_fill_fifo(struct bchannel *bch)
*z1t = cpu_to_le16(new_z1); /* now send data */
}
-next_t_frame:
+ next_t_frame:
count = bch->tx_skb->len - bch->tx_idx;
/* maximum fill shall be poll*2 */
if (count > (poll << 1) - fcnt)
@@ -823,18 +823,18 @@ next_t_frame:
return;
/* data is suitable for fifo */
new_z1 = le16_to_cpu(*z1t) + count;
- /* new buffer Position */
+ /* new buffer Position */
if (new_z1 >= (B_FIFO_SIZE + B_SUB_VAL))
new_z1 -= B_FIFO_SIZE; /* buffer wrap */
src = bch->tx_skb->data + bch->tx_idx;
- /* source pointer */
+ /* source pointer */
dst = bdata + (le16_to_cpu(*z1t) - B_SUB_VAL);
maxlen = (B_FIFO_SIZE + B_SUB_VAL) - le16_to_cpu(*z1t);
- /* end of fifo */
+ /* end of fifo */
if (bch->debug & DEBUG_HW_BFIFO)
printk(KERN_DEBUG "hfcpci_FFt fcnt(%d) "
- "maxl(%d) nz1(%x) dst(%p)\n",
- fcnt, maxlen, new_z1, dst);
+ "maxl(%d) nz1(%x) dst(%p)\n",
+ fcnt, maxlen, new_z1, dst);
fcnt += count;
bch->tx_idx += count;
if (maxlen > count)
@@ -859,27 +859,27 @@ next_t_frame:
}
if (bch->debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG
- "%s: ch(%x) f1(%d) f2(%d) z1(f1)(%x)\n",
- __func__, bch->nr, bz->f1, bz->f2,
- bz->za[bz->f1].z1);
+ "%s: ch(%x) f1(%d) f2(%d) z1(f1)(%x)\n",
+ __func__, bch->nr, bz->f1, bz->f2,
+ bz->za[bz->f1].z1);
fcnt = bz->f1 - bz->f2; /* frame count actually buffered */
if (fcnt < 0)
fcnt += (MAX_B_FRAMES + 1); /* if wrap around */
if (fcnt > (MAX_B_FRAMES - 1)) {
if (bch->debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG
- "hfcpci_fill_Bfifo more as 14 frames\n");
+ "hfcpci_fill_Bfifo more as 14 frames\n");
return;
}
/* now determine free bytes in FIFO buffer */
maxlen = le16_to_cpu(bz->za[bz->f2].z2) -
- le16_to_cpu(bz->za[bz->f1].z1) - 1;
+ le16_to_cpu(bz->za[bz->f1].z1) - 1;
if (maxlen <= 0)
maxlen += B_FIFO_SIZE; /* count now contains available bytes */
if (bch->debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG "hfcpci_fill_fifo ch(%x) count(%d/%d)\n",
- bch->nr, count, maxlen);
+ bch->nr, count, maxlen);
if (maxlen < count) {
if (bch->debug & DEBUG_HW_BCHANNEL)
@@ -887,7 +887,7 @@ next_t_frame:
return;
}
new_z1 = le16_to_cpu(bz->za[bz->f1].z1) + count;
- /* new buffer Position */
+ /* new buffer Position */
if (new_z1 >= (B_FIFO_SIZE + B_SUB_VAL))
new_z1 -= B_FIFO_SIZE; /* buffer wrap */
@@ -895,7 +895,7 @@ next_t_frame:
src = bch->tx_skb->data + bch->tx_idx; /* source pointer */
dst = bdata + (le16_to_cpu(bz->za[bz->f1].z1) - B_SUB_VAL);
maxlen = (B_FIFO_SIZE + B_SUB_VAL) - le16_to_cpu(bz->za[bz->f1].z1);
- /* end fifo */
+ /* end fifo */
if (maxlen > count)
maxlen = count; /* limit size */
memcpy(dst, src, maxlen); /* first copy */
@@ -923,7 +923,7 @@ ph_state_te(struct dchannel *dch)
{
if (dch->debug)
printk(KERN_DEBUG "%s: TE newstate %x\n",
- __func__, dch->state);
+ __func__, dch->state);
switch (dch->state) {
case 0:
l1_event(dch->l1, HW_RESET_IND);
@@ -961,7 +961,7 @@ handle_nt_timer3(struct dchannel *dch) {
hc->hw.mst_m |= HFCPCI_MASTER;
Write_hfc(hc, HFCPCI_MST_MODE, hc->hw.mst_m);
_queue_data(&dch->dev.D, PH_ACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
}
static void
@@ -971,7 +971,7 @@ ph_state_nt(struct dchannel *dch)
if (dch->debug)
printk(KERN_DEBUG "%s: NT newstate %x\n",
- __func__, dch->state);
+ __func__, dch->state);
switch (dch->state) {
case 2:
if (hc->hw.nt_timer < 0) {
@@ -993,7 +993,7 @@ ph_state_nt(struct dchannel *dch)
hc->hw.ctmt &= ~HFCPCI_AUTO_TIMER;
hc->hw.ctmt |= HFCPCI_TIM3_125;
Write_hfc(hc, HFCPCI_CTMT, hc->hw.ctmt |
- HFCPCI_CLTIMER);
+ HFCPCI_CLTIMER);
test_and_clear_bit(FLG_HFC_TIMER_T3, &dch->Flags);
test_and_set_bit(FLG_HFC_TIMER_T1, &dch->Flags);
/* allow G2 -> G3 transition */
@@ -1013,7 +1013,7 @@ ph_state_nt(struct dchannel *dch)
Write_hfc(hc, HFCPCI_MST_MODE, hc->hw.mst_m);
test_and_clear_bit(FLG_L2_ACTIVATED, &dch->Flags);
_queue_data(&dch->dev.D, PH_DEACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
break;
case 4:
hc->hw.nt_timer = 0;
@@ -1025,7 +1025,7 @@ ph_state_nt(struct dchannel *dch)
case 3:
if (!test_and_set_bit(FLG_HFC_TIMER_T3, &dch->Flags)) {
if (!test_and_clear_bit(FLG_L2_ACTIVATED,
- &dch->Flags)) {
+ &dch->Flags)) {
handle_nt_timer3(dch);
break;
}
@@ -1036,7 +1036,7 @@ ph_state_nt(struct dchannel *dch)
hc->hw.ctmt &= ~HFCPCI_AUTO_TIMER;
hc->hw.ctmt |= HFCPCI_TIM3_125;
Write_hfc(hc, HFCPCI_CTMT, hc->hw.ctmt |
- HFCPCI_CLTIMER);
+ HFCPCI_CLTIMER);
}
break;
}
@@ -1081,7 +1081,7 @@ hfc_l1callback(struct dchannel *dch, u_int cmd)
hc->hw.mst_m |= HFCPCI_MASTER;
Write_hfc(hc, HFCPCI_MST_MODE, hc->hw.mst_m);
Write_hfc(hc, HFCPCI_STATES, HFCPCI_ACTIVATE |
- HFCPCI_DO_ACTION);
+ HFCPCI_DO_ACTION);
l1_event(dch->l1, HW_POWERUP_IND);
break;
case HW_DEACT_REQ:
@@ -1107,17 +1107,17 @@ hfc_l1callback(struct dchannel *dch, u_int cmd)
case PH_ACTIVATE_IND:
test_and_set_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
case PH_DEACTIVATE_IND:
test_and_clear_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
default:
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: unknown command %x\n",
- __func__, cmd);
+ __func__, cmd);
return -1;
}
return 0;
@@ -1170,7 +1170,7 @@ hfcpci_int(int intno, void *dev_id)
val = Read_hfc(hc, HFCPCI_INT_S1);
if (hc->dch.debug & DEBUG_HW_DCHANNEL)
printk(KERN_DEBUG
- "HFC-PCI: stat(%02x) s1(%02x)\n", stat, val);
+ "HFC-PCI: stat(%02x) s1(%02x)\n", stat, val);
} else {
/* shared */
spin_unlock(&hc->lock);
@@ -1185,7 +1185,7 @@ hfcpci_int(int intno, void *dev_id)
exval = Read_hfc(hc, HFCPCI_STATES) & 0xf;
if (hc->dch.debug & DEBUG_HW_DCHANNEL)
printk(KERN_DEBUG "ph_state chg %d->%d\n",
- hc->dch.state, exval);
+ hc->dch.state, exval);
hc->dch.state = exval;
schedule_event(&hc->dch, FLG_PHCHANGE);
val &= ~0x40;
@@ -1198,7 +1198,7 @@ hfcpci_int(int intno, void *dev_id)
val &= ~0x80;
Write_hfc(hc, HFCPCI_CTMT, hc->hw.ctmt | HFCPCI_CLTIMER);
}
- if (val & 0x08) { /* B1 rx */
+ if (val & 0x08) { /* B1 rx */
bch = Sel_BCS(hc, hc->hw.bswapped ? 2 : 1);
if (bch)
main_rec_hfcpci(bch);
@@ -1257,22 +1257,22 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol)
if (bch->debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG
- "HFCPCI bchannel protocol %x-->%x ch %x-->%x\n",
- bch->state, protocol, bch->nr, bc);
+ "HFCPCI bchannel protocol %x-->%x ch %x-->%x\n",
+ bch->state, protocol, bch->nr, bc);
fifo2 = bc;
- pcm_mode = (bc>>24) & 0xff;
+ pcm_mode = (bc >> 24) & 0xff;
if (pcm_mode) { /* PCM SLOT USE */
if (!test_bit(HFC_CFG_PCM, &hc->cfg))
printk(KERN_WARNING
- "%s: pcm channel id without HFC_CFG_PCM\n",
- __func__);
- rx_slot = (bc>>8) & 0xff;
- tx_slot = (bc>>16) & 0xff;
+ "%s: pcm channel id without HFC_CFG_PCM\n",
+ __func__);
+ rx_slot = (bc >> 8) & 0xff;
+ tx_slot = (bc >> 16) & 0xff;
bc = bc & 0xff;
} else if (test_bit(HFC_CFG_PCM, &hc->cfg) && (protocol > ISDN_P_NONE))
printk(KERN_WARNING "%s: no pcm channel id but HFC_CFG_PCM\n",
- __func__);
+ __func__);
if (hc->chanlimit > 1) {
hc->hw.bswapped = 0; /* B1 and B2 normal mode */
hc->hw.sctrl_e &= ~0x80;
@@ -1308,11 +1308,11 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol)
if (fifo2 & 2) {
hc->hw.fifo_en &= ~HFCPCI_FIFOEN_B2;
hc->hw.int_m1 &= ~(HFCPCI_INTS_B2TRANS +
- HFCPCI_INTS_B2REC);
+ HFCPCI_INTS_B2REC);
} else {
hc->hw.fifo_en &= ~HFCPCI_FIFOEN_B1;
hc->hw.int_m1 &= ~(HFCPCI_INTS_B1TRANS +
- HFCPCI_INTS_B1REC);
+ HFCPCI_INTS_B1REC);
}
#ifdef REVERSE_BITORDER
if (bch->nr & 2)
@@ -1347,14 +1347,14 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol)
hc->hw.fifo_en |= HFCPCI_FIFOEN_B2;
if (!tics)
hc->hw.int_m1 |= (HFCPCI_INTS_B2TRANS +
- HFCPCI_INTS_B2REC);
+ HFCPCI_INTS_B2REC);
hc->hw.ctmt |= 2;
hc->hw.conn &= ~0x18;
} else {
hc->hw.fifo_en |= HFCPCI_FIFOEN_B1;
if (!tics)
hc->hw.int_m1 |= (HFCPCI_INTS_B1TRANS +
- HFCPCI_INTS_B1REC);
+ HFCPCI_INTS_B1REC);
hc->hw.ctmt |= 1;
hc->hw.conn &= ~0x03;
}
@@ -1376,14 +1376,14 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol)
hc->hw.last_bfifo_cnt[1] = 0;
hc->hw.fifo_en |= HFCPCI_FIFOEN_B2;
hc->hw.int_m1 |= (HFCPCI_INTS_B2TRANS +
- HFCPCI_INTS_B2REC);
+ HFCPCI_INTS_B2REC);
hc->hw.ctmt &= ~2;
hc->hw.conn &= ~0x18;
} else {
hc->hw.last_bfifo_cnt[0] = 0;
hc->hw.fifo_en |= HFCPCI_FIFOEN_B1;
hc->hw.int_m1 |= (HFCPCI_INTS_B1TRANS +
- HFCPCI_INTS_B1REC);
+ HFCPCI_INTS_B1REC);
hc->hw.ctmt &= ~1;
hc->hw.conn &= ~0x03;
}
@@ -1395,7 +1395,7 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol)
}
if (test_bit(HFC_CFG_PCM, &hc->cfg)) {
if ((protocol == ISDN_P_NONE) ||
- (protocol == -1)) { /* init case */
+ (protocol == -1)) { /* init case */
rx_slot = 0;
tx_slot = 0;
} else {
@@ -1411,18 +1411,18 @@ mode_hfcpci(struct bchannel *bch, int bc, int protocol)
hc->hw.conn &= 0xc7;
hc->hw.conn |= 0x08;
printk(KERN_DEBUG "%s: Write_hfc: B2_SSL 0x%x\n",
- __func__, tx_slot);
+ __func__, tx_slot);
printk(KERN_DEBUG "%s: Write_hfc: B2_RSL 0x%x\n",
- __func__, rx_slot);
+ __func__, rx_slot);
Write_hfc(hc, HFCPCI_B2_SSL, tx_slot);
Write_hfc(hc, HFCPCI_B2_RSL, rx_slot);
} else {
hc->hw.conn &= 0xf8;
hc->hw.conn |= 0x01;
printk(KERN_DEBUG "%s: Write_hfc: B1_SSL 0x%x\n",
- __func__, tx_slot);
+ __func__, tx_slot);
printk(KERN_DEBUG "%s: Write_hfc: B1_RSL 0x%x\n",
- __func__, rx_slot);
+ __func__, rx_slot);
Write_hfc(hc, HFCPCI_B1_SSL, tx_slot);
Write_hfc(hc, HFCPCI_B1_RSL, rx_slot);
}
@@ -1447,12 +1447,12 @@ set_hfcpci_rxtest(struct bchannel *bch, int protocol, int chan)
if (bch->debug & DEBUG_HW_BCHANNEL)
printk(KERN_DEBUG
- "HFCPCI bchannel test rx protocol %x-->%x ch %x-->%x\n",
- bch->state, protocol, bch->nr, chan);
+ "HFCPCI bchannel test rx protocol %x-->%x ch %x-->%x\n",
+ bch->state, protocol, bch->nr, chan);
if (bch->nr != chan) {
printk(KERN_DEBUG
- "HFCPCI rxtest wrong channel parameter %x/%x\n",
- bch->nr, chan);
+ "HFCPCI rxtest wrong channel parameter %x/%x\n",
+ bch->nr, chan);
return -EINVAL;
}
switch (protocol) {
@@ -1543,7 +1543,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
test_and_set_bit(FLG_FILLEMPTY, &bch->Flags);
if (debug & DEBUG_HW_OPEN)
printk(KERN_DEBUG "%s: FILL_EMPTY request (nr=%d "
- "off=%d)\n", __func__, bch->nr, !!cq->p1);
+ "off=%d)\n", __func__, bch->nr, !!cq->p1);
break;
default:
printk(KERN_WARNING "%s: unknown Op %x\n", __func__, cq->op);
@@ -1593,7 +1593,7 @@ hfc_bctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
break;
default:
printk(KERN_WARNING "%s: unknown prim(%x)\n",
- __func__, cmd);
+ __func__, cmd);
}
return ret;
}
@@ -1635,12 +1635,12 @@ hfcpci_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
if (test_bit(FLG_ACTIVE, &dch->Flags)) {
spin_unlock_irqrestore(&hc->lock, flags);
_queue_data(&dch->dev.D, PH_ACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
break;
}
test_and_set_bit(FLG_L2_ACTIVATED, &dch->Flags);
Write_hfc(hc, HFCPCI_STATES, HFCPCI_ACTIVATE |
- HFCPCI_DO_ACTION | 1);
+ HFCPCI_DO_ACTION | 1);
} else
ret = l1_event(dch->l1, hh->prim);
spin_unlock_irqrestore(&hc->lock, flags);
@@ -1718,12 +1718,12 @@ hfcpci_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
spin_unlock_irqrestore(&hc->lock, flags);
if (!ret)
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
break;
case PH_DEACTIVATE_REQ:
deactivate_bchannel(bch);
_queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
ret = 0;
break;
}
@@ -1763,7 +1763,7 @@ init_card(struct hfc_pci *hc)
spin_unlock_irqrestore(&hc->lock, flags);
if (request_irq(hc->irq, hfcpci_int, IRQF_SHARED, "HFC PCI", hc)) {
printk(KERN_WARNING
- "mISDN: couldn't get interrupt %d\n", hc->irq);
+ "mISDN: couldn't get interrupt %d\n", hc->irq);
return -EIO;
}
spin_lock_irqsave(&hc->lock, flags);
@@ -1779,9 +1779,9 @@ init_card(struct hfc_pci *hc)
spin_unlock_irqrestore(&hc->lock, flags);
/* Timeout 80ms */
current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout((80*HZ)/1000);
+ schedule_timeout((80 * HZ) / 1000);
printk(KERN_INFO "HFC PCI: IRQ %d count %d\n",
- hc->irq, hc->irqcnt);
+ hc->irq, hc->irqcnt);
/* now switch timer interrupt off */
spin_lock_irqsave(&hc->lock, flags);
hc->hw.int_m1 &= ~HFCPCI_INTS_TIMER;
@@ -1790,8 +1790,8 @@ init_card(struct hfc_pci *hc)
Write_hfc(hc, HFCPCI_MST_MODE, hc->hw.mst_m);
if (!hc->irqcnt) {
printk(KERN_WARNING
- "HFC PCI: IRQ(%d) getting no interrupts "
- "during init %d\n", hc->irq, 4 - cnt);
+ "HFC PCI: IRQ(%d) getting no interrupts "
+ "during init %d\n", hc->irq, 4 - cnt);
if (cnt == 1)
break;
else {
@@ -1819,7 +1819,7 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
switch (cq->op) {
case MISDN_CTRL_GETOP:
cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_CONNECT |
- MISDN_CTRL_DISCONNECT;
+ MISDN_CTRL_DISCONNECT;
break;
case MISDN_CTRL_LOOP:
/* channel 0 disabled loop */
@@ -1833,7 +1833,7 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
else
slot = 0x80;
printk(KERN_DEBUG "%s: Write_hfc: B1_SSL/RSL 0x%x\n",
- __func__, slot);
+ __func__, slot);
Write_hfc(hc, HFCPCI_B1_SSL, slot);
Write_hfc(hc, HFCPCI_B1_RSL, slot);
hc->hw.conn = (hc->hw.conn & ~7) | 6;
@@ -1845,7 +1845,7 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
else
slot = 0x81;
printk(KERN_DEBUG "%s: Write_hfc: B2_SSL/RSL 0x%x\n",
- __func__, slot);
+ __func__, slot);
Write_hfc(hc, HFCPCI_B2_SSL, slot);
Write_hfc(hc, HFCPCI_B2_RSL, slot);
hc->hw.conn = (hc->hw.conn & ~0x38) | 0x30;
@@ -1875,7 +1875,7 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
else
slot = 0x80;
printk(KERN_DEBUG "%s: Write_hfc: B1_SSL/RSL 0x%x\n",
- __func__, slot);
+ __func__, slot);
Write_hfc(hc, HFCPCI_B1_SSL, slot);
Write_hfc(hc, HFCPCI_B2_RSL, slot);
if (test_bit(HFC_CFG_SW_DD_DU, &hc->cfg))
@@ -1883,7 +1883,7 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
else
slot = 0x81;
printk(KERN_DEBUG "%s: Write_hfc: B2_SSL/RSL 0x%x\n",
- __func__, slot);
+ __func__, slot);
Write_hfc(hc, HFCPCI_B2_SSL, slot);
Write_hfc(hc, HFCPCI_B1_RSL, slot);
hc->hw.conn = (hc->hw.conn & ~0x3f) | 0x36;
@@ -1898,7 +1898,7 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
break;
default:
printk(KERN_WARNING "%s: unknown Op %x\n",
- __func__, cq->op);
+ __func__, cq->op);
ret = -EINVAL;
break;
}
@@ -1907,13 +1907,13 @@ channel_ctrl(struct hfc_pci *hc, struct mISDN_ctrl_req *cq)
static int
open_dchannel(struct hfc_pci *hc, struct mISDNchannel *ch,
- struct channel_req *rq)
+ struct channel_req *rq)
{
int err = 0;
if (debug & DEBUG_HW_OPEN)
printk(KERN_DEBUG "%s: dev(%d) open from %p\n", __func__,
- hc->dch.dev.id, __builtin_return_address(0));
+ hc->dch.dev.id, __builtin_return_address(0));
if (rq->protocol == ISDN_P_NONE)
return -EINVAL;
if (rq->adr.channel == 1) {
@@ -1949,7 +1949,7 @@ open_dchannel(struct hfc_pci *hc, struct mISDNchannel *ch,
if (((ch->protocol == ISDN_P_NT_S0) && (hc->dch.state == 3)) ||
((ch->protocol == ISDN_P_TE_S0) && (hc->dch.state == 7))) {
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY,
- 0, NULL, GFP_KERNEL);
+ 0, NULL, GFP_KERNEL);
}
rq->ch = ch;
if (!try_module_get(THIS_MODULE))
@@ -1991,7 +1991,7 @@ hfc_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: cmd:%x %p\n",
- __func__, cmd, arg);
+ __func__, cmd, arg);
switch (cmd) {
case OPEN_CHANNEL:
rq = arg;
@@ -2004,8 +2004,8 @@ hfc_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
case CLOSE_CHANNEL:
if (debug & DEBUG_HW_OPEN)
printk(KERN_DEBUG "%s: dev(%d) close from %p\n",
- __func__, hc->dch.dev.id,
- __builtin_return_address(0));
+ __func__, hc->dch.dev.id,
+ __builtin_return_address(0));
module_put(THIS_MODULE);
break;
case CONTROL_CHANNEL:
@@ -2014,7 +2014,7 @@ hfc_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
default:
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: unknown command %x\n",
- __func__, cmd);
+ __func__, cmd);
return -EINVAL;
}
return err;
@@ -2047,16 +2047,16 @@ setup_hw(struct hfc_pci *hc)
/* We silently assume the address is okay if nonzero */
if (!buffer) {
printk(KERN_WARNING
- "HFC-PCI: Error allocating memory for FIFO!\n");
+ "HFC-PCI: Error allocating memory for FIFO!\n");
return 1;
}
hc->hw.fifos = buffer;
pci_write_config_dword(hc->pdev, 0x80, hc->hw.dmahandle);
hc->hw.pci_io = ioremap((ulong) hc->hw.pci_io, 256);
printk(KERN_INFO
- "HFC-PCI: defined at mem %#lx fifo %#lx(%#lx) IRQ %d HZ %d\n",
- (u_long) hc->hw.pci_io, (u_long) hc->hw.fifos,
- (u_long) hc->hw.dmahandle, hc->irq, HZ);
+ "HFC-PCI: defined at mem %#lx fifo %#lx(%#lx) IRQ %d HZ %d\n",
+ (u_long) hc->hw.pci_io, (u_long) hc->hw.fifos,
+ (u_long) hc->hw.dmahandle, hc->irq, HZ);
/* enable memory mapped ports, disable busmaster */
pci_write_config_word(hc->pdev, PCI_COMMAND, PCI_ENA_MEMIO);
hc->hw.int_m2 = 0;
@@ -2113,7 +2113,7 @@ setup_card(struct hfc_pci *card)
card->dch.hw = card;
card->dch.dev.Dprotocols = (1 << ISDN_P_TE_S0) | (1 << ISDN_P_NT_S0);
card->dch.dev.Bprotocols = (1 << (ISDN_P_B_RAW & ISDN_P_B_MASK)) |
- (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
+ (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
card->dch.dev.D.send = hfcpci_l2l1D;
card->dch.dev.D.ctrl = hfc_dctrl;
card->dch.dev.nrbchan = 2;
@@ -2174,13 +2174,13 @@ static const struct _hfc_map hfc_map[] =
{HFC_ANIGMA_MC145575, 0, "Motorola MC145575"},
{HFC_ZOLTRIX_2BD0, 0, "Zoltrix 2BD0"},
{HFC_DIGI_DF_M_IOM2_E, 0,
- "Digi International DataFire Micro V IOM2 (Europe)"},
+ "Digi International DataFire Micro V IOM2 (Europe)"},
{HFC_DIGI_DF_M_E, 0,
- "Digi International DataFire Micro V (Europe)"},
+ "Digi International DataFire Micro V (Europe)"},
{HFC_DIGI_DF_M_IOM2_A, 0,
- "Digi International DataFire Micro V IOM2 (North America)"},
+ "Digi International DataFire Micro V IOM2 (North America)"},
{HFC_DIGI_DF_M_A, 0,
- "Digi International DataFire Micro V (North America)"},
+ "Digi International DataFire Micro V (North America)"},
{HFC_SITECOM_DC105V2, 0, "Sitecom Connectivity DC-105 ISDN TA"},
{},
};
@@ -2188,51 +2188,51 @@ static const struct _hfc_map hfc_map[] =
static struct pci_device_id hfc_ids[] =
{
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_2BD0),
- (unsigned long) &hfc_map[0] },
+ (unsigned long) &hfc_map[0] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B000),
- (unsigned long) &hfc_map[1] },
+ (unsigned long) &hfc_map[1] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B006),
- (unsigned long) &hfc_map[2] },
+ (unsigned long) &hfc_map[2] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B007),
- (unsigned long) &hfc_map[3] },
+ (unsigned long) &hfc_map[3] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B008),
- (unsigned long) &hfc_map[4] },
+ (unsigned long) &hfc_map[4] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B009),
- (unsigned long) &hfc_map[5] },
+ (unsigned long) &hfc_map[5] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B00A),
- (unsigned long) &hfc_map[6] },
+ (unsigned long) &hfc_map[6] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B00B),
- (unsigned long) &hfc_map[7] },
+ (unsigned long) &hfc_map[7] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B00C),
- (unsigned long) &hfc_map[8] },
+ (unsigned long) &hfc_map[8] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B100),
- (unsigned long) &hfc_map[9] },
+ (unsigned long) &hfc_map[9] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B700),
- (unsigned long) &hfc_map[10] },
+ (unsigned long) &hfc_map[10] },
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B701),
- (unsigned long) &hfc_map[11] },
+ (unsigned long) &hfc_map[11] },
{ PCI_VDEVICE(ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1),
- (unsigned long) &hfc_map[12] },
+ (unsigned long) &hfc_map[12] },
{ PCI_VDEVICE(ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675),
- (unsigned long) &hfc_map[13] },
+ (unsigned long) &hfc_map[13] },
{ PCI_VDEVICE(BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT),
- (unsigned long) &hfc_map[14] },
+ (unsigned long) &hfc_map[14] },
{ PCI_VDEVICE(BERKOM, PCI_DEVICE_ID_BERKOM_A1T),
- (unsigned long) &hfc_map[15] },
+ (unsigned long) &hfc_map[15] },
{ PCI_VDEVICE(ANIGMA, PCI_DEVICE_ID_ANIGMA_MC145575),
- (unsigned long) &hfc_map[16] },
+ (unsigned long) &hfc_map[16] },
{ PCI_VDEVICE(ZOLTRIX, PCI_DEVICE_ID_ZOLTRIX_2BD0),
- (unsigned long) &hfc_map[17] },
+ (unsigned long) &hfc_map[17] },
{ PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_E),
- (unsigned long) &hfc_map[18] },
+ (unsigned long) &hfc_map[18] },
{ PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_DF_M_E),
- (unsigned long) &hfc_map[19] },
+ (unsigned long) &hfc_map[19] },
{ PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_A),
- (unsigned long) &hfc_map[20] },
+ (unsigned long) &hfc_map[20] },
{ PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_DF_M_A),
- (unsigned long) &hfc_map[21] },
+ (unsigned long) &hfc_map[21] },
{ PCI_VDEVICE(SITECOM, PCI_DEVICE_ID_SITECOM_DC105V2),
- (unsigned long) &hfc_map[22] },
+ (unsigned long) &hfc_map[22] },
{},
};
@@ -2277,7 +2277,7 @@ hfc_remove_pci(struct pci_dev *pdev)
else
if (debug)
printk(KERN_DEBUG "%s: drvdata already removed\n",
- __func__);
+ __func__);
}
@@ -2317,7 +2317,7 @@ static void
hfcpci_softirq(void *arg)
{
(void) driver_for_each_device(&hfc_driver.driver, NULL, arg,
- _hfcpci_softirq);
+ _hfcpci_softirq);
/* if next event would be in the past ... */
if ((s32)(hfc_jiffies + tics - jiffies) <= 0)
@@ -2343,14 +2343,14 @@ HFC_init(void)
poll = (tics * 8000) / HZ;
if (poll > 256 || poll < 8) {
printk(KERN_ERR "%s: Wrong poll value %d not in range "
- "of 8..256.\n", __func__, poll);
+ "of 8..256.\n", __func__, poll);
err = -EINVAL;
return err;
}
}
if (poll != HFCPCI_BTRANS_THRESHOLD) {
printk(KERN_INFO "%s: Using alternative poll value of %d\n",
- __func__, poll);
+ __func__, poll);
hfc_tl.function = (void *)hfcpci_softirq;
hfc_tl.data = 0;
init_timer(&hfc_tl);
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
index 0e1f4d5b977..60233873463 100644
--- a/drivers/isdn/hardware/mISDN/hfcsusb.c
+++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
@@ -27,6 +27,7 @@
* poll=<n>, default 128
* n : burst size of PH_DATA_IND at transparent rx data
*
+ * Revision: 0.3.3 (socket), 2008-11-05
*/
#include <linux/module.h>
@@ -36,8 +37,6 @@
#include <linux/slab.h>
#include "hfcsusb.h"
-static const char *hfcsusb_rev = "Revision: 0.3.3 (socket), 2008-11-05";
-
static unsigned int debug;
static int poll = DEFAULT_TRANSP_BURST_SZ;
@@ -76,9 +75,9 @@ ctrl_start_transfer(struct hfcsusb *hw)
hw->ctrl_urb->transfer_buffer = NULL;
hw->ctrl_urb->transfer_buffer_length = 0;
hw->ctrl_write.wIndex =
- cpu_to_le16(hw->ctrl_buff[hw->ctrl_out_idx].hfcs_reg);
+ cpu_to_le16(hw->ctrl_buff[hw->ctrl_out_idx].hfcs_reg);
hw->ctrl_write.wValue =
- cpu_to_le16(hw->ctrl_buff[hw->ctrl_out_idx].reg_val);
+ cpu_to_le16(hw->ctrl_buff[hw->ctrl_out_idx].reg_val);
usb_submit_urb(hw->ctrl_urb, GFP_ATOMIC);
}
@@ -94,7 +93,7 @@ static int write_reg(struct hfcsusb *hw, __u8 reg, __u8 val)
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s reg(0x%02x) val(0x%02x)\n",
- hw->name, __func__, reg, val);
+ hw->name, __func__, reg, val);
spin_lock(&hw->ctrl_lock);
if (hw->ctrl_cnt >= HFC_CTRL_BUFSIZE) {
@@ -197,8 +196,8 @@ handle_led(struct hfcsusb *hw, int event)
if (hw->led_state != tmpled) {
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s reg(0x%02x) val(x%02x)\n",
- hw->name, __func__,
- HFCUSB_P_DATA, hw->led_state);
+ hw->name, __func__,
+ HFCUSB_P_DATA, hw->led_state);
write_reg(hw, HFCUSB_P_DATA, hw->led_state);
}
@@ -226,7 +225,7 @@ hfcusb_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
spin_unlock_irqrestore(&hw->lock, flags);
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s PH_DATA_REQ ret(%i)\n",
- hw->name, __func__, ret);
+ hw->name, __func__, ret);
if (ret > 0) {
/*
* other l1 drivers don't send early confirms on
@@ -245,12 +244,12 @@ hfcusb_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
ret = 0;
if (!ret)
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY,
- 0, NULL, GFP_KERNEL);
+ 0, NULL, GFP_KERNEL);
break;
case PH_DEACTIVATE_REQ:
deactivate_bchannel(bch);
_queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY,
- 0, NULL, GFP_KERNEL);
+ 0, NULL, GFP_KERNEL);
ret = 0;
break;
}
@@ -271,7 +270,7 @@ hfcsusb_ph_info(struct hfcsusb *hw)
int i;
phi = kzalloc(sizeof(struct ph_info) +
- dch->dev.nrbchan * sizeof(struct ph_info_ch), GFP_ATOMIC);
+ dch->dev.nrbchan * sizeof(struct ph_info_ch), GFP_ATOMIC);
phi->dch.ch.protocol = hw->protocol;
phi->dch.ch.Flags = dch->Flags;
phi->dch.state = dch->state;
@@ -281,8 +280,8 @@ hfcsusb_ph_info(struct hfcsusb *hw)
phi->bch[i].Flags = hw->bch[i].Flags;
}
_queue_data(&dch->dev.D, MPH_INFORMATION_IND, MISDN_ID_ANY,
- sizeof(struct ph_info_dch) + dch->dev.nrbchan *
- sizeof(struct ph_info_ch), phi, GFP_ATOMIC);
+ sizeof(struct ph_info_dch) + dch->dev.nrbchan *
+ sizeof(struct ph_info_ch), phi, GFP_ATOMIC);
kfree(phi);
}
@@ -303,7 +302,7 @@ hfcusb_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
case PH_DATA_REQ:
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s: PH_DATA_REQ\n",
- hw->name, __func__);
+ hw->name, __func__);
spin_lock_irqsave(&hw->lock, flags);
ret = dchannel_senddata(dch, skb);
@@ -317,20 +316,20 @@ hfcusb_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
case PH_ACTIVATE_REQ:
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s: PH_ACTIVATE_REQ %s\n",
- hw->name, __func__,
- (hw->protocol == ISDN_P_NT_S0) ? "NT" : "TE");
+ hw->name, __func__,
+ (hw->protocol == ISDN_P_NT_S0) ? "NT" : "TE");
if (hw->protocol == ISDN_P_NT_S0) {
ret = 0;
if (test_bit(FLG_ACTIVE, &dch->Flags)) {
_queue_data(&dch->dev.D,
- PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_ATOMIC);
+ PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
+ NULL, GFP_ATOMIC);
} else {
hfcsusb_ph_command(hw,
- HFC_L1_ACTIVATE_NT);
+ HFC_L1_ACTIVATE_NT);
test_and_set_bit(FLG_L2_ACTIVATED,
- &dch->Flags);
+ &dch->Flags);
}
} else {
hfcsusb_ph_command(hw, HFC_L1_ACTIVATE_TE);
@@ -341,7 +340,7 @@ hfcusb_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
case PH_DEACTIVATE_REQ:
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s: PH_DEACTIVATE_REQ\n",
- hw->name, __func__);
+ hw->name, __func__);
test_and_clear_bit(FLG_L2_ACTIVATED, &dch->Flags);
if (hw->protocol == ISDN_P_NT_S0) {
@@ -386,7 +385,7 @@ hfc_l1callback(struct dchannel *dch, u_int cmd)
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s cmd 0x%x\n",
- hw->name, __func__, cmd);
+ hw->name, __func__, cmd);
switch (cmd) {
case INFO3_P8:
@@ -411,17 +410,17 @@ hfc_l1callback(struct dchannel *dch, u_int cmd)
case PH_ACTIVATE_IND:
test_and_set_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
case PH_DEACTIVATE_IND:
test_and_clear_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
default:
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: unknown cmd %x\n",
- hw->name, __func__, cmd);
+ hw->name, __func__, cmd);
return -1;
}
hfcsusb_ph_info(hw);
@@ -430,14 +429,14 @@ hfc_l1callback(struct dchannel *dch, u_int cmd)
static int
open_dchannel(struct hfcsusb *hw, struct mISDNchannel *ch,
- struct channel_req *rq)
+ struct channel_req *rq)
{
int err = 0;
if (debug & DEBUG_HW_OPEN)
printk(KERN_DEBUG "%s: %s: dev(%d) open addr(%i) from %p\n",
- hw->name, __func__, hw->dch.dev.id, rq->adr.channel,
- __builtin_return_address(0));
+ hw->name, __func__, hw->dch.dev.id, rq->adr.channel,
+ __builtin_return_address(0));
if (rq->protocol == ISDN_P_NONE)
return -EINVAL;
@@ -451,7 +450,7 @@ open_dchannel(struct hfcsusb *hw, struct mISDNchannel *ch,
hfcsusb_start_endpoint(hw, HFC_CHAN_E);
set_bit(FLG_ACTIVE, &hw->ech.Flags);
_queue_data(&hw->ech.dev.D, PH_ACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
} else
return -EINVAL;
}
@@ -474,11 +473,11 @@ open_dchannel(struct hfcsusb *hw, struct mISDNchannel *ch,
if (((ch->protocol == ISDN_P_NT_S0) && (hw->dch.state == 3)) ||
((ch->protocol == ISDN_P_TE_S0) && (hw->dch.state == 7)))
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY,
- 0, NULL, GFP_KERNEL);
+ 0, NULL, GFP_KERNEL);
rq->ch = ch;
if (!try_module_get(THIS_MODULE))
printk(KERN_WARNING "%s: %s: cannot get module\n",
- hw->name, __func__);
+ hw->name, __func__);
return 0;
}
@@ -494,7 +493,7 @@ open_bchannel(struct hfcsusb *hw, struct channel_req *rq)
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s B%i\n",
- hw->name, __func__, rq->adr.channel);
+ hw->name, __func__, rq->adr.channel);
bch = &hw->bch[rq->adr.channel - 1];
if (test_and_set_bit(FLG_OPEN, &bch->Flags))
@@ -511,7 +510,7 @@ open_bchannel(struct hfcsusb *hw, struct channel_req *rq)
if (!try_module_get(THIS_MODULE))
printk(KERN_WARNING "%s: %s:cannot get module\n",
- hw->name, __func__);
+ hw->name, __func__);
return 0;
}
@@ -522,16 +521,16 @@ channel_ctrl(struct hfcsusb *hw, struct mISDN_ctrl_req *cq)
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s op(0x%x) channel(0x%x)\n",
- hw->name, __func__, (cq->op), (cq->channel));
+ hw->name, __func__, (cq->op), (cq->channel));
switch (cq->op) {
case MISDN_CTRL_GETOP:
cq->op = MISDN_CTRL_LOOP | MISDN_CTRL_CONNECT |
- MISDN_CTRL_DISCONNECT;
+ MISDN_CTRL_DISCONNECT;
break;
default:
printk(KERN_WARNING "%s: %s: unknown Op %x\n",
- hw->name, __func__, cq->op);
+ hw->name, __func__, cq->op);
ret = -EINVAL;
break;
}
@@ -552,7 +551,7 @@ hfc_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: cmd:%x %p\n",
- hw->name, __func__, cmd, arg);
+ hw->name, __func__, cmd, arg);
switch (cmd) {
case OPEN_CHANNEL:
rq = arg;
@@ -568,9 +567,9 @@ hfc_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
hw->open--;
if (debug & DEBUG_HW_OPEN)
printk(KERN_DEBUG
- "%s: %s: dev(%d) close from %p (open %d)\n",
- hw->name, __func__, hw->dch.dev.id,
- __builtin_return_address(0), hw->open);
+ "%s: %s: dev(%d) close from %p (open %d)\n",
+ hw->name, __func__, hw->dch.dev.id,
+ __builtin_return_address(0), hw->open);
if (!hw->open) {
hfcsusb_stop_endpoint(hw, HFC_CHAN_D);
if (hw->fifos[HFCUSB_PCM_RX].pipe)
@@ -585,7 +584,7 @@ hfc_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
default:
if (dch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: unknown command %x\n",
- hw->name, __func__, cmd);
+ hw->name, __func__, cmd);
return -EINVAL;
}
return err;
@@ -602,10 +601,10 @@ ph_state_te(struct dchannel *dch)
if (debug & DEBUG_HW) {
if (dch->state <= HFC_MAX_TE_LAYER1_STATE)
printk(KERN_DEBUG "%s: %s: %s\n", hw->name, __func__,
- HFC_TE_LAYER1_STATES[dch->state]);
+ HFC_TE_LAYER1_STATES[dch->state]);
else
printk(KERN_DEBUG "%s: %s: TE F%d\n",
- hw->name, __func__, dch->state);
+ hw->name, __func__, dch->state);
}
switch (dch->state) {
@@ -643,12 +642,12 @@ ph_state_nt(struct dchannel *dch)
if (debug & DEBUG_HW) {
if (dch->state <= HFC_MAX_NT_LAYER1_STATE)
printk(KERN_DEBUG "%s: %s: %s\n",
- hw->name, __func__,
- HFC_NT_LAYER1_STATES[dch->state]);
+ hw->name, __func__,
+ HFC_NT_LAYER1_STATES[dch->state]);
else
printk(KERN_INFO DRIVER_NAME "%s: %s: NT G%d\n",
- hw->name, __func__, dch->state);
+ hw->name, __func__, dch->state);
}
switch (dch->state) {
@@ -677,7 +676,7 @@ ph_state_nt(struct dchannel *dch)
hw->timers &= ~NT_ACTIVATION_TIMER;
test_and_set_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, PH_ACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
handle_led(hw, LED_S0_ON);
break;
case (4):
@@ -712,8 +711,8 @@ hfcsusb_setup_bch(struct bchannel *bch, int protocol)
if (debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: protocol %x-->%x B%d\n",
- hw->name, __func__, bch->state, protocol,
- bch->nr);
+ hw->name, __func__, bch->state, protocol,
+ bch->nr);
/* setup val for CON_HDLC */
conhdlc = 0;
@@ -743,7 +742,7 @@ hfcsusb_setup_bch(struct bchannel *bch, int protocol)
default:
if (debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: prot not known %x\n",
- hw->name, __func__, protocol);
+ hw->name, __func__, protocol);
return -ENOPROTOOPT;
}
@@ -772,7 +771,7 @@ hfcsusb_setup_bch(struct bchannel *bch, int protocol)
handle_led(hw, (bch->nr == 1) ? LED_B1_ON : LED_B2_ON);
else
handle_led(hw, (bch->nr == 1) ? LED_B1_OFF :
- LED_B2_OFF);
+ LED_B2_OFF);
}
hfcsusb_ph_info(hw);
return 0;
@@ -783,7 +782,7 @@ hfcsusb_ph_command(struct hfcsusb *hw, u_char command)
{
if (debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: %x\n",
- hw->name, __func__, command);
+ hw->name, __func__, command);
switch (command) {
case HFC_L1_ACTIVATE_TE:
@@ -801,15 +800,15 @@ hfcsusb_ph_command(struct hfcsusb *hw, u_char command)
case HFC_L1_ACTIVATE_NT:
if (hw->dch.state == 3)
_queue_data(&hw->dch.dev.D, PH_ACTIVATE_IND,
- MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
+ MISDN_ID_ANY, 0, NULL, GFP_ATOMIC);
else
write_reg(hw, HFCUSB_STATES, HFCUSB_ACTIVATE |
- HFCUSB_DO_ACTION | HFCUSB_NT_G2_G3);
+ HFCUSB_DO_ACTION | HFCUSB_NT_G2_G3);
break;
case HFC_L1_DEACTIVATE_NT:
write_reg(hw, HFCUSB_STATES,
- HFCUSB_DO_ACTION);
+ HFCUSB_DO_ACTION);
break;
}
}
@@ -830,7 +829,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
test_and_set_bit(FLG_FILLEMPTY, &bch->Flags);
if (debug & DEBUG_HW_OPEN)
printk(KERN_DEBUG "%s: FILL_EMPTY request (nr=%d "
- "off=%d)\n", __func__, bch->nr, !!cq->p1);
+ "off=%d)\n", __func__, bch->nr, !!cq->p1);
break;
default:
printk(KERN_WARNING "%s: unknown Op %x\n", __func__, cq->op);
@@ -843,7 +842,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
/* collect data from incoming interrupt or isochron USB data */
static void
hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len,
- int finish)
+ int finish)
{
struct hfcsusb *hw = fifo->hw;
struct sk_buff *rx_skb = NULL;
@@ -854,9 +853,9 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len,
if (debug & DBG_HFC_CALL_TRACE)
printk(KERN_DEBUG "%s: %s: fifo(%i) len(%i) "
- "dch(%p) bch(%p) ech(%p)\n",
- hw->name, __func__, fifon, len,
- fifo->dch, fifo->bch, fifo->ech);
+ "dch(%p) bch(%p) ech(%p)\n",
+ hw->name, __func__, fifon, len,
+ fifo->dch, fifo->bch, fifo->ech);
if (!len)
return;
@@ -896,7 +895,7 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len,
skb_trim(rx_skb, 0);
} else {
printk(KERN_DEBUG "%s: %s: No mem for rx_skb\n",
- hw->name, __func__);
+ hw->name, __func__);
spin_unlock(&hw->lock);
return;
}
@@ -906,8 +905,8 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len,
/* D/E-Channel SKB range check */
if ((rx_skb->len + len) >= MAX_DFRAME_LEN_L1) {
printk(KERN_DEBUG "%s: %s: sbk mem exceeded "
- "for fifo(%d) HFCUSB_D_RX\n",
- hw->name, __func__, fifon);
+ "for fifo(%d) HFCUSB_D_RX\n",
+ hw->name, __func__, fifon);
skb_trim(rx_skb, 0);
spin_unlock(&hw->lock);
return;
@@ -916,8 +915,8 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len,
/* B-Channel SKB range check */
if ((rx_skb->len + len) >= (MAX_BCH_SIZE + 3)) {
printk(KERN_DEBUG "%s: %s: sbk mem exceeded "
- "for fifo(%d) HFCUSB_B_RX\n",
- hw->name, __func__, fifon);
+ "for fifo(%d) HFCUSB_B_RX\n",
+ hw->name, __func__, fifon);
skb_trim(rx_skb, 0);
spin_unlock(&hw->lock);
return;
@@ -930,16 +929,16 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len,
/* we have a complete hdlc packet */
if (finish) {
if ((rx_skb->len > 3) &&
- (!(rx_skb->data[rx_skb->len - 1]))) {
+ (!(rx_skb->data[rx_skb->len - 1]))) {
if (debug & DBG_HFC_FIFO_VERBOSE) {
printk(KERN_DEBUG "%s: %s: fifon(%i)"
- " new RX len(%i): ",
- hw->name, __func__, fifon,
- rx_skb->len);
+ " new RX len(%i): ",
+ hw->name, __func__, fifon,
+ rx_skb->len);
i = 0;
while (i < rx_skb->len)
printk("%02x ",
- rx_skb->data[i++]);
+ rx_skb->data[i++]);
printk("\n");
}
@@ -952,17 +951,17 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len,
recv_Bchannel(fifo->bch, MISDN_ID_ANY);
if (fifo->ech)
recv_Echannel(fifo->ech,
- &hw->dch);
+ &hw->dch);
} else {
if (debug & DBG_HFC_FIFO_VERBOSE) {
printk(KERN_DEBUG
- "%s: CRC or minlen ERROR fifon(%i) "
- "RX len(%i): ",
- hw->name, fifon, rx_skb->len);
+ "%s: CRC or minlen ERROR fifon(%i) "
+ "RX len(%i): ",
+ hw->name, fifon, rx_skb->len);
i = 0;
while (i < rx_skb->len)
printk("%02x ",
- rx_skb->data[i++]);
+ rx_skb->data[i++]);
printk("\n");
}
skb_trim(rx_skb, 0);
@@ -984,7 +983,7 @@ fill_isoc_urb(struct urb *urb, struct usb_device *dev, unsigned int pipe,
int k;
usb_fill_bulk_urb(urb, dev, pipe, buf, packet_size * num_packets,
- complete, context);
+ complete, context);
urb->number_of_packets = num_packets;
urb->transfer_flags = URB_ISO_ASAP;
@@ -1006,7 +1005,7 @@ rx_iso_complete(struct urb *urb)
struct usb_fifo *fifo = context_iso_urb->owner_fifo;
struct hfcsusb *hw = fifo->hw;
int k, len, errcode, offset, num_isoc_packets, fifon, maxlen,
- status, iso_status, i;
+ status, iso_status, i;
__u8 *buf;
static __u8 eof[8];
__u8 s0_state;
@@ -1030,8 +1029,8 @@ rx_iso_complete(struct urb *urb)
if (status == -EXDEV) {
if (debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: with -EXDEV "
- "urb->status %d, fifonum %d\n",
- hw->name, __func__, status, fifon);
+ "urb->status %d, fifonum %d\n",
+ hw->name, __func__, status, fifon);
/* clear status, so go on with ISO transfers */
status = 0;
@@ -1050,18 +1049,18 @@ rx_iso_complete(struct urb *urb)
if (iso_status && (debug & DBG_HFC_FIFO_VERBOSE)) {
printk(KERN_DEBUG "%s: %s: "
- "ISO packet %i, status: %i\n",
- hw->name, __func__, k, iso_status);
+ "ISO packet %i, status: %i\n",
+ hw->name, __func__, k, iso_status);
}
/* USB data log for every D ISO in */
if ((fifon == HFCUSB_D_RX) &&
(debug & DBG_HFC_USB_VERBOSE)) {
printk(KERN_DEBUG
- "%s: %s: %d (%d/%d) len(%d) ",
- hw->name, __func__, urb->start_frame,
- k, num_isoc_packets-1,
- len);
+ "%s: %s: %d (%d/%d) len(%d) ",
+ hw->name, __func__, urb->start_frame,
+ k, num_isoc_packets - 1,
+ len);
for (i = 0; i < len; i++)
printk("%x ", buf[i]);
printk("\n");
@@ -1082,12 +1081,12 @@ rx_iso_complete(struct urb *urb)
eof[fifon] = buf[0] & 1;
if (len > 2)
hfcsusb_rx_frame(fifo, buf + 2,
- len - 2, (len < maxlen)
- ? eof[fifon] : 0);
+ len - 2, (len < maxlen)
+ ? eof[fifon] : 0);
} else
hfcsusb_rx_frame(fifo, buf, len,
- (len < maxlen) ?
- eof[fifon] : 0);
+ (len < maxlen) ?
+ eof[fifon] : 0);
fifo->last_urblen = len;
}
}
@@ -1107,14 +1106,14 @@ rx_iso_complete(struct urb *urb)
if (errcode < 0) {
if (debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: error submitting "
- "ISO URB: %d\n",
- hw->name, __func__, errcode);
+ "ISO URB: %d\n",
+ hw->name, __func__, errcode);
}
} else {
if (status && (debug & DBG_HFC_URB_INFO))
printk(KERN_DEBUG "%s: %s: rx_iso_complete : "
- "urb->status %d, fifonum %d\n",
- hw->name, __func__, status, fifon);
+ "urb->status %d, fifonum %d\n",
+ hw->name, __func__, status, fifon);
}
}
@@ -1141,8 +1140,8 @@ rx_int_complete(struct urb *urb)
if ((!fifo->active) || (urb->status)) {
if (debug & DBG_HFC_URB_ERROR)
printk(KERN_DEBUG
- "%s: %s: RX-Fifo %i is going down (%i)\n",
- hw->name, __func__, fifon, urb->status);
+ "%s: %s: RX-Fifo %i is going down (%i)\n",
+ hw->name, __func__, fifon, urb->status);
fifo->urb->interval = 0; /* cancel automatic rescheduling */
return;
@@ -1154,7 +1153,7 @@ rx_int_complete(struct urb *urb)
/* USB data log for every D INT in */
if ((fifon == HFCUSB_D_RX) && (debug & DBG_HFC_USB_VERBOSE)) {
printk(KERN_DEBUG "%s: %s: D RX INT len(%d) ",
- hw->name, __func__, len);
+ hw->name, __func__, len);
for (i = 0; i < len; i++)
printk("%02x ", buf[i]);
printk("\n");
@@ -1174,8 +1173,8 @@ rx_int_complete(struct urb *urb)
/* if we have more than the 2 status bytes -> collect data */
if (len > 2)
hfcsusb_rx_frame(fifo, buf + 2,
- urb->actual_length - 2,
- (len < maxlen) ? eof[fifon] : 0);
+ urb->actual_length - 2,
+ (len < maxlen) ? eof[fifon] : 0);
} else {
hfcsusb_rx_frame(fifo, buf, urb->actual_length,
(len < maxlen) ? eof[fifon] : 0);
@@ -1186,7 +1185,7 @@ rx_int_complete(struct urb *urb)
if (status) {
if (debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: error resubmitting USB\n",
- hw->name, __func__);
+ hw->name, __func__);
}
}
@@ -1199,7 +1198,7 @@ tx_iso_complete(struct urb *urb)
struct hfcsusb *hw = fifo->hw;
struct sk_buff *tx_skb;
int k, tx_offset, num_isoc_packets, sink, remain, current_len,
- errcode, hdlc, i;
+ errcode, hdlc, i;
int *tx_idx;
int frame_complete, fifon, status;
__u8 threshbit;
@@ -1222,7 +1221,7 @@ tx_iso_complete(struct urb *urb)
hdlc = test_bit(FLG_HDLC, &fifo->bch->Flags);
} else {
printk(KERN_DEBUG "%s: %s: neither BCH nor DCH\n",
- hw->name, __func__);
+ hw->name, __func__);
spin_unlock(&hw->lock);
return;
}
@@ -1239,8 +1238,8 @@ tx_iso_complete(struct urb *urb)
if (status == -EXDEV) {
if (debug & DBG_HFC_URB_ERROR)
printk(KERN_DEBUG "%s: %s: "
- "-EXDEV (%i) fifon (%d)\n",
- hw->name, __func__, status, fifon);
+ "-EXDEV (%i) fifon (%d)\n",
+ hw->name, __func__, status, fifon);
/* clear status, so go on with ISO transfers */
status = 0;
@@ -1270,8 +1269,8 @@ tx_iso_complete(struct urb *urb)
errcode = urb->iso_frame_desc[k].status;
if (errcode) {
printk(KERN_DEBUG "%s: %s: "
- "ISO packet %i, status: %i\n",
- hw->name, __func__, k, errcode);
+ "ISO packet %i, status: %i\n",
+ hw->name, __func__, k, errcode);
}
}
@@ -1299,7 +1298,7 @@ tx_iso_complete(struct urb *urb)
if (hdlc) {
/* signal frame completion */
context_iso_urb->
- buffer[tx_offset] = 1;
+ buffer[tx_offset] = 1;
/* add 2 byte flags and 16bit
* CRC at end of ISDN frame */
fifo->bit_line += 32;
@@ -1319,21 +1318,21 @@ tx_iso_complete(struct urb *urb)
if ((fifon == HFCUSB_D_RX) &&
(debug & DBG_HFC_USB_VERBOSE)) {
printk(KERN_DEBUG
- "%s: %s (%d/%d) offs(%d) len(%d) ",
- hw->name, __func__,
- k, num_isoc_packets-1,
- urb->iso_frame_desc[k].offset,
- urb->iso_frame_desc[k].length);
+ "%s: %s (%d/%d) offs(%d) len(%d) ",
+ hw->name, __func__,
+ k, num_isoc_packets - 1,
+ urb->iso_frame_desc[k].offset,
+ urb->iso_frame_desc[k].length);
for (i = urb->iso_frame_desc[k].offset;
i < (urb->iso_frame_desc[k].offset
- + urb->iso_frame_desc[k].length);
+ + urb->iso_frame_desc[k].length);
i++)
printk("%x ",
- context_iso_urb->buffer[i]);
+ context_iso_urb->buffer[i]);
printk(" skb->len(%i) tx-idx(%d)\n",
- tx_skb->len, *tx_idx);
+ tx_skb->len, *tx_idx);
}
tx_offset += (current_len + 1);
@@ -1351,13 +1350,13 @@ tx_iso_complete(struct urb *urb)
if (debug & DBG_HFC_FIFO_VERBOSE) {
printk(KERN_DEBUG "%s: %s: "
- "fifon(%i) new TX len(%i): ",
- hw->name, __func__,
- fifon, tx_skb->len);
+ "fifon(%i) new TX len(%i): ",
+ hw->name, __func__,
+ fifon, tx_skb->len);
i = 0;
while (i < tx_skb->len)
printk("%02x ",
- tx_skb->data[i++]);
+ tx_skb->data[i++]);
printk("\n");
}
@@ -1366,9 +1365,9 @@ tx_iso_complete(struct urb *urb)
if (fifo->dch && get_next_dframe(fifo->dch))
tx_skb = fifo->dch->tx_skb;
else if (fifo->bch &&
- get_next_bframe(fifo->bch)) {
+ get_next_bframe(fifo->bch)) {
if (test_bit(FLG_TRANSPARENT,
- &fifo->bch->Flags))
+ &fifo->bch->Flags))
confirm_Bsend(fifo->bch);
tx_skb = fifo->bch->tx_skb;
}
@@ -1378,8 +1377,8 @@ tx_iso_complete(struct urb *urb)
if (errcode < 0) {
if (debug & DEBUG_HW)
printk(KERN_DEBUG
- "%s: %s: error submitting ISO URB: %d \n",
- hw->name, __func__, errcode);
+ "%s: %s: error submitting ISO URB: %d \n",
+ hw->name, __func__, errcode);
}
/*
@@ -1396,9 +1395,9 @@ tx_iso_complete(struct urb *urb)
} else {
if (status && (debug & DBG_HFC_URB_ERROR))
printk(KERN_DEBUG "%s: %s: urb->status %s (%i)"
- "fifonum=%d\n",
- hw->name, __func__,
- symbolic(urb_errlist, status), status, fifon);
+ "fifonum=%d\n",
+ hw->name, __func__,
+ symbolic(urb_errlist, status), status, fifon);
}
spin_unlock(&hw->lock);
}
@@ -1416,17 +1415,17 @@ start_isoc_chain(struct usb_fifo *fifo, int num_packets_per_urb,
if (debug)
printk(KERN_DEBUG "%s: %s: fifo %i\n",
- hw->name, __func__, fifo->fifonum);
+ hw->name, __func__, fifo->fifonum);
/* allocate Memory for Iso out Urbs */
for (i = 0; i < 2; i++) {
if (!(fifo->iso[i].urb)) {
fifo->iso[i].urb =
- usb_alloc_urb(num_packets_per_urb, GFP_KERNEL);
+ usb_alloc_urb(num_packets_per_urb, GFP_KERNEL);
if (!(fifo->iso[i].urb)) {
printk(KERN_DEBUG
- "%s: %s: alloc urb for fifo %i failed",
- hw->name, __func__, fifo->fifonum);
+ "%s: %s: alloc urb for fifo %i failed",
+ hw->name, __func__, fifo->fifonum);
}
fifo->iso[i].owner_fifo = (struct usb_fifo *) fifo;
fifo->iso[i].indx = i;
@@ -1436,27 +1435,27 @@ start_isoc_chain(struct usb_fifo *fifo, int num_packets_per_urb,
(fifo->usb_packet_maxlen *
num_packets_per_urb)) {
fill_isoc_urb(fifo->iso[i].urb,
- fifo->hw->dev, fifo->pipe,
- fifo->iso[i].buffer,
- num_packets_per_urb,
- fifo->usb_packet_maxlen,
- fifo->intervall, complete,
- &fifo->iso[i]);
+ fifo->hw->dev, fifo->pipe,
+ fifo->iso[i].buffer,
+ num_packets_per_urb,
+ fifo->usb_packet_maxlen,
+ fifo->intervall, complete,
+ &fifo->iso[i]);
memset(fifo->iso[i].buffer, 0,
sizeof(fifo->iso[i].buffer));
for (k = 0; k < num_packets_per_urb; k++) {
fifo->iso[i].urb->
- iso_frame_desc[k].offset =
- k * packet_size;
+ iso_frame_desc[k].offset =
+ k * packet_size;
fifo->iso[i].urb->
- iso_frame_desc[k].length =
- packet_size;
+ iso_frame_desc[k].length =
+ packet_size;
}
} else {
printk(KERN_DEBUG
- "%s: %s: ISO Buffer size to small!\n",
- hw->name, __func__);
+ "%s: %s: ISO Buffer size to small!\n",
+ hw->name, __func__);
}
}
fifo->bit_line = BITLINE_INF;
@@ -1466,8 +1465,8 @@ start_isoc_chain(struct usb_fifo *fifo, int num_packets_per_urb,
fifo->stop_gracefull = 0;
if (errcode < 0) {
printk(KERN_DEBUG "%s: %s: %s URB nr:%d\n",
- hw->name, __func__,
- symbolic(urb_errlist, errcode), i);
+ hw->name, __func__,
+ symbolic(urb_errlist, errcode), i);
}
}
return fifo->active;
@@ -1492,10 +1491,10 @@ stop_iso_gracefull(struct usb_fifo *fifo)
for (i = 0; i < 2; i++) {
timeout = 3;
while (fifo->stop_gracefull && timeout--)
- schedule_timeout_interruptible((HZ/1000)*16);
+ schedule_timeout_interruptible((HZ / 1000) * 16);
if (debug && fifo->stop_gracefull)
printk(KERN_DEBUG "%s: ERROR %s for fifo %i.%i\n",
- hw->name, __func__, fifo->fifonum, i);
+ hw->name, __func__, fifo->fifonum, i);
}
}
@@ -1515,7 +1514,7 @@ stop_int_gracefull(struct usb_fifo *fifo)
timeout = 3;
while (fifo->stop_gracefull && timeout--)
- schedule_timeout_interruptible((HZ/1000)*3);
+ schedule_timeout_interruptible((HZ / 1000) * 3);
if (debug && fifo->stop_gracefull)
printk(KERN_DEBUG "%s: ERROR %s for fifo %i\n",
hw->name, __func__, fifo->fifonum);
@@ -1530,7 +1529,7 @@ start_int_fifo(struct usb_fifo *fifo)
if (debug)
printk(KERN_DEBUG "%s: %s: INT IN fifo:%d\n",
- hw->name, __func__, fifo->fifonum);
+ hw->name, __func__, fifo->fifonum);
if (!fifo->urb) {
fifo->urb = usb_alloc_urb(0, GFP_KERNEL);
@@ -1538,14 +1537,14 @@ start_int_fifo(struct usb_fifo *fifo)
return;
}
usb_fill_int_urb(fifo->urb, fifo->hw->dev, fifo->pipe,
- fifo->buffer, fifo->usb_packet_maxlen,
- (usb_complete_t)rx_int_complete, fifo, fifo->intervall);
+ fifo->buffer, fifo->usb_packet_maxlen,
+ (usb_complete_t)rx_int_complete, fifo, fifo->intervall);
fifo->active = 1;
fifo->stop_gracefull = 0;
errcode = usb_submit_urb(fifo->urb, GFP_KERNEL);
if (errcode) {
printk(KERN_DEBUG "%s: %s: submit URB: status:%i\n",
- hw->name, __func__, errcode);
+ hw->name, __func__, errcode);
fifo->active = 0;
}
}
@@ -1555,7 +1554,7 @@ setPortMode(struct hfcsusb *hw)
{
if (debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s %s\n", hw->name, __func__,
- (hw->protocol == ISDN_P_TE_S0) ? "TE" : "NT");
+ (hw->protocol == ISDN_P_TE_S0) ? "TE" : "NT");
if (hw->protocol == ISDN_P_TE_S0) {
write_reg(hw, HFCUSB_SCTRL, 0x40);
@@ -1589,7 +1588,7 @@ reset_hfcsusb(struct hfcsusb *hw)
/* set USB_SIZE to match the wMaxPacketSize for INT or BULK transfers */
write_reg(hw, HFCUSB_USB_SIZE, (hw->packet_size / 8) |
- ((hw->packet_size / 8) << 4));
+ ((hw->packet_size / 8) << 4));
/* set USB_SIZE_I to match the the wMaxPacketSize for ISO transfers */
write_reg(hw, HFCUSB_USB_SIZE_I, hw->iso_packet_size);
@@ -1600,13 +1599,13 @@ reset_hfcsusb(struct hfcsusb *hw)
/* init the fifos */
write_reg(hw, HFCUSB_F_THRES,
- (HFCUSB_TX_THRESHOLD / 8) | ((HFCUSB_RX_THRESHOLD / 8) << 4));
+ (HFCUSB_TX_THRESHOLD / 8) | ((HFCUSB_RX_THRESHOLD / 8) << 4));
fifo = hw->fifos;
for (i = 0; i < HFCUSB_NUM_FIFOS; i++) {
write_reg(hw, HFCUSB_FIFO, i); /* select the desired fifo */
fifo[i].max_size =
- (i <= HFCUSB_B2_RX) ? MAX_BCH_SIZE : MAX_DFRAME_LEN;
+ (i <= HFCUSB_B2_RX) ? MAX_BCH_SIZE : MAX_DFRAME_LEN;
fifo[i].last_urblen = 0;
/* set 2 bit for D- & E-channel */
@@ -1615,7 +1614,7 @@ reset_hfcsusb(struct hfcsusb *hw)
/* enable all fifos */
if (i == HFCUSB_D_TX)
write_reg(hw, HFCUSB_CON_HDLC,
- (hw->protocol == ISDN_P_NT_S0) ? 0x08 : 0x09);
+ (hw->protocol == ISDN_P_NT_S0) ? 0x08 : 0x09);
else
write_reg(hw, HFCUSB_CON_HDLC, 0x08);
write_reg(hw, HFCUSB_INC_RES_F, 2); /* reset the fifo */
@@ -1641,34 +1640,34 @@ hfcsusb_start_endpoint(struct hfcsusb *hw, int channel)
/* start rx endpoints using USB INT IN method */
if (hw->cfg_used == CNF_3INT3ISO || hw->cfg_used == CNF_4INT3ISO)
- start_int_fifo(hw->fifos + channel*2 + 1);
+ start_int_fifo(hw->fifos + channel * 2 + 1);
/* start rx endpoints using USB ISO IN method */
if (hw->cfg_used == CNF_3ISO3ISO || hw->cfg_used == CNF_4ISO3ISO) {
switch (channel) {
case HFC_CHAN_D:
start_isoc_chain(hw->fifos + HFCUSB_D_RX,
- ISOC_PACKETS_D,
- (usb_complete_t)rx_iso_complete,
- 16);
+ ISOC_PACKETS_D,
+ (usb_complete_t)rx_iso_complete,
+ 16);
break;
case HFC_CHAN_E:
start_isoc_chain(hw->fifos + HFCUSB_PCM_RX,
- ISOC_PACKETS_D,
- (usb_complete_t)rx_iso_complete,
- 16);
+ ISOC_PACKETS_D,
+ (usb_complete_t)rx_iso_complete,
+ 16);
break;
case HFC_CHAN_B1:
start_isoc_chain(hw->fifos + HFCUSB_B1_RX,
- ISOC_PACKETS_B,
- (usb_complete_t)rx_iso_complete,
- 16);
+ ISOC_PACKETS_B,
+ (usb_complete_t)rx_iso_complete,
+ 16);
break;
case HFC_CHAN_B2:
start_isoc_chain(hw->fifos + HFCUSB_B2_RX,
- ISOC_PACKETS_B,
- (usb_complete_t)rx_iso_complete,
- 16);
+ ISOC_PACKETS_B,
+ (usb_complete_t)rx_iso_complete,
+ 16);
break;
}
}
@@ -1677,18 +1676,18 @@ hfcsusb_start_endpoint(struct hfcsusb *hw, int channel)
switch (channel) {
case HFC_CHAN_D:
start_isoc_chain(hw->fifos + HFCUSB_D_TX,
- ISOC_PACKETS_B,
- (usb_complete_t)tx_iso_complete, 1);
+ ISOC_PACKETS_B,
+ (usb_complete_t)tx_iso_complete, 1);
break;
case HFC_CHAN_B1:
start_isoc_chain(hw->fifos + HFCUSB_B1_TX,
- ISOC_PACKETS_D,
- (usb_complete_t)tx_iso_complete, 1);
+ ISOC_PACKETS_D,
+ (usb_complete_t)tx_iso_complete, 1);
break;
case HFC_CHAN_B2:
start_isoc_chain(hw->fifos + HFCUSB_B2_TX,
- ISOC_PACKETS_B,
- (usb_complete_t)tx_iso_complete, 1);
+ ISOC_PACKETS_B,
+ (usb_complete_t)tx_iso_complete, 1);
break;
}
}
@@ -1709,15 +1708,15 @@ hfcsusb_stop_endpoint(struct hfcsusb *hw, int channel)
/* rx endpoints using USB INT IN method */
if (hw->cfg_used == CNF_3INT3ISO || hw->cfg_used == CNF_4INT3ISO)
- stop_int_gracefull(hw->fifos + channel*2 + 1);
+ stop_int_gracefull(hw->fifos + channel * 2 + 1);
/* rx endpoints using USB ISO IN method */
if (hw->cfg_used == CNF_3ISO3ISO || hw->cfg_used == CNF_4ISO3ISO)
- stop_iso_gracefull(hw->fifos + channel*2 + 1);
+ stop_iso_gracefull(hw->fifos + channel * 2 + 1);
/* tx endpoints using USB ISO OUT method */
if (channel != HFC_CHAN_E)
- stop_iso_gracefull(hw->fifos + channel*2);
+ stop_iso_gracefull(hw->fifos + channel * 2);
}
@@ -1733,12 +1732,12 @@ setup_hfcsusb(struct hfcsusb *hw)
/* check the chip id */
if (read_reg_atomic(hw, HFCUSB_CHIP_ID, &b) != 1) {
printk(KERN_DEBUG "%s: %s: cannot read chip id\n",
- hw->name, __func__);
+ hw->name, __func__);
return 1;
}
if (b != HFCUSB_CHIPID) {
printk(KERN_DEBUG "%s: %s: Invalid chip id 0x%02x\n",
- hw->name, __func__, b);
+ hw->name, __func__, b);
return 1;
}
@@ -1755,8 +1754,8 @@ setup_hfcsusb(struct hfcsusb *hw)
hw->ctrl_write.bRequest = 0;
hw->ctrl_write.wLength = 0;
usb_fill_control_urb(hw->ctrl_urb, hw->dev, hw->ctrl_out_pipe,
- (u_char *)&hw->ctrl_write, NULL, 0,
- (usb_complete_t)ctrl_complete, hw);
+ (u_char *)&hw->ctrl_write, NULL, 0,
+ (usb_complete_t)ctrl_complete, hw);
reset_hfcsusb(hw);
return 0;
@@ -1807,7 +1806,7 @@ deactivate_bchannel(struct bchannel *bch)
if (bch->debug & DEBUG_HW)
printk(KERN_DEBUG "%s: %s: bch->nr(%i)\n",
- hw->name, __func__, bch->nr);
+ hw->name, __func__, bch->nr);
spin_lock_irqsave(&hw->lock, flags);
mISDN_clear_bchannel(bch);
@@ -1849,7 +1848,7 @@ hfc_bctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
break;
default:
printk(KERN_WARNING "%s: unknown prim(%x)\n",
- __func__, cmd);
+ __func__, cmd);
}
return ret;
}
@@ -1878,7 +1877,7 @@ setup_instance(struct hfcsusb *hw, struct device *parent)
mISDN_initdchannel(&hw->ech, MAX_DFRAME_LEN_L1, NULL);
hw->dch.dev.Bprotocols = (1 << (ISDN_P_B_RAW & ISDN_P_B_MASK)) |
- (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
+ (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
hw->dch.dev.nrbchan = 2;
for (i = 0; i < 2; i++) {
hw->bch[i].nr = i + 1;
@@ -1906,9 +1905,9 @@ setup_instance(struct hfcsusb *hw, struct device *parent)
goto out;
snprintf(hw->name, MISDN_MAX_IDLEN - 1, "%s.%d", DRIVER_NAME,
- hfcsusb_cnt + 1);
+ hfcsusb_cnt + 1);
printk(KERN_INFO "%s: registered as '%s'\n",
- DRIVER_NAME, hw->name);
+ DRIVER_NAME, hw->name);
err = mISDN_register_device(&hw->dch.dev, parent, hw->name);
if (err)
@@ -1938,30 +1937,30 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
struct usb_host_endpoint *ep;
struct hfcsusb_vdata *driver_info;
int ifnum = iface->desc.bInterfaceNumber, i, idx, alt_idx,
- probe_alt_setting, vend_idx, cfg_used, *vcf, attr, cfg_found,
- ep_addr, cmptbl[16], small_match, iso_packet_size, packet_size,
- alt_used = 0;
+ probe_alt_setting, vend_idx, cfg_used, *vcf, attr, cfg_found,
+ ep_addr, cmptbl[16], small_match, iso_packet_size, packet_size,
+ alt_used = 0;
vend_idx = 0xffff;
for (i = 0; hfcsusb_idtab[i].idVendor; i++) {
if ((le16_to_cpu(dev->descriptor.idVendor)
- == hfcsusb_idtab[i].idVendor) &&
+ == hfcsusb_idtab[i].idVendor) &&
(le16_to_cpu(dev->descriptor.idProduct)
- == hfcsusb_idtab[i].idProduct)) {
+ == hfcsusb_idtab[i].idProduct)) {
vend_idx = i;
continue;
}
}
printk(KERN_DEBUG
- "%s: interface(%d) actalt(%d) minor(%d) vend_idx(%d)\n",
- __func__, ifnum, iface->desc.bAlternateSetting,
- intf->minor, vend_idx);
+ "%s: interface(%d) actalt(%d) minor(%d) vend_idx(%d)\n",
+ __func__, ifnum, iface->desc.bAlternateSetting,
+ intf->minor, vend_idx);
if (vend_idx == 0xffff) {
printk(KERN_WARNING
- "%s: no valid vendor found in USB descriptor\n",
- __func__);
+ "%s: no valid vendor found in USB descriptor\n",
+ __func__);
return -EIO;
}
/* if vendor and product ID is OK, start probing alternate settings */
@@ -1997,17 +1996,17 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
if (cmptbl[idx] == EP_NUL)
cfg_found = 0;
if (attr == USB_ENDPOINT_XFER_INT
- && cmptbl[idx] == EP_INT)
+ && cmptbl[idx] == EP_INT)
cmptbl[idx] = EP_NUL;
if (attr == USB_ENDPOINT_XFER_BULK
- && cmptbl[idx] == EP_BLK)
+ && cmptbl[idx] == EP_BLK)
cmptbl[idx] = EP_NUL;
if (attr == USB_ENDPOINT_XFER_ISOC
- && cmptbl[idx] == EP_ISO)
+ && cmptbl[idx] == EP_ISO)
cmptbl[idx] = EP_NUL;
if (attr == USB_ENDPOINT_XFER_INT &&
- ep->desc.bInterval < vcf[17]) {
+ ep->desc.bInterval < vcf[17]) {
cfg_found = 0;
}
}
@@ -2061,27 +2060,27 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
switch (ep->desc.bmAttributes) {
case USB_ENDPOINT_XFER_INT:
f->pipe = usb_rcvintpipe(dev,
- ep->desc.bEndpointAddress);
+ ep->desc.bEndpointAddress);
f->usb_transfer_mode = USB_INT;
packet_size = le16_to_cpu(ep->desc.wMaxPacketSize);
break;
case USB_ENDPOINT_XFER_BULK:
if (ep_addr & 0x80)
f->pipe = usb_rcvbulkpipe(dev,
- ep->desc.bEndpointAddress);
+ ep->desc.bEndpointAddress);
else
f->pipe = usb_sndbulkpipe(dev,
- ep->desc.bEndpointAddress);
+ ep->desc.bEndpointAddress);
f->usb_transfer_mode = USB_BULK;
packet_size = le16_to_cpu(ep->desc.wMaxPacketSize);
break;
case USB_ENDPOINT_XFER_ISOC:
if (ep_addr & 0x80)
f->pipe = usb_rcvisocpipe(dev,
- ep->desc.bEndpointAddress);
+ ep->desc.bEndpointAddress);
else
f->pipe = usb_sndisocpipe(dev,
- ep->desc.bEndpointAddress);
+ ep->desc.bEndpointAddress);
f->usb_transfer_mode = USB_ISOC;
iso_packet_size = le16_to_cpu(ep->desc.wMaxPacketSize);
break;
@@ -2093,7 +2092,7 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
f->fifonum = idx & 7;
f->hw = hw;
f->usb_packet_maxlen =
- le16_to_cpu(ep->desc.wMaxPacketSize);
+ le16_to_cpu(ep->desc.wMaxPacketSize);
f->intervall = ep->desc.bInterval;
}
ep++;
@@ -2115,8 +2114,8 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
driver_info =
(struct hfcsusb_vdata *)hfcsusb_idtab[vend_idx].driver_info;
printk(KERN_DEBUG "%s: %s: detected \"%s\" (%s, if=%d alt=%d)\n",
- hw->name, __func__, driver_info->vend_name,
- conf_str[small_match], ifnum, alt_used);
+ hw->name, __func__, driver_info->vend_name,
+ conf_str[small_match], ifnum, alt_used);
if (setup_instance(hw, dev->dev.parent))
return -EIO;
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.h b/drivers/isdn/hardware/mISDN/hfcsusb.h
index 369196adae0..cb1231b08f7 100644
--- a/drivers/isdn/hardware/mISDN/hfcsusb.h
+++ b/drivers/isdn/hardware/mISDN/hfcsusb.h
@@ -36,10 +36,10 @@
#define NT_ACTIVATION_TIMER 0x01 /* enables NT mode activation Timer */
#define NT_T1_COUNT 10
-#define MAX_BCH_SIZE 2048 /* allowed B-channel packet size */
+#define MAX_BCH_SIZE 2048 /* allowed B-channel packet size */
-#define HFCUSB_RX_THRESHOLD 64 /* threshold for fifo report bit rx */
-#define HFCUSB_TX_THRESHOLD 96 /* threshold for fifo report bit tx */
+#define HFCUSB_RX_THRESHOLD 64 /* threshold for fifo report bit rx */
+#define HFCUSB_TX_THRESHOLD 96 /* threshold for fifo report bit tx */
#define HFCUSB_CHIP_ID 0x16 /* Chip ID register index */
#define HFCUSB_CIRM 0x00 /* cirm register index */
@@ -90,8 +90,8 @@
/* defines how much ISO packets are handled in one URB */
static int iso_packets[8] =
- { ISOC_PACKETS_B, ISOC_PACKETS_B, ISOC_PACKETS_B, ISOC_PACKETS_B,
- ISOC_PACKETS_D, ISOC_PACKETS_D, ISOC_PACKETS_D, ISOC_PACKETS_D
+{ ISOC_PACKETS_B, ISOC_PACKETS_B, ISOC_PACKETS_B, ISOC_PACKETS_B,
+ ISOC_PACKETS_D, ISOC_PACKETS_D, ISOC_PACKETS_D, ISOC_PACKETS_D
};
@@ -100,15 +100,15 @@ static int iso_packets[8] =
#define SINK_MIN 48
#define SINK_DMIN 12
#define SINK_DMAX 18
-#define BITLINE_INF (-96*8)
+#define BITLINE_INF (-96 * 8)
/* HFC-S USB register access by Control-URSs */
-#define write_reg_atomic(a, b, c) \
+#define write_reg_atomic(a, b, c) \
usb_control_msg((a)->dev, (a)->ctrl_out_pipe, 0, 0x40, (c), (b), \
- 0, 0, HFC_CTRL_TIMEOUT)
-#define read_reg_atomic(a, b, c) \
+ 0, 0, HFC_CTRL_TIMEOUT)
+#define read_reg_atomic(a, b, c) \
usb_control_msg((a)->dev, (a)->ctrl_in_pipe, 1, 0xC0, 0, (b), (c), \
- 1, HFC_CTRL_TIMEOUT)
+ 1, HFC_CTRL_TIMEOUT)
#define HFC_CTRL_BUFSIZE 64
struct ctrl_buf {
@@ -222,7 +222,7 @@ static char *conf_str[] = {
#define LED_B2_DATA 10
#define LED_NORMAL 0 /* LEDs are normal */
-#define LED_INVERTED 1 /* LEDs are inverted */
+#define LED_INVERTED 1 /* LEDs are inverted */
/* time in ms to perform a Flashing LED when B-Channel has traffic */
#define LED_TIME 250
@@ -258,7 +258,7 @@ struct usb_fifo {
__u8 usb_transfer_mode; /* switched between ISO and INT */
struct iso_urb iso[2]; /* two urbs to have one always
- one pending */
+ one pending */
struct dchannel *dch; /* link to hfcsusb_t->dch */
struct bchannel *bch; /* link to hfcsusb_t->bch */
@@ -339,76 +339,76 @@ static const char *HFC_NT_LAYER1_STATES[HFC_MAX_NT_LAYER1_STATE + 1] = {
/* supported devices */
static struct usb_device_id hfcsusb_idtab[] = {
{
- USB_DEVICE(0x0959, 0x2bd0),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_OFF, {4, 0, 2, 1},
- "ISDN USB TA (Cologne Chip HFC-S USB based)"}),
+ USB_DEVICE(0x0959, 0x2bd0),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_OFF, {4, 0, 2, 1},
+ "ISDN USB TA (Cologne Chip HFC-S USB based)"}),
},
{
- USB_DEVICE(0x0675, 0x1688),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {1, 2, 0, 0},
- "DrayTek miniVigor 128 USB ISDN TA"}),
+ USB_DEVICE(0x0675, 0x1688),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {1, 2, 0, 0},
+ "DrayTek miniVigor 128 USB ISDN TA"}),
},
{
- USB_DEVICE(0x07b0, 0x0007),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {0x80, -64, -32, -16},
- "Billion tiny USB ISDN TA 128"}),
+ USB_DEVICE(0x07b0, 0x0007),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {0x80, -64, -32, -16},
+ "Billion tiny USB ISDN TA 128"}),
},
{
- USB_DEVICE(0x0742, 0x2008),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {4, 0, 2, 1},
- "Stollmann USB TA"}),
+ USB_DEVICE(0x0742, 0x2008),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {4, 0, 2, 1},
+ "Stollmann USB TA"}),
},
{
- USB_DEVICE(0x0742, 0x2009),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {4, 0, 2, 1},
- "Aceex USB ISDN TA"}),
+ USB_DEVICE(0x0742, 0x2009),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {4, 0, 2, 1},
+ "Aceex USB ISDN TA"}),
},
{
- USB_DEVICE(0x0742, 0x200A),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {4, 0, 2, 1},
- "OEM USB ISDN TA"}),
+ USB_DEVICE(0x0742, 0x200A),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {4, 0, 2, 1},
+ "OEM USB ISDN TA"}),
},
{
- USB_DEVICE(0x08e3, 0x0301),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {2, 0, 1, 4},
- "Olitec USB RNIS"}),
+ USB_DEVICE(0x08e3, 0x0301),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {2, 0, 1, 4},
+ "Olitec USB RNIS"}),
},
{
- USB_DEVICE(0x07fa, 0x0846),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {0x80, -64, -32, -16},
- "Bewan Modem RNIS USB"}),
+ USB_DEVICE(0x07fa, 0x0846),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {0x80, -64, -32, -16},
+ "Bewan Modem RNIS USB"}),
},
{
- USB_DEVICE(0x07fa, 0x0847),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {0x80, -64, -32, -16},
- "Djinn Numeris USB"}),
+ USB_DEVICE(0x07fa, 0x0847),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {0x80, -64, -32, -16},
+ "Djinn Numeris USB"}),
},
{
- USB_DEVICE(0x07b0, 0x0006),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {0x80, -64, -32, -16},
- "Twister ISDN TA"}),
+ USB_DEVICE(0x07b0, 0x0006),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {0x80, -64, -32, -16},
+ "Twister ISDN TA"}),
},
{
- USB_DEVICE(0x071d, 0x1005),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {0x02, 0, 0x01, 0x04},
- "Eicon DIVA USB 4.0"}),
+ USB_DEVICE(0x071d, 0x1005),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {0x02, 0, 0x01, 0x04},
+ "Eicon DIVA USB 4.0"}),
},
{
- USB_DEVICE(0x0586, 0x0102),
- .driver_info = (unsigned long) &((struct hfcsusb_vdata)
- {LED_SCHEME1, {0x88, -64, -32, -16},
- "ZyXEL OMNI.NET USB II"}),
+ USB_DEVICE(0x0586, 0x0102),
+ .driver_info = (unsigned long) &((struct hfcsusb_vdata)
+ {LED_SCHEME1, {0x88, -64, -32, -16},
+ "ZyXEL OMNI.NET USB II"}),
},
{ }
};
diff --git a/drivers/isdn/hardware/mISDN/iohelper.h b/drivers/isdn/hardware/mISDN/iohelper.h
index b438981107a..c3e7bb1daa2 100644
--- a/drivers/isdn/hardware/mISDN/iohelper.h
+++ b/drivers/isdn/hardware/mISDN/iohelper.h
@@ -27,83 +27,83 @@
#define _IOHELPER_H
typedef u8 (read_reg_func)(void *hwp, u8 offset);
-typedef void (write_reg_func)(void *hwp, u8 offset, u8 value);
-typedef void (fifo_func)(void *hwp, u8 offset, u8 *datap, int size);
+ typedef void (write_reg_func)(void *hwp, u8 offset, u8 value);
+ typedef void (fifo_func)(void *hwp, u8 offset, u8 *datap, int size);
-struct _ioport {
- u32 port;
- u32 ale;
-};
+ struct _ioport {
+ u32 port;
+ u32 ale;
+ };
-#define IOFUNC_IO(name, hws, ap) \
- static u8 Read##name##_IO(void *p, u8 off) {\
- struct hws *hw = p;\
- return inb(hw->ap.port + off);\
- } \
- static void Write##name##_IO(void *p, u8 off, u8 val) {\
- struct hws *hw = p;\
- outb(val, hw->ap.port + off);\
- } \
- static void ReadFiFo##name##_IO(void *p, u8 off, u8 *dp, int size) {\
- struct hws *hw = p;\
- insb(hw->ap.port + off, dp, size);\
- } \
- static void WriteFiFo##name##_IO(void *p, u8 off, u8 *dp, int size) {\
- struct hws *hw = p;\
- outsb(hw->ap.port + off, dp, size);\
+#define IOFUNC_IO(name, hws, ap) \
+ static u8 Read##name##_IO(void *p, u8 off) { \
+ struct hws *hw = p; \
+ return inb(hw->ap.port + off); \
+ } \
+ static void Write##name##_IO(void *p, u8 off, u8 val) { \
+ struct hws *hw = p; \
+ outb(val, hw->ap.port + off); \
+ } \
+ static void ReadFiFo##name##_IO(void *p, u8 off, u8 *dp, int size) { \
+ struct hws *hw = p; \
+ insb(hw->ap.port + off, dp, size); \
+ } \
+ static void WriteFiFo##name##_IO(void *p, u8 off, u8 *dp, int size) { \
+ struct hws *hw = p; \
+ outsb(hw->ap.port + off, dp, size); \
}
-#define IOFUNC_IND(name, hws, ap) \
- static u8 Read##name##_IND(void *p, u8 off) {\
- struct hws *hw = p;\
- outb(off, hw->ap.ale);\
- return inb(hw->ap.port);\
- } \
- static void Write##name##_IND(void *p, u8 off, u8 val) {\
- struct hws *hw = p;\
- outb(off, hw->ap.ale);\
- outb(val, hw->ap.port);\
- } \
- static void ReadFiFo##name##_IND(void *p, u8 off, u8 *dp, int size) {\
- struct hws *hw = p;\
- outb(off, hw->ap.ale);\
- insb(hw->ap.port, dp, size);\
- } \
- static void WriteFiFo##name##_IND(void *p, u8 off, u8 *dp, int size) {\
- struct hws *hw = p;\
- outb(off, hw->ap.ale);\
- outsb(hw->ap.port, dp, size);\
+#define IOFUNC_IND(name, hws, ap) \
+ static u8 Read##name##_IND(void *p, u8 off) { \
+ struct hws *hw = p; \
+ outb(off, hw->ap.ale); \
+ return inb(hw->ap.port); \
+ } \
+ static void Write##name##_IND(void *p, u8 off, u8 val) { \
+ struct hws *hw = p; \
+ outb(off, hw->ap.ale); \
+ outb(val, hw->ap.port); \
+ } \
+ static void ReadFiFo##name##_IND(void *p, u8 off, u8 *dp, int size) { \
+ struct hws *hw = p; \
+ outb(off, hw->ap.ale); \
+ insb(hw->ap.port, dp, size); \
+ } \
+ static void WriteFiFo##name##_IND(void *p, u8 off, u8 *dp, int size) { \
+ struct hws *hw = p; \
+ outb(off, hw->ap.ale); \
+ outsb(hw->ap.port, dp, size); \
}
-#define IOFUNC_MEMIO(name, hws, typ, adr) \
- static u8 Read##name##_MIO(void *p, u8 off) {\
- struct hws *hw = p;\
- return readb(((typ *)hw->adr) + off);\
- } \
- static void Write##name##_MIO(void *p, u8 off, u8 val) {\
- struct hws *hw = p;\
- writeb(val, ((typ *)hw->adr) + off);\
- } \
- static void ReadFiFo##name##_MIO(void *p, u8 off, u8 *dp, int size) {\
- struct hws *hw = p;\
- while (size--)\
- *dp++ = readb(((typ *)hw->adr) + off);\
- } \
- static void WriteFiFo##name##_MIO(void *p, u8 off, u8 *dp, int size) {\
- struct hws *hw = p;\
- while (size--)\
- writeb(*dp++, ((typ *)hw->adr) + off);\
+#define IOFUNC_MEMIO(name, hws, typ, adr) \
+ static u8 Read##name##_MIO(void *p, u8 off) { \
+ struct hws *hw = p; \
+ return readb(((typ *)hw->adr) + off); \
+ } \
+ static void Write##name##_MIO(void *p, u8 off, u8 val) { \
+ struct hws *hw = p; \
+ writeb(val, ((typ *)hw->adr) + off); \
+ } \
+ static void ReadFiFo##name##_MIO(void *p, u8 off, u8 *dp, int size) { \
+ struct hws *hw = p; \
+ while (size--) \
+ *dp++ = readb(((typ *)hw->adr) + off); \
+ } \
+ static void WriteFiFo##name##_MIO(void *p, u8 off, u8 *dp, int size) { \
+ struct hws *hw = p; \
+ while (size--) \
+ writeb(*dp++, ((typ *)hw->adr) + off); \
}
-#define ASSIGN_FUNC(typ, name, dest) do {\
- dest.read_reg = &Read##name##_##typ;\
- dest.write_reg = &Write##name##_##typ;\
- dest.read_fifo = &ReadFiFo##name##_##typ;\
- dest.write_fifo = &WriteFiFo##name##_##typ;\
+#define ASSIGN_FUNC(typ, name, dest) do { \
+ dest.read_reg = &Read##name##_##typ; \
+ dest.write_reg = &Write##name##_##typ; \
+ dest.read_fifo = &ReadFiFo##name##_##typ; \
+ dest.write_fifo = &WriteFiFo##name##_##typ; \
} while (0)
-#define ASSIGN_FUNC_IPAC(typ, target) do {\
- ASSIGN_FUNC(typ, ISAC, target.isac);\
- ASSIGN_FUNC(typ, IPAC, target);\
+#define ASSIGN_FUNC_IPAC(typ, target) do { \
+ ASSIGN_FUNC(typ, ISAC, target.isac); \
+ ASSIGN_FUNC(typ, IPAC, target); \
} while (0)
#endif
diff --git a/drivers/isdn/hardware/mISDN/isar.h b/drivers/isdn/hardware/mISDN/isar.h
index 9962bdf699c..cadfc49c920 100644
--- a/drivers/isdn/hardware/mISDN/isar.h
+++ b/drivers/isdn/hardware/mISDN/isar.h
@@ -97,7 +97,7 @@ struct isar_hw {
#define ISAR_HIS_SDATA 0x20
#define ISAR_HIS_DPS1 0x40
#define ISAR_HIS_DPS2 0x80
-#define SET_DPS(x) ((x<<6) & 0xc0)
+#define SET_DPS(x) ((x << 6) & 0xc0)
#define ISAR_IIS_MSCMSD 0x3f
#define ISAR_IIS_VNR 0x15
diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
index 6218775ce87..631eb3fa63c 100644
--- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
+++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
@@ -431,11 +431,11 @@ enable_hwirq(struct inf_hw *hw)
break;
case INF_GAZEL_R685:
outb(GAZEL_ISAC_EN + GAZEL_HSCX_EN + GAZEL_PCI_EN,
- (u32)hw->cfg.start + GAZEL_INCSR);
+ (u32)hw->cfg.start + GAZEL_INCSR);
break;
case INF_GAZEL_R753:
outb(GAZEL_IPAC_EN + GAZEL_PCI_EN,
- (u32)hw->cfg.start + GAZEL_INCSR);
+ (u32)hw->cfg.start + GAZEL_INCSR);
break;
default:
break;
@@ -511,21 +511,21 @@ reset_inf(struct inf_hw *hw)
/* Workaround PCI9060 */
outb(9, (u32)hw->cfg.start + 0x69);
outb(DIVA_RESET_BIT | DIVA_LED_A,
- (u32)hw->cfg.start + DIVA_PCI_CTRL);
+ (u32)hw->cfg.start + DIVA_PCI_CTRL);
break;
case INF_DIVA201:
writel(PITA_PARA_SOFTRESET | PITA_PARA_MPX_MODE,
- hw->cfg.p + PITA_MISC_REG);
+ hw->cfg.p + PITA_MISC_REG);
mdelay(1);
writel(PITA_PARA_MPX_MODE, hw->cfg.p + PITA_MISC_REG);
mdelay(10);
break;
case INF_DIVA202:
writel(PITA_PARA_SOFTRESET | PITA_PARA_MPX_MODE,
- hw->cfg.p + PITA_MISC_REG);
+ hw->cfg.p + PITA_MISC_REG);
mdelay(1);
writel(PITA_PARA_MPX_MODE | PITA_SER_SOFTRESET,
- hw->cfg.p + PITA_MISC_REG);
+ hw->cfg.p + PITA_MISC_REG);
mdelay(10);
break;
case INF_SPEEDWIN:
@@ -630,7 +630,7 @@ init_irq(struct inf_hw *hw)
msleep_interruptible(10);
if (debug & DEBUG_HW)
pr_notice("%s: IRQ %d count %d\n", hw->name,
- hw->irq, hw->irqcnt);
+ hw->irq, hw->irqcnt);
if (!hw->irqcnt) {
pr_info("%s: IRQ(%d) got no requests during init %d\n",
hw->name, hw->irq, 3 - cnt);
@@ -672,11 +672,11 @@ setup_io(struct inf_hw *hw)
hw->cfg.size = pci_resource_len(hw->pdev, hw->ci->cfg_bar);
if (hw->ci->cfg_mode == AM_MEMIO) {
if (!request_mem_region(hw->cfg.start, hw->cfg.size,
- hw->name))
+ hw->name))
err = -EBUSY;
} else {
if (!request_region(hw->cfg.start, hw->cfg.size,
- hw->name))
+ hw->name))
err = -EBUSY;
}
if (err) {
@@ -690,8 +690,8 @@ setup_io(struct inf_hw *hw)
hw->cfg.mode = hw->ci->cfg_mode;
if (debug & DEBUG_HW)
pr_notice("%s: IO cfg %lx (%lu bytes) mode%d\n",
- hw->name, (ulong)hw->cfg.start,
- (ulong)hw->cfg.size, hw->ci->cfg_mode);
+ hw->name, (ulong)hw->cfg.start,
+ (ulong)hw->cfg.size, hw->ci->cfg_mode);
}
if (hw->ci->addr_mode) {
@@ -699,11 +699,11 @@ setup_io(struct inf_hw *hw)
hw->addr.size = pci_resource_len(hw->pdev, hw->ci->addr_bar);
if (hw->ci->addr_mode == AM_MEMIO) {
if (!request_mem_region(hw->addr.start, hw->addr.size,
- hw->name))
+ hw->name))
err = -EBUSY;
} else {
if (!request_region(hw->addr.start, hw->addr.size,
- hw->name))
+ hw->name))
err = -EBUSY;
}
if (err) {
@@ -717,8 +717,8 @@ setup_io(struct inf_hw *hw)
hw->addr.mode = hw->ci->addr_mode;
if (debug & DEBUG_HW)
pr_notice("%s: IO addr %lx (%lu bytes) mode%d\n",
- hw->name, (ulong)hw->addr.start,
- (ulong)hw->addr.size, hw->ci->addr_mode);
+ hw->name, (ulong)hw->addr.start,
+ (ulong)hw->addr.size, hw->ci->addr_mode);
}
@@ -903,7 +903,7 @@ setup_instance(struct inf_hw *card)
ulong flags;
snprintf(card->name, MISDN_MAX_IDLEN - 1, "%s.%d", card->ci->name,
- inf_cnt + 1);
+ inf_cnt + 1);
write_lock_irqsave(&card_lock, flags);
list_add_tail(&card->list, &Cards);
write_unlock_irqrestore(&card_lock, flags);
@@ -928,7 +928,7 @@ setup_instance(struct inf_hw *card)
goto error_setup;
err = mISDN_register_device(&card->ipac.isac.dch.dev,
- &card->pdev->dev, card->name);
+ &card->pdev->dev, card->name);
if (err)
goto error;
@@ -1099,7 +1099,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return -EINVAL;
} else
pr_notice("mISDN: found adapter %s at %s\n",
- card->ci->full, pci_name(pdev));
+ card->ci->full, pci_name(pdev));
card->irq = pdev->irq;
pci_set_drvdata(pdev, card);
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c
index d2ffb1d9b83..b47e9bed218 100644
--- a/drivers/isdn/hardware/mISDN/mISDNipac.c
+++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
@@ -129,7 +129,7 @@ isac_empty_fifo(struct isac_hw *isac, int count)
}
if ((isac->dch.rx_skb->len + count) >= isac->dch.maxlen) {
pr_debug("%s: %s overrun %d\n", isac->name, __func__,
- isac->dch.rx_skb->len + count);
+ isac->dch.rx_skb->len + count);
WriteISAC(isac, ISAC_CMDR, 0x80);
return;
}
@@ -140,7 +140,7 @@ isac_empty_fifo(struct isac_hw *isac, int count)
char pfx[MISDN_MAX_IDLEN + 16];
snprintf(pfx, MISDN_MAX_IDLEN + 15, "D-recv %s %d ",
- isac->name, count);
+ isac->name, count);
print_hex_dump_bytes(pfx, DUMP_PREFIX_OFFSET, ptr, count);
}
}
@@ -178,7 +178,7 @@ isac_fill_fifo(struct isac_hw *isac)
char pfx[MISDN_MAX_IDLEN + 16];
snprintf(pfx, MISDN_MAX_IDLEN + 15, "D-send %s %d ",
- isac->name, count);
+ isac->name, count);
print_hex_dump_bytes(pfx, DUMP_PREFIX_OFFSET, ptr, count);
}
}
@@ -283,7 +283,7 @@ isac_mos_irq(struct isac_hw *isac)
}
isac->mon_rx[isac->mon_rxp++] = ReadISAC(isac, ISAC_MOR0);
pr_debug("%s: ISAC MOR0 %02x\n", isac->name,
- isac->mon_rx[isac->mon_rxp - 1]);
+ isac->mon_rx[isac->mon_rxp - 1]);
if (isac->mon_rxp == 1) {
isac->mocr |= 0x04;
WriteISAC(isac, ISAC_MOCR, isac->mocr);
@@ -313,7 +313,7 @@ afterMONR0:
}
isac->mon_rx[isac->mon_rxp++] = ReadISAC(isac, ISAC_MOR1);
pr_debug("%s: ISAC MOR1 %02x\n", isac->name,
- isac->mon_rx[isac->mon_rxp - 1]);
+ isac->mon_rx[isac->mon_rxp - 1]);
isac->mocr |= 0x40;
WriteISAC(isac, ISAC_MOCR, isac->mocr);
}
@@ -325,7 +325,7 @@ afterMONR1:
WriteISAC(isac, ISAC_MOCR, isac->mocr);
if (isac->monitor) {
ret = isac->monitor(isac->dch.hw, MONITOR_RX_0,
- isac->mon_rx, isac->mon_rxp);
+ isac->mon_rx, isac->mon_rxp);
if (ret)
kfree(isac->mon_rx);
} else {
@@ -343,7 +343,7 @@ afterMONR1:
WriteISAC(isac, ISAC_MOCR, isac->mocr);
if (isac->monitor) {
ret = isac->monitor(isac->dch.hw, MONITOR_RX_1,
- isac->mon_rx, isac->mon_rxp);
+ isac->mon_rx, isac->mon_rxp);
if (ret)
kfree(isac->mon_rx);
} else {
@@ -356,7 +356,7 @@ afterMONR1:
}
if (val & 0x02) {
if ((!isac->mon_tx) || (isac->mon_txc &&
- (isac->mon_txp >= isac->mon_txc) && !(val & 0x08))) {
+ (isac->mon_txp >= isac->mon_txc) && !(val & 0x08))) {
isac->mocr &= 0xf0;
WriteISAC(isac, ISAC_MOCR, isac->mocr);
isac->mocr |= 0x0a;
@@ -364,7 +364,7 @@ afterMONR1:
if (isac->mon_txc && (isac->mon_txp >= isac->mon_txc)) {
if (isac->monitor)
ret = isac->monitor(isac->dch.hw,
- MONITOR_TX_0, NULL, 0);
+ MONITOR_TX_0, NULL, 0);
}
kfree(isac->mon_tx);
isac->mon_tx = NULL;
@@ -375,7 +375,7 @@ afterMONR1:
if (isac->mon_txc && (isac->mon_txp >= isac->mon_txc)) {
if (isac->monitor)
ret = isac->monitor(isac->dch.hw,
- MONITOR_TX_0, NULL, 0);
+ MONITOR_TX_0, NULL, 0);
kfree(isac->mon_tx);
isac->mon_tx = NULL;
isac->mon_txc = 0;
@@ -384,12 +384,12 @@ afterMONR1:
}
WriteISAC(isac, ISAC_MOX0, isac->mon_tx[isac->mon_txp++]);
pr_debug("%s: ISAC %02x -> MOX0\n", isac->name,
- isac->mon_tx[isac->mon_txp - 1]);
+ isac->mon_tx[isac->mon_txp - 1]);
}
AfterMOX0:
if (val & 0x20) {
if ((!isac->mon_tx) || (isac->mon_txc &&
- (isac->mon_txp >= isac->mon_txc) && !(val & 0x80))) {
+ (isac->mon_txp >= isac->mon_txc) && !(val & 0x80))) {
isac->mocr &= 0x0f;
WriteISAC(isac, ISAC_MOCR, isac->mocr);
isac->mocr |= 0xa0;
@@ -397,7 +397,7 @@ AfterMOX0:
if (isac->mon_txc && (isac->mon_txp >= isac->mon_txc)) {
if (isac->monitor)
ret = isac->monitor(isac->dch.hw,
- MONITOR_TX_1, NULL, 0);
+ MONITOR_TX_1, NULL, 0);
}
kfree(isac->mon_tx);
isac->mon_tx = NULL;
@@ -408,7 +408,7 @@ AfterMOX0:
if (isac->mon_txc && (isac->mon_txp >= isac->mon_txc)) {
if (isac->monitor)
ret = isac->monitor(isac->dch.hw,
- MONITOR_TX_1, NULL, 0);
+ MONITOR_TX_1, NULL, 0);
kfree(isac->mon_tx);
isac->mon_tx = NULL;
isac->mon_txc = 0;
@@ -417,7 +417,7 @@ AfterMOX0:
}
WriteISAC(isac, ISAC_MOX1, isac->mon_tx[isac->mon_txp++]);
pr_debug("%s: ISAC %02x -> MOX1\n", isac->name,
- isac->mon_tx[isac->mon_txp - 1]);
+ isac->mon_tx[isac->mon_txp - 1]);
}
AfterMOX1:
val = 0; /* dummy to avoid warning */
@@ -432,7 +432,7 @@ isac_cisq_irq(struct isac_hw *isac) {
pr_debug("%s: ISAC CIR0 %02X\n", isac->name, val);
if (val & 2) {
pr_debug("%s: ph_state change %x->%x\n", isac->name,
- isac->state, (val >> 2) & 0xf);
+ isac->state, (val >> 2) & 0xf);
isac->state = (val >> 2) & 0xf;
isac_ph_state_change(isac);
}
@@ -451,7 +451,7 @@ isacsx_cic_irq(struct isac_hw *isac)
pr_debug("%s: ISACX CIR0 %02X\n", isac->name, val);
if (val & ISACX_CIR0_CIC0) {
pr_debug("%s: ph_state change %x->%x\n", isac->name,
- isac->state, val >> 4);
+ isac->state, val >> 4);
isac->state = val >> 4;
isac_ph_state_change(isac);
}
@@ -488,7 +488,7 @@ isacsx_rme_irq(struct isac_hw *isac)
if (isac->dch.rx_skb) {
skb_trim(isac->dch.rx_skb, isac->dch.rx_skb->len - 1);
pr_debug("%s: dchannel received %d\n", isac->name,
- isac->dch.rx_skb->len);
+ isac->dch.rx_skb->len);
recv_Dchannel(&isac->dch);
}
}
@@ -628,7 +628,7 @@ isac_ctrl(struct isac_hw *isac, u32 cmd, u_long para)
break;
default:
pr_debug("%s: %s unknown command %x %lx\n", isac->name,
- __func__, cmd, para);
+ __func__, cmd, para);
return -1;
}
return 0;
@@ -685,16 +685,16 @@ isac_l1cmd(struct dchannel *dch, u32 cmd)
case PH_ACTIVATE_IND:
test_and_set_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
case PH_DEACTIVATE_IND:
test_and_clear_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
default:
pr_debug("%s: %s unknown command %x\n", isac->name,
- __func__, cmd);
+ __func__, cmd);
return -1;
}
return 0;
@@ -731,7 +731,7 @@ dbusy_timer_handler(struct isac_hw *isac)
rbch = ReadISAC(isac, ISAC_RBCH);
star = ReadISAC(isac, ISAC_STAR);
pr_debug("%s: D-Channel Busy RBCH %02x STAR %02x\n",
- isac->name, rbch, star);
+ isac->name, rbch, star);
if (rbch & ISAC_RBCH_XAC) /* D-Channel Busy */
test_and_set_bit(FLG_L1_BUSY, &isac->dch.Flags);
else {
@@ -753,7 +753,7 @@ static int
open_dchannel(struct isac_hw *isac, struct channel_req *rq)
{
pr_debug("%s: %s dev(%d) open from %p\n", isac->name, __func__,
- isac->dch.dev.id, __builtin_return_address(1));
+ isac->dch.dev.id, __builtin_return_address(1));
if (rq->protocol != ISDN_P_TE_S0)
return -EINVAL;
if (rq->adr.channel == 1)
@@ -763,7 +763,7 @@ open_dchannel(struct isac_hw *isac, struct channel_req *rq)
rq->ch->protocol = rq->protocol;
if (isac->dch.state == 7)
_queue_data(rq->ch, PH_ACTIVATE_IND, MISDN_ID_ANY,
- 0, NULL, GFP_KERNEL);
+ 0, NULL, GFP_KERNEL);
return 0;
}
@@ -807,7 +807,7 @@ isac_init(struct isac_hw *isac)
val = ReadISAC(isac, ISACX_ID);
if (isac->dch.debug & DEBUG_HW)
pr_notice("%s: ISACX Design ID %x\n",
- isac->name, val & 0x3f);
+ isac->name, val & 0x3f);
val = ReadISAC(isac, ISACX_CIR0);
pr_debug("%s: ISACX CIR0 %02X\n", isac->name, val);
isac->state = val >> 4;
@@ -832,7 +832,7 @@ isac_init(struct isac_hw *isac)
val = ReadISAC(isac, ISAC_RBCH);
if (isac->dch.debug & DEBUG_HW)
pr_notice("%s: ISAC version (%x): %s\n", isac->name,
- val, ISACVer[(val >> 5) & 3]);
+ val, ISACVer[(val >> 5) & 3]);
isac->type |= ((val >> 5) & 3);
if (!isac->adf2)
isac->adf2 = 0x80;
@@ -889,7 +889,7 @@ waitforCEC(struct hscx_hw *hx)
}
if (to < 50)
pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr,
- 50 - to);
+ 50 - to);
if (!to)
pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr);
}
@@ -909,7 +909,7 @@ waitforXFW(struct hscx_hw *hx)
}
if (to < 50)
pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr,
- 50 - to);
+ 50 - to);
if (!to)
pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr);
}
@@ -942,7 +942,7 @@ hscx_empty_fifo(struct hscx_hw *hscx, u8 count)
}
if ((hscx->bch.rx_skb->len + count) > hscx->bch.maxlen) {
pr_debug("%s: overrun %d\n", hscx->ip->name,
- hscx->bch.rx_skb->len + count);
+ hscx->bch.rx_skb->len + count);
skb_trim(hscx->bch.rx_skb, 0);
hscx_cmdr(hscx, 0x80); /* RMC */
return;
@@ -951,16 +951,16 @@ hscx_empty_fifo(struct hscx_hw *hscx, u8 count)
if (hscx->ip->type & IPAC_TYPE_IPACX)
hscx->ip->read_fifo(hscx->ip->hw,
- hscx->off + IPACX_RFIFOB, p, count);
+ hscx->off + IPACX_RFIFOB, p, count);
else
hscx->ip->read_fifo(hscx->ip->hw,
- hscx->off, p, count);
+ hscx->off, p, count);
hscx_cmdr(hscx, 0x80); /* RMC */
if (hscx->bch.debug & DEBUG_HW_BFIFO) {
snprintf(hscx->log, 64, "B%1d-recv %s %d ",
- hscx->bch.nr, hscx->ip->name, count);
+ hscx->bch.nr, hscx->ip->name, count);
print_hex_dump_bytes(hscx->log, DUMP_PREFIX_OFFSET, p, count);
}
}
@@ -984,22 +984,22 @@ hscx_fill_fifo(struct hscx_hw *hscx)
more = 1;
}
pr_debug("%s: B%1d %d/%d/%d\n", hscx->ip->name, hscx->bch.nr, count,
- hscx->bch.tx_idx, hscx->bch.tx_skb->len);
+ hscx->bch.tx_idx, hscx->bch.tx_skb->len);
hscx->bch.tx_idx += count;
if (hscx->ip->type & IPAC_TYPE_IPACX)
hscx->ip->write_fifo(hscx->ip->hw,
- hscx->off + IPACX_XFIFOB, p, count);
+ hscx->off + IPACX_XFIFOB, p, count);
else {
waitforXFW(hscx);
hscx->ip->write_fifo(hscx->ip->hw,
- hscx->off, p, count);
+ hscx->off, p, count);
}
hscx_cmdr(hscx, more ? 0x08 : 0x0a);
if (hscx->bch.debug & DEBUG_HW_BFIFO) {
snprintf(hscx->log, 64, "B%1d-send %s %d ",
- hscx->bch.nr, hscx->ip->name, count);
+ hscx->bch.nr, hscx->ip->name, count);
print_hex_dump_bytes(hscx->log, DUMP_PREFIX_OFFSET, p, count);
}
}
@@ -1037,18 +1037,18 @@ ipac_rme(struct hscx_hw *hx)
if (!(rstab & 0x80)) {
if (hx->bch.debug & DEBUG_HW_BCHANNEL)
pr_notice("%s: B%1d invalid frame\n",
- hx->ip->name, hx->bch.nr);
+ hx->ip->name, hx->bch.nr);
}
if (rstab & 0x40) {
if (hx->bch.debug & DEBUG_HW_BCHANNEL)
pr_notice("%s: B%1d RDO proto=%x\n",
- hx->ip->name, hx->bch.nr,
- hx->bch.state);
+ hx->ip->name, hx->bch.nr,
+ hx->bch.state);
}
if (!(rstab & 0x20)) {
if (hx->bch.debug & DEBUG_HW_BCHANNEL)
pr_notice("%s: B%1d CRC error\n",
- hx->ip->name, hx->bch.nr);
+ hx->ip->name, hx->bch.nr);
}
hscx_cmdr(hx, 0x80); /* Do RMC */
return;
@@ -1065,7 +1065,7 @@ ipac_rme(struct hscx_hw *hx)
return;
if (hx->bch.rx_skb->len < 2) {
pr_debug("%s: B%1d frame to short %d\n",
- hx->ip->name, hx->bch.nr, hx->bch.rx_skb->len);
+ hx->ip->name, hx->bch.nr, hx->bch.rx_skb->len);
skb_trim(hx->bch.rx_skb, 0);
} else {
skb_trim(hx->bch.rx_skb, hx->bch.rx_skb->len - 1);
@@ -1086,7 +1086,7 @@ ipac_irq(struct hscx_hw *hx, u8 ista)
if (m & ista) {
exirb = ReadHSCX(hx, IPAC_EXIRB);
pr_debug("%s: B%1d EXIRB %02x\n", hx->ip->name,
- hx->bch.nr, exirb);
+ hx->bch.nr, exirb);
}
} else if (hx->bch.nr & 2) { /* HSCX B */
if (ista & (HSCX__EXA | HSCX__ICA))
@@ -1094,7 +1094,7 @@ ipac_irq(struct hscx_hw *hx, u8 ista)
if (ista & HSCX__EXB) {
exirb = ReadHSCX(hx, IPAC_EXIRB);
pr_debug("%s: B%1d EXIRB %02x\n", hx->ip->name,
- hx->bch.nr, exirb);
+ hx->bch.nr, exirb);
}
istab = ista & 0xF8;
} else { /* HSCX A */
@@ -1102,7 +1102,7 @@ ipac_irq(struct hscx_hw *hx, u8 ista)
if (ista & HSCX__EXA) {
exirb = ReadHSCX(hx, IPAC_EXIRB);
pr_debug("%s: B%1d EXIRB %02x\n", hx->ip->name,
- hx->bch.nr, exirb);
+ hx->bch.nr, exirb);
}
istab = istab & 0xF8;
}
@@ -1141,7 +1141,7 @@ ipac_irq(struct hscx_hw *hx, u8 ista)
return;
}
pr_debug("%s: B%1d XDU error at len %d\n", hx->ip->name,
- hx->bch.nr, hx->bch.tx_idx);
+ hx->bch.nr, hx->bch.tx_idx);
hx->bch.tx_idx = 0;
hscx_cmdr(hx, 0x01); /* XRES */
}
@@ -1204,10 +1204,10 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop)
return IRQ_NONE;
if (cnt < maxloop)
pr_debug("%s: %d irqloops cpu%d\n", ipac->name,
- maxloop - cnt, smp_processor_id());
+ maxloop - cnt, smp_processor_id());
if (maxloop && !cnt)
pr_notice("%s: %d IRQ LOOP cpu%d\n", ipac->name,
- maxloop, smp_processor_id());
+ maxloop, smp_processor_id());
return IRQ_HANDLED;
}
EXPORT_SYMBOL(mISDNipac_irq);
@@ -1216,7 +1216,7 @@ static int
hscx_mode(struct hscx_hw *hscx, u32 bprotocol)
{
pr_debug("%s: HSCX %c protocol %x-->%x ch %d\n", hscx->ip->name,
- '@' + hscx->bch.nr, hscx->bch.state, bprotocol, hscx->bch.nr);
+ '@' + hscx->bch.nr, hscx->bch.state, bprotocol, hscx->bch.nr);
if (hscx->ip->type & IPAC_TYPE_IPACX) {
if (hscx->bch.nr & 1) { /* B1 and ICA */
WriteIPAC(hscx->ip, ISACX_BCHA_TSDP_BC1, 0x80);
@@ -1364,7 +1364,7 @@ hscx_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
spin_unlock_irqrestore(hx->ip->hwlock, flags);
if (!ret)
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
break;
case PH_DEACTIVATE_REQ:
spin_lock_irqsave(hx->ip->hwlock, flags);
@@ -1372,7 +1372,7 @@ hscx_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
hscx_mode(hx, ISDN_P_NONE);
spin_unlock_irqrestore(hx->ip->hwlock, flags);
_queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
ret = 0;
break;
default:
@@ -1394,7 +1394,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
case MISDN_CTRL_GETOP:
cq->op = 0;
break;
- /* Nothing implemented yet */
+ /* Nothing implemented yet */
case MISDN_CTRL_FILL_EMPTY:
default:
pr_info("%s: unknown Op %x\n", __func__, cq->op);
@@ -1467,7 +1467,7 @@ hscx_init(struct hscx_hw *hx)
pr_debug("%s: HSCX VSTR %02x\n", hx->ip->name, val);
if (hx->bch.debug & DEBUG_HW)
pr_notice("%s: HSCX version %s\n", hx->ip->name,
- HSCXVer[val & 0x0f]);
+ HSCXVer[val & 0x0f]);
} else
WriteHSCX(hx, IPAC_CCR1, 0x82);
WriteHSCX(hx, IPAC_CCR2, 0x30);
@@ -1491,7 +1491,7 @@ ipac_init(struct ipac_hw *ipac)
val = ReadIPAC(ipac, IPAC_CONF);
/* conf is default 0, but can be overwritten by card setup */
pr_debug("%s: IPAC CONF %02x/%02x\n", ipac->name,
- val, ipac->conf);
+ val, ipac->conf);
WriteIPAC(ipac, IPAC_CONF, ipac->conf);
val = ReadIPAC(ipac, IPAC_ID);
if (ipac->hscx[0].bch.debug & DEBUG_HW)
@@ -1569,7 +1569,7 @@ ipac_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
break;
case CLOSE_CHANNEL:
pr_debug("%s: dev(%d) close from %p\n", ipac->name,
- dch->dev.id, __builtin_return_address(0));
+ dch->dev.id, __builtin_return_address(0));
module_put(ipac->owner);
break;
case CONTROL_CHANNEL:
@@ -1620,7 +1620,7 @@ mISDNipac_init(struct ipac_hw *ipac, void *hw)
ipac->hscx[i].bch.nr = i + 1;
set_channelmap(i + 1, ipac->isac.dch.dev.channelmap);
list_add(&ipac->hscx[i].bch.ch.list,
- &ipac->isac.dch.dev.bchannels);
+ &ipac->isac.dch.dev.bchannels);
mISDN_initbchannel(&ipac->hscx[i].bch, MAX_DATA_MEM);
ipac->hscx[i].bch.ch.nr = i + 1;
ipac->hscx[i].bch.ch.send = &hscx_l2l1;
diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c
index 7034af28d46..10446ab404b 100644
--- a/drivers/isdn/hardware/mISDN/mISDNisar.c
+++ b/drivers/isdn/hardware/mISDN/mISDNisar.c
@@ -42,7 +42,7 @@ MODULE_VERSION(ISAR_REV);
static const u8 faxmodulation_s[] = "3,24,48,72,73,74,96,97,98,121,122,145,146";
static const u8 faxmodulation[] = {3, 24, 48, 72, 73, 74, 96, 97, 98, 121,
- 122, 145, 146};
+ 122, 145, 146};
#define FAXMODCNT 13
static void isar_setup(struct isar_hw *);
@@ -84,9 +84,9 @@ send_mbox(struct isar_hw *isar, u8 his, u8 creg, u8 len, u8 *msg)
while (l < (int)len) {
hex_dump_to_buffer(msg + l, len - l, 32, 1,
- isar->log, 256, 1);
+ isar->log, 256, 1);
pr_debug("%s: %s %02x: %s\n", isar->name,
- __func__, l, isar->log);
+ __func__, l, isar->log);
l += 32;
}
}
@@ -113,9 +113,9 @@ rcv_mbox(struct isar_hw *isar, u8 *msg)
while (l < (int)isar->clsb) {
hex_dump_to_buffer(msg + l, isar->clsb - l, 32,
- 1, isar->log, 256, 1);
+ 1, isar->log, 256, 1);
pr_debug("%s: %s %02x: %s\n", isar->name,
- __func__, l, isar->log);
+ __func__, l, isar->log);
l += 32;
}
}
@@ -130,7 +130,7 @@ get_irq_infos(struct isar_hw *isar)
isar->cmsb = isar->read_reg(isar->hw, ISAR_CTRL_H);
isar->clsb = isar->read_reg(isar->hw, ISAR_CTRL_L);
pr_debug("%s: rcv_mbox(%02x,%02x,%d)\n", isar->name,
- isar->iis, isar->cmsb, isar->clsb);
+ isar->iis, isar->cmsb, isar->clsb);
}
/*
@@ -154,7 +154,7 @@ poll_mbox(struct isar_hw *isar, int maxdelay)
rcv_mbox(isar, NULL);
}
pr_debug("%s: pulled %d bytes after %d us\n",
- isar->name, isar->clsb, maxdelay - t);
+ isar->name, isar->clsb, maxdelay - t);
return t;
}
@@ -200,13 +200,13 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
if (1 != isar->version) {
pr_err("%s: ISAR wrong version %d firmware download aborted\n",
- isar->name, isar->version);
+ isar->name, isar->version);
return -EINVAL;
}
if (!(saved_debug & DEBUG_HW_FIRMWARE_FIFO))
isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO;
pr_debug("%s: load firmware %d words (%d bytes)\n",
- isar->name, size/2, size);
+ isar->name, size / 2, size);
cnt = 0;
size /= 2;
/* disable ISAR IRQ */
@@ -219,7 +219,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
blk_head.d_key = le16_to_cpu(*sp++);
cnt += 3;
pr_debug("ISAR firmware block (%#x,%d,%#x)\n",
- blk_head.sadr, blk_head.len, blk_head.d_key & 0xff);
+ blk_head.sadr, blk_head.len, blk_head.d_key & 0xff);
left = blk_head.len;
if (cnt + left > size) {
pr_info("%s: firmware error have %d need %d words\n",
@@ -229,7 +229,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
}
spin_lock_irqsave(isar->hwlock, flags);
if (!send_mbox(isar, ISAR_HIS_DKEY, blk_head.d_key & 0xff,
- 0, NULL)) {
+ 0, NULL)) {
pr_info("ISAR send_mbox dkey failed\n");
ret = -ETIME;
goto reterror;
@@ -260,7 +260,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
cnt += noc;
*mp++ = noc;
pr_debug("%s: load %3d words at %04x\n", isar->name,
- noc, blk_head.sadr);
+ noc, blk_head.sadr);
blk_head.sadr += noc;
while (noc) {
val = le16_to_cpu(*sp++);
@@ -289,7 +289,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
}
}
pr_debug("%s: ISAR firmware block %d words loaded\n",
- isar->name, blk_head.len);
+ isar->name, blk_head.len);
}
isar->ch[0].bch.debug = saved_debug;
/* 10ms delay */
@@ -333,7 +333,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
goto reterrflg;
} else
pr_debug("%s: ISAR general status event %x\n",
- isar->name, isar->bstat);
+ isar->name, isar->bstat);
/* 10ms delay */
cnt = 10;
while (cnt--)
@@ -387,7 +387,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
} else {
if ((isar->cmsb == ISAR_CTRL_SWVER) && (isar->clsb == 1)) {
pr_notice("%s: ISAR software version %#x\n",
- isar->name, isar->buf[0]);
+ isar->name, isar->buf[0]);
} else {
pr_info("%s: ISAR wrong swver response (%x,%x)"
" cnt(%d)\n", isar->name, isar->cmsb,
@@ -431,7 +431,7 @@ isar_rcv_frame(struct isar_ch *ch)
switch (ch->bch.state) {
case ISDN_P_NONE:
pr_debug("%s: ISAR protocol 0 spurious IIS_RDATA %x/%x/%x\n",
- ch->is->name, ch->is->iis, ch->is->cmsb, ch->is->clsb);
+ ch->is->name, ch->is->iis, ch->is->cmsb, ch->is->clsb);
ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
break;
case ISDN_P_B_RAW:
@@ -439,7 +439,7 @@ isar_rcv_frame(struct isar_ch *ch)
case ISDN_P_B_MODEM_ASYNC:
if (!ch->bch.rx_skb) {
ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen,
- GFP_ATOMIC);
+ GFP_ATOMIC);
if (unlikely(!ch->bch.rx_skb)) {
pr_info("%s: B receive out of memory\n",
ch->is->name);
@@ -453,7 +453,7 @@ isar_rcv_frame(struct isar_ch *ch)
case ISDN_P_B_HDLC:
if (!ch->bch.rx_skb) {
ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen,
- GFP_ATOMIC);
+ GFP_ATOMIC);
if (unlikely(!ch->bch.rx_skb)) {
pr_info("%s: B receive out of memory\n",
ch->is->name);
@@ -464,14 +464,14 @@ isar_rcv_frame(struct isar_ch *ch)
if ((ch->bch.rx_skb->len + ch->is->clsb) >
(ch->bch.maxlen + 2)) {
pr_debug("%s: incoming packet too large\n",
- ch->is->name);
+ ch->is->name);
ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
skb_trim(ch->bch.rx_skb, 0);
break;
}
if (ch->is->cmsb & HDLC_ERROR) {
pr_debug("%s: ISAR frame error %x len %d\n",
- ch->is->name, ch->is->cmsb, ch->is->clsb);
+ ch->is->name, ch->is->cmsb, ch->is->clsb);
#ifdef ERROR_STATISTIC
if (ch->is->cmsb & HDLC_ERR_RER)
ch->bch.err_inv++;
@@ -489,7 +489,7 @@ isar_rcv_frame(struct isar_ch *ch)
if (ch->is->cmsb & HDLC_FED) {
if (ch->bch.rx_skb->len < 3) { /* last 2 are the FCS */
pr_debug("%s: ISAR frame to short %d\n",
- ch->is->name, ch->bch.rx_skb->len);
+ ch->is->name, ch->bch.rx_skb->len);
skb_trim(ch->bch.rx_skb, 0);
break;
}
@@ -500,7 +500,7 @@ isar_rcv_frame(struct isar_ch *ch)
case ISDN_P_B_T30_FAX:
if (ch->state != STFAX_ACTIV) {
pr_debug("%s: isar_rcv_frame: not ACTIV\n",
- ch->is->name);
+ ch->is->name);
ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
if (ch->bch.rx_skb)
skb_trim(ch->bch.rx_skb, 0);
@@ -508,7 +508,7 @@ isar_rcv_frame(struct isar_ch *ch)
}
if (!ch->bch.rx_skb) {
ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen,
- GFP_ATOMIC);
+ GFP_ATOMIC);
if (unlikely(!ch->bch.rx_skb)) {
pr_info("%s: B receive out of memory\n",
__func__);
@@ -519,14 +519,14 @@ isar_rcv_frame(struct isar_ch *ch)
if (ch->cmd == PCTRL_CMD_FRM) {
rcv_mbox(ch->is, skb_put(ch->bch.rx_skb, ch->is->clsb));
pr_debug("%s: isar_rcv_frame: %d\n",
- ch->is->name, ch->bch.rx_skb->len);
+ ch->is->name, ch->bch.rx_skb->len);
if (ch->is->cmsb & SART_NMD) { /* ABORT */
pr_debug("%s: isar_rcv_frame: no more data\n",
- ch->is->name);
+ ch->is->name);
ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
send_mbox(ch->is, SET_DPS(ch->dpath) |
- ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC,
- 0, NULL);
+ ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC,
+ 0, NULL);
ch->state = STFAX_ESCAPE;
/* set_skb_flag(skb, DF_NOMOREDATA); */
}
@@ -537,7 +537,7 @@ isar_rcv_frame(struct isar_ch *ch)
}
if (ch->cmd != PCTRL_CMD_FRH) {
pr_debug("%s: isar_rcv_frame: unknown fax mode %x\n",
- ch->is->name, ch->cmd);
+ ch->is->name, ch->cmd);
ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
if (ch->bch.rx_skb)
skb_trim(ch->bch.rx_skb, 0);
@@ -574,12 +574,12 @@ isar_rcv_frame(struct isar_ch *ch)
}
if (ch->is->cmsb & SART_NMD) { /* ABORT */
pr_debug("%s: isar_rcv_frame: no more data\n",
- ch->is->name);
+ ch->is->name);
ch->is->write_reg(ch->is->hw, ISAR_IIA, 0);
if (ch->bch.rx_skb)
skb_trim(ch->bch.rx_skb, 0);
send_mbox(ch->is, SET_DPS(ch->dpath) |
- ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC, 0, NULL);
+ ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC, 0, NULL);
ch->state = STFAX_ESCAPE;
deliver_status(ch, HW_MOD_NOCARR);
}
@@ -599,14 +599,14 @@ isar_fill_fifo(struct isar_ch *ch)
u8 *ptr;
pr_debug("%s: ch%d tx_skb %p tx_idx %d\n",
- ch->is->name, ch->bch.nr, ch->bch.tx_skb, ch->bch.tx_idx);
+ ch->is->name, ch->bch.nr, ch->bch.tx_skb, ch->bch.tx_idx);
if (!ch->bch.tx_skb)
return;
count = ch->bch.tx_skb->len - ch->bch.tx_idx;
if (count <= 0)
return;
if (!(ch->is->bstat &
- (ch->dpath == 1 ? BSTAT_RDM1 : BSTAT_RDM2)))
+ (ch->dpath == 1 ? BSTAT_RDM1 : BSTAT_RDM2)))
return;
if (count > ch->mml) {
msb = 0;
@@ -618,17 +618,17 @@ isar_fill_fifo(struct isar_ch *ch)
if (!ch->bch.tx_idx) {
pr_debug("%s: frame start\n", ch->is->name);
if ((ch->bch.state == ISDN_P_B_T30_FAX) &&
- (ch->cmd == PCTRL_CMD_FTH)) {
+ (ch->cmd == PCTRL_CMD_FTH)) {
if (count > 1) {
if ((ptr[0] == 0xff) && (ptr[1] == 0x13)) {
/* last frame */
test_and_set_bit(FLG_LASTDATA,
- &ch->bch.Flags);
+ &ch->bch.Flags);
pr_debug("%s: set LASTDATA\n",
- ch->is->name);
+ ch->is->name);
if (msb == HDLC_FED)
test_and_set_bit(FLG_DLEETX,
- &ch->bch.Flags);
+ &ch->bch.Flags);
}
}
}
@@ -643,21 +643,21 @@ isar_fill_fifo(struct isar_ch *ch)
case ISDN_P_B_L2DTMF:
case ISDN_P_B_MODEM_ASYNC:
send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA,
- 0, count, ptr);
+ 0, count, ptr);
break;
case ISDN_P_B_HDLC:
send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA,
- msb, count, ptr);
+ msb, count, ptr);
break;
case ISDN_P_B_T30_FAX:
if (ch->state != STFAX_ACTIV)
pr_debug("%s: not ACTIV\n", ch->is->name);
else if (ch->cmd == PCTRL_CMD_FTH)
send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA,
- msb, count, ptr);
+ msb, count, ptr);
else if (ch->cmd == PCTRL_CMD_FTM)
send_mbox(ch->is, SET_DPS(ch->dpath) | ISAR_HIS_SDATA,
- 0, count, ptr);
+ 0, count, ptr);
else
pr_debug("%s: not FTH/FTM\n", ch->is->name);
break;
@@ -687,8 +687,8 @@ static void
send_next(struct isar_ch *ch)
{
pr_debug("%s: %s ch%d tx_skb %p tx_idx %d\n",
- ch->is->name, __func__, ch->bch.nr,
- ch->bch.tx_skb, ch->bch.tx_idx);
+ ch->is->name, __func__, ch->bch.nr,
+ ch->bch.tx_skb, ch->bch.tx_idx);
if (ch->bch.state == ISDN_P_B_T30_FAX) {
if (ch->cmd == PCTRL_CMD_FTH) {
if (test_bit(FLG_LASTDATA, &ch->bch.Flags)) {
@@ -713,12 +713,12 @@ send_next(struct isar_ch *ch)
else {
if (test_and_clear_bit(FLG_DLEETX, &ch->bch.Flags)) {
if (test_and_clear_bit(FLG_LASTDATA,
- &ch->bch.Flags)) {
+ &ch->bch.Flags)) {
if (test_and_clear_bit(FLG_NMD_DATA,
- &ch->bch.Flags)) {
+ &ch->bch.Flags)) {
u8 zd = 0;
send_mbox(ch->is, SET_DPS(ch->dpath) |
- ISAR_HIS_SDATA, 0x01, 1, &zd);
+ ISAR_HIS_SDATA, 0x01, 1, &zd);
}
test_and_set_bit(FLG_LL_OK, &ch->bch.Flags);
} else {
@@ -738,7 +738,7 @@ check_send(struct isar_hw *isar, u8 rdm)
ch = sel_bch_isar(isar, 1);
if (ch && test_bit(FLG_ACTIVE, &ch->bch.Flags)) {
if (ch->bch.tx_skb && (ch->bch.tx_skb->len >
- ch->bch.tx_idx))
+ ch->bch.tx_idx))
isar_fill_fifo(ch);
else
send_next(ch);
@@ -748,7 +748,7 @@ check_send(struct isar_hw *isar, u8 rdm)
ch = sel_bch_isar(isar, 2);
if (ch && test_bit(FLG_ACTIVE, &ch->bch.Flags)) {
if (ch->bch.tx_skb && (ch->bch.tx_skb->len >
- ch->bch.tx_idx))
+ ch->bch.tx_idx))
isar_fill_fifo(ch);
else
send_next(ch);
@@ -757,10 +757,10 @@ check_send(struct isar_hw *isar, u8 rdm)
}
const char *dmril[] = {"NO SPEED", "1200/75", "NODEF2", "75/1200", "NODEF4",
- "300", "600", "1200", "2400", "4800", "7200",
- "9600nt", "9600t", "12000", "14400", "WRONG"};
+ "300", "600", "1200", "2400", "4800", "7200",
+ "9600nt", "9600t", "12000", "14400", "WRONG"};
const char *dmrim[] = {"NO MOD", "NO DEF", "V32/V32b", "V22", "V21",
- "Bell103", "V23", "Bell202", "V17", "V29", "V27ter"};
+ "Bell103", "V23", "Bell202", "V17", "V29", "V27ter"};
static void
isar_pump_status_rsp(struct isar_ch *ch) {
@@ -892,10 +892,10 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
pr_debug("%s: pump stev LINE_TX_H\n", ch->is->name);
ch->state = STFAX_CONT;
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
- PCTRL_CMD_CONT, 0, NULL);
+ PCTRL_CMD_CONT, 0, NULL);
} else {
pr_debug("%s: pump stev LINE_TX_H wrong st %x\n",
- ch->is->name, ch->state);
+ ch->is->name, ch->state);
}
break;
case PSEV_LINE_RX_H:
@@ -903,10 +903,10 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
pr_debug("%s: pump stev LINE_RX_H\n", ch->is->name);
ch->state = STFAX_CONT;
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
- PCTRL_CMD_CONT, 0, NULL);
+ PCTRL_CMD_CONT, 0, NULL);
} else {
pr_debug("%s: pump stev LINE_RX_H wrong st %x\n",
- ch->is->name, ch->state);
+ ch->is->name, ch->state);
}
break;
case PSEV_LINE_TX_B:
@@ -914,10 +914,10 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
pr_debug("%s: pump stev LINE_TX_B\n", ch->is->name);
ch->state = STFAX_CONT;
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
- PCTRL_CMD_CONT, 0, NULL);
+ PCTRL_CMD_CONT, 0, NULL);
} else {
pr_debug("%s: pump stev LINE_TX_B wrong st %x\n",
- ch->is->name, ch->state);
+ ch->is->name, ch->state);
}
break;
case PSEV_LINE_RX_B:
@@ -925,10 +925,10 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
pr_debug("%s: pump stev LINE_RX_B\n", ch->is->name);
ch->state = STFAX_CONT;
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
- PCTRL_CMD_CONT, 0, NULL);
+ PCTRL_CMD_CONT, 0, NULL);
} else {
pr_debug("%s: pump stev LINE_RX_B wrong st %x\n",
- ch->is->name, ch->state);
+ ch->is->name, ch->state);
}
break;
case PSEV_RSP_CONN:
@@ -941,19 +941,19 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
int delay = (ch->mod == 3) ? 1000 : 200;
/* 1s (200 ms) Flags before data */
if (test_and_set_bit(FLG_FTI_RUN,
- &ch->bch.Flags))
+ &ch->bch.Flags))
del_timer(&ch->ftimer);
ch->ftimer.expires =
- jiffies + ((delay * HZ)/1000);
+ jiffies + ((delay * HZ) / 1000);
test_and_set_bit(FLG_LL_CONN,
- &ch->bch.Flags);
+ &ch->bch.Flags);
add_timer(&ch->ftimer);
} else {
deliver_status(ch, HW_MOD_CONNECT);
}
} else {
pr_debug("%s: pump stev RSP_CONN wrong st %x\n",
- ch->is->name, ch->state);
+ ch->is->name, ch->state);
}
break;
case PSEV_FLAGS_DET:
@@ -961,7 +961,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
break;
case PSEV_RSP_DISC:
pr_debug("%s: pump stev RSP_DISC state(%d)\n",
- ch->is->name, ch->state);
+ ch->is->name, ch->state);
if (ch->state == STFAX_ESCAPE) {
p1 = 5;
switch (ch->newcmd) {
@@ -972,7 +972,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
p1 = 2;
case PCTRL_CMD_FTH:
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
- PCTRL_CMD_SILON, 1, &p1);
+ PCTRL_CMD_SILON, 1, &p1);
ch->state = STFAX_SILDET;
break;
case PCTRL_CMD_FRH:
@@ -983,13 +983,13 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
ch->cmd = ch->newcmd;
ch->newcmd = 0;
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
- ch->cmd, 1, &p1);
+ ch->cmd, 1, &p1);
ch->state = STFAX_LINE;
ch->try_mod = 3;
break;
default:
pr_debug("%s: RSP_DISC unknown newcmd %x\n",
- ch->is->name, ch->newcmd);
+ ch->is->name, ch->newcmd);
break;
}
} else if (ch->state == STFAX_ACTIV) {
@@ -1015,7 +1015,7 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
ch->cmd = ch->newcmd;
ch->newcmd = 0;
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
- ch->cmd, 1, &p1);
+ ch->cmd, 1, &p1);
ch->state = STFAX_LINE;
ch->try_mod = 3;
}
@@ -1026,17 +1026,17 @@ isar_pump_statev_fax(struct isar_ch *ch, u8 devt) {
case PSEV_RSP_FCERR:
if (ch->state == STFAX_LINE) {
pr_debug("%s: pump stev RSP_FCERR try %d\n",
- ch->is->name, ch->try_mod);
+ ch->is->name, ch->try_mod);
if (ch->try_mod--) {
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL,
- ch->cmd, 1, &ch->mod);
+ ch->cmd, 1, &ch->mod);
break;
}
}
pr_debug("%s: pump stev RSP_FCERR\n", ch->is->name);
ch->state = STFAX_ESCAPE;
send_mbox(ch->is, dps | ISAR_HIS_PUMPCTRL, PCTRL_CMD_ESC,
- 0, NULL);
+ 0, NULL);
deliver_status(ch, HW_MOD_FCERROR);
break;
default:
@@ -1057,8 +1057,8 @@ mISDNisar_irq(struct isar_hw *isar)
isar_rcv_frame(ch);
else {
pr_debug("%s: ISAR spurious IIS_RDATA %x/%x/%x\n",
- isar->name, isar->iis, isar->cmsb,
- isar->clsb);
+ isar->name, isar->iis, isar->cmsb,
+ isar->clsb);
isar->write_reg(isar->hw, ISAR_IIA, 0);
}
break;
@@ -1078,7 +1078,7 @@ mISDNisar_irq(struct isar_hw *isar)
}
#endif
pr_debug("%s: Buffer STEV dpath%d msb(%x)\n",
- isar->name, isar->iis>>6, isar->cmsb);
+ isar->name, isar->iis >> 6, isar->cmsb);
isar->write_reg(isar->hw, ISAR_IIA, 0);
break;
case ISAR_IIS_PSTEV:
@@ -1100,16 +1100,16 @@ mISDNisar_irq(struct isar_hw *isar)
tt += 7;
tt |= DTMF_TONE_VAL;
_queue_data(&ch->bch.ch, PH_CONTROL_IND,
- MISDN_ID_ANY, sizeof(tt), &tt,
- GFP_ATOMIC);
+ MISDN_ID_ANY, sizeof(tt), &tt,
+ GFP_ATOMIC);
} else
pr_debug("%s: ISAR IIS_PSTEV pm %d sta %x\n",
- isar->name, ch->bch.state,
- isar->cmsb);
+ isar->name, ch->bch.state,
+ isar->cmsb);
} else {
pr_debug("%s: ISAR spurious IIS_PSTEV %x/%x/%x\n",
- isar->name, isar->iis, isar->cmsb,
- isar->clsb);
+ isar->name, isar->iis, isar->cmsb,
+ isar->clsb);
isar->write_reg(isar->hw, ISAR_IIA, 0);
}
break;
@@ -1120,8 +1120,8 @@ mISDNisar_irq(struct isar_hw *isar)
isar_pump_status_rsp(ch);
} else {
pr_debug("%s: ISAR spurious IIS_PSTRSP %x/%x/%x\n",
- isar->name, isar->iis, isar->cmsb,
- isar->clsb);
+ isar->name, isar->iis, isar->cmsb,
+ isar->clsb);
isar->write_reg(isar->hw, ISAR_IIA, 0);
}
break;
@@ -1137,7 +1137,7 @@ mISDNisar_irq(struct isar_hw *isar)
default:
rcv_mbox(isar, NULL);
pr_debug("%s: unhandled msg iis(%x) ctrl(%x/%x)\n",
- isar->name, isar->iis, isar->cmsb, isar->clsb);
+ isar->name, isar->iis, isar->cmsb, isar->clsb);
break;
}
}
@@ -1169,11 +1169,11 @@ setup_pump(struct isar_ch *ch) {
if (test_bit(FLG_DTMFSEND, &ch->bch.Flags)) {
param[0] = 5; /* TOA 5 db */
send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG,
- PMOD_DTMF_TRANS, 1, param);
+ PMOD_DTMF_TRANS, 1, param);
} else {
param[0] = 40; /* REL -46 dbm */
send_mbox(ch->is, dps | ISAR_HIS_PUMPCFG,
- PMOD_DTMF, 1, param);
+ PMOD_DTMF, 1, param);
}
case ISDN_P_B_MODEM_ASYNC:
ctrl = PMOD_DATAMODEM;
@@ -1220,17 +1220,17 @@ setup_sart(struct isar_ch *ch) {
switch (ch->bch.state) {
case ISDN_P_NONE:
send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_DISABLE,
- 0, NULL);
+ 0, NULL);
break;
case ISDN_P_B_RAW:
case ISDN_P_B_L2DTMF:
send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_BINARY,
- 2, param);
+ 2, param);
break;
case ISDN_P_B_HDLC:
case ISDN_P_B_T30_FAX:
send_mbox(ch->is, dps | ISAR_HIS_SARTCFG, SMODE_HDLC,
- 1, param);
+ 1, param);
break;
case ISDN_P_B_MODEM_ASYNC:
ctrl = SMODE_V14 | SCTRL_HDMC_BOTH;
@@ -1297,7 +1297,7 @@ modeisar(struct isar_ch *ch, u32 bprotocol)
if (!test_and_set_bit(ISAR_DP2_USE, &ch->is->Flags))
ch->dpath = 2;
else if (!test_and_set_bit(ISAR_DP1_USE,
- &ch->is->Flags))
+ &ch->is->Flags))
ch->dpath = 1;
else {
pr_info("modeisar both pathes in use\n");
@@ -1307,7 +1307,7 @@ modeisar(struct isar_ch *ch, u32 bprotocol)
test_and_set_bit(FLG_HDLC, &ch->bch.Flags);
else
test_and_set_bit(FLG_TRANSPARENT,
- &ch->bch.Flags);
+ &ch->bch.Flags);
break;
case ISDN_P_B_MODEM_ASYNC:
case ISDN_P_B_T30_FAX:
@@ -1328,7 +1328,7 @@ modeisar(struct isar_ch *ch, u32 bprotocol)
}
}
pr_debug("%s: ISAR ch%d dp%d protocol %x->%x\n", ch->is->name,
- ch->bch.nr, ch->dpath, ch->bch.state, bprotocol);
+ ch->bch.nr, ch->dpath, ch->bch.state, bprotocol);
ch->bch.state = bprotocol;
setup_pump(ch);
setup_iom2(ch);
@@ -1353,7 +1353,7 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
u8 ctrl = 0, nom = 0, p1 = 0;
pr_debug("%s: isar_pump_cmd %x/%x state(%x)\n",
- ch->is->name, cmd, para, ch->bch.state);
+ ch->is->name, cmd, para, ch->bch.state);
switch (cmd) {
case HW_MOD_FTM:
if (ch->state == STFAX_READY) {
@@ -1367,7 +1367,7 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
ch->newcmd = 0;
ch->try_mod = 3;
} else if ((ch->state == STFAX_ACTIV) &&
- (ch->cmd == PCTRL_CMD_FTM) && (ch->mod == para))
+ (ch->cmd == PCTRL_CMD_FTM) && (ch->mod == para))
deliver_status(ch, HW_MOD_CONNECT);
else {
ch->newmod = para;
@@ -1389,8 +1389,8 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
ch->newcmd = 0;
ch->try_mod = 3;
} else if ((ch->state == STFAX_ACTIV) &&
- (ch->cmd == PCTRL_CMD_FTH) && (ch->mod == para))
- deliver_status(ch, HW_MOD_CONNECT);
+ (ch->cmd == PCTRL_CMD_FTH) && (ch->mod == para))
+ deliver_status(ch, HW_MOD_CONNECT);
else {
ch->newmod = para;
ch->newcmd = PCTRL_CMD_FTH;
@@ -1411,7 +1411,7 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
ch->newcmd = 0;
ch->try_mod = 3;
} else if ((ch->state == STFAX_ACTIV) &&
- (ch->cmd == PCTRL_CMD_FRM) && (ch->mod == para))
+ (ch->cmd == PCTRL_CMD_FRM) && (ch->mod == para))
deliver_status(ch, HW_MOD_CONNECT);
else {
ch->newmod = para;
@@ -1433,7 +1433,7 @@ isar_pump_cmd(struct isar_ch *ch, u32 cmd, u8 para)
ch->newcmd = 0;
ch->try_mod = 3;
} else if ((ch->state == STFAX_ACTIV) &&
- (ch->cmd == PCTRL_CMD_FRH) && (ch->mod == para))
+ (ch->cmd == PCTRL_CMD_FRH) && (ch->mod == para))
deliver_status(ch, HW_MOD_CONNECT);
else {
ch->newmod = para;
@@ -1464,7 +1464,7 @@ isar_setup(struct isar_hw *isar)
for (i = 0; i < 2; i++) {
/* Buffer Config */
send_mbox(isar, (i ? ISAR_HIS_DPS2 : ISAR_HIS_DPS1) |
- ISAR_HIS_P12CFG, 4, 1, &msg);
+ ISAR_HIS_P12CFG, 4, 1, &msg);
isar->ch[i].mml = msg;
isar->ch[i].bch.state = 0;
isar->ch[i].dpath = i + 1;
@@ -1505,7 +1505,7 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
spin_unlock_irqrestore(ich->is->hwlock, flags);
if (!ret)
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
break;
case PH_DEACTIVATE_REQ:
spin_lock_irqsave(ich->is->hwlock, flags);
@@ -1513,15 +1513,15 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
modeisar(ich, ISDN_P_NONE);
spin_unlock_irqrestore(ich->is->hwlock, flags);
_queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
ret = 0;
break;
case PH_CONTROL_REQ:
val = (u32 *)skb->data;
pr_debug("%s: PH_CONTROL | REQUEST %x/%x\n", ich->is->name,
- hh->id, *val);
+ hh->id, *val);
if ((hh->id == 0) && ((*val & ~DTMF_TONE_MASK) ==
- DTMF_TONE_VAL)) {
+ DTMF_TONE_VAL)) {
if (bch->state == ISDN_P_B_L2DTMF) {
char tt = *val & DTMF_TONE_MASK;
@@ -1541,7 +1541,7 @@ isar_l2l1(struct mISDNchannel *ch, struct sk_buff *skb)
return -EINVAL;
}
} else if ((hh->id == HW_MOD_FRM) || (hh->id == HW_MOD_FRH) ||
- (hh->id == HW_MOD_FTM) || (hh->id == HW_MOD_FTH)) {
+ (hh->id == HW_MOD_FTM) || (hh->id == HW_MOD_FTH)) {
for (id = 0; id < FAXMODCNT; id++)
if (faxmodulation[id] == *val)
break;
@@ -1581,7 +1581,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
case MISDN_CTRL_GETOP:
cq->op = 0;
break;
- /* Nothing implemented yet */
+ /* Nothing implemented yet */
case MISDN_CTRL_FILL_EMPTY:
default:
pr_info("%s: unknown Op %x\n", __func__, cq->op);
@@ -1647,7 +1647,7 @@ init_isar(struct isar_hw *isar)
isar->version = ISARVersion(isar);
if (isar->ch[0].bch.debug & DEBUG_HW)
pr_notice("%s: Testing version %d (%d time)\n",
- isar->name, isar->version, 3 - cnt);
+ isar->name, isar->version, 3 - cnt);
if (isar->version == 1)
break;
isar->ctrl(isar->hw, HW_RESET_REQ, 0);
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
index 5ef9f11ee74..dd6de9f7a8a 100644
--- a/drivers/isdn/hardware/mISDN/netjet.c
+++ b/drivers/isdn/hardware/mISDN/netjet.c
@@ -191,7 +191,7 @@ fill_mem(struct tiger_ch *bc, u32 idx, u32 cnt, u32 fill)
u32 mask = 0xff, val;
pr_debug("%s: B%1d fill %02x len %d idx %d/%d\n", card->name,
- bc->bch.nr, fill, cnt, idx, card->send.idx);
+ bc->bch.nr, fill, cnt, idx, card->send.idx);
if (bc->bch.nr & 2) {
fill <<= 8;
mask <<= 8;
@@ -213,7 +213,7 @@ mode_tiger(struct tiger_ch *bc, u32 protocol)
struct tiger_hw *card = bc->bch.hw;
pr_debug("%s: B%1d protocol %x-->%x\n", card->name,
- bc->bch.nr, bc->bch.state, protocol);
+ bc->bch.nr, bc->bch.state, protocol);
switch (protocol) {
case ISDN_P_NONE:
if (bc->bch.state == ISDN_P_NONE)
@@ -237,7 +237,7 @@ mode_tiger(struct tiger_ch *bc, u32 protocol)
test_and_set_bit(FLG_TRANSPARENT, &bc->bch.Flags);
bc->bch.state = protocol;
bc->idx = 0;
- bc->free = card->send.size/2;
+ bc->free = card->send.size / 2;
bc->rxstate = 0;
bc->txstate = TX_INIT | TX_IDLE;
bc->lastrx = -1;
@@ -251,7 +251,7 @@ mode_tiger(struct tiger_ch *bc, u32 protocol)
test_and_set_bit(FLG_HDLC, &bc->bch.Flags);
bc->bch.state = protocol;
bc->idx = 0;
- bc->free = card->send.size/2;
+ bc->free = card->send.size / 2;
bc->rxstate = 0;
bc->txstate = TX_INIT | TX_IDLE;
isdnhdlc_rcv_init(&bc->hrecv, 0);
@@ -273,12 +273,12 @@ mode_tiger(struct tiger_ch *bc, u32 protocol)
card->send.idx = (card->send.dmacur - card->send.dmastart) >> 2;
card->recv.idx = (card->recv.dmacur - card->recv.dmastart) >> 2;
pr_debug("%s: %s ctrl %x irq %02x/%02x idx %d/%d\n",
- card->name, __func__,
- inb(card->base + NJ_DMACTRL),
- inb(card->base + NJ_IRQMASK0),
- inb(card->base + NJ_IRQSTAT0),
- card->send.idx,
- card->recv.idx);
+ card->name, __func__,
+ inb(card->base + NJ_DMACTRL),
+ inb(card->base + NJ_IRQMASK0),
+ inb(card->base + NJ_IRQSTAT0),
+ card->send.idx,
+ card->recv.idx);
return 0;
}
@@ -311,7 +311,7 @@ inittiger(struct tiger_hw *card)
int i;
card->dma_p = pci_alloc_consistent(card->pdev, NJ_DMA_SIZE,
- &card->dma);
+ &card->dma);
if (!card->dma_p) {
pr_info("%s: No DMA memory\n", card->name);
return -ENOMEM;
@@ -344,9 +344,9 @@ inittiger(struct tiger_hw *card)
if (debug & DEBUG_HW)
pr_notice("%s: send buffer phy %#x - %#x - %#x virt %p"
- " size %zu u32\n", card->name,
- card->send.dmastart, card->send.dmairq,
- card->send.dmaend, card->send.start, card->send.size);
+ " size %zu u32\n", card->name,
+ card->send.dmastart, card->send.dmairq,
+ card->send.dmaend, card->send.start, card->send.size);
outl(card->send.dmastart, card->base + NJ_DMA_READ_START);
outl(card->send.dmairq, card->base + NJ_DMA_READ_IRQ);
@@ -362,9 +362,9 @@ inittiger(struct tiger_hw *card)
if (debug & DEBUG_HW)
pr_notice("%s: recv buffer phy %#x - %#x - %#x virt %p"
- " size %zu u32\n", card->name,
- card->recv.dmastart, card->recv.dmairq,
- card->recv.dmaend, card->recv.start, card->recv.size);
+ " size %zu u32\n", card->name,
+ card->recv.dmastart, card->recv.dmairq,
+ card->recv.dmaend, card->recv.start, card->recv.size);
outl(card->recv.dmastart, card->base + NJ_DMA_WRITE_START);
outl(card->recv.dmairq, card->base + NJ_DMA_WRITE_IRQ);
@@ -398,7 +398,7 @@ read_dma(struct tiger_ch *bc, u32 idx, int cnt)
if (test_bit(FLG_TRANSPARENT, &bc->bch.Flags)) {
if ((bc->bch.rx_skb->len + cnt) > bc->bch.maxlen) {
pr_debug("%s: B%1d overrun %d\n", card->name,
- bc->bch.nr, bc->bch.rx_skb->len + cnt);
+ bc->bch.nr, bc->bch.rx_skb->len + cnt);
skb_trim(bc->bch.rx_skb, 0);
return;
}
@@ -418,8 +418,8 @@ read_dma(struct tiger_ch *bc, u32 idx, int cnt)
next_frame:
if (test_bit(FLG_HDLC, &bc->bch.Flags)) {
stat = isdnhdlc_decode(&bc->hrecv, pn, cnt, &i,
- bc->bch.rx_skb->data, bc->bch.maxlen);
- if (stat > 0) /* valid frame received */
+ bc->bch.rx_skb->data, bc->bch.maxlen);
+ if (stat > 0) /* valid frame received */
p = skb_put(bc->bch.rx_skb, stat);
else if (stat == -HDLC_CRC_ERROR)
pr_info("%s: B%1d receive frame CRC error\n",
@@ -431,14 +431,14 @@ next_frame:
pr_info("%s: B%1d receive frame too long (> %d)\n",
card->name, bc->bch.nr, bc->bch.maxlen);
} else
- stat = cnt;
+ stat = cnt;
if (stat > 0) {
if (debug & DEBUG_HW_BFIFO) {
snprintf(card->log, LOG_SIZE, "B%1d-recv %s %d ",
- bc->bch.nr, card->name, stat);
+ bc->bch.nr, card->name, stat);
print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET,
- p, stat);
+ p, stat);
}
recv_Bchannel(&bc->bch, 0);
}
@@ -447,7 +447,7 @@ next_frame:
cnt -= i;
if (!bc->bch.rx_skb) {
bc->bch.rx_skb = mI_alloc_skb(bc->bch.maxlen,
- GFP_ATOMIC);
+ GFP_ATOMIC);
if (!bc->bch.rx_skb) {
pr_info("%s: B%1d receive out of memory\n",
card->name, bc->bch.nr);
@@ -498,7 +498,7 @@ resync(struct tiger_ch *bc, struct tiger_hw *card)
bc->idx = card->recv.size - 1;
bc->txstate = TX_RUN;
pr_debug("%s: %s B%1d free %d idx %d/%d\n", card->name,
- __func__, bc->bch.nr, bc->free, bc->idx, card->send.idx);
+ __func__, bc->bch.nr, bc->free, bc->idx, card->send.idx);
}
static int bc_next_frame(struct tiger_ch *);
@@ -514,14 +514,14 @@ fill_hdlc_flag(struct tiger_ch *bc)
if (bc->free == 0)
return;
pr_debug("%s: %s B%1d %d state %x idx %d/%d\n", card->name,
- __func__, bc->bch.nr, bc->free, bc->txstate,
- bc->idx, card->send.idx);
+ __func__, bc->bch.nr, bc->free, bc->txstate,
+ bc->idx, card->send.idx);
if (bc->txstate & (TX_IDLE | TX_INIT | TX_UNDERRUN))
resync(bc, card);
count = isdnhdlc_encode(&bc->hsend, NULL, 0, &i,
- bc->hsbuf, bc->free);
+ bc->hsbuf, bc->free);
pr_debug("%s: B%1d hdlc encoded %d flags\n", card->name,
- bc->bch.nr, count);
+ bc->bch.nr, count);
bc->free -= count;
p = bc->hsbuf;
m = (bc->bch.nr & 1) ? 0xffffff00 : 0xffff00ff;
@@ -535,7 +535,7 @@ fill_hdlc_flag(struct tiger_ch *bc)
}
if (debug & DEBUG_HW_BFIFO) {
snprintf(card->log, LOG_SIZE, "B%1d-send %s %d ",
- bc->bch.nr, card->name, count);
+ bc->bch.nr, card->name, count);
print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, p, count);
}
}
@@ -554,16 +554,16 @@ fill_dma(struct tiger_ch *bc)
if (count <= 0)
return;
pr_debug("%s: %s B%1d %d/%d/%d/%d state %x idx %d/%d\n", card->name,
- __func__, bc->bch.nr, count, bc->free, bc->bch.tx_idx,
- bc->bch.tx_skb->len, bc->txstate, bc->idx, card->send.idx);
+ __func__, bc->bch.nr, count, bc->free, bc->bch.tx_idx,
+ bc->bch.tx_skb->len, bc->txstate, bc->idx, card->send.idx);
if (bc->txstate & (TX_IDLE | TX_INIT | TX_UNDERRUN))
resync(bc, card);
p = bc->bch.tx_skb->data + bc->bch.tx_idx;
if (test_bit(FLG_HDLC, &bc->bch.Flags)) {
count = isdnhdlc_encode(&bc->hsend, p, count, &i,
- bc->hsbuf, bc->free);
+ bc->hsbuf, bc->free);
pr_debug("%s: B%1d hdlc encoded %d in %d\n", card->name,
- bc->bch.nr, i, count);
+ bc->bch.nr, i, count);
bc->bch.tx_idx += i;
bc->free -= count;
p = bc->hsbuf;
@@ -584,7 +584,7 @@ fill_dma(struct tiger_ch *bc)
}
if (debug & DEBUG_HW_BFIFO) {
snprintf(card->log, LOG_SIZE, "B%1d-send %s %d ",
- bc->bch.nr, card->name, count);
+ bc->bch.nr, card->name, count);
print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, p, count);
}
if (bc->free)
@@ -633,7 +633,7 @@ send_tiger_bc(struct tiger_hw *card, struct tiger_ch *bc)
return;
}
pr_debug("%s: B%1d TX no data free %d idx %d/%d\n", card->name,
- bc->bch.nr, bc->free, bc->idx, card->send.idx);
+ bc->bch.nr, bc->free, bc->idx, card->send.idx);
if (!(bc->txstate & (TX_IDLE | TX_INIT))) {
fill_mem(bc, bc->idx, bc->free, 0xff);
if (bc->free == card->send.size)
@@ -706,8 +706,8 @@ nj_irq(int intno, void *dev_id)
s0val |= 0x01; /* the 1st read area is free */
pr_debug("%s: DMA Status %02x/%02x/%02x %d/%d\n", card->name,
- s1val, s0val, card->last_is0,
- card->recv.idx, card->send.idx);
+ s1val, s0val, card->last_is0,
+ card->recv.idx, card->send.idx);
/* test if we have a DMA interrupt */
if (s0val != card->last_is0) {
if ((s0val & NJ_IRQM0_RD_MASK) !=
@@ -758,7 +758,7 @@ nj_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
spin_unlock_irqrestore(&card->lock, flags);
if (!ret)
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
break;
case PH_DEACTIVATE_REQ:
spin_lock_irqsave(&card->lock, flags);
@@ -766,7 +766,7 @@ nj_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
mode_tiger(bc, ISDN_P_NONE);
spin_unlock_irqrestore(&card->lock, flags);
_queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
ret = 0;
break;
}
@@ -785,7 +785,7 @@ channel_bctrl(struct tiger_ch *bc, struct mISDN_ctrl_req *cq)
case MISDN_CTRL_GETOP:
cq->op = 0;
break;
- /* Nothing implemented yet */
+ /* Nothing implemented yet */
case MISDN_CTRL_FILL_EMPTY:
default:
pr_info("%s: %s unknown Op %x\n", card->name, __func__, cq->op);
@@ -900,7 +900,7 @@ nj_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
break;
case CLOSE_CHANNEL:
pr_debug("%s: dev(%d) close from %p\n", card->name, dch->dev.id,
- __builtin_return_address(0));
+ __builtin_return_address(0));
module_put(THIS_MODULE);
break;
case CONTROL_CHANNEL:
@@ -908,7 +908,7 @@ nj_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
break;
default:
pr_debug("%s: %s unknown command %x\n",
- card->name, __func__, cmd);
+ card->name, __func__, cmd);
return -EINVAL;
}
return err;
@@ -968,7 +968,7 @@ nj_release(struct tiger_hw *card)
free_irq(card->irq, card);
if (card->isac.dch.dev.dev.class)
mISDN_unregister_device(&card->isac.dch.dev);
-
+
for (i = 0; i < 2; i++) {
mISDN_freebchannel(&card->bc[i].bch);
kfree(card->bc[i].hsbuf);
@@ -976,7 +976,7 @@ nj_release(struct tiger_hw *card)
}
if (card->dma_p)
pci_free_consistent(card->pdev, NJ_DMA_SIZE,
- card->dma_p, card->dma);
+ card->dma_p, card->dma);
write_lock_irqsave(&card_lock, flags);
list_del(&card->list);
write_unlock_irqrestore(&card_lock, flags);
@@ -1033,14 +1033,14 @@ setup_instance(struct tiger_hw *card)
card->bc[i].bch.ch.ctrl = nj_bctrl;
card->bc[i].bch.ch.nr = i + 1;
list_add(&card->bc[i].bch.ch.list,
- &card->isac.dch.dev.bchannels);
+ &card->isac.dch.dev.bchannels);
card->bc[i].bch.hw = card;
}
err = nj_setup(card);
if (err)
goto error;
err = mISDN_register_device(&card->isac.dch.dev, &card->pdev->dev,
- card->name);
+ card->name);
if (err)
goto error;
err = nj_init_card(card);
@@ -1074,7 +1074,7 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
if (pdev->subsystem_vendor == 0xb100 &&
- pdev->subsystem_device == 0x0003 ) {
+ pdev->subsystem_device == 0x0003) {
pr_notice("Netjet: Digium TDM400P not handled yet\n");
return -ENODEV;
}
@@ -1094,7 +1094,7 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
printk(KERN_INFO "nj_probe(mISDN): found adapter at %s\n",
- pci_name(pdev));
+ pci_name(pdev));
pci_set_master(pdev);
diff --git a/drivers/isdn/hardware/mISDN/netjet.h b/drivers/isdn/hardware/mISDN/netjet.h
index d061ff99560..ddd41ef1a70 100644
--- a/drivers/isdn/hardware/mISDN/netjet.h
+++ b/drivers/isdn/hardware/mISDN/netjet.h
@@ -55,4 +55,3 @@
/* 2 * 64 byte is a compromise between IRQ count and latency */
#define NJ_DMA_RXSIZE 128 /* 2 * 64 */
#define NJ_DMA_TXSIZE 128 /* 2 * 64 */
-
diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c
index 4d0d41ea122..04689935148 100644
--- a/drivers/isdn/hardware/mISDN/speedfax.c
+++ b/drivers/isdn/hardware/mISDN/speedfax.c
@@ -147,10 +147,10 @@ Start_ISAR:
goto Start_ISAR;
if (cnt < irqloops)
pr_debug("%s: %d irqloops cpu%d\n", sf->name,
- irqloops - cnt, smp_processor_id());
+ irqloops - cnt, smp_processor_id());
if (irqloops && !cnt)
pr_notice("%s: %d IRQ LOOP cpu%d\n", sf->name,
- irqloops, smp_processor_id());
+ irqloops, smp_processor_id());
spin_unlock(&sf->lock);
return IRQ_HANDLED;
}
@@ -266,7 +266,7 @@ sfax_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
break;
case CLOSE_CHANNEL:
pr_debug("%s: dev(%d) close from %p\n", sf->name,
- dch->dev.id, __builtin_return_address(0));
+ dch->dev.id, __builtin_return_address(0));
module_put(THIS_MODULE);
break;
case CONTROL_CHANNEL:
@@ -306,10 +306,10 @@ init_card(struct sfax_hw *sf)
msleep_interruptible(10);
if (debug & DEBUG_HW)
pr_notice("%s: IRQ %d count %d\n", sf->name,
- sf->irq, sf->irqcnt);
+ sf->irq, sf->irqcnt);
if (!sf->irqcnt) {
pr_info("%s: IRQ(%d) got no requests during init %d\n",
- sf->name, sf->irq, 3 - cnt);
+ sf->name, sf->irq, 3 - cnt);
} else
return 0;
}
@@ -325,7 +325,7 @@ setup_speedfax(struct sfax_hw *sf)
if (!request_region(sf->cfg, 256, sf->name)) {
pr_info("mISDN: %s config port %x-%x already in use\n",
- sf->name, sf->cfg, sf->cfg + 255);
+ sf->name, sf->cfg, sf->cfg + 255);
return -EIO;
}
outb(0xff, sf->cfg);
@@ -396,7 +396,7 @@ setup_instance(struct sfax_hw *card)
}
if (debug & DEBUG_HW)
pr_notice("%s: got firmware %zu bytes\n",
- card->name, firmware->size);
+ card->name, firmware->size);
mISDNisac_init(&card->isac, card);
@@ -406,7 +406,7 @@ setup_instance(struct sfax_hw *card)
for (i = 0; i < 2; i++) {
set_channelmap(i + 1, card->isac.dch.dev.channelmap);
list_add(&card->isar.ch[i].bch.ch.list,
- &card->isac.dch.dev.bchannels);
+ &card->isac.dch.dev.bchannels);
}
err = setup_speedfax(card);
@@ -416,7 +416,7 @@ setup_instance(struct sfax_hw *card)
if (err)
goto error;
err = mISDN_register_device(&card->isac.dch.dev,
- &card->pdev->dev, card->name);
+ &card->pdev->dev, card->name);
if (err)
goto error;
err = init_card(card);
@@ -466,7 +466,7 @@ sfaxpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
pr_notice("mISDN: Speedfax found adapter %s at %s\n",
- (char *)ent->driver_data, pci_name(pdev));
+ (char *)ent->driver_data, pci_name(pdev));
card->cfg = pci_resource_start(pdev, 0);
card->irq = pdev->irq;
@@ -514,7 +514,7 @@ Speedfax_init(void)
int err;
pr_notice("Sedlbauer Speedfax+ Driver Rev. %s\n",
- SPEEDFAX_REV);
+ SPEEDFAX_REV);
err = pci_register_driver(&sfaxpci_driver);
return err;
}
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index e10e0284533..7f1e7ba75cd 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -171,7 +171,7 @@ W6692Version(struct w6692_hw *card)
val = ReadW6692(card, W_D_RBCH);
pr_notice("%s: Winbond W6692 version: %s\n", card->name,
- W6692Ver[(val >> 6) & 3]);
+ W6692Ver[(val >> 6) & 3]);
}
static void
@@ -248,7 +248,7 @@ W6692_ph_bh(struct dchannel *dch)
break;
default:
pr_debug("%s: TE unknown state %02x dch state %02x\n",
- card->name, card->state, dch->state);
+ card->name, card->state, dch->state);
break;
}
pr_debug("%s: TE newstate %02x\n", card->name, dch->state);
@@ -271,7 +271,7 @@ W6692_empty_Dfifo(struct w6692_hw *card, int count)
}
if ((dch->rx_skb->len + count) >= dch->maxlen) {
pr_debug("%s: empty_Dfifo overrun %d\n", card->name,
- dch->rx_skb->len + count);
+ dch->rx_skb->len + count);
WriteW6692(card, W_D_CMDR, W_D_CMDR_RACK);
return;
}
@@ -280,7 +280,7 @@ W6692_empty_Dfifo(struct w6692_hw *card, int count)
WriteW6692(card, W_D_CMDR, W_D_CMDR_RACK);
if (debug & DEBUG_HW_DFIFO) {
snprintf(card->log, 63, "D-recv %s %d ",
- card->name, count);
+ card->name, count);
print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, ptr, count);
}
}
@@ -312,11 +312,11 @@ W6692_fill_Dfifo(struct w6692_hw *card)
del_timer(&dch->timer);
}
init_timer(&dch->timer);
- dch->timer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ)/1000);
+ dch->timer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ) / 1000);
add_timer(&dch->timer);
if (debug & DEBUG_HW_DFIFO) {
snprintf(card->log, 63, "D-send %s %d ",
- card->name, count);
+ card->name, count);
print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, ptr, count);
}
}
@@ -426,7 +426,7 @@ handle_statusD(struct w6692_hw *card)
if (exval & W_D_EXI_MOC) { /* MOC - not supported */
v1 = ReadW6692(card, W_MOSR);
pr_debug("%s: spurious MOC interrupt MOSR %02x\n",
- card->name, v1);
+ card->name, v1);
}
if (exval & W_D_EXI_ISC) { /* ISC - Level1 change */
cir = ReadW6692(card, W_CIR);
@@ -434,7 +434,7 @@ handle_statusD(struct w6692_hw *card)
if (cir & W_CIR_ICC) {
v1 = cir & W_CIR_COD_MASK;
pr_debug("%s: ph_state_change %x -> %x\n", card->name,
- dch->state, v1);
+ dch->state, v1);
card->state = v1;
if (card->fmask & led) {
switch (v1) {
@@ -479,13 +479,13 @@ W6692_empty_Bfifo(struct w6692_ch *wch, int count)
if (unlikely(!wch->bch.rx_skb)) {
pr_info("%s: B receive out of memory\n", card->name);
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK |
- W_B_CMDR_RACT);
+ W_B_CMDR_RACT);
return;
}
}
if (wch->bch.rx_skb->len + count > wch->bch.maxlen) {
pr_debug("%s: empty_Bfifo incoming packet too large\n",
- card->name);
+ card->name);
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
skb_trim(wch->bch.rx_skb, 0);
return;
@@ -495,7 +495,7 @@ W6692_empty_Bfifo(struct w6692_ch *wch, int count)
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
if (debug & DEBUG_HW_DFIFO) {
snprintf(card->log, 63, "B%1d-recv %s %d ",
- wch->bch.nr, card->name, count);
+ wch->bch.nr, card->name, count);
print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, ptr, count);
}
}
@@ -520,13 +520,13 @@ W6692_fill_Bfifo(struct w6692_ch *wch)
cmd |= W_B_CMDR_XME;
pr_debug("%s: fill Bfifo%d/%d\n", card->name,
- count, wch->bch.tx_idx);
+ count, wch->bch.tx_idx);
wch->bch.tx_idx += count;
outsb(wch->addr + W_B_XFIFO, ptr, count);
WriteW6692B(wch, W_B_CMDR, cmd);
if (debug & DEBUG_HW_DFIFO) {
snprintf(card->log, 63, "B%1d-send %s %d ",
- wch->bch.nr, card->name, count);
+ wch->bch.nr, card->name, count);
print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, ptr, count);
}
}
@@ -586,7 +586,7 @@ disable_pots(struct w6692_ch *wch)
wch->b_mode &= ~(W_B_MODE_EPCM | W_B_MODE_BSW0);
WriteW6692B(wch, W_B_MODE, wch->b_mode);
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_RACT |
- W_B_CMDR_XRST);
+ W_B_CMDR_XRST);
return 0;
}
@@ -597,7 +597,7 @@ w6692_mode(struct w6692_ch *wch, u32 pr)
card = wch->bch.hw;
pr_debug("%s: B%d protocol %x-->%x\n", card->name,
- wch->bch.nr, wch->bch.state, pr);
+ wch->bch.nr, wch->bch.state, pr);
switch (pr) {
case ISDN_P_NONE:
if ((card->fmask & pots) && (wch->b_mode & W_B_MODE_EPCM))
@@ -614,7 +614,7 @@ w6692_mode(struct w6692_ch *wch, u32 pr)
WriteW6692B(wch, W_B_MODE, wch->b_mode);
WriteW6692B(wch, W_B_EXIM, 0);
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_RACT |
- W_B_CMDR_XRST);
+ W_B_CMDR_XRST);
test_and_set_bit(FLG_TRANSPARENT, &wch->bch.Flags);
break;
case ISDN_P_B_HDLC:
@@ -624,7 +624,7 @@ w6692_mode(struct w6692_ch *wch, u32 pr)
WriteW6692B(wch, W_B_ADM2, 0xff);
WriteW6692B(wch, W_B_EXIM, 0);
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_RACT |
- W_B_CMDR_XRST);
+ W_B_CMDR_XRST);
test_and_set_bit(FLG_HDLC, &wch->bch.Flags);
break;
default:
@@ -667,7 +667,7 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
if ((star & W_B_STAR_RDOV) &&
test_bit(FLG_ACTIVE, &wch->bch.Flags)) {
pr_debug("%s: B%d RDOV proto=%x\n", card->name,
- wch->bch.nr, wch->bch.state);
+ wch->bch.nr, wch->bch.state);
#ifdef ERROR_STATISTIC
wch->bch.err_rdo++;
#endif
@@ -675,21 +675,21 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
if (test_bit(FLG_HDLC, &wch->bch.Flags)) {
if (star & W_B_STAR_CRCE) {
pr_debug("%s: B%d CRC error\n",
- card->name, wch->bch.nr);
+ card->name, wch->bch.nr);
#ifdef ERROR_STATISTIC
wch->bch.err_crc++;
#endif
}
if (star & W_B_STAR_RMB) {
pr_debug("%s: B%d message abort\n",
- card->name, wch->bch.nr);
+ card->name, wch->bch.nr);
#ifdef ERROR_STATISTIC
wch->bch.err_inv++;
#endif
}
}
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK |
- W_B_CMDR_RRST | W_B_CMDR_RACT);
+ W_B_CMDR_RRST | W_B_CMDR_RACT);
if (wch->bch.rx_skb)
skb_trim(wch->bch.rx_skb, 0);
} else {
@@ -706,12 +706,12 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
star = ReadW6692B(wch, W_B_STAR);
if (star & W_B_STAR_RDOV) {
pr_debug("%s: B%d RDOV proto=%x\n", card->name,
- wch->bch.nr, wch->bch.state);
+ wch->bch.nr, wch->bch.state);
#ifdef ERROR_STATISTIC
wch->bch.err_rdo++;
#endif
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK |
- W_B_CMDR_RRST | W_B_CMDR_RACT);
+ W_B_CMDR_RRST | W_B_CMDR_RACT);
} else {
W6692_empty_Bfifo(wch, W_B_FIFO_THRESH);
if (test_bit(FLG_TRANSPARENT, &wch->bch.Flags) &&
@@ -723,28 +723,28 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
/* only if it is not handled yet */
if (!(star & W_B_STAR_RDOV)) {
pr_debug("%s: B%d RDOV IRQ proto=%x\n", card->name,
- wch->bch.nr, wch->bch.state);
+ wch->bch.nr, wch->bch.state);
#ifdef ERROR_STATISTIC
wch->bch.err_rdo++;
#endif
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK |
- W_B_CMDR_RRST | W_B_CMDR_RACT);
+ W_B_CMDR_RRST | W_B_CMDR_RACT);
}
}
if (stat & W_B_EXI_XFR) {
if (!(stat & (W_B_EXI_RME | W_B_EXI_RMR))) {
star = ReadW6692B(wch, W_B_STAR);
pr_debug("%s: B%d star %02x\n", card->name,
- wch->bch.nr, star);
+ wch->bch.nr, star);
}
if (star & W_B_STAR_XDOW) {
pr_debug("%s: B%d XDOW proto=%x\n", card->name,
- wch->bch.nr, wch->bch.state);
+ wch->bch.nr, wch->bch.state);
#ifdef ERROR_STATISTIC
wch->bch.err_xdu++;
#endif
WriteW6692B(wch, W_B_CMDR, W_B_CMDR_XRST |
- W_B_CMDR_RACT);
+ W_B_CMDR_RACT);
/* resend */
if (wch->bch.tx_skb) {
if (!test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
@@ -757,7 +757,7 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
}
if (stat & W_B_EXI_XDUN) {
pr_debug("%s: B%d XDUN proto=%x\n", card->name,
- wch->bch.nr, wch->bch.state);
+ wch->bch.nr, wch->bch.state);
#ifdef ERROR_STATISTIC
wch->bch.err_xdu++;
#endif
@@ -818,7 +818,7 @@ dbusy_timer_handler(struct dchannel *dch)
rbch = ReadW6692(card, W_D_RBCH);
star = ReadW6692(card, W_D_STAR);
pr_debug("%s: D-Channel Busy RBCH %02x STAR %02x\n",
- card->name, rbch, star);
+ card->name, rbch, star);
if (star & W_D_STAR_XBZ) /* D-Channel Busy */
test_and_set_bit(FLG_L1_BUSY, &dch->Flags);
else {
@@ -888,7 +888,7 @@ void initW6692(struct w6692_hw *card)
val = ReadW6692(card, W_XADDR);
if (debug & DEBUG_HW)
pr_notice("%s: W_XADDR=%02x\n",
- card->name, val);
+ card->name, val);
}
}
}
@@ -924,7 +924,7 @@ init_card(struct w6692_hw *card)
msleep_interruptible(10);
if (debug & DEBUG_HW)
pr_notice("%s: IRQ %d count %d\n", card->name,
- card->irq, card->irqcnt);
+ card->irq, card->irqcnt);
if (!card->irqcnt) {
pr_info("%s: IRQ(%d) getting no IRQs during init %d\n",
card->name, card->irq, 3 - cnt);
@@ -970,7 +970,7 @@ w6692_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
spin_unlock_irqrestore(&card->lock, flags);
if (!ret)
_queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
break;
case PH_DEACTIVATE_REQ:
spin_lock_irqsave(&card->lock, flags);
@@ -978,7 +978,7 @@ w6692_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
w6692_mode(bc, ISDN_P_NONE);
spin_unlock_irqrestore(&card->lock, flags);
_queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,
- NULL, GFP_KERNEL);
+ NULL, GFP_KERNEL);
ret = 0;
break;
default:
@@ -1000,7 +1000,7 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
case MISDN_CTRL_GETOP:
cq->op = 0;
break;
- /* Nothing implemented yet */
+ /* Nothing implemented yet */
case MISDN_CTRL_FILL_EMPTY:
default:
pr_info("%s: unknown Op %x\n", __func__, cq->op);
@@ -1168,16 +1168,16 @@ w6692_l1callback(struct dchannel *dch, u32 cmd)
case PH_ACTIVATE_IND:
test_and_set_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
case PH_DEACTIVATE_IND:
test_and_clear_bit(FLG_ACTIVE, &dch->Flags);
_queue_data(&dch->dev.D, cmd, MISDN_ID_ANY, 0, NULL,
- GFP_ATOMIC);
+ GFP_ATOMIC);
break;
default:
pr_debug("%s: %s unknown command %x\n", card->name,
- __func__, cmd);
+ __func__, cmd);
return -1;
}
return 0;
@@ -1187,7 +1187,7 @@ static int
open_dchannel(struct w6692_hw *card, struct channel_req *rq)
{
pr_debug("%s: %s dev(%d) open from %p\n", card->name, __func__,
- card->dch.dev.id, __builtin_return_address(1));
+ card->dch.dev.id, __builtin_return_address(1));
if (rq->protocol != ISDN_P_TE_S0)
return -EINVAL;
if (rq->adr.channel == 1)
@@ -1197,7 +1197,7 @@ open_dchannel(struct w6692_hw *card, struct channel_req *rq)
rq->ch->protocol = rq->protocol;
if (card->dch.state == 7)
_queue_data(rq->ch, PH_ACTIVATE_IND, MISDN_ID_ANY,
- 0, NULL, GFP_KERNEL);
+ 0, NULL, GFP_KERNEL);
return 0;
}
@@ -1225,7 +1225,7 @@ w6692_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
break;
case CLOSE_CHANNEL:
pr_debug("%s: dev(%d) close from %p\n", card->name,
- dch->dev.id, __builtin_return_address(0));
+ dch->dev.id, __builtin_return_address(0));
module_put(THIS_MODULE);
break;
case CONTROL_CHANNEL:
@@ -1245,7 +1245,7 @@ setup_w6692(struct w6692_hw *card)
if (!request_region(card->addr, 256, card->name)) {
pr_info("%s: config port %x-%x already in use\n", card->name,
- card->addr, card->addr + 255);
+ card->addr, card->addr + 255);
return -EIO;
}
W6692Version(card);
@@ -1333,7 +1333,7 @@ setup_instance(struct w6692_hw *card)
if (err)
goto error_setup;
err = mISDN_register_device(&card->dch.dev, &card->pdev->dev,
- card->name);
+ card->name);
if (err)
goto error_reg;
err = init_card(card);