aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-23[TULIP] DMFE: Fix SROM parsing regression.David S. Miller1-3/+3
Changeset 16b110c3fd760620b4a787db6ed512fe531ab1b5 (dmfe warning fix) bothed up the offsets read from the SROM so that it doesn't read the same datums it used to. The change made transformations like turning: "srom + 34" into "(__le32 *)srom + 34/4" which doesn't work because 4 does not divide evenly into 34 so we're using a different pointer offset than in the original code. I've changed theses cases in dmfe_parse_srom() to consistently use "(type *)(srom + offset)" preserving the offsets from the original code. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-22Fix file references in documentation and KconfigJohann Felix Soden2-4/+1
Fix typo in arch/powerpc/boot/flatdevtree_env.h. There is no Documentation/networking/ixgbe.txt. README.cycladesZ is now in Documentation/. wavelan.p.h is now in drivers/net/wireless/. HFS.txt is now Documentation/filesystems/hfs.txt. OSS-files are now in sound/oss/. Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds5-17/+12
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: [ICMP]: ICMP_MIB_OUTMSGS increment duplicated [IPV6]: RFC 2011 compatibility broken [IPV6]: ICMP6_MIB_OUTMSGS increment duplicated [NET]: rtnl_link: fix use-after-free [AF_KEY]: Fix skb leak on pfkey_send_migrate() error [ATM] atm/suni.c: Fix section mismatch. [ATM] atm/idt77105.c: Fix section mismatch. [IrDA]: af_irda memory leak fixes [NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms' [NETFILTER]: bridge-netfilter: fix net_device refcnt leaks [IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861. [IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone() [NET]: Fix interrupt semaphore corruption in Intel drivers. [IPV4] fib_trie: fix duplicated route issue [IPV4] fib_hash: fix duplicated route issue [IPV6]: Mischecked tw match in __inet6_check_established. rfkill: call rfkill_led_trigger_unregister() on error
2008-01-22tc35815: Use irq number for tc35815-mac platform device idAtsushi Nemoto1-1/+1
The tc35815-mac platform device used a pci bus number and a devfn to identify its target device, but the pci bus number may vary if some bus-bridges are found. Use irq number which is be unique for embedded controllers. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-20[NET]: rtnl_link: fix use-after-freePatrick McHardy1-13/+1
When unregistering the rtnl_link_ops, all existing devices using the ops are destroyed. With nested devices this may lead to a use-after-free despite the use of for_each_netdev_safe() in case the upper device is next in the device list and is destroyed by the NETDEV_UNREGISTER notifier. The easy fix is to restart scanning the device list after removing a device. Alternatively we could add new devices to the front of the list to avoid having dependant devices follow the device they depend on. A third option would be to only restart scanning if dev->iflink of the next device matches dev->ifindex of the current one. For now this seems like the safest solution. With this patch, the veth rtnl_link_ops unregistration can use rtnl_link_unregister() directly since it now also handles destruction of multiple devices at once. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-20[NET]: Fix interrupt semaphore corruption in Intel drivers.David S. Miller4-4/+11
Several of the Intel ethernet drivers keep an atomic counter used to manage when to actually hit the hardware with a disable or an enable. The way the net_rx_work() breakout logic works during a pending napi_disable() is that it simply unschedules the poll even if it still has work. This can potentially leave interrupts disabled, but that is OK because all of the drivers are about to disable interrupts anyways in all such code paths that do a napi_disable(). Unfortunately, this trips up the semaphore used here in the Intel drivers. If you hit this case, when you try to bring the interface back up it won't enable interrupts. A reload of the driver module fixes it of course. So what we do is make sure all the sequences now go: napi_disable(); atomic_set(&adapter->irq_sem, 0); *_irq_disable(); which makes sure the counter is always in the correct state. Reported by Robert Olsson. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-18Replace cpmac fixMatteo Croce1-1/+1
Please apply this patch since i reverted by mistake the commit 4e3ab47a547616e583c7a5458beced6aa34c8ef3 in 6cd043d99dcf5d252fcc682958541f449113f7b3 Signed-off-by: Matteo Croce <technoboy85@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18dl2k: the restAl Viro2-15/+4
remove an unused union-with-bitfield of the same sort, add missing conversions in debugging printk Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18dl2k: MSCR, MSSR, ESR, PHY_SCR fixesAl Viro2-58/+22
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18dl2k: BMSR fixesAl Viro2-38/+16
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18dl2k: ANAR, ANLPAR fixesAl Viro2-98/+42
same story, different registers... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18dl2k: BMCR_t fixesAl Viro2-61/+32
broken use of bitfields; FUBAR on big-endian (and not valid C, strictly speaking). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-183c574, 3c515 bitfields abuseAl Viro2-43/+48
wn3_config is shared by these cards; the way we deal with it is both bad C (union abuse) and broken on big-endian. For 3c515 it's less serious (ISA cards are quite rare outside of little-endian boxen), but 3c574 is a pcmcia one and that'd better be endian-independent... Fix is the same in both cases. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18sbni endian fixesAl Viro1-3/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18wan/lmc bitfields fixesAl Viro1-10/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18dscc4 endian fixesAl Viro1-45/+49
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18S2io: Fixed synchronization between scheduling of napi with card reset and closeSreenivasa Honnur1-5/+12
- Fixed synchronization between scheduling of napi with card reset and close by moving the enabling and disabling of napi to card up and card down functions respectively instead of open and close. Signed-off-by: Surjit Reang <surjit.reang@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18atl1: fix frame length bugJay Cliburn1-4/+4
The driver sets up the hardware to accept a frame with max length equal to MTU + Ethernet header + FCS + VLAN tag, but we neglect to add the VLAN tag size to the ingress buffer. When a VLAN-tagged frame arrives, the hardware passes it, but bad things happen because the buffer is too small. This patch fixes that. Thanks to David Harris for reporting the bug and testing the fix. Tested-by: David Harris <david.harris@cpni-inc.com> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18Revert "sky2: remove check for PCI wakeup setting from BIOS"Stephen Hemminger1-5/+19
This reverts commit 84cd2dfb04d23a961c5f537baa243fa54d0987ac. Some BIOS's break if Wake On Lan is enabled, and the machine can't boot. Better to have some user's have to call ethtool to enable WOL than to break a single user's boot. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixesJeff Garzik6-12/+24
2008-01-18e1000e Kconfig: remove ref to nonexistant docsJason Uhlenkott1-3/+0
There is no Documentation/networking/e1000e.txt. Signed-off-by: Jason Uhlenkott <jasonuhl@jasonuhl.org> Cc: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18Merge branch 'ipg-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream-fixesJeff Garzik1-24/+12
2008-01-18bonding: Don't hold lock when calling rtnl_unlockJay Vosburgh1-1/+3
Change bond_mii_monitor to not hold any locks when calling rtnl_unlock, as rtnl_unlock can sleep (when acquring another mutex in netdev_run_todo). Bug reported by Makito SHIOKAWA <mshiokawa@miraclelinux.com>, who included a different patch. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18bonding: fix lock ordering for rtnl and bonding_rwsemJay Vosburgh2-27/+35
Fix the handling of rtnl and the bonding_rwsem to always be acquired in a consistent order (rtnl, then bonding_rwsem). The existing code sometimes acquired them in this order, and sometimes in the opposite order, which opens a window for deadlock between ifenslave and sysfs. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18bonding: Fix up parameter parsingJay Vosburgh3-12/+23
A recent change to add an additional hash policy modified bond_parse_parm, but it now does not correctly match parameters passed in via sysfs. Rewrote bond_parse_parm to handle (a) parameter matches that are substrings of one another and (b) user input with whitespace (e.g., sysfs input often has a trailing newline). Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18bonding: release slaves when master removed via sysfsJay Vosburgh1-3/+1
Add a call to bond_release_all in the bonding netdev event handler for the master. This releases the slaves for the case of, e.g., "echo -bond0 > /sys/class/net/bonding_masters", which otherwise will spin forever waiting for references to be released. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18bonding: fix locking during alb failover and slave removalJay Vosburgh2-12/+20
alb_fasten_mac_swap (actually rlb_teach_disabled_mac_on_primary) requries RTNL and no other locks. This could cause dev_set_promiscuity and/or dev_set_mac_address to be called with improper locking. Changed callers to hold only RTNL during calls to alb_fasten_mac_swap or functions calling it. Updated header comments in affected functions to reflect proper reality of locking requirements. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18bonding: fix ASSERT_RTNL that produces spurious warningsJay Vosburgh1-3/+2
Move an ASSERT_RTNL down to where we should hold only RTNL; the existing check produces spurious warnings because we hold additional locks at _bh, tripping a debug warning in spin_lock_mutex(). Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-18bonding: fix locking in sysfs primary/active selectionJay Vosburgh1-5/+10
Fix the functions that store the primary and active slave options via sysfs to hold the correct locks in the correct order. The bond_change_active_slave and bond_select_active_slave functions both require rtnl, bond->lock for read and curr_slave_lock for write_bh, and no other locks. This is so that the lower level mode-specific functions (notably for balance-alb mode) can release locks down to just rtnl in order to call, e.g., dev_set_mac_address with the locks it expects (rtnl only). Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-17ipg: fix Tx completion irq requestFrancois Romieu1-4/+1
The current logic will only request an ack for the first pending packet. No irq is triggered as soon as the CPU submits a few packets a bit quickly. Let's request an irq for every packet instead. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-17ipg: fix queue stop condition in the xmit handlerFrancois Romieu1-1/+1
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-17ipg: plug Tx completion leakFrancois Romieu1-14/+5
The Tx skb release could not free more than one skb per call. Add it to the fact that the xmit handler does not check for a queue full condition and you have a recipe to leak quickly. Let's release every pending Tx descriptor which has been given back to the host CPU by the network controller. The xmit handler suggests that it is done through the IPG_TFC_TFDDONE bit. Remove the former "curr" computing: it does not produce anything usable in its current form. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-17ipg: balance locking in irq handlerFrancois Romieu1-5/+5
Spotted-by: <linux@horizon.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2008-01-17[NIU]: Fix 1G PHY link state handling.David S. Miller1-0/+3
The code in link_status_1g() computes the active speed and duplex but does not update the link config state with those values. As a result the link speed is not reported correctly and the XIF is not reprogrammed properly on link up events. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-17[NET]: Fix TX timeout regression in Intel drivers.David S. Miller3-7/+16
This fixes a regression added by changeset 53e52c729cc169db82a6105fac7a166e10c2ec36 ("[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.") As pointed out by Jesse Brandeburg, for three of the drivers edited above there is breakout logic in the *_clean_tx_irq() code to prevent running TX reclaim forever. If this occurs, we have to elide NAPI poll completion or else those TX events will never be serviced. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
2008-01-16rt2x00: Fix ieee80211 payload alignmentIvo van Doorn2-3/+10
As Johannes Berg indicated, the NET_IP_ALIGN doesn't need to be used for ieee80211 frames. This means we can simplify the alignment calculation to just use the result of the header size modulus 4 as frame alignment. Furthermore we shouldn't use NET_IP_ALIGN in rt2x00usb because it could be 0 on some architectures and we absolutely need to have 2 bytes reserved for possible aligning. Signed-off-by: Ivo van Doorn<IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-16b43: fix use-after-free rfkill bugStefano Brivio1-5/+6
Fix rfkill code which caused a use-after-free bug. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-16ipw2200: fix typo in kerneldocStefano Brivio1-1/+1
Fix a typo in kerneldoc for ipw2200. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-16wireless/libertas support for 88w8385 sdio older revisionMarc Pignat1-0/+4
Identifiaction of another revision of 88w8385 in sdio mode. Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-16hostap: section mismatch warningRandy Dunlap1-3/+3
Fix section mismatch by changing variable name to match one of the whitelisted (allowable) names for pointing into init data: WARNING: vmlinux.o(.data+0xce618): Section mismatch: reference to .init.data:prism2_plx_id_table (between 'prism2_plx_drv_id' and 'dev_info') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds3-20/+238
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: [TOKENRING]: rif_timer not initialized properly [NETFILTER]: bridge: fix double POST_ROUTING invocation [NETFILTER]: xt_helper: Do not bypass RCU [NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit [MACVLAN]: Prevent nesting macvlan devices [VLAN]: nested VLAN: fix lockdep's recursive locking warning [DECNET] ROUTE: fix rcu_dereference() uses in /proc/net/decnet_cache [BLUETOOTH]: Always send explicit hci_ll wake-up acks. [BLUETOOTH]: rfcomm tty BUG_ON() code fix [AX25] af_ax25: Possible circular locking. [AX25]: Kill user triggable printks. [IPV4] ROUTE: fix rcu_dereference() uses in /proc/net/rt_cache [NEIGH]: Fix race between neigh_parms_release and neightbl_fill_parms [NIU]: Support for Marvell PHY
2008-01-12sky2: remove check for PCI wakeup setting from BIOSStephen Hemminger1-19/+5
The driver checks status of PCI power management to mark default setting of Wake On Lan. On some systems this works, but often it reports a that WOL is disabled when it isn't. This patch gets rid of that check and just reports the wake on lan status based on the hardware capablity. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12sky2: large memory workaround.Stephen Hemminger2-18/+10
This patch might fix problems with 4G or more of memory. It stops the driver from doing a small optimization for Tx and Rx, and instead always sets the high-page on tx/rx descriptors. Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=9725 Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12fs_enet: check for phydev existence in the ethtool handlersAnton Vorontsov1-2/+9
Otherwise oops will happen if ethernet device has not been opened: Unable to handle kernel paging request for data at address 0x0000014c Faulting instruction address: 0xc016f7f0 Oops: Kernel access of bad area, sig: 11 [#1] MPC85xx NIP: c016f7f0 LR: c01722a0 CTR: 00000000 REGS: c79ddc70 TRAP: 0300 Not tainted (2.6.24-rc3-g820a386b) MSR: 00029000 <EE,ME> CR: 20004428 XER: 20000000 DEAR: 0000014c, ESR: 00000000 TASK = c789f5e0[999] 'snmpd' THREAD: c79dc000 GPR00: c01aceb8 c79ddd20 c789f5e0 00000000 c79ddd3c 00000000 c79ddd64 00000000 GPR08: 00000000 c7845b60 c79dde3c c01ace80 20004422 200249fc 000002a0 100da728 GPR16: 100c0000 00000000 00000000 00000000 20022078 00000009 200220e0 bfc85558 GPR24: c79ddd3c 00000000 00000000 c02e0e70 c022fc64 ffffffff c7845800 bfc85498 NIP [c016f7f0] phy_ethtool_gset+0x0/0x4c LR [c01722a0] fs_get_settings+0x18/0x28 Call Trace: [c79ddd20] [c79dde38] 0xc79dde38 (unreliable) [c79ddd30] [c01aceb8] dev_ethtool+0x294/0x11ec [c79dde30] [c01aaa44] dev_ioctl+0x454/0x6a8 [c79ddeb0] [c019b9d4] sock_ioctl+0x84/0x230 [c79dded0] [c007ded8] do_ioctl+0x34/0x8c [c79ddee0] [c007dfbc] vfs_ioctl+0x8c/0x41c [c79ddf10] [c007e38c] sys_ioctl+0x40/0x74 [c79ddf40] [c000d4c0] ret_from_syscall+0x0/0x3c Instruction dump: 81630000 800b0030 2f800000 419e0010 7c0803a6 4e800021 7c691b78 80010014 7d234b78 38210010 7c0803a6 4e800020 <8003014c> 7c6b1b78 38600000 90040004 Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixesJeff Garzik4-7/+44
2008-01-12[usb netdev] asix: fix regressionRuss Dill1-3/+3
51bf2976b55d07f9daae9697a0a3ac9f58abcedc caused a regression in the asix usbnet driver. usb_control_msg returns the number of bytes read on success, not 0. Tested with NETGEAR FA120. Signed-off-by: Russ Dill <Russ.Dill@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12r8169: fix missing loop variable incrementFrancois Romieu1-1/+1
Spotted-by: Citizen Lee <citizen_lee@thecus.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12ip1000: menu location changeStephen Hemminger1-10/+10
Move the ip1000 driver into the expected place for gigabit cards in the configuration menu structure. It should be under the gigabit cards, not at the top level. Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-12Fixed a small typo in the loopback driverEmil Medve1-1/+1
This is probably a result of the changes from commit 854d836 - [NET]: Dynamically allocate the loopback device, part 2 Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-123c509: PnP resource management fixKrzysztof Helt1-0/+4
In order to release PnP resources a card type must be set to EL3_PNP. Previously, it was never set hence the PnP resources were not released and device was left in incorrect state. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Jeff Garzik <jeff@garzik.org>