summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/mISDN/hfcpci.c
diff options
context:
space:
mode:
authorKarsten Keil <kkeil@linux-pingi.de>2012-05-16 01:51:08 +0200
committerDavid S. Miller <davem@davemloft.net>2012-05-16 21:24:36 +0200
commitc27b46e7f1cbf3be95a4cf5840c76a7b7d54b26f (patch)
treedb406c5ceb174b3b41a0085929fe85c5e6951bb6 /drivers/isdn/hardware/mISDN/hfcpci.c
parentmISDN: Implement MISDN_CTRL_FILL_EMPTY for more drivers (diff)
downloadlinux-c27b46e7f1cbf3be95a4cf5840c76a7b7d54b26f.tar.xz
linux-c27b46e7f1cbf3be95a4cf5840c76a7b7d54b26f.zip
mISDN: Implement MISDN_CTRL_RX_OFF for more drivers
MISDN_CTRL_RX_OFF is a meachanism to discard RX data in the driver if the data is not needed by the application. It can be used when playing mesages, but not recording or with unidirectional protocols. Signed-off-by: Karsten Keil <kkeil@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/hfcpci.c')
-rw-r--r--drivers/isdn/hardware/mISDN/hfcpci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index 1bd8bc7eb5c7..81363ffa5357 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -572,6 +572,11 @@ hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *rxbz,
fcnt_tx = B_FIFO_SIZE - fcnt_tx;
/* remaining bytes to send (bytes in tx-fifo) */
+ if (test_bit(FLG_RX_OFF, &bch->Flags)) {
+ bch->dropcnt += fcnt_rx;
+ *z2r = cpu_to_le16(new_z2);
+ return;
+ }
maxlen = bchannel_get_rxbuf(bch, fcnt_rx);
if (maxlen < 0) {
pr_warning("B%d: No bufferspace for %d bytes\n",