dahdi-linux/drivers/dahdi
Shaun Ruffell b9a8000bbd dahdi: Fix failure to read / write on kernel 3.16+
Kernel version 3.16+, since upstream commit (7f7f25e82d54870d "replace checking
for ->read/->aio_read presence with check in ->f_mode" )[1], does not like it
when dahdi changes the set of allowed file operations on a file descriptor
outside of the context of an open() system call.

DAHDI changes the available file operations when a channel is opened by first
opening /dev/dahdi/channel and then calling the DAHDI_SPECIFY ioctl to bind it
to a particular DAHDI channel. Until DAHDI_SPECIFY is called there weren't any
read()/write() callbacks implemented and therefore after the initial open, the
kernel was setting not setting FMODE_CAN_{WRITE,READ} on the file descriptor
indicating that those operations were not allowed.

Now define empty shell functions on the general dahdi_fops so the vfs layer will
not mark a file descriptor as unwritteable or unreadable on open.

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7f7f25e82d54870df24d415a7007fbd327da027b

Internal-Issue-ID: DAHLIN-340
Reported-and-tested-by: Thomas B. Clark
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
2014-09-17 16:29:16 -05:00
..
datamods net: Update dahdi for alloc_netdev() api change in 3.17+ 2014-08-11 09:53:02 -05:00
firmware wcte43x: Fix failure to download firmware. 2014-07-18 10:19:09 -05:00
hpec Update Digium copyright on files changed since beginning of the year. 2012-03-21 18:56:05 +00:00
oct612x oct612x: Implement the SerializationObject callbacks. 2014-06-20 13:01:27 -05:00
voicebus net: Update dahdi for alloc_netdev() api change in 3.17+ 2014-08-11 09:53:02 -05:00
vpmadt032_loader Add #include <linux/slab.h> to all files that call kzalloc|kmalloc|kfree. 2014-05-20 11:36:23 -05:00
wcb4xxp Do not call dahdi_span_ops.open with spinlock held. 2014-06-20 13:01:27 -05:00
wct4xxp wct4xxp: Report rx signalling bit changes after spanconfig. 2014-06-27 22:40:28 -05:00
wctc4xxp net: Update dahdi for alloc_netdev() api change in 3.17+ 2014-08-11 09:53:02 -05:00
wctdm24xxp Add #include <linux/slab.h> to all files that call kzalloc|kmalloc|kfree. 2014-05-20 11:36:23 -05:00
wcte12xp Add #include <linux/slab.h> to all files that call kzalloc|kmalloc|kfree. 2014-05-20 11:36:23 -05:00
xpp Do not call dahdi_span_ops.open with spinlock held. 2014-06-20 13:01:27 -05:00
adt_lec.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
adt_lec.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
arith.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
biquad.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
dahdi_dummy.c dahdi_dummy: Include timer.h instead of time.h 2012-04-05 16:15:22 +00:00
dahdi_dynamic_eth.c Revert "dahdi_dynamic_eth: Move tx packet flushing to process context." 2012-12-11 10:27:56 -06:00
dahdi_dynamic_ethmf.c dahdi_dynamic_ethmf: Don't use create_proc_read_entry() 2013-05-24 00:30:33 +03:00
dahdi_dynamic_loc.c dahdi_dynamic_loc: Change and check the dyn->pvt pointer under lock. 2012-04-03 19:44:45 +00:00
dahdi_dynamic.c dynamic: Prevent oops due to inverted compile flag 2014-08-15 14:58:47 -05:00
dahdi_echocan_jpah.c Update Digium copyright on files changed since beginning of the year. 2012-03-21 18:56:05 +00:00
dahdi_echocan_kb1.c Update Digium copyright on files changed since beginning of the year. 2012-03-21 18:56:05 +00:00
dahdi_echocan_mg2.c Update Digium copyright on files changed since beginning of the year. 2012-03-21 18:56:05 +00:00
dahdi_echocan_oslec.c code cleanup - refactor module_printk() 2012-02-09 15:24:40 +00:00
dahdi_echocan_sec2.c code cleanup: remove unused debug_printk() 2012-02-09 15:25:03 +00:00
dahdi_echocan_sec.c code cleanup: remove unused debug_printk() 2012-02-09 15:25:03 +00:00
dahdi_transcode.c wctc4xxp: Cleanup RTP for unopened channels. 2014-05-16 12:06:58 -05:00
dahdi-base.c dahdi: Fix failure to read / write on kernel 3.16+ 2014-09-17 16:29:16 -05:00
dahdi-sysfs-chan.c sysfs: bugfix: shorten too long file names 2013-06-23 22:12:33 +03:00
dahdi-sysfs.c sysfs: new device attribute: registration_time 2014-01-28 20:04:22 +02:00
dahdi-sysfs.h Remove support for kernels < 2.6.18 2012-03-13 20:09:12 +00:00
dahdi-version.c dahdi: Do not rebuild dahdi-base.c when only updating the version. 2011-02-28 14:19:09 +00:00
dahdi.h Update Digium copyright on files changed since beginning of the year. 2012-03-21 18:56:05 +00:00
ecdis.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
fir.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
fxo_modes.h wctdm24xxp, wctdm: Reduce memory used by fxo_modes array. 2011-04-04 16:26:00 +00:00
Kbuild wcte43x: Add driver for TE435/TE235 digital cards. 2013-11-11 14:39:19 -06:00
Kconfig wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
makefw.c wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
pciradio.c pciradio: interruptible_sleep_on_timeout() -> msleep_interruptible() 2014-05-20 11:36:23 -05:00
pciradio.rbt wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
proslic.h wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
tor2-hw.h "struct pci_device_id[]" -> "DEFINE_PCI_DEVICE_TABLE" 2011-01-03 18:26:24 +00:00
tor2.c tor2: Remove unused open/close callbacks. 2014-06-20 13:01:27 -05:00
tormenta2.rbt wct4xxp: Moving the transmit short detection behind debug module param. 2010-08-27 21:59:27 +00:00
wcaxx-base.c wcaxx: Update firmware for A8B/A4B to 1d0019/b0019. 2014-03-17 12:02:47 -05:00
wcfxo.c Do not call dahdi_span_ops.open with spinlock held. 2014-06-20 13:01:27 -05:00
wct1xxp.c Add #include <linux/slab.h> to all files that call kzalloc|kmalloc|kfree. 2014-05-20 11:36:23 -05:00
wctdm.c Do not call dahdi_span_ops.open with spinlock held. 2014-06-20 13:01:27 -05:00
wcte11xp.c Do not call dahdi_span_ops.open with spinlock held. 2014-06-20 13:01:27 -05:00
wcte13xp-base.c wcte13xp: Reset span alarm to RED on startup 2014-07-23 16:24:01 -05:00
wcte43x-base.c wcte43x: Reset span alarm to RED on startup 2014-08-01 16:16:08 -05:00
wcxb_flash.c wcaxx: New driver for A4A/A4B/A8A/A8B analog cards. 2013-11-11 14:39:19 -06:00
wcxb_flash.h wcaxx: New driver for A4A/A4B/A8A/A8B analog cards. 2013-11-11 14:39:19 -06:00
wcxb_spi.c Add #include <linux/slab.h> to all files that call kzalloc|kmalloc|kfree. 2014-05-20 11:36:23 -05:00
wcxb_spi.h wcaxx: New driver for A4A/A4B/A8A/A8B analog cards. 2013-11-11 14:39:19 -06:00
wcxb.c Add #include <linux/slab.h> to all files that call kzalloc|kmalloc|kfree. 2014-05-20 11:36:23 -05:00
wcxb.h wcxb: Add diagnostic message if DMA retries are increasing when DEBUG is defined. 2014-03-17 10:33:14 -05:00