aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* genetlink: Optimize and one bug fix in genl_generate_id()Krishna Kumar2009-10-171-16/+8
| | | | | | | | | | | | | | | | | | | 1. GENL_MIN_ID is a valid id -> no need to start at GENL_MIN_ID + 1. 2. Avoid going through the ids two times: If we start at GENL_MIN_ID+1 (*or bigger*) and all ids are over!, the code iterates through the list twice (*or lesser*). 3. Simplify code - no need to start at idx=0 which gets reset to GENL_MIN_ID. Patch on net-next-2.6. Reboot test shows that first id passed to genl_register_family was 16, next two were GENL_ID_GENERATE and genl_generate_id returned 17 & 18 (user level testing of same code shows expected values across entire range of MIN/MAX). Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* genetlink: Optimize genl_register_family()Krishna Kumar2009-10-171-5/+3
| | | | | | | | | | genl_register_family() doesn't need to call genl_family_find_byid when GENL_ID_GENERATE is passed during register. Patch on net-next-2.6, compile and reboot testing only. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb3: No need to wake queue in xmit handlerKrishna Kumar2009-10-171-1/+1
| | | | | | | | | | | The xmit handler doesn't need to wake the queue after stopping it temporarily (some other drivers are doing the same). Patch on net-next-2.6, multiple netperf sessions tested. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Acked-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ctcm rollback in case of errorsEinar Lueck2009-10-171-17/+42
| | | | | | | | | Group device now cleanly reacts to failures during channel start and implements a clean rollback. Signed-off-by: Einar Lueck <elelueck@de.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* lcs: Recognize return codes of ccw_device_set_online().Klaus-Dieter Wacker2009-10-171-3/+9
| | | | | | | | | | | The creation of a new lcs device requires a call to the function ccw_device_set_online() for the read and the write channel. Failure of either call should terminate the lcs device creation immediately with return code -ENODEV. Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* lcs: ODEBUG: object is on stack, but not annotated.Klaus-Dieter Wacker2009-10-171-1/+1
| | | | | | | | | | Timer_list structure in lcs_send_lancmd() is allocated on stack. Initialization with init_timer() leads to above ODEBUG message. Instead use init_timer_on_stack() which prevents above msg. Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* af_iucv: remove duplicate sock_set_flagUrsula Braun2009-10-171-1/+0
| | | | | | | | | | Remove duplicate sock_set_flag(sk, SOCK_ZAPPED) in iucv_sock_close, which has been overlooked in September-commit 7514bab04e567c9408fe0facbde4277f09d5eb74. Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* af_iucv: use sk functions to modify sk->sk_ack_backlogHendrik Brueckner2009-10-171-2/+2
| | | | | | | | | Instead of modifying sk->sk_ack_backlog directly, use respective socket functions. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen; update version to 4.0.62Dhananjay Phadke2009-10-171-2/+2
| | | | | Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: sysfs control for auto firmware recoveryNarender Kumar2009-10-172-1/+52
| | | | | | | | | | | | | Firmware hang detection and recovery (reset) need to be disabled for diagnostic tools, which can run some disruptive tests. This adds a driver level control to turn off this feature by diag tools. Signed-off-by: Narender Kumar <narender.kumar@qlogic.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: fix error codes in for tools accessDhananjay Phadke2009-10-172-24/+31
| | | | | | | | Use -EIO or -EINVAL as error codes, these can get passed up to applications (tools). Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: onchip memory access changeAmit Kumar Salecha2009-10-173-9/+17
| | | | | | | | | | Add support for different windowing scheme for on chip memory in future chip revisions. This is required by diagnostic tools. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: reset sequence changesAmit Kumar Salecha2009-10-173-29/+16
| | | | | | | | | | | Future revisions need different chip reset sequence and firmware initialization. Also clean up some never used debug code. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: 128 memory controller supportAmit Kumar Salecha2009-10-172-10/+53
| | | | | | | | | | | Future revisions of the chip have 128 bit memory transactions. Require drivers to implement rmw in case of sub-128 bit accesses by driver. This is mostly used by diagnostic tools. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: defines for next revisionAmit Kumar Salecha2009-10-171-0/+2
| | | | | | Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: Add support for next generation of BladeEngine device.Ajit Khaparde2009-10-161-2/+13
| | | | | | | Add new PCI ids to support next generation of BladeEngine device. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: hold socket before giving it to sk_deliver_skb()Rémi Denis-Courmont2009-10-151-1/+3
| | | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Update to version 1.52.1-1Eilon Greenstein2009-10-151-2/+2
| | | | | Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Report the maximal available BW as link speedEilon Greenstein2009-10-151-1/+13
| | | | | | | | The device is limited to the maximal BW allocation, so it should be displayed as the link speed to notify the user. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Do not call load/unload functionality from DCCEilon Greenstein2009-10-151-14/+5
| | | | | | | | | There is really no need to clear the MAC or the FW filtering rules - it was added for completion, but caused race conditions with load/unload. Removing this redundant code Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Adding FW mailbox mutexEilon Greenstein2009-10-152-2/+8
| | | | | | | DCC commands are not protected with the RTNL lock, so a mutex should be added Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Changing the Disabled state to a flagEilon Greenstein2009-10-152-16/+20
| | | | | | | | | | When working with DCC, a function can be disabled or enabled (virtual link down or up). Using the function state introduced some race conditions with the load/unload flow. Using a separate flag to indicate that the function is disabled. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Remove old FW filesEilon Greenstein2009-10-152-23039/+0
| | | | | Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Allowing 0 as initial fairness valueEilon Greenstein2009-10-154-33/+33
| | | | | | | | | | | | | Value of zero was used to disable the fairness mechanism. Though the code (driver and FW) allowed changing the value at run time, it did not allow to do that if the mechanism was disabled to begin with. Fixed the FW to allow turning on and off the mechanism at run time. Fixed the code to read the value from the chip at the right sequence. Without this fix, if the initial value was set to zero, traffic could not run on the interface. Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Add FW 5.2.7Eilon Greenstein2009-10-152-0/+23025
| | | | | Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Add missing __NR_recvmmsg define.David S. Miller2009-10-141-1/+2
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sk_drops consolidationEric Dumazet2009-10-149-34/+20
| | | | | | | | | | | sock_queue_rcv_skb() can update sk_drops itself, removing need for callers to take care of it. This is more consistent since sock_queue_rcv_skb() also reads sk_drops when queueing a skb. This adds sk_drops managment to many protocols that not cared yet. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hamradio: Fix bit test correctly.Thomas Sailer2009-10-141-4/+3
| | | | | Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: forward incoming packetsRémi Denis-Courmont2009-10-141-0/+32
| | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: route outgoing packetsRémi Denis-Courmont2009-10-141-5/+12
| | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: routing table Netlink interfaceRémi Denis-Courmont2009-10-143-0/+162
| | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: routing table backendRémi Denis-Courmont2009-10-142-6/+99
| | | | | | | | The Phonet "universe" only has 64 addresses, so we keep a trivial flat routing table. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: deliver broadcast packets to broadcast socketsRémi Denis-Courmont2009-10-143-0/+28
| | | | | Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ia64: Fix up the syscall table for recvmmsgArnaldo Carvalho de Melo2009-10-141-1/+2
| | | | | | | Reported-by: "Tony Luck" <tony.luck@intel.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Remove BKL from tunThomas Gleixner2009-10-141-4/+1
| | | | | | | | | | | | | The lock_kernel/unlock_kernel() in cycle_kernel_lock() which is called in tun_chr_open() is not serializing against anything and safe to remove. tun_chr_fasync() is serialized by get/put_tun() and fasync_helper() has no dependency on BKL. The modification of tun->flags is racy with and without the BKL so removing it does not make it worse. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-10-1332-141/+5273
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * TI DaVinci EMAC: Clear statistics register properly.Sriram2009-10-131-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mechanism to clear the statistics register is dependent on the status of GMIIEN bit in MAC control register. If the GMIIEN bit is set, the stats registers are write to decrement. If the GMIIEN bit is cleared, the stats registers are plain read/write registers. The stats register clearing operation must take into account the current state of GMIIEN as it can be cleared when the interface is brought down. With existing implementation logic, querying for interface stats when the interface is down, can corrupt the statistics counters. This patch examines the GMIIEN bit status in MAC_CONTROL register before choosing an appropriate mask for clearing stats registers. Signed-off-by: Sriramakrishnan <srk@ti.com> Acked-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * r8169: partial support and phy init for the 8168dfrançois romieu2009-10-131-55/+932
| | | | | | | | | | | | | | | | | | Extracted from Realtek's 8.012.00 r8168 driver. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Tested-by: Simon Farnsworth <simon.farnsworth@onelan.com> Cc: Edward Hsu <edward_hsu@realtek.com.tw> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Merge branch 'master' of ↵David S. Miller2009-10-136-4/+11
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| | * libertas: fix buildAlan Cox2009-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/net/wireless/libertas/cmdresp.c: In function ‘lbs_process_event’: drivers/net/wireless/libertas/cmdresp.c:519: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function) drivers/net/wireless/libertas/cmdresp.c:519: error: (Each undeclared identifier is reported only once drivers/net/wireless/libertas/cmdresp.c:519: error: for each function it appears in.) Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * mac80211: document ieee80211_rx() context requirementJohannes Berg2009-10-122-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ieee80211_rx() must be called with softirqs disabled since the networking stack requires this for netif_rx() and some code in mac80211 can assume that it can not be processing its own tasklet and this call at the same time. It may be possible to remove this requirement after a careful audit of mac80211 and doing any needed locking improvements in it along with disabling softirqs around netif_rx(). An alternative might be to push all packet processing to process context in mac80211, instead of to the tasklet, and add other synchronisation. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * b43: fix ieee80211_rx() contextJohannes Berg2009-10-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the way it interacts with the networking stack and other parts of mac80211, ieee80211_rx() must be called with disabled softirqs. [1] http://thread.gmane.org/gmane.linux.kernel.wireless.general/39440/focus=40266 Reported-by: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * mac80211: fix ibss raceJohannes Berg2009-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a scan completes, we call ieee80211_sta_find_ibss(), which is also called from other places. When the scan was done in software, there's no problem as both run from the single-threaded mac80211 workqueue and are thus serialised against each other, but with hardware scan the completion can be in a different context and race against callers of this function from the workqueue (e.g. due to beacon RX). So instead of calling ieee80211_sta_find_ibss() directly, just arm the timer and have it fire, scheduling the work, which will invoke ieee80211_sta_find_ibss() (if that is appropriate in the current state). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * mac80211: fix logic error ibss merge bssid checkFelix Fietkau2009-10-121-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * iwlwifi: change the order of freeing memoryWey-Yi Guy2009-10-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to free the dynamic allocated memory before ieee80211_free_hw(); once call ieee80211_free_hw(), should not reference to "priv" data structure. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | irda/sa1100_ir: check return value of startup hookDmitry Artamonow2009-10-131-2/+5
| | | | | | | | | | | | | | | Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | udp: Fix udp_poll() and ioctl()Eric Dumazet2009-10-131-30/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udp_poll() can in some circumstances drop frames with incorrect checksums. Problem is we now have to lock the socket while dropping frames, or risk sk_forward corruption. This bug is present since commit 95766fff6b9a78d1 ([UDP]: Add memory accounting.) While we are at it, we can correct ioctl(SIOCINQ) to also drop bad frames. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | WAN: fix Cisco HDLC handshaking.Krzysztof Halasa2009-10-131-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cisco HDLC uses keepalive packets and sequence numbers to determine link state. In rare cases both ends could transmit keepalive packets at the same time, causing the received sequence numbers to be treated as incorrect. Now we accept our current sequence number as well as the previous one. Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: fix tcp_defer_accept to consider the timeoutWilly Tarreau2009-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was trying to use TCP_DEFER_ACCEPT and noticed that if the client does not talk, the connection is never accepted and remains in SYN_RECV state until the retransmits expire, where it finally is deleted. This is bad when some firewall such as netfilter sits between the client and the server because the firewall sees the connection in ESTABLISHED state while the server will finally silently drop it without sending an RST. This behaviour contradicts the man page which says it should wait only for some time : TCP_DEFER_ACCEPT (since Linux 2.4) Allows a listener to be awakened only when data arrives on the socket. Takes an integer value (seconds), this can bound the maximum number of attempts TCP will make to complete the connection. This option should not be used in code intended to be portable. Also, looking at ipv4/tcp.c, a retransmit counter is correctly computed : case TCP_DEFER_ACCEPT: icsk->icsk_accept_queue.rskq_defer_accept = 0; if (val > 0) { /* Translate value in seconds to number of * retransmits */ while (icsk->icsk_accept_queue.rskq_defer_accept < 32 && val > ((TCP_TIMEOUT_INIT / HZ) << icsk->icsk_accept_queue.rskq_defer_accept)) icsk->icsk_accept_queue.rskq_defer_accept++; icsk->icsk_accept_queue.rskq_defer_accept++; } break; ==> rskq_defer_accept is used as a counter of retransmits. But in tcp_minisocks.c, this counter is only checked. And in fact, I have found no location which updates it. So I think that what was intended was to decrease it in tcp_minisocks whenever it is checked, which the trivial patch below does. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | 3c574_cs: spin_lock the set_multicast_list functionKen Kawasaki2009-10-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | 3c574_cs: spin_lock the set_multicast_list function. Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>