28 Nov, 2011
1 commit
-
Move the "ISDN4Linux interface" message from device registration,
where it is emitted for each device, to driver registration, where
it is emitted only once, for consistency with the CAPI variant.Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller
01 Nov, 2011
2 commits
-
In preparation of the module.h usage cleanup, call out the header
that we need to get EXPORT_SYMBOL variants and THIS_MODULE into scope.Signed-off-by: Paul Gortmaker
-
So that we don't get build failures once the implicit module.h
presence is terminated.Signed-off-by: Paul Gortmaker
27 Jul, 2011
1 commit
-
This allows us to move duplicated code in
(atomic_inc_not_zero() for now) toSigned-off-by: Arun Sharma
Reviewed-by: Eric Dumazet
Cc: Ingo Molnar
Cc: David Miller
Cc: Eric Dumazet
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Jun, 2011
1 commit
-
if_open() calls try_module_get(), and after an attempt to lock a mutex
the if_open() function may return -ERESTARTSYS without
putting the module. Then, when if_open() is executed again,
try_module_get() is called making the reference counter of THIS_MODULE
greater than one at successful exit from if_open(). The if_close()
function puts the module only once, and as a result it can't be
unloaded.This patch adds module_put call before the return from if_open().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Pavel Shved
Signed-off-by: David S. Miller
04 Jun, 2011
1 commit
-
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
Reported-by: Milton Miller
Cc: Stefan Bigler
Cc: Toby Gray
Cc: Felipe Balbi
Cc: Greg Kroah-Hartman
Cc: Alan Cox
Signed-off-by: Linus Torvalds
24 May, 2011
1 commit
-
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
tty/serial: Fix break handling for PORT_TEGRA
tty/serial: Add explicit PORT_TEGRA type
n_tracerouter and n_tracesink ldisc additions.
Intel PTI implementaiton of MIPI 1149.7.
Kernel documentation for the PTI feature.
export kernel call get_task_comm().
tty: Remove to support serial for S5P6442
pch_phub: Support new device ML7223
8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
ASoC: Update cx20442 for TTY API change
pch_uart: Support new device ML7223 IOH
parport: Use request_muxed_region for IT87 probe and lock
tty/serial: add support for Xilinx PS UART
n_gsm: Use print_hex_dump_bytes
drivers/tty/moxa.c: Put correct tty value
TTY: tty_io, annotate locking functions
TTY: serial_core, remove superfluous set_task_state
TTY: serial_core, remove invalid test
Char: moxa, fix locking in moxa_write
...Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
drivers/tty/serial/Makefile.I did the hci_ldisc thing as an evil merge, cleaning things up.
23 Apr, 2011
1 commit
-
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
Tested-by: Toby Gray
Signed-off-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman
18 Apr, 2011
1 commit
-
The variable 'offset' is set but unused in
write_iso_tasklet(). Just kill it off.Signed-off-by: David S. Miller
31 Mar, 2011
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: David S. Miller
18 Feb, 2011
3 commits
-
Only oddities here are a couple of drivers that bogusly called the ldisc
helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes
away.Signed-off-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman -
Doing tiocmget was such fun we should do tiocmset as well for the same
reasonsSigned-off-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman -
We don't actually need this and it causes problems for internal use of
this functionality. Currently there is a single use of the FILE * pointer.
That is the serial core which uses it to check tty_hung_up_p. However if
that is true then IO_ERROR is also already set so the check may be removed.Signed-off-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman
14 Jan, 2011
1 commit
-
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
Documentation/trace/events.txt: Remove obsolete sched_signal_send.
writeback: fix global_dirty_limits comment runtime -> real-time
ppc: fix comment typo singal -> signal
drivers: fix comment typo diable -> disable.
m68k: fix comment typo diable -> disable.
wireless: comment typo fix diable -> disable.
media: comment typo fix diable -> disable.
remove doc for obsolete dynamic-printk kernel-parameter
remove extraneous 'is' from Documentation/iostats.txt
Fix spelling milisec -> ms in snd_ps3 module parameter description
Fix spelling mistakes in comments
Revert conflicting V4L changes
i7core_edac: fix typos in comments
mm/rmap.c: fix comment
sound, ca0106: Fix assignment to 'channel'.
hrtimer: fix a typo in comment
init/Kconfig: fix typo
anon_inodes: fix wrong function name in comment
fix comment typos concerning "consistent"
poll: fix a typo in comment
...Fix up trivial conflicts in:
- drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
- fs/ext4/ext4.hAlso fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
01 Jan, 2011
1 commit
-
Hi,
In drivers/isdn/gigaset/capi.c::do_disconnect_req() we will leak the
memory allocated (with kmalloc) to 'b3cmsg' if the call to alloc_skb()
fails....
b3cmsg = kmalloc(sizeof(*b3cmsg), GFP_KERNEL);
allocation here ------^
if (!b3cmsg) {
dev_err(cs->dev, "%s: out of memory\n", __func__);
send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
return;
}
capi_cmsg_header(b3cmsg, ap->id, CAPI_DISCONNECT_B3, CAPI_IND,
ap->nextMessageNumber++,
cmsg->adr.adrPLCI | (1 << 16));
b3cmsg->Reason_B3 = CapiProtocolErrorLayer1;
b3skb = alloc_skb(CAPI_DISCONNECT_B3_IND_BASELEN, GFP_KERNEL);
if (b3skb == NULL) {
dev_err(cs->dev, "%s: out of memory\n", __func__);
send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
return;
leak here ------^
...This leak is easily fixed by just kfree()'ing the memory allocated to
'b3cmsg' right before we return. The following patch does that.Signed-off-by: Jesper Juhl
Acked-by: Tilman Schmidt
Signed-off-by: David S. Miller
02 Nov, 2010
1 commit
-
"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",Signed-off-by: Uwe Kleine-König
Signed-off-by: Jiri Kosina
01 Oct, 2010
9 commits
-
Rephrase some USB error messages to make them clearer and more consistent.
Downgrade some warning messages that may occur during normal operation to
debug messages.Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Rework the handling of USB errors in interrupt input reads
to clear halts correctly, delay URB resubmission after errors,
limit retries, and improve error recovery.Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Recover from a lost HD_RECEIVEATDATA_ACK message by sending a
zero-length HD_READ_ATMESSAGE command when ev_layer sends "+++".Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
In error_reset(), if sending HD_RESET_INTERRUPT_PIPE to the device
fails, try performing an USB reset.
Also correct an error in the leading comment.Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Use setup_timer() and mod_timer() instead of direct assignment to
timer structure members, simplify the argument of one timer routine,
and make extra sure all timers are stopped during suspend.Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Remove the debug flag DEBUG_DRIVER and associated code.
It doesn't serve any useful purpose anymore.Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
In transparent data reception, avoid a NULL pointer dereference
in case an skbuff cannot be allocated, remove an inappropriate
call to the HDLC flush routine, and correct the accounting of
received bytes for continued buffers.Signed-off-by: Tilman Schmidt
CC: stable
Signed-off-by: David S. Miller -
Rework the handling of USB errors in AT response reads
to fix a possible infinite retry loop and a memory leak,
and silence a few overly verbose kernel messages.Signed-off-by: Tilman Schmidt
CC: stable
Signed-off-by: David S. Miller -
Unlock cs->lock before calling error_hangup() which is marked
"cs->lock must not be held".Signed-off-by: Tilman Schmidt
CC: stable
Signed-off-by: David S. Miller
08 Aug, 2010
2 commits
-
I moved the kfree(cb) below the dereferences.
Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller -
We should unlock here. This is the only place where we return from the
function with the lock held. The caller isn't expecting it.Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller
16 Jul, 2010
1 commit
-
There were two methods isdn_gethex() and isdn_getnum() which are custom
implementations of strtoul(). Get rid of them in regard to
strict_strtoul() kernel's function.Signed-off-by: Andy Shevchenko
Cc: Hansjoerg Lipp
Cc: Tilman Schmidt
Cc: Karsten Keil
Cc: gigaset307x-common@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller
08 Jul, 2010
10 commits
-
The CAPI variant of the Gigaset drivers can, in combination with
capidrv, now fully replace the legacy ISDN4Linux variant. All
reported problems have been fixed. So remove the EXPERIMENTAL tag
from the Kconfig option selecting it, and adapt the documentation
accordingly to encourage users to switch to it.Impact: documentation/status update, no functional change
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Take care to free all previously allocated ressources in the
"out of memory" error path of the ISDN_CMD_DIAL branch.
Based on an original patch by Dan Carpenter.Impact: bugfix
Reported-by: Dan Carpenter
Signed-off-by: Tilman Schmidt
Acked-by: Dan Carpenter
Signed-off-by: David S. Miller -
Downgrade some error messages which occur frequently during
normal operation to debug messages.Impact: logging
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Remove compile time options in the Gigaset ISDN driver that aren't
going to be changed anymore, and an obsolete FIXME comment.Impact: cleanup
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Add minimal handling for the non-optional CAPI FACILITY_REQ
Supplementary Service function Listen.Impact: bugfix
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Provide better control of debugging output for DATA_B3 CAPI messages
which tend to occur very frequently.Impact: logging
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
With CONFIG_GIGASET_DEBUG set, every isochronous USB frame after
an erroneous one was checked for more errors. This produced only
noise messages in practice, so drop it.Impact: cleanup
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Downgrade the Gigaset driver's reaction to unknown AT responses from
the device from warning to debug level, and remove the handling of
some device responses which aren't relevant for the driver's
operation.Impact: cleanup
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Change the Gigaset driver's internal write_cmd interface to accept a
cmdbuf structure instead of a string. This avoids copying formatted
AT commands a second time.Impact: optimization
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
The usb_gigaset driver's write buffer limit was different from those
of the others for no good reason. Set it to the same value, derived
from the Siemens documentation.Impact: cosmetic
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller
26 Jun, 2010
2 commits
-
CAPI applications can handle several connections in parallel,
so one connection state per application isn't sufficient.
Store the connection state in the channel structure instead.Impact: bugfix
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller -
Adapt to buggy device firmware which accepts setting HLC only in the
same command line as BC, by encoding HLC and BC in a single command
if both are specified, and rejecting HLC without BC.Impact: bugfix
Signed-off-by: Tilman Schmidt
Signed-off-by: David S. Miller