aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-09-01qlcnic: fix panic while using eth_hdrRajesh Borundia1-1/+3
o skb->mac_header is not set, so machine panics while using function eth_hdr. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-01qlcnic: fix mac anti spoof policyRajesh Borundia1-3/+10
o Allow enabling/disabling mac anti spoof policy only for Non privilege functions. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-01qlcnic: fix for setting default eswitch configRajesh Borundia1-31/+65
o Default eswitch config was set, even before eswitch capabilty get detected. As a result setting default config was getting fail. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-01qlcnic: fix mac addr readRajesh Borundia3-30/+13
o Mac addr was read from flash for every fw reset for Non-priviledge function.It should be read only once. o Remove unnecessary get_mac_addr callback Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-01qlcnic: add api version in reg dumpRajesh Borundia1-4/+11
o ethtool reg version bumped to 2 Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-01qlcnic: backout firmware initialization updateSony Chacko4-28/+100
o Backing out "firmware initialization update" changes, commit-id "d4066833bb1b35fefb1dd45eb2b10659d46bf151". o fix heartbit spelling, it should be heartbeat Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-31stmmac: Fix another build warning.David S. Miller1-2/+2
drivers/net/stmmac/dwmac100_core.c: In function 'dwmac100_dump_mac_regs': drivers/net/stmmac/dwmac100_core.c:47: warning: cast from pointer to integer of different size Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-30stmmac: Fix build warnings.David S. Miller3-3/+4
In file included from drivers/net/stmmac/stmmac_ethtool.c:30: drivers/net/stmmac/stmmac.h:111: warning: 'struct platform_device' declared inside parameter list drivers/net/stmmac/stmmac.h:111: warning: its scope is only this definition or declaration, which is probably not what you want drivers/net/stmmac/stmmac_main.c: In function 'stmmac_dvr_probe': drivers/net/stmmac/stmmac_main.c:1744: warning: cast from pointer to integer of different size In file included from drivers/net/stmmac/stmmac_mdio.c:31: drivers/net/stmmac/stmmac.h:111: warning: 'struct platform_device' declared inside parameter list drivers/net/stmmac/stmmac.h:111: warning: its scope is only this definition or declaration, which is probably not what you want drivers/net/stmmac/dwmac1000_core.c: In function 'dwmac1000_dump_regs': drivers/net/stmmac/dwmac1000_core.c:56: warning: cast from pointer to integer of different size Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-30net/m68k: Hydra Ethernet - print whole resource instead of start addressGeert Uytterhoeven1-3/+2
resource_size_t changed from `unsigned long' to `phys_addr_t`, which is either `u32' or `u64'. Print the whole resource to remove the cast and to make it future-proof. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-28drivers/net/atl1c: Remove double testJulia Lawall1-1/+1
The nic_type field is compared to athr_l2c twice. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @expression@ expression E; @@ ( * E || ... || E | * E && ... && E ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-28starfire: use BUILD_BUG_ON for netdrv_addr_tAkinobu Mita1-5/+1
Detect size mismatch for netdrv_addr_t at build time rather than checking at module load time. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Ion Badulescu <ionut@badula.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-28starfire: use PCI_VDEVICEAkinobu Mita1-1/+1
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Ion Badulescu <ionut@badula.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-28mlx4: use bitmap libraryAkinobu Mita1-11/+4
Replace loops calling set_bit() and clear_bit() with bitmap_set() and bitmap_clear(). Unlike loops calling set_bit() and clear_bit(), bitmap_set() and bitmap_clear() are not atomic. But this is ok. Because the bitmap operations are protected by bitmap->lock except for initialization of the bitmap in mlx4_bitmap_init(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Roland Dreier <rolandd@cisco.com> Cc: netdev@vger.kernel.org Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-27slip: Use net_device_stats from struct net_deviceTobias Klauser2-39/+31
Use net_device->stats for stats instead of private variable copies in struct slip. Use ndo_get_stat64 so the additions can be performed on a private destination buffer. Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-26bnx2x: fix wrong return from bnx2x_trylock_hw_lockEric Dumazet1-1/+1
bnx2x_trylock_hw_lock() returns a bool : true if succeeded to acquire the lock. false in case of error. -EINVAL is not an acceptable value, since its promoted to true. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-26stmmac: Make time functionality depend upon RTC_HCTOSYS_DEVICEDavid S. Miller1-0/+1
Based upon a report by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-26qlcnic: PCI ID additionSritej Velaga1-0/+2
Added PCI ID to board info. Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-26qlcnic: Fix driver load issue in FW hangAnirban Chakraborty4-60/+75
If there is a FW hang when the driver loads, it can not determine the FW operational mode. Fix it by checking the FW state first before issuing any FW commands to determine its capabilities and thereby detecting driver operational mode. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-26qlcnic: Fix missing error codesSony Chacko1-4/+8
In the original code, the error codes returned from some of the functions are not caught and sent up the caller chain. Fixed it here. Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25bna: Fixed build break for allyesconfigRasesh Mody8-431/+162
This is the patch to fix the build break caused by multiple definitions of symbols between Brocade's FC/FCOE driver(BFA) and 10G Networking Driver(BNA). Changes are: 1. locally used functions are made static 2. unused functions are removed 3. using unique namespaces for the function names that must be globally visible Signed-off-by: Debashis Dutt <ddutt@brocade.com> Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25r6040: Free irq line on error pathDenis Kirjanov1-13/+20
Free irq line on error path. Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25s2io: remove lro parameterAmerigo Wang2-21/+9
Remove "lro" parameter of s2io driver. Signed-off-by: WANG Cong <amwang@redhat.com> Cc: jon.mason@exar.com Acked-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25be2net: stats for packets received due to internal switching in ASIC.Ajit Khaparde1-0/+3
Counters for packets received due to internal switching are already available. This change will start displaying them in ethtool -S Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25be2net: fix to dynamically generate MAC Address for VFsAjit Khaparde2-0/+68
The BE ASIC/firmware doesnot reserve and assign MAC address for VFs. This results in the VF interfaces being created with MAC Address 0. The code change proposed takes the MAC address of PF to generate a seed. MAC Address for VFs are assigned incrementally starting from the seed. These addresses are programmed in the ASIC by the PF and the VF driver queries for the MAC address during its probe. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25qlge: Fix a deadlock when the interface is going downBreno Leitao1-11/+12
Currently qlge can deadlock when the interface is going down, and the mpi_port_cfg_work() is executing on another processor. It happens because unregister_netdev() holds the rtnl lock, and the mpi_port_cfg_work() also request this lock. Since unregiter_netdev() may wait mpi_port_cfg_work(), who also request the holding lock, it can cause an deadlock, displaying the following error: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. rmmod D 00000080c6c1d190 0 3993 2081 0x00008080 Call Trace: [c000000975f56ee0] [c0000000000152a0] .__switch_to+0x100/0x1d0 [c000000975f56f70] [c0000000005781b4] .schedule+0x3a4/0x8c0 [c000000975f570c0] [c000000000578e8c] .schedule_timeout+0x24c/0x350 [c000000975f571e0] [c000000000578a88] .wait_for_common+0x198/0x210 [c000000975f572c0] [c0000000000abbb4] .__cancel_work_timer+0x2c4/0x2e0 [c000000975f57400] [d0000000078e7a20] .ql_adapter_down+0x80/0x260 [qlge] [c000000975f574b0] [d0000000078e7d80] .qlge_close+0x70/0x130 [qlge] [c000000975f57540] [c000000000497ef8] .__dev_close+0x98/0xf0 [c000000975f575d0] [c000000000497f74] .dev_close+0x24/0x60 [c000000975f57650] [c000000000498080] .rollback_registered_many+0xd0/0x2b0 [c000000975f576f0] [c000000000498338] .rollback_registered+0x38/0x50 [c000000975f57780] [c0000000004983d8] .unregister_netdevice_queue+0x88/0xe0 [c000000975f57810] [c000000000498574] .unregister_netdev+0x24/0x40 [c000000975f57890] [d0000000078f6f38] .qlge_remove+0x3c/0x78 [qlge] [c000000975f57920] [c0000000002d9298] .pci_device_remove+0x48/0x90 [c000000975f579a0] [c000000000372850] .__device_release_driver+0xa0/0x130 [c000000975f57a30] [c000000000372a08] .driver_detach+0x128/0x150 [c000000975f57ad0] [c000000000371134] .bus_remove_driver+0xc4/0x1a0 [c000000975f57b70] [c00000000037357c] .driver_unregister+0x8c/0xd0 [c000000975f57c00] [c0000000002d968c] .pci_unregister_driver+0x5c/0x110 [c000000975f57ca0] [d0000000078f6ee4] .qlge_exit+0x1c/0x34 [qlge] Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25drivers/net/irda: Eliminate memory leakJulia Lawall1-1/+2
dev_alloc_skb allocates some memory, so that memory should be freed before leaving the function in an error case. Corrected some typos in a nearby comment as well. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression x; expression E; identifier f1; iterator I; @@ x = dev_alloc_skb(...); <... when != x when != true (x == NULL || ...) when != if (...) { <+...x...+> } when != I (...) { <+...x...+> } ( x == NULL | x == E | x->f1 ) ...> * return ...; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25typhoon: fix a race in typhoon_do_get_statsEric Dumazet1-24/+22
Its important to store 'final' values in counters, not using them as temporary variables, or this might break some SNMP applications. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25plip: remove superflous returnDan Carpenter1-1/+0
This return isn't reachable and it obscures the goto on the line before. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25stmmac: make ioaddr 'void __iomem *' rather than unsigned longGiuseppe CAVALLARO13-163/+152
This avoids unnecessary casting and adds the ioaddr in the private structure. This patch also removes many warning when compile the driver. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25stmmac: remove dead option in the driver's KconfigGiuseppe CAVALLARO1-2/+2
This patch removes the CPU_SUBTYPE_ST40 dependency in the driver's Kconfig. In fact, this option has been removed in the commit: f96691872439ab2071171d4531c4a95b5d493ae5 as reported by Christian Dietrich. Note that the driver remains tested on STM platforms, only. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25stmmac: fix_mac_speed is called during 10/100<->1000 speed changesPawel Moll1-0/+3
This patch modifies the stmmac_adjust_link() function so the fix_mac_speed() is called not only when link speed is changing between 10 and 100 Mbps (as required in RMII mode) but also for 1000 Mbps. Signed-off-by: Pawel Moll <pawel.moll@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25bnx2x: small fix in stats handlingEric Dumazet1-3/+4
Use a private variable to fold rx_dropped value, instead of shared destination buffer, as it might break SNMP applications. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Eilon Greenstein <eilong@broadcom.com> CC: Dmitry Kravkov <dmitry@broadcom.com> Acked-By: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25drivers/net: Remove address use from assignments of function pointersJoe Perches49-118/+118
"foo = &function" is more commonly written "foo = function" Done with coccinelle script: // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> drivers/net/tehuti.c used a function and struct with the same name, the function was renamed. Compile tested x86 only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25qlcnic: change reg nameAmit Kumar Salecha3-8/+8
Change QLCNIC_CRB_DEV_REF_COUNT to QLCNIC_CRB_DRV_ACTIVE to match document. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25qlcnic: fix fw recovery for PFAmit Kumar Salecha1-5/+17
Privilege function should wait for npar state to be operational before creating context. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25qlcnic: support port vlan idAmit Kumar Salecha3-21/+111
On NIC Partition capable adapter, Administrator can configure to tag packet with particular vlan id. Packet will be tagged and strip with that vlan id. Also if 'Tagging' flag is disable, other packet will be drop. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25qlcnic: eswitch config fixesRajesh Borundia2-12/+15
o remove validation before deleting vlan id o Add missing 'break' while deleting vlan id. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville117-1917/+2873
Conflicts: drivers/net/wireless/libertas/if_sdio.c
2010-08-24mlx4_en: Fix build warning in mlx4_en_create_rx_ring.David S. Miller1-2/+0
drivers/net/mlx4/en_rx.c: In function ‘mlx4_en_create_rx_ring’: drivers/net/mlx4/en_rx.c:305: warning: label ‘err_map’ defined but not used Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: updated driver versionYevgeny Petrilin1-2/+2
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: Moving to work with GROYevgeny Petrilin5-113/+17
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: UDP RSS supportYevgeny Petrilin6-11/+24
Adding capability for RSS for UDP traffic, hashing is done based on IP addresses and UDP port number. The support depends on HW/FW capabilities. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: reconfiguring mac address.Yevgeny Petrilin2-0/+7
When Mac address is removed from one port of the CX2 device, the other device should reconfigure its Mac. This fixes an issue with failover, when both ports have the same Mac address, and one of the ports, is closed, the second one stops receiving traffic. (bugzilla #1965 at bugs.openfabrics.org) Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: get/set ringsize uses actual ring sizeYevgeny Petrilin1-5/+6
In case that the rings were not fully filled, the report in Ethtool should be according to the actual size that was filled. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: Fixing report in Ethtool get_settingsYevgeny Petrilin4-2/+42
The report now based on query from FW, giving the correct tranciever type and link speed. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: Added self diagnostics test implementationYevgeny Petrilin13-27/+385
The selftest includes 5 features: 1. Interrupt test: Executing commands and receiving command completion on all our interrupt vectors. 2. Link test: Verifying we are connected to valid link partner. 3. Speed test: Check that we negotiated link speed correctly. 4. Registers test: Activate HW health check command. 5. Loopback test: Send a packet on loopback interface and catch it on RX side. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: Validate port up prior to transmittingYevgeny Petrilin1-0/+3
We might try to use resources which were not activated. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: Reporting link state with KERN_INFOYevgeny Petrilin2-2/+4
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: Fixed MAX_TX_RINGS definitionYevgeny Petrilin1-1/+1
Defined as sum of default number of TX rings and number of rings used for priority flow control mode. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-24mlx4_en: performing CLOSE_PORT at the end of tear-down processYevgeny Petrilin1-2/+4
All port's resources should be closed before we give the CLOSE_PORT command to the firmware. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>