summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* freezer: use lock_task_sighand() in fake_signal_wake_up()Tejun Heo2011-11-211-3/+4
| | | | | | | | | | | | | cgroup_freezer calls freeze_task() without holding tasklist_lock and, if the task is exiting, its ->sighand may be gone by the time fake_signal_wake_up() is called. Use lock_task_sighand() instead of accessing ->sighand directly. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Paul Menage <paul@paulmenage.org>
* freezer: restructure __refrigerator()Tejun Heo2011-11-211-21/+11
| | | | | | | | | | | | | | | | | | | If another freeze happens before all tasks leave FROZEN state after being thawed, the freezer can see the existing FROZEN and consider the tasks to be frozen but they can clear FROZEN without checking the new freezing(). Oleg suggested restructuring __refrigerator() such that there's single condition check section inside freezer_lock and sigpending is cleared afterwards, which fixes the problem and simplifies the code. Restructure accordingly. -v2: Frozen loop exited without releasing freezer_lock. Fixed. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
* freezer: fix set_freezable[_with_signal]() raceTejun Heo2011-11-212-4/+30
| | | | | | | | | | | | | | | | | | A kthread doing set_freezable*() may race with on-going PM freeze and the freezer might think all tasks are frozen while the new freezable kthread is merrily proceeding to execute code paths which aren't supposed to be executing during PM freeze. Reimplement set_freezable[_with_signal]() using __set_freezable() such that freezable PF flags are modified under freezer_lock and try_to_freeze() is called afterwards. This eliminates race condition against freezing. Note: Separated out from larger patch to resolve fix order dependency Oleg pointed out. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com>
* freezer: remove should_send_signal() and update frozen()Tejun Heo2011-11-212-8/+3
| | | | | | | | | should_send_signal() is only used in freezer.c. Exporting them only increases chance of abuse. Open code the two users and remove it. Update frozen() to return bool. Signed-off-by: Tejun Heo <tj@kernel.org>
* freezer: remove now unused TIF_FREEZETejun Heo2011-11-2123-45/+0
| | | | | | Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-arch@vger.kernel.org
* freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZETejun Heo2011-11-215-49/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using TIF_FREEZE for freezing worked when there was only single freezing condition (the PM one); however, now there is also the cgroup_freezer and single bit flag is getting clumsy. thaw_processes() is already testing whether cgroup freezing in in effect to avoid thawing tasks which were frozen by both PM and cgroup freezers. This is racy (nothing prevents race against cgroup freezing) and fragile. A much simpler way is to test actual freeze conditions from freezing() - ie. directly test whether PM or cgroup freezing is in effect. This patch adds variables to indicate whether and what type of freezing conditions are in effect and reimplements freezing() such that it directly tests whether any of the two freezing conditions is active and the task should freeze. On fast path, freezing() is still very cheap - it only tests system_freezing_cnt. This makes the clumsy dancing aroung TIF_FREEZE unnecessary and freeze/thaw operations more usual - updating state variables for the new state and nudging target tasks so that they notice the new state and comply. As long as the nudging happens after state update, it's race-free. * This allows use of freezing() in freeze_task(). Replace the open coded tests with freezing(). * p != current test is added to warning printing conditions in try_to_freeze_tasks() failure path. This is necessary as freezing() is now true for the task which initiated freezing too. -v2: Oleg pointed out that re-freezing FROZEN cgroup could increment system_freezing_cnt. Fixed. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Paul Menage <paul@paulmenage.org> (for the cgroup portions)
* cgroup_freezer: prepare for removal of TIF_FREEZETejun Heo2011-11-213-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TIF_FREEZE will be removed soon and freezing() will directly test whether any freezing condition is in effect. Make the following changes in preparation. * Rename cgroup_freezing_or_frozen() to cgroup_freezing() and make it return bool. * Make cgroup_freezing() access task_freezer() under rcu read lock instead of task_lock(). This makes the state dereferencing racy against task moving to another cgroup; however, it was already racy without this change as ->state dereference wasn't synchronized. This will be later dealt with using attach hooks. * freezer->state is now set before trying to push tasks into the target state. -v2: Oleg pointed out that freeze_change_state() was setting freeze->state incorrectly to CGROUP_FROZEN instead of CGROUP_FREEZING. Fixed. -v3: Matt pointed out that setting CGROUP_FROZEN used to always invoke try_to_freeze_cgroup() regardless of the current state. Patch updated such that the actual freeze/thaw operations are always performed on invocation. This shouldn't make any difference unless something is broken. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Paul Menage <paul@paulmenage.org> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Oleg Nesterov <oleg@redhat.com>
* freezer: clean up freeze_processes() failure pathTejun Heo2011-11-216-46/+23
| | | | | | | | | | | | | | | | | | | | | | freeze_processes() failure path is rather messy. Freezing is canceled for workqueues and tasks which aren't frozen yet but frozen tasks are left alone and should be thawed by the caller and of course some callers (xen and kexec) didn't do it. This patch updates __thaw_task() to handle cancelation correctly and makes freeze_processes() and freeze_kernel_threads() call thaw_processes() on failure instead so that the system is fully thawed on failure. Unnecessary [suspend_]thaw_processes() calls are removed from kernel/power/hibernate.c, suspend.c and user.c. While at it, restructure error checking if clause in suspend_prepare() to be less weird. -v2: Srivatsa spotted missing removal of suspend_thaw_processes() in suspend_prepare() and error in commit message. Updated. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
* freezer: kill PF_FREEZINGTejun Heo2011-11-212-8/+1
| | | | | | | | With the previous changes, there's no meaningful difference between PF_FREEZING and PF_FROZEN. Remove PF_FREEZING and use PF_FROZEN instead in task_contributes_to_load(). Signed-off-by: Tejun Heo <tj@kernel.org>
* freezer: test freezable conditions while holding freezer_lockTejun Heo2011-11-212-16/+3
| | | | | | | | | | | | | | | | | | | try_to_freeze_tasks() and thaw_processes() use freezable() and frozen() as preliminary tests before initiating operations on a task. These are done without any synchronization and hinder with synchronization cleanup without any real performance benefits. In try_to_freeze_tasks(), open code self test and move PF_NOFREEZE and frozen() tests inside freezer_lock in freeze_task(). thaw_processes() can simply drop freezable() test as frozen() test in __thaw_task() is enough. Note: This used to be a part of larger patch to fix set_freezable() race. Separated out to satisfy ordering among dependent fixes. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com>
* freezer: make freezing indicate freeze condition in effectTejun Heo2011-11-213-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently freezing (TIF_FREEZE) and frozen (PF_FROZEN) states are interlocked - freezing is set to request freeze and when the task actually freezes, it clears freezing and sets frozen. This interlocking makes things more complex than necessary - freezing doesn't mean there's freezing condition in effect and frozen doesn't match the task actually entering and leaving frozen state (it's cleared by the thawing task). This patch makes freezing indicate that freeze condition is in effect. A task enters and stays frozen if freezing. This makes PF_FROZEN manipulation done only by the task itself and prevents wakeup from __thaw_task() leaking outside of refrigerator. The only place which needs to tell freezing && !frozen is try_to_freeze_task() to whine about tasks which don't enter frozen. It's updated to test the condition explicitly. With the change, frozen() state my linger after __thaw_task() until the task wakes up and exits fridge. This can trigger BUG_ON() in update_if_frozen(). Work it around by testing freezing() && frozen() instead of frozen(). -v2: Oleg pointed out missing re-check of freezing() when trying to clear FROZEN and possible spurious BUG_ON() trigger in update_if_frozen(). Both fixed. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Paul Menage <paul@paulmenage.org>
* freezer: use dedicated lock instead of task_lock() + memory barrierTejun Heo2011-11-212-49/+37
| | | | | | | | | | | | | | | | | | Freezer synchronization is needlessly complicated - it's by no means a hot path and the priority is staying unintrusive and safe. This patch makes it simply use a dedicated lock instead of piggy-backing on task_lock() and playing with memory barriers. On the failure path of try_to_freeze_tasks(), locking is moved from it to cancel_freezing(). This makes the frozen() test racy but the race here is a non-issue as the warning is printed for tasks which failed to enter frozen for 20 seconds and race on PF_FROZEN at the last moment doesn't change anything. This simplifies freezer implementation and eases further changes including some race fixes. Signed-off-by: Tejun Heo <tj@kernel.org>
* freezer: don't distinguish nosig tasks on thawTejun Heo2011-11-211-13/+7
| | | | | | | | | | There's no point in thawing nosig tasks before others. There's no ordering requirement between the two groups on thaw, which the staged thawing can't guarantee anyway. Simplify thaw_processes() by removing the distinction and collapsing thaw_tasks() into thaw_processes(). This will help further updates to freezer. Signed-off-by: Tejun Heo <tj@kernel.org>
* freezer: remove racy clear_freeze_flag() and set PF_NOFREEZE on dead tasksTejun Heo2011-11-212-4/+2
| | | | | | | | | | | | | clear_freeze_flag() in exit_mm() is racy. Freezing can start afterwards. Remove it. Skipping freezer for exiting task will be properly implemented later. Also, freezable() was testing exit_state directly to make system freezer ignore dead tasks. Let the exiting task set PF_NOFREEZE after entering TASK_DEAD instead. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com>
* freezer: rename thaw_process() to __thaw_task() and simplify the implementationTejun Heo2011-11-215-27/+18
| | | | | | | | | | | | | | | | | | thaw_process() now has only internal users - system and cgroup freezers. Remove the unnecessary return value, rename, unexport and collapse __thaw_process() into it. This will help further updates to the freezer code. -v3: oom_kill grew a use of thaw_process() while this patch was pending. Convert it to use __thaw_task() for now. In the longer term, this should be handled by allowing tasks to die if killed even if it's frozen. -v2: minor style update as suggested by Matt. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Paul Menage <menage@google.com> Cc: Matt Helsley <matthltc@us.ibm.com>
* freezer: implement and use kthread_freezable_should_stop()Tejun Heo2011-11-217-23/+42
| | | | | | | | | | | | | | | | | | | | | | | Writeback and thinkpad_acpi have been using thaw_process() to prevent deadlock between the freezer and kthread_stop(); unfortunately, this is inherently racy - nothing prevents freezing from happening between thaw_process() and kthread_stop(). This patch implements kthread_freezable_should_stop() which enters refrigerator if necessary but is guaranteed to return if kthread_stop() is invoked. Both thaw_process() users are converted to use the new function. Note that this deadlock condition exists for many of freezable kthreads. They need to be converted to use the new should_stop or freezable workqueue. Tested with synthetic test case. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Jens Axboe <axboe@kernel.dk> Cc: Oleg Nesterov <oleg@redhat.com>
* freezer: unexport refrigerator() and update try_to_freeze() slightlyTejun Heo2011-11-2115-39/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason to export two functions for entering the refrigerator. Calling refrigerator() instead of try_to_freeze() doesn't save anything noticeable or removes any race condition. * Rename refrigerator() to __refrigerator() and make it return bool indicating whether it scheduled out for freezing. * Update try_to_freeze() to return bool and relay the return value of __refrigerator() if freezing(). * Convert all refrigerator() users to try_to_freeze(). * Update documentation accordingly. * While at it, add might_sleep() to try_to_freeze(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: Chris Mason <chris.mason@oracle.com> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jan Kara <jack@suse.cz> Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp> Cc: Christoph Hellwig <hch@infradead.org>
* freezer: don't unnecessarily set PF_NOFREEZE explicitlyTejun Heo2011-11-214-7/+1
| | | | | | | | | | | | | | | | | | | Some drivers set PF_NOFREEZE in their kthread functions which is completely unnecessary and racy - some part of freezer code doesn't consider cases where PF_NOFREEZE is set asynchronous to freezer operations. In general, there's no reason to allow setting PF_NOFREEZE explicitly. Remove them and change the documentation to note that setting PF_NOFREEZE directly isn't allowed. -v2: Dropped change to twl4030-irq.c as it no longer uses PF_NOFREEZE. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: "Gustavo F. Padovan" <padovan@profusion.mobi> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: wwang <wei_wang@realsil.com.cn>
* freezer: fix current->state restoration race in refrigerator()Tejun Heo2011-11-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | refrigerator() saves current->state before entering frozen state and restores it before returning using __set_current_state(); however, this is racy, for example, please consider the following sequence. set_current_state(TASK_INTERRUPTIBLE); try_to_freeze(); if (kthread_should_stop()) break; schedule(); If kthread_stop() races with ->state restoration, the restoration can restore ->state to TASK_INTERRUPTIBLE after kthread_stop() sets it to TASK_RUNNING but kthread_should_stop() may still see zero ->should_stop because there's no memory barrier between restoring TASK_INTERRUPTIBLE and kthread_should_stop() test. This isn't restricted to kthread_should_stop(). current->state is often used in memory barrier based synchronization and silently restoring it w/o mb breaks them. Use set_current_state() instead. Signed-off-by: Tejun Heo <tj@kernel.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds2011-11-2077-312/+604
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits) ipv4: fix redirect handling ping: dont increment ICMP_MIB_INERRORS sky2: fix hang in napi_disable sky2: enforce minimum ring size bonding: Don't allow mode change via sysfs with slaves present f_phonet: fix page offset of first received fragment stmmac: fix pm functions avoiding sleep on spinlock stmmac: remove spin_lock in stmmac_ioctl. stmmac: parameters auto-tuning through HW cap reg stmmac: fix advertising 1000Base capabilties for non GMII iface stmmac: use mdelay on timeout of sw reset sky2: version 1.30 sky2: used fixed RSS key sky2: reduce default Tx ring size sky2: rename up/down functions sky2: pci posting issues sky2: fix hang on shutdown (and other irq issues) r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list MAINTAINERS: change email address for shemminger pch_gbe: Move #include of module.h ...
| * ipv4: fix redirect handlingEric Dumazet2011-11-181-51/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f39925dbde77 (ipv4: Cache learned redirect information in inetpeer.) introduced a regression in ICMP redirect handling. It assumed ipv4_dst_check() would be called because all possible routes were attached to the inetpeer we modify in ip_rt_redirect(), but thats not true. commit 7cc9150ebe (route: fix ICMP redirect validation) tried to fix this but solution was not complete. (It fixed only one route) So we must lookup existing routes (including different TOS values) and call check_peer_redir() on them. Reported-by: Ivan Zahariev <famzah@icdsoft.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ping: dont increment ICMP_MIB_INERRORSEric Dumazet2011-11-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ping module incorrectly increments ICMP_MIB_INERRORS if feeded with a frame not belonging to its own sockets. RFC 2011 states that ICMP_MIB_INERRORS should count "the number of ICMP messages which the entiry received but determined as having ICMP-specific errors (bad ICMP checksums, bad length, etc.)." Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Vasiliy Kulikov <segoon@openwall.com> Acked-by: Flavio Leitner <fbl@redhat.com> Acked-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sky2: fix hang in napi_disablestephen hemminger2011-11-172-7/+11
| | | | | | | | | | | | | | | | If IRQ was never initialized, then calling napi_disable() would hang. Add more bookkeeping to track whether IRQ was ever initialized. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sky2: enforce minimum ring sizestephen hemminger2011-11-171-2/+12
| | | | | | | | | | | | | | | | | | | | | | The hardware has a restriction that the minimum ring size possible is 128. The number of elements used is controlled by tx_pending and the overall number of elements in the ring tx_ring_size, therefore it is okay to limit the number of elements in use to a small value (63) but still provide a bigger ring. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bonding: Don't allow mode change via sysfs with slaves presentVeaceslav Falico2011-11-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | When changing mode via bonding's sysfs, the slaves are not initialized correctly. Forbid to change modes with slaves present to ensure that every slave is initialized correctly via bond_enslave(). Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Acked-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Merge branch 'for-davem' of ↵David S. Miller2011-11-174-2/+23
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| | * Merge branch 'master' of ↵John W. Linville2011-11-174-2/+23
| | |\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
| | | * Net, libertas: Resolve memory leak in if_spi_host_to_card()Jesper Juhl2011-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we hit the default case in the switch in if_spi_host_to_card() we'll leak the memory we allocated for 'packet'. This patch resolves the leak by freeing the allocated memory in that case. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Dan Williams <dcbw@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | | * rt2x00: Fix sleep-while-atomic bug in powersaving code.Gertjan van Wingerde2011-11-152-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic powersaving code that determines after reception of a frame whether the device should go back to sleep or whether is could stay awake was calling rt2x00lib_config directly from RX tasklet context. On a number of the devices this call can actually sleep, due to having to confirm that the sleeping commands have been executed successfully. Fix this by moving the call to rt2x00lib_config to a workqueue call. This fixes bug https://bugzilla.redhat.com/show_bug.cgi?id=731672 Tested-by: Tomas Trnka <tomastrnka@gmx.com> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Cc: <stable@vger.kernel.org> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | | * rt2x00: Add USB device ID of Buffalo WLI-UC-GNHP.Gertjan van Wingerde2011-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is reported to be an RT3070 based device. Reported-by: Teika Kazura <teika@lavabit.com> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | | f_phonet: fix page offset of first received fragmentRémi Denis-Courmont2011-11-171-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | We pull one byte (the MAC header) from the first fragment before the fragment is actually appended. So the socket buffer length is 1, not 0. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | stmmac: fix pm functions avoiding sleep on spinlockFrancesco Virlinzi2011-11-171-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the pm functions to avoid the system sleeps while a spinlock is taken. Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | stmmac: remove spin_lock in stmmac_ioctl.Srinivas Kandagatla2011-11-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes un-needed spin_lock in stmmac_ioctl while reading and writing mdio registers. While holding spin_lock the code must be atomic, which is not true in this case as both mdiobus_read and writes have mutex locks. Without this patch reading mdio registers via mii-tool results in below BUG: mii-tool -vvv eth0" Using SIOCGMIIPHY=0x8947 BUG: sleeping function called from invalid context at kernel/mutex.c:287 in_atomic(): 1, irqs_disabled(): 0, pid: 614, name: mii-tool 2 locks held by mii-tool/614: #0: (rtnl_mutex){......}, at: [<c01fd80c>] dev_ioctl+0x550/0x674 #1: (&priv->lock){......}, at: [<c01b34ec>] stmmac_ioctl+0x4c/0x78 [<c002ea14>] (unwind_backtrace+0x0/0xcc) from [<c0272c38>] (mutex_lock_nested+0x24/0x35c) [<c0272c38>] (mutex_lock_nested+0x24/0x35c) from [<c01b237c>] (mdiobus_read+0x44/0x70) [<c01b237c>] (mdiobus_read+0x44/0x70) from [<c01b0c64>] (phy_mii_ioctl+0x4c/0x138) [<c01b0c64>] (phy_mii_ioctl+0x4c/0x138) from [<c01b34fc>] (stmmac_ioctl+0x5c/0x78) [<c01b34fc>] (stmmac_ioctl+0x5c/0x78) from [<c01fcec8>] (dev_ifsioc+0x2a4/0x2c8) [<c01fcec8>] (dev_ifsioc+0x2a4/0x2c8) from [<c01fd81c>] (dev_ioctl+0x560/0x674) [<c01fd81c>] (dev_ioctl+0x560/0x674) from [<c00c36e0>] (vfs_ioctl+0x2c/0x8c) [<c00c36e0>] (vfs_ioctl+0x2c/0x8c) from [<c00c4130>] (do_vfs_ioctl+0x530/0x578) [<c00c4130>] (do_vfs_ioctl+0x530/0x578) from [<c00c41ac>] (sys_ioctl+0x34/0x54) [<c00c41ac>] (sys_ioctl+0x34/0x54) from [<c0028aa0>] (ret_fast_syscall+0x0/0x2c) Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | stmmac: parameters auto-tuning through HW cap regGiuseppe CAVALLARO2011-11-173-29/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New GMAC devices (newer than the databook 3.50a) have the HW capability register that provides which features are actually supported by the hardware. On old devices many information have to be passed through the platform, for example: enhanced descriptor structure, TX COE etc. These are mandatory to properly configure the driver. This remains still valid because the driver has to support old Synopsys devices but now it's also able to override them using the values from the HW capability register if supported. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | stmmac: fix advertising 1000Base capabilties for non GMII ifaceSrinivas Kandagatla2011-11-171-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the way to stop the 1000Base advertising capabilties for non GMII interfaces. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | stmmac: use mdelay on timeout of sw resetFrancesco Virlinzi2011-11-172-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses an mdelay to manage the timeout on sw reset to be independant of cpu_clk. Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Reviewed-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sky2: version 1.30stephen hemminger2011-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Update version number. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sky2: used fixed RSS keystephen hemminger2011-11-161-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than generating a different RSS key on each boot, just use a predetermined value that will map same flow to same value on every device. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sky2: reduce default Tx ring sizestephen hemminger2011-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default Tx ring size for the sky2 driver is quite large and could cause excess buffer bloat for many users. The minimum ring size possible and still allow handling the worst case packet on 64bit platforms is 38 which gets rounded up to a power of 2. But most packets only require a couple of ring elements. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sky2: rename up/down functionsstephen hemminger2011-11-161-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | The code is clearer if the up/down functions are renamed to open/close like other drivers. Purely syntax change. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sky2: pci posting issuesstephen hemminger2011-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | A couple of the reset and setup paths have possible PCI posting issues. When setting registers, a read is necessary to force the writes to complete. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sky2: fix hang on shutdown (and other irq issues)stephen hemminger2011-11-161-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several problems with recent change to how IRQ's are setup. * synchronize_irq in sky2_shutdown would hang because there was no IRQ setup. * when device was set to down, some IRQ bits left enabled so a hardware error would produce IRQ with no handler * quick link on Optima chip set was enabled without handler * suspend/resume would leave IRQ on with no handler if device was down Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | r6040: fix check against MCRO_HASHEN bit in r6040_multicast_listFlorian Fainelli2011-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We are checking whether the MCR0_HASHEN bit is set using a logical and instead of bitwise and, fix that. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | MAINTAINERS: change email address for shemmingerStephen Hemminger2011-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | My old email account at linux-foundation is no longer usable after the LF breakin. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | pch_gbe: Move #include of module.hJoe Perches2011-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The first #include must be pch_gbe.h as it does a #define of pr_fmt. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: cache-in compressed fw imageDmitry Kravkov2011-11-162-30/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-request fw from fs may fail for different reasons, once the fw was loaded we won't release it until driver is removed. This also resolves the boot problem when initial fw is located on initrd, but rootfs is still unavailable, in this case device reset will fail due to absence of fw files. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | net/cadence: enable by default NET_ATMELJean-Christophe PLAGNIOL-VILLARD2011-11-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | so the defconfig of the atmel continue to have the support of the network as before Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bridge: correct IPv6 checksum after pullstephen hemminger2011-11-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bridge multicast snooping of ICMPv6 would incorrectly report a checksum problem when used with Ethernet devices like sky2 that use CHECKSUM_COMPLETE. When bytes are removed from skb, the computed checksum needs to be adjusted. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Tested-by: Martin Volf <martin.volf.42@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qeth: Reduce CPU consumption through less SIGA-r callsEinar Lueck2011-11-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch avoids SIGA-r calls in case of SIGA-r required. It only calls SIGA-r if a threshold of free buffer is reached. CPU consumption is reduced as a consequence. Signed-off-by: Einar Lueck <elelueck@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qeth: l3 fix rcu splat in xmitFrank Blaschka2011-11-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | when use dst_get_neighbour to get neighbour, we need rcu_read_lock to protect, since dst_get_neighbour uses rcu_dereference. Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud