linux/drivers/net/wan
Linus Torvalds 55db4c64ed Revert "tty: make receive_buf() return the amout of bytes received"
This reverts commit b1c43f82c5.

It was broken in so many ways, and results in random odd pty issues.

It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
cause endless work-loops (see commit a5660b41af: "tty: fix endless
work loop when the buffer fills up").

It also used an "unsigned int" return value fo the ->receive_buf()
function, but then made multiple functions return a negative error code,
and didn't actually check for the error in the caller.

And it didn't actually work at all.  BenH bisected down odd tty behavior
to it:
  "It looks like the patch is causing some major malfunctions of the X
   server for me, possibly related to PTYs.  For example, cat'ing a
   large file in a gnome terminal hangs the kernel for -minutes- in a
   loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
   data in the quoted bits further down).

   ...

   Some more data: It -looks- like what happens is that the
   flush_to_ldisc work queue entry constantly re-queues itself (because
   the PTY is full ?) and the workqueue thread will basically loop
   forver calling it without ever scheduling, thus starving the consumer
   process that could have emptied the PTY."

which is pretty much exactly the problem we fixed in a5660b41af.

Milton Miller pointed out the 'unsigned int' issue.

Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reported-by: Milton Miller <miltonm@bga.com>
Cc: Stefan Bigler <stefan.bigler@keymile.com>
Cc: Toby Gray <toby.gray@realvnc.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
History 2011-06-04 06:33:24 +09:00
..
lmc Fix common misspellings 2011-03-31 11:26:23 -03:00
.gitignore gitignore: misc files 2006-01-01 22:21:50 +01:00
c101.c drivers/net/wan: Adjust confusing if indentation 2010-08-16 21:06:25 -07:00
cosa.c Fix common misspellings 2011-03-31 11:26:23 -03:00
cosa.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cycx_drv.c wan: make read-only data const 2010-09-06 13:32:20 -07:00
cycx_main.c wan: make read-only data const 2010-09-06 13:32:20 -07:00
cycx_x25.c X25: Use identifiers for cyclades device to x25 interface 2010-04-22 16:12:50 -07:00
dlci.c net: call dev_alloc_name from register_netdevice 2011-05-05 10:57:45 -07:00
dscc4.c Fix common misspellings 2011-03-31 11:26:23 -03:00
farsync.c farsync: Fix compile warnings. 2010-08-10 00:06:58 -07:00
farsync.h WAN: farsync driver no longer uses syncppp.c directly 2008-07-23 23:00:38 +02:00
hd64570.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
hd64570.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
hd64572.c WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers. 2010-12-12 15:03:00 -08:00
hd64572.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hdlc.c Fix typo interrest[ing|ed] => interest[ing|ed] 2010-09-21 17:05:44 +02:00
hdlc_cisco.c ipv4: ip_ptr cleanups 2010-09-15 22:06:05 -07:00
hdlc_fr.c net: call dev_alloc_name from register_netdevice 2011-05-05 10:57:45 -07:00
hdlc_ppp.c WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver. 2010-04-16 15:41:03 -07:00
hdlc_raw.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hdlc_raw_eth.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hdlc_x25.c X25: Use identifiers for hdlc x25 device to x25 interface 2010-04-22 16:12:51 -07:00
hostess_sv11.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ixp4xx_hss.c Fix common misspellings 2011-03-31 11:26:23 -03:00
Kconfig Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
lapbether.c net: call dev_alloc_name from register_netdevice 2011-05-05 10:57:45 -07:00
Makefile WAN: Add IXP4xx HSS HDLC driver. 2008-12-22 00:47:31 +01:00
n2.c drivers/net: return operator cleanup 2010-09-26 18:34:29 -07:00
pc300-falc-lh.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pc300.h WAN: Convert PC300 driver to use normal u8/u16/u32 types 2008-07-23 23:00:38 +02:00
pc300_drv.c Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-05-26 13:19:00 -07:00
pc300_tty.c tiocmset: kill the file pointer argument 2011-02-17 11:52:43 -08:00
pc300too.c drivers/net/: use DEFINE_PCI_DEVICE_TABLE() 2010-01-07 23:54:26 -08:00
pci200syn.c drivers/net/wan: Adjust confusing if indentation 2010-08-16 21:06:25 -07:00
sbni.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sbni.h sbni endian fixes 2008-01-18 14:44:33 -05:00
sdla.c drivers/net: return operator cleanup 2010-09-26 18:34:29 -07:00
sealevel.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wanxl.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
wanxl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
wanxlfw.inc_shipped Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
wanxlfw.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
x25_asy.c Revert "tty: make receive_buf() return the amout of bytes received" 2011-06-04 06:33:24 +09:00
x25_asy.h x25_asy: convert to internal net_device_stats 2009-03-21 22:37:57 -07:00
z85230.c Fix common misspellings 2011-03-31 11:26:23 -03:00
z85230.h wan: convert drivers to netdev_tx_t 2009-09-01 01:13:28 -07:00