- 26 Oct, 2012 1 commit
-
-
Tilman Schmidt authored
The delayed work function int_in_work() may call usb_reset_device() and thus, indirectly, the driver's pre_reset method. Trying to cancel the work synchronously in that situation would deadlock. Fix by avoiding cancel_work_sync() in the pre_reset method. If the reset was NOT initiated by int_in_work() this might cause int_in_work() to run after the post_reset method, with urb_int_in already resubmitted, so handle that case gracefully. Signed-off-by:
Tilman Schmidt <tilman@imap.cc> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 10 Oct, 2012 1 commit
-
-
Dan Carpenter authored
"protos" is an array of unsigned longs and "i" is the number of bits in an unsigned long so we need to use 1UL as well to prevent the shift from wrapping around. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 03 Oct, 2012 1 commit
-
-
Max Filippov authored
Signed-off-by:
Max Filippov <jcmvbkbc@gmail.com> Signed-off-by:
Chris Zankel <chris@zankel.net>
-
- 13 Sep, 2012 2 commits
-
-
Peter Senna Tschudin authored
Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e <= r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != &e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok && unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // </smpl> Signed-off-by:
Peter Senna Tschudin <peter.senna@gmail.com> Acked-by:
Tilman Schmidt <tilman@imap.cc> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Karsten Keil authored
It is a bad idea to hold a spinlock and call flush_work_sync. Move the workqueue cleanup outside the spinlock and use cancel_work_sync, on closing the channel this seems to be the more correct function. Remove the never used and constant return value of mISDN_freebchannel. Signed-off-by:
Karsten Keil <keil@b1-systems.de> Cc: <stable@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 03 Sep, 2012 1 commit
-
-
Wei Yongjun authored
hc has been allocated in this function and missing free it before leaving from some error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 20 Aug, 2012 1 commit
-
-
Tejun Heo authored
flush[_delayed]_work_sync() are now spurious. Mark them deprecated and convert all users to flush[_delayed]_work(). If you're cc'd and wondering what's going on: Now all workqueues are non-reentrant and the regular flushes guarantee that the work item is not pending or running on any CPU on return, so there's no reason to use the sync flushes at all and they're going away. This patch doesn't make any functional difference. Signed-off-by:
Tejun Heo <tj@kernel.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Mattia Dongili <malattia@linux.it> Cc: Kent Yoder <key@linux.vnet.ibm.com> Cc: David Airlie <airlied@linux.ie> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Bryan Wu <bryan.wu@canonical.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Alasdair Kergon <agk@redhat.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-wireless@vger.kernel.org Cc: Anton Vorontsov <cbou@mail.ru> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Eric Van Hensbergen <ericvh@gmail.com> Cc: Takashi Iwai <tiwai@suse.de> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Petr Vandrovec <petr@vandrovec.name> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Avi Kivity <avi@redhat.com>
-
- 13 Aug, 2012 3 commits
-
-
Jiri Slaby authored
This has two outcomes: * we give the TTY layer a tty_port * we do not find the info structure every time open is called on that tty The "tty->port = port" assignment is not needed anymore since it happens in tty_port_install implicitly. Signed-off-by:
Jiri Slaby <jslaby@suse.cz> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: netdev@vger.kernel.org Acked-by:
Alan Cox <alan@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jiri Slaby authored
This looks like it was a mistake not to create device nodes for these drivers. Let us create them from now on. It will be necessary to call tty_register_device some way, either by tty_register_driver implicitly or to call tty_register_device proper. Signed-off-by:
Jiri Slaby <jslaby@suse.cz> Cc: netdev@vger.kernel.org Cc: linux390@de.ibm.com Cc: linux-s390@vger.kernel.org Cc: linux-cris-kernel@axis.com Acked-by:
Alan Cox <alan@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jiri Slaby authored
Currently we have no way to assign tty->port while performing tty installation. There are two ways to provide the link tty_struct => tty_port. Either by calling tty_port_install from tty->ops->install or tty_port_register_device called instead of tty_register_device when the device is being set up after connected. In this patch we modify most of the drivers to do the latter. When the drivers use tty_register_device and we have tty_port already, we switch to tty_port_register_device. So we have the tty_struct => tty_port link for free for those. Signed-off-by:
Jiri Slaby <jslaby@suse.cz> Acked-by:
Alan Cox <alan@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 06 Aug, 2012 1 commit
-
-
Karsten Keil authored
If a fixed TEI is used, the initial state of the layer 2 statmachine need to be 4 (TEI assigned). This was true only for Point to Point connections, but not for the other fixed TEIs. It was not found before, because usually only the TEI 0 is used as fixed TEI for PtP mode, but if you try X31 packet mode connections with SAPI 16, TEI 1, it did fail. Signed-off-by:
Karsten Keil <keil@b1-systems.de> Cc: <stable@vger.kernel.org> # 3.5.x Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 03 Aug, 2012 1 commit
-
-
Wu Fengguang authored
Fix a buffer overflow bug by removing the revision and printk. [ 22.016214] isdnloop-ISDN-driver Rev 1.11.6.7 [ 22.097508] isdnloop: (loop0) virtual card added [ 22.174400] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff83244972 [ 22.174400] [ 22.436157] Pid: 1, comm: swapper Not tainted 3.5.0-bisect-00018-gfa8bbb13-dirty #129 [ 22.624071] Call Trace: [ 22.720558] [<ffffffff832448c3>] ? CallcNew+0x56/0x56 [ 22.815248] [<ffffffff8222b623>] panic+0x110/0x329 [ 22.914330] [<ffffffff83244972>] ? isdnloop_init+0xaf/0xb1 [ 23.014800] [<ffffffff832448c3>] ? CallcNew+0x56/0x56 [ 23.090763] [<ffffffff8108e24b>] __stack_chk_fail+0x2b/0x30 [ 23.185748] [<ffffffff83244972>] isdnloop_init+0xaf/0xb1 Signed-off-by:
Fengguang Wu <fengguang.wu@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 30 Jul, 2012 1 commit
-
-
Karsten Keil authored
The test for the fillempty condition was wrong in one place. Changed the variable to the right boolean type. Signed-off-by:
Karsten Keil <keil@b1-systems.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 18 Jul, 2012 2 commits
-
-
Karsten Keil authored
usb_alloc_urb() return value needs to be checked to avoid later NULL pointer access. Reported by rucsoftsec@gmail.com via bugzilla.kernel.org #44601. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Karsten Keil authored
pnp_activate_dev() return value needs to be checked to make sure that following calls calls to the PNP functions do work correctly. Fix for report #44491 on bugzilla.kernel.org. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 17 Jul, 2012 1 commit
-
-
Paul Bolle authored
Building Gigaset's CAPI support without Gigaset's debugging enabled triggers this GCC warning: 'format_ie' defined but not used [-Wunused-function] Silence this warning by wrapping format_ie() in an "#ifdef CONFIG_GIGASET_DEBUG" and "#endif" pair. Signed-off-by:
Paul Bolle <pebolle@tiscali.nl> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 16 Jul, 2012 1 commit
-
-
Alan Cox authored
This will let us sort out a whole pile of tty related races. The alternative would be to keep points and refcount the termios objects. However 1. They are tiny anyway 2. Many devices don't use the stored copies 3. We can remove a pty special case Signed-off-by:
Alan Cox <alan@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 Jul, 2012 1 commit
-
-
Julia Lawall authored
If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. The dereferences are just deleted from the debugging statement. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 22 May, 2012 1 commit
-
-
Karsten Keil authored
According to http://www.ip-phone-forum.de/showthread.php?t=225313 this HW works. Thanks to Lars Immisch for pointing to this thread. Signed-off-by:
Karsten Keil <keil@b1-systems.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 18 May, 2012 1 commit
-
-
Sarah Sharp authored
Hub-initiated LPM is not good for USB communications devices. Comms devices should be able to tell when their link can go into a lower power state, because they know when an incoming transmission is finished. Ideally, these devices would slam their links into a lower power state, using the device-initiated LPM, after finishing the last packet of their data transfer. If we enable the idle timeouts for the parent hubs to enable hub-initiated LPM, we will get a lot of useless LPM packets on the bus as the devices reject LPM transitions when they're in the middle of receiving data. Worse, some devices might blindly accept the hub-initiated LPM and power down their radios while they're in the middle of receiving a transmission. The Intel Windows folks are disabling hub-initiated LPM for all USB communications devices under a xHCI USB 3.0 host. In order to keep the Linux behavior as close as possible to Windows, we need to do the same in Linux. Set the disable_hub_initiated_lpm flag for for all USB communications drivers. I know there aren't currently any USB 3.0 devices that implement these class specifications, but we should be ready if they do. Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: Johan Hedberg <johan.hedberg@gmail.com> Cc: Hansjoerg Lipp <hjlipp@web.de> Cc: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Jan Dumon <j.dumon@option.com> Cc: Petko Manolov <petkan@users.sourceforge.net> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Kalle Valo <kvalo@qca.qualcomm.com> Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> Cc: Jouni Malinen <jouni@qca.qualcomm.com> Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: Brett Rudley <brudley@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Cc: Arend van Spriel <arend@broadcom.com> Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com> Cc: Kan Yan <kanyan@broadcom.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: Herton Ronaldo Krzesinski <herton@canonical.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: Daniel Drake <dsd@gentoo.org> Cc: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by:
Sarah Sharp <sarah.a.sharp@linux.intel.com>
-
- 17 May, 2012 1 commit
-
-
Dan Carpenter authored
We test both "!skb_out" and "skb_out" here which is duplicative and causes a static checker warning. I considered that the intent might have been to test "skb_in" but that's a valid pointer here. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 16 May, 2012 8 commits
-
-
Karsten Keil authored
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>
-
Karsten Keil authored
MISDN_CTRL_FILL_EMPTY is a meachanism to send a fixed value (normally silence) as long no data from upper layers is available. It can be used when recording voice messages or with unidirectional protocols. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Karsten Keil authored
If the FIFO of the card is small, many short messages are queued up to the upper layers and the userspace. This change allows the applications to set a minimum datalen they want from the drivers. Create a common control function to avoid code duplication in each driver. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Karsten Keil authored
We did allways allocate maxsize buffers, but for transparent data we know the actual size. Use a common function to calculate size and detect overflows. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Martin Bachem authored
Here was a off by one in the activation/deactivation. The additional activation in open_bchannel() did hide it, but only if you do not try to use B2. Signed-off-by:
Martin Bachem <info@colognechip.com> Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Karsten Keil authored
If we detect the latest hardware revision we should use the bigger fifo to avoid TX underruns and have less interrupts. TX underruns should be logged as warning. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Karsten Keil authored
It is better to send a confirm for transparent data early as possible to avoid TX underuns. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Karsten Keil authored
If a channel was closed after it was deactivated it could happen that something was not proper resetted. The test if a channel is still activ was wrong, so remove it and always do the cleanup. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 15 May, 2012 1 commit
-
-
Masanari Iida authored
Correcting spelling "extenal" to "external" in hfcmulti.c Signed-off-by:
Masanari Iida <standby24x7@gmail.com>
-
- 07 May, 2012 8 commits
-
-
Tilman Schmidt authored
If Kernel CAPI is compiled without CONFIG_ISDN_CAPI_MIDDLEWARE, the structure retrieved via capincci_find() is never actually used, so don't compile that function in that case. Signed-off-by:
Tilman Schmidt <tilman@imap.cc> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Tilman Schmidt authored
Fix up some of the readibility deterioration caused by the recent whitespace coding style cleanup. Signed-off-by:
Tilman Schmidt <tilman@imap.cc> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Tilman Schmidt authored
Various functions in the Gigaset driver were using different conventions for the meaning of their int return values. Align them to the usual negative error numbers convention. Inspired-by:
Julia Lawall <julia.lawall@lip6.fr> Signed-off-by:
Tilman Schmidt <tilman@imap.cc> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Tilman Schmidt authored
Functions clear_at_state and free_strings did the same thing; drop one of them, keeping the more descriptive name. Drop a redundant call. Rename function dealloc_at_states to dealloc_temp_at_states to clarify its purpose. Signed-off-by:
Tilman Schmidt <tilman@imap.cc> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Tilman Schmidt authored
Fix up some of the readibility deterioration caused by the recent whitespace coding style cleanup. Signed-off-by:
Tilman Schmidt <tilman@imap.cc> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Tilman Schmidt authored
An out-of-place "OK" response to the "AT+GMR" (get firmware version) command turns out to be, more often than not, a delayed response to a previous command rather than an actual error, so continue waiting for the version number in that case. Signed-off-by:
Tilman Schmidt <tilman@imap.cc> CC: stable <stable@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Tilman Schmidt authored
If DISCONNECT_B3_IND was synthesized because of a DISCONNECT_REQ with existing logical connections, the connection state wasn't updated accordingly. Also the emitted DISCONNECT_B3_IND message wasn't included in the debug log as requested. This patch fixes both of these issues. Signed-off-by:
Tilman Schmidt <tilman@imap.cc> CC: stable <stable@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Tilman Schmidt authored
Introduce a global ratelimit for CAPI message dumps to protect against possible log flood. Drop the ratelimit for ignored messages which is now covered by the global one. Signed-off-by:
Tilman Schmidt <tilman@imap.cc> CC: stable <stable@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 04 May, 2012 2 commits
-
-
Karsten Keil authored
With multiple cards is hard to figure out which port caused trouble int the layer2 routines (e.g. got a timeout). Now we have the informations in the log output. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Karsten Keil authored
The timer3 and the activation delay timer need to be independent. If timer3 fires do not reqest power up we have to send only INFO 0. Now layer1 pass TBR3 again. Signed-off-by:
Karsten Keil <kkeil@linux-pingi.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-