History log of /drivers/net/caif/caif_serial.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
eb93992207dadb946a3b5cf4544957dc924a6f58 19-Dec-2011 Rusty Russell <rusty@rustcorp.com.au> module_param: make bool parameters really bool (net & drivers/net)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

(Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false).

Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
f84ea779c25dabc90956f1c329e5e5c501ea96cc 06-Dec-2011 Roar Førde <roar.forde@stericsson.com> caif: Replace BUG_ON with WARN_ON.

BUG_ON is too strict in a number of circumstances,
use WARN_ON instead. Protocol errors should not halt the system.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
95cb3656c09fcf6577138337216c27744ebc91e2 24-Jun-2011 Jesper Juhl <jj@chaosbits.net> net: Remove unneeded version.h includes from drivers/net/

It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/net/.
This patch removes them.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
a6b7a407865aab9f849dd99a71072b7cd1175116 06-Jun-2011 Alexey Dobriyan <adobriyan@gmail.com> net: remove interrupt.h inclusion from netdevice.h

* remove interrupt.g inclusion from netdevice.h -- not needed
* fixup fallout, add interrupt.h and hardirq.h back where needed.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
55db4c64eddf37e31279ec15fe90314713bc9cfa 03-Jun-2011 Linus Torvalds <torvalds@linux-foundation.org> Revert "tty: make receive_buf() return the amout of bytes received"

This reverts commit b1c43f82c5aa265442f82dba31ce985ebb7aa71c.

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 a5660b41af6a: "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 a5660b41af6a.

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>
/drivers/net/caif/caif_serial.c
b1c43f82c5aa265442f82dba31ce985ebb7aa71c 20-Mar-2011 Felipe Balbi <balbi@ti.com> tty: make receive_buf() return the amout of bytes received

it makes it simpler to keep track of the amount of
bytes received and simplifies how flush_to_ldisc counts
the remaining bytes. It also fixes a bug of lost bytes
on n_tty when flushing too many bytes via the USB
serial gadget driver.

Tested-by: Stefan Bigler <stefan.bigler@keymile.com>
Tested-by: Toby Gray <toby.gray@realvnc.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/net/caif/caif_serial.c
2aa40aef9debc77d55cc87a50d335b6fe97fbeb0 17-Jun-2010 Sjur Braendeland <sjur.brandeland@stericsson.com> caif: Use link layer MTU instead of fixed MTU

Previously CAIF supported maximum transfer size of ~4050.
The transfer size is now calculated dynamically based on the
link layers mtu size.

Signed-off-by: Sjur Braendeland@stericsson.com
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
c1f8fc57c046903b5e7c891f2922592d5f775af3 31-May-2010 Dan Carpenter <error27@gmail.com> caif: add newlines after declarations in caif_serial.c

I added newlines after the declarations in caif_serial.c. This is
normal kernel style, although I can't see anywhere it's documented.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
7c25492871a50f9f72f4d1350bdea53169024864 31-May-2010 Dan Carpenter <error27@gmail.com> caif: remove unneeded variable from caif_net_open()

We don't use the "ser" variable so I've removed it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
d3f744e0d6c1c27a10cdceac6eb946122188dbc9 28-Apr-2010 Sjur Braendeland <sjur.brandeland@stericsson.com> caif: Ldisc add permission check and mem-alloc error check

Changes:
o Added permission checks for installing. CAP_SYS_ADMIN and
CAP_SYS_TTY_CONFIG can install the ldisc.
o Check if allocation of skb was successful.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
e31d5a05948e4478ba8396063d1e1f39880928e2 08-Apr-2010 Alan Cox <alan@linux.intel.com> caif: tty's are kref objects so take a reference

I don't think this can be abused in this case but do things properly.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
c93f09402106f22601838ee2bb0d02bae934b5e5 08-Apr-2010 Alan Cox <alan@linux.intel.com> caif: check write operations

write is optional for a tty device. Check that we have a write op rather
than calling NULL.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c
9b27105b4a44c54bf91ecd7d0315034ae75684f7 30-Mar-2010 Sjur Braendeland <sjur.brandeland@stericsson.com> net-caif-driver: add CAIF serial driver (ldisc)

Add CAIF Serial driver. This driver is implemented as a line discipline.

caif_serial uses the following module parameters:
ser_use_stx - specifies if STart of frame eXtension is in use.
ser_loop - sets the interface in loopback mode.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/caif/caif_serial.c