aboutsummaryrefslogtreecommitdiffstats
path: root/mm (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-01-04firmware: convert tg3 driver to request_firmware()Jaswinder Singh Rajput7-698/+992
Firmware blob looks like this... u8 firmware_major u8 firmware_minor u8 firmware_fix u8 pad __be32 start_address __be32 length (total, including BSS sections to be zeroed) data... (in __be32 words, which is native for the firmware) Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04firmware: convert acenic driver to request_firmware()Jaswinder Singh6-46/+9510
We store the firmware in its native big-endian form now, so the loop in ace_copy() is modified to use be32_to_cpup() when writing it out. We can forget the BSS,SBSS sections of the firmware, since we were clearing all the device's RAM anyway. And the text,rodata,data sections can all be loaded as a single chunk since they're contiguous (give or take a few dozen bytes in between). Signed-off-by: Jaswinder Singh <jaswinder@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Jes Sorensen <jes@sgi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04ipv6: Fix sporadic sendmsg -EINVAL when sending to multicast groups.David S. Miller2-7/+49
Thanks to excellent diagnosis by Eduard Guzovsky. The core problem is that on a network with lots of active multicast traffic, the neighbour cache can fill up. If we try to allocate a new route and thus neighbour cache entry, the bog-standard GC attempt the neighbour layer does in ineffective because route entries hold a reference to the existing neighbour entries and GC can only liberate entries with no references. IPV4 already has a way to handle this, by doing a route cache GC in such situations (when neigh attach returns -ENOBUFS). So simply mimick this on the ipv6 side. Tested-by: Eduard Guzovsky <eguzovsky@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29net: Fix percpu counters deadlockHerbert Xu6-8/+21
When we converted the protocol atomic counters such as the orphan count and the total socket count deadlocks were introduced due to the mismatch in BH status of the spots that used the percpu counter operations. Based on the diagnosis and patch by Peter Zijlstra, this patch fixes these issues by disabling BH where we may be in process context. Reported-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits: netRusty Russell4-8/+8
In future all cpumask ops will only be valid (in general) for bit numbers < nr_cpu_ids. So use that instead of NR_CPUS in iterators and other comparisons. This is always safe: no cpu number can be >= nr_cpu_ids, and nr_cpu_ids is initialized to NR_CPUS at boot. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29drivers/net/usb: use USB API functions rather than constantsJulia Lawall2-3/+2
This set of patches introduces calls to the following set of functions: usb_endpoint_dir_in(epd) usb_endpoint_dir_out(epd) usb_endpoint_is_bulk_in(epd) usb_endpoint_is_bulk_out(epd) usb_endpoint_is_int_in(epd) usb_endpoint_is_int_out(epd) usb_endpoint_num(epd) usb_endpoint_type(epd) usb_endpoint_xfer_bulk(epd) usb_endpoint_xfer_control(epd) usb_endpoint_xfer_int(epd) usb_endpoint_xfer_isoc(epd) In some cases, introducing one of these functions is not possible, and it just replaces an explicit integer value by one of the following constants: USB_ENDPOINT_XFER_BULK USB_ENDPOINT_XFER_CONTROL USB_ENDPOINT_XFER_INT USB_ENDPOINT_XFER_ISOC In drivers/net/wireless/zd1211rw/zd_usb.c the code: (endpoint->bEndpointAddress & USB_TYPE_MASK) == USB_DIR_OUT is suspicious. If it is intended to use USB_ENDPOINT_DIR_MASK rather than USB_TYPE_MASK, then the whole conditional test could be converted to a call to usb_endpoint_is_bulk_in. An extract of the semantic patch that makes these changes is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r1@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) == - \(USB_ENDPOINT_XFER_CONTROL\|0\)) + usb_endpoint_xfer_control(epd) @r5@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == - \(USB_DIR_IN\|0x80\)) + usb_endpoint_dir_in(epd) @inc@ @@ #include <linux/usb.h> @depends on !inc && (r1||r5)@ @@ + #include <linux/usb.h> #include <linux/usb/...> // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29cls_cgroup: clean up KconfigLi Zefan1-3/+0
cls_cgroup can't be compiled as a module, since it's not supported by cgroup. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29cls_cgroup: clean up for cgroup partLi Zefan1-9/+14
- It's better to use container_of() instead of casting cgroup_subsys_state * to cgroup_cls_state *. - Add helper function task_cls_state(). - Rename net_cls_state() to cgrp_cls_state(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29cls_cgroup: fix an oops when removing a cgroupLi Zefan1-1/+1
When removing a cgroup, an oops was triggered immediately. The cause is wrong kfree() in cgrp_destroy(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29EtherExpress16: fix printing timed out statusRoel Kluin1-28/+28
in drivers/net/eexpress.c:558, function unstick_cu() while (!SCB_complete(rsst=scb_status(dev))) { ... if (...) printk(KERN_WARNING "%s: Reset timed out status %04x, retrying...\n", dev->name,rsst); } but this will become while (!((rsst = scb_status(dev) & 0x8000) != 0) ... because of the macro: #define SCB_complete(s) ((s&0x8000)!=0) so rsst can only become either 0x8000 or 0, but in the latter case the loop ends, I think the wrong timed out status is printed. This also cleans up similar macros. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29mlx4_en: Added "set_ringparam" Ethtool interface implementationYevgeny Petrilin3-33/+61
Now using Ethtool to determine ring sizes, removed the module parameters that controlled those values. Modifying ring size requires restart of the interface. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29mlx4_en: Always allocate RX ring for each interrupt vectorYevgeny Petrilin2-13/+4
Removed module parameter specifying number of RX rings Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGSYevgeny Petrilin1-1/+2
Required in cases were dev->caps.num_comp_vectors > MAX_RX_RINGS. For current values this would happen on machines that have more then 16 cores. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29IPVS: Make "no destination available" message more consistent between schedulersSimon Horman9-10/+24
Acked-by: Graeme Fowler <graeme@graemef.net> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29net: KS8695: removed duplicated #includeHuang Weiyi1-1/+0
Removed duplicated include in drivers/net/arm/ks8695net.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29tun: Fix SIOCSIFHWADDR error.Kusanagi Kouichi1-1/+1
Set proper operations. Signed-off-by: Kusanagi Kouichi <slash@ma.neweb.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29smsc911x: compile fix re netif_rx signature changesAlexey Dobriyan1-2/+2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29netns: foreach_netdev_safe is insufficient in default_device_exitEric W. Biederman1-3/+5
During network namespace teardown we either move or delete all of the network devices associated with a network namespace. In the case of veth devices deleting one will also delete it's pair device. If both devices are in the same network namespace then for_each_netdev_safe is insufficient as next may point to the second veth device we have deleted. To avoid problems I do what we do in __rtnl_kill_links and restart the scan of the device list, after we have deleted a device. Currently dev_change_netnamespace does not appear to suffer from this problem, but wireless devices are also paired and likely should be moved between network namespaces together. So I have errored on the side of caution and restart the scan of the network devices in that case as well. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29net: make xfrm_statistics_seq_show use generic snmp_fold_fieldRusty Russell1-15/+2
No reason to roll our own here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-29net: Fix more NAPI interface netdev argument drop fallout.Kamalesh Babulal3-3/+3
I hit similar build failure due to the change in the netif_rx_reschedule() drivers/net/ehea/ehea_main.c: In function 'ehea_poll': drivers/net/ehea/ehea_main.c:844: warning: passing argument 1 of 'netif_rx_reschedule' from incompatible pointer type drivers/net/ehea/ehea_main.c:844: error: too many arguments to function 'netif_rx_reschedule' make[3]: *** [drivers/net/ehea/ehea_main.o] Error 1 greping through the sources for the changes missed out, we have ./drivers/net/arm/ixp4xx_eth.c:507: netif_rx_reschedule(dev, napi)) { ./drivers/net/arm/ep93xx_eth.c:310: if (more && netif_rx_reschedule(dev, napi)) ./drivers/net/wan/ixp4xx_hss.c:657: netif_rx_reschedule(dev, napi)) { Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-28net: Fix unused variable warnings in pasemi_mac.c and spider_net.cDavid S. Miller2-3/+0
As reported by Stephen Rothwell: -------------------- Today's linux-next build (powerpc ppc64_defconfig) produced these new warnings: drivers/net/pasemi_mac.c: In function 'pasemi_mac_rx_intr': drivers/net/pasemi_mac.c:957: warning: unused variable 'dev' drivers/net/pasemi_mac.c: In function 'pasemi_mac_poll': drivers/net/pasemi_mac.c:1637: warning: unused variable 'dev' drivers/net/spider_net.c: In function 'spider_net_poll': drivers/net/spider_net.c:1280: warning: unused variable 'netdev' Probably caused by commit 908a7a16b852ffd618a9127be8d62432182d81b4 ("net: Remove unused netdev arg from some NAPI interfaces"). -------------------- Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-28net: ehea NAPI interface cleanup fixStephen Rothwell2-2/+2
Commit 908a7a16b852ffd618a9127be8d62432182d81b4 ("net: Remove unused netdev arg from some NAPI interfaces") missed two spots. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-28cifs: update for new IP4/6 address printingStephen Rothwell1-4/+4
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-29powerpc/44x: Support 16K/64K base page sizes on 44xIlya Yanok10-48/+130
This adds support for 16k and 64k page sizes on PowerPC 44x processors. The PGDIR table is much smaller than a page when using 16k or 64k pages (512 and 32 bytes respectively) so we allocate the PGDIR with kzalloc() instead of __get_free_pages(). One PTE table covers rather a large memory area when using 16k or 64k pages (32MB or 512MB respectively), so we can easily put FIXMAP and PKMAP in the area covered by one PTE table. Signed-off-by: Yuri Tikhonov <yur@emcraft.com> Signed-off-by: Vladimir Panfilov <pvr@emcraft.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com> Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-29powerpc: Force memory size to be a multiple of PAGE_SIZEHollis Blanchard1-1/+15
Ensure that total memory size is page-aligned, because otherwise mark_bootmem() gets upset. This error case was triggered by using 64 KiB pages in the kernel while arch/powerpc/boot/4xx.c arbitrarily reduced the amount of memory by 4096 (to work around a chip bug that affects the last 256 bytes of physical memory). Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-28m68k: use the new byteorder headersHarvey Harrison1-11/+5
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-28fbcon: Protect free_irq() by MACH_IS_ATARI checkGeert Uytterhoeven1-1/+2
Add missing check for Atari in free_irq() call, which could cause problems on multi-platform m68k kernels. Reported-by: Brad Boyer <flar@allandria.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-28fbcon: remove broken mac vbl handlerFinn Thain1-72/+3
Remove the Mac VBL interrupt code as it doesn't work properly and doesn't bring any benefit when fixed. Also remove unused DEFAULT_CURSOR_BLINK_RATE macro and irqres variable. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-28m68k: fix trigraph ignored warning in setox.SFinn Thain1-2/+2
Fix the warning: trigraph ??/ ignored, use -trigraphs to enable caused by the recent removal of -traditional option. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-28macfb annotations and compiler warning fixFinn Thain1-16/+16
Add some __iomem annotations. Remove some volatile qualifiers to fix several compiler warnings: "passing arg 1 of `iounmap' discards qualifiers from pointer target type". Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-28m68k: mac baboon interrupt enable/disableFinn Thain2-15/+35
No-one seems to know how to mask individual baboon interrupts, so we just mask the umbrella IRQ. This will work as long as only the IDE driver uses the baboon chip (it can't deadlock). Use mac_enable_irq/mac_disable_irq rather than enable_irq/disable_irq because the latter routines count the depth of nested calls which triggers a warning and call trace because IRQ_NUBUS_C is enabled twice in a row (once when the baboon handler is registered, and once when the IDE IRQ is registered). Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-28m68k: machw.h cleanupFinn Thain12-33/+0
Remove some more cruft from machw.h and drop the #include where it isn't needed. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-28m68k: Mac via cleanup and commentryFinn Thain1-47/+32
No behavioural changes, just cleanups and better documentation. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-28m68k: Reinstate mac rtcFinn Thain2-9/+10
Reinstate the Mac hardware clock for CUDA ADB and Mac II ADB models. It doesn't work properly on Mac IIsi ADB and PMU ADB yet, so leave them out. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-12-27net: Allow dependancies of FDDI & Tokenring to be modular.Dave Jones2-2/+2
I noticed it isn't possible to build token ring & fddi drivers without causing LLC, and a bunch of other things to be forced built-in. For distro kernels, this means carrying a chunk of code in the vmlinuz, even if the user doesn't use those protocols. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26igb: Fix build warning when DCA is disabled.David S. Miller1-2/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26net: Fix warning fallout from recent NAPI interface changes.David S. Miller11-14/+0
When we removed the network device argument from several NAPI interfaces in 908a7a16b852ffd618a9127be8d62432182d81b4 ("net: Remove unused netdev arg from some NAPI interfaces.") several drivers now started getting unused variable warnings. This fixes those up. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26gro: Fix potential use after freeHerbert Xu1-1/+4
The initial skb may have been freed after napi_gro_complete in napi_gro_receive if it was merged into an existing packet. Thus we cannot check same_flow (which indicates whether it was merged) after calling napi_gro_complete. This patch fixes this by saving the same_flow status before the call to napi_gro_complete. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: If AN is enabled, always read speed/duplex from the AN advertising bitsBen Hutchings1-7/+10
When AN is enabled and the link is down the speed/duplex control bits will not be meaningful. Use the advertising bits instead, and mask them with the LPA bits if and only if AN is complete (as before). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: When disabling the NIC, close the device rather than unregistering itBen Hutchings1-24/+23
This should reduce user confusion and may also aid recovery (ioctls will still be available). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: SFT9001: Add cable diagnosticsBen Hutchings1-8/+107
The SFT9001 firmware implements cable diagnostics; run those and include their results in a self-test. In case of a cable fault, do not fail the self-test as a whole; only faults in the NIC should cause that. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: Add support for multiple PHY self-testsBen Hutchings5-15/+44
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: Merge top-level functions for self-testsBen Hutchings3-55/+48
Pass in ethtool test flags to determine which tests to run. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: Clean up PHY mode management in loopback self-testBen Hutchings1-12/+7
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: Fix unreliable link detection in some loopback modesBen Hutchings3-13/+24
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26sfc: Generate unique names for per-NIC workqueuesBen Hutchings2-1/+6
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26802.3ad: use standard ethhdr instead of ad_headerHolger Eitzenberger2-18/+8
802.3ad has its own ethhdr-like structure in the form of an ad_header, which is at the start of both the LACPDU and marker PDU. Both are the same from the struct values, both are packed as well. It's therefore perfectly fine to replace the ad_header by the ethhdr and to remove its definition. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26802.3ad: generalize out mac address initializerHolger Eitzenberger2-11/+14
Generalize out mac address initializer for the LACPDU multicast address and use in two places. Remove the now unused AD_MULTICAST_LACPDU_ADDR. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26802.3ad: initialize ports LACPDU from const initializerHolger Eitzenberger1-49/+12
Save some text by initializing ports LACPDU from const initializer, then get rid of ad_initialize_lacpdu(). Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-26802.3ad: remove typedef around ad_systemHolger Eitzenberger1-3/+3
As typedefs are considered a bad thing most of the time remove the typedef around ad_system. Signed-off-by: Holger Eitzenberger <heitzenberger@astaro.com> Signed-off-by: David S. Miller <davem@davemloft.net>