aboutsummaryrefslogtreecommitdiffstats
path: root/arch (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo541-190/+400
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30iwlwifi: don't include iwl-dev.h from iwl-devtrace.hTejun Heo3-1/+3
iwl-devtrace.h is used to declare and define trace points and including iwl-dev.h from the file, which in turn includes other generic headers, can lead to problems like generating duplicate copies of generic trace points depending on the order of includes. Don't include iwl-dev.h from iwl-devtrace.h but include it from its users - iwl-io.h and iwl-devtrace.c. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Cc: Zhu Yi <yi.zhu@intel.com> Cc: Intel Linux Wireless <ilw@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com>
2010-03-30x86: don't include slab.h from arch/x86/include/asm/pgtable_32.hTejun Heo1-1/+0
Including slab.h from x86 pgtable_32.h creates a troublesome dependency chain w/ ftrace enabled. The following chain leads to inclusion of pgtable_32.h from define_trace.h. trace/define_trace.h trace/ftrace.h linux/ftrace_event.h linux/ring_buffer.h linux/mm.h asm/pgtable.h asm/pgtable_32.h slab.h itself defines trace hooks via linux/sl[aou]b_def.h linux/kmemtrace.h trace/events/kmem.h If slab.h is not included before define_trace.h is included, this leads to duplicate definitions of kmemtrace hooks or other include dependency problems. pgtable_32.h doesn't need slab.h to begin with. Don't include it from there. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: H. Peter Anvin <hpa@zytor.com>
2010-03-29ext3: fix broken handling of EXT3_STATE_NEWLinus Torvalds4-6/+8
In commit 9df93939b735 ("ext3: Use bitops to read/modify EXT3_I(inode)->i_state") ext3 changed its internal 'i_state' variable to use bitops for its state handling. However, unline the same ext4 change, it didn't actually change the name of the field when it changed the semantics of it. As a result, an old use of 'i_state' remained in fs/ext3/ialloc.c that initialized the field to EXT3_STATE_NEW. And that does not work _at_all_ when we're now working with individually named bits rather than values that get masked. So the code tried to mark the state to be new, but in actual fact set the field to EXT3_STATE_JDATA. Which makes no sense at all, and screws up all the code that checks whether the inode was newly allocated. In particular, it made the xattr code unhappy, and caused various random behavior, like apparently https://bugzilla.redhat.com/show_bug.cgi?id=577911 So fix the initialization, and rename the field to match ext4 so that we don't have this happen again. Cc: James Morris <jmorris@namei.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: Daniel J Walsh <dwalsh@redhat.com> Cc: Eric Paris <eparis@redhat.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-29r8169: offical fix for CVE-2009-4537 (overlength frame DMAs)Neil Horman1-5/+24
Official patch to fix the r8169 frame length check error. Based on this initial thread: http://marc.info/?l=linux-netdev&m=126202972828626&w=1 This is the official patch to fix the frame length problems in the r8169 driver. As noted in the previous thread, while this patch incurs a performance hit on the driver, its possible to improve performance dynamically by updating the mtu and rx_copybreak values at runtime to return performance to what it was for those NICS which are unaffected by the ideosyncracy (if there are any). Summary: A while back Eric submitted a patch for r8169 in which the proper allocated frame size was written to RXMaxSize to prevent the NIC from dmaing too much data. This was done in commit fdd7b4c3302c93f6833e338903ea77245eb510b4. A long time prior to that however, Francois posted 126fa4b9ca5d9d7cb7d46f779ad3bd3631ca387c, which expiclitly disabled the MaxSize setting due to the fact that the hardware behaved in odd ways when overlong frames were received on NIC's supported by this driver. This was mentioned in a security conference recently: http://events.ccc.de/congress/2009/Fahrplan//events/3596.en.html It seems that if we can't enable frame size filtering, then, as Eric correctly noticed, we can find ourselves DMA-ing too much data to a buffer, causing corruption. As a result is seems that we are forced to allocate a frame which is ready to handle a maximally sized receive. This obviously has performance issues with it, so to mitigate that issue, this patch does two things: 1) Raises the copybreak value to the frame allocation size, which should force appropriately sized packets to get allocated on rx, rather than a full new 16k buffer. 2) This patch only disables frame filtering initially (i.e., during the NIC open), changing the MTU results in ring buffer allocation of a size in relation to the new mtu (along with a warning indicating that this is dangerous). Because of item (2), individuals who can't cope with the performance hit (or can otherwise filter frames to prevent the bug), or who have hardware they are sure is unaffected by this issue, can manually lower the copybreak and reset the mtu such that performance is restored easily. Signed-off-by: Neil Horman <nhorman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-29sparc64: Properly truncate pt_regs framepointer in perf callback.David S. Miller1-1/+1
For 32-bit processes, we save the full 64-bits of the regs in pt_regs. But unlike when the userspace actually does load and store instructions, the top 32-bits don't get automatically truncated by the cpu in kernel mode (because the kernel doesn't execute with PSTATE_AM address masking enabled). So we have to do it by hand. Reported-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-29hwmon: (asc7621) Add X58 entry in KconfigJaswinder Singh Rajput1-2/+2
Intel X58 have asc7621a chip. So added X58 entry in Kconfig for asc7621. Also arranged existing models in ascending order. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-29hwmon: (w83793) Saving negative errors in unsignedDan Carpenter1-1/+1
"ret" is used to store the return value for watchdog_trigger() and it should be signed for the error handling to work. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-29hwmon: (coretemp) Add missing newline to dev_warn() messageDean Nelson1-1/+1
Add missing newline to dev_warn() message string. This is more of an issue with older kernels that don't automatically add a newline if it was missing from the end of the previous line. Signed-off-by: Dean Nelson <dnelson@redhat.com> Cc: stable@kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-29hwmon: (coretemp) Fix cpu model outputPrarit Bhargava1-1/+1
Avoid hex and decimal confusion when printing out the cpu model. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-29ceph: update discussion list address in MAINTAINERSSage Weil1-1/+1
Signed-off-by: Sage Weil <sage@newdream.net>
2010-03-29ceph: some documentations fixesCheng Renquan2-4/+7
New documentation should have an entry in the 00-INDEX. Correct git urls. Signed-off-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: Sage Weil <sage@newdream.net>
2010-03-29frv/chris: fix lines with a missing semicolonsDavid Howells2-2/+2
Commit b26b2d494b659f9 ("resource/PCI: align functions now return start of resource") added lines with missing semicolons. Add the missing semicolons to the FRV and CRIS arch code. Signed-off-by: David Howells <dhowells@redhat.com> Cc: linux@dominikbrodowski.net Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-29SLOW_WORK: CONFIG_SLOW_WORK_PROC should be CONFIG_SLOW_WORK_DEBUGDavid Howells4-10/+10
CONFIG_SLOW_WORK_PROC was changed to CONFIG_SLOW_WORK_DEBUG, but not in all instances. Change the remaining instances. This makes the debugfs file display the time mark and the owner's description again. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-29slow-work: use get_ref wrapper instead of directly calling get_refDave Airlie1-1/+1
Otherwise we can get an oops if the user has no get_ref/put_ref requirement. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-29Staging: et131x: Properly disable FC in txmac.Nick Bowler1-1/+1
FC disable is bit 3 of the txmac ctl register, but commit 6720949d5562 ("Staging: et131x: Kil the txmac type") accidentally changed the code to set bit 2 instead. Signed-off-by: Nick Bowler <nbowler@draconx.ca> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-29ALSA: hda: Use LPIB for ga-ma770-ud3 boardDaniel T Chen1-0/+1
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575669 The OR states that position_fix=1 is necessary to work around glitching during volume adjustments using PulseAudio. Reported-by: Carlos Laviola <claviola@debian.org> Tested-by: Carlos Laviola <claviola@debian.org> Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklistDaniel Chen1-0/+1
BugLink: https://launchpad.net/bugs/481058 The OR has verified that both 'Headphone Jack Sense' and 'Line Jack Sense' need to be muted for sound to be audible, so just add the machine's SSID to the ac97 jack sense blacklist. Reported-by: Richard Gagne Tested-by: Richard Gagne Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-28ceph: fix use after free on mds __unregister_requestSage Weil1-1/+2
There was a use after free in __unregister_request that would trigger whenever the request map held the last reference. This appears to have triggered an oops during 'umount -f' when requests are being torn down. Signed-off-by: Sage Weil <sage@newdream.net>
2010-03-28ipv6: Don't drop cache route entry unless timer actually expired.YOSHIFUJI Hideaki / 吉藤英明1-4/+9
This is ipv6 variant of the commit 5e016cbf6.. ("ipv4: Don't drop redirected route cache entry unless PTMU actually expired") by Guenter Roeck <guenter.roeck@ericsson.com>. Remove cache route entry in ipv6_negative_advice() only if the timer is expired. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-28Revert "ide: skip probe if there are no devices on the port (v2)"David S. Miller1-9/+3
This reverts commit a20b2a44eca52818ef52a94959480b7e6ea2f528. As requested by David Fries. This makes CDROMs which are slave drives on a ribbon without a master disappear and causes other similar kinds of badness. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-28tulip: Add missing parens.David S. Miller1-1/+1
As reported by Stephen Rothwell. drivers/net/tulip/uli526x.c: In function 'uli526x_rx_packet': drivers/net/tulip/uli526x.c:861: warning: assignment makes pointer from integer without a cast Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-28pata_via: fix VT6410/6415/6330 detection issueJosephChan@via.com.tw1-0/+4
When using VT6410/6415/6330 chips on some VIA's platforms, the HDD connection to VT6410/6415/6330 cannot be detected. It is because the driver detects wrong via_isa_bridge ID, and then causes this issue to happen. Signed-off-by: Joseph Chan <josephchan@via.com.tw> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-03-27arch/sparc/kernel: Use set_cpus_allowed_ptrJulia Lawall3-10/+10
Use set_cpus_allowed_ptr rather than set_cpus_allowed. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E1,E2; @@ - set_cpus_allowed(E1, cpumask_of_cpu(E2)) + set_cpus_allowed_ptr(E1, cpumask_of(E2)) @@ expression E; identifier I; @@ - set_cpus_allowed(E, I) + set_cpus_allowed_ptr(E, &I) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27r8169: fix broken register writesFrancois Romieu1-2/+2
This is quite similar to b39fe41f481d20c201012e4483e76c203802dda7 though said registers are not even documented as 64-bit registers - as opposed to the initial TxDescStartAddress ones - but as single bytes which must be combined into 32 bits at the MMIO read/write level before being merged into a 64 bit logical entity. Credits go to Ben Hutchings <ben@decadent.org.uk> for the MAR registers (aka "multicast is broken for ages on ARM) and to Timo Teräs <timo.teras@iki.fi> for the MAC registers. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27pcnet_cs: add new idKen Kawasaki2-1/+3
pcnet_cs: *add new id (Allied Telesis LM33-PCM-T Lan&Modem multifunction card) *use PROD_ID for LA-PCM.(because LA-PCM and LM33-PCM-T use the same MANF_ID). Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27bonding: fix broken multicast with round-robin modeAndy Gospodarek1-8/+32
Round-robin (mode 0) does nothing to ensure that any multicast traffic originally destined for the host will continue to arrive at the host when the link that sent the IGMP join or membership report goes down. One of the benefits of absolute round-robin transmit. Keeping track of subscribed multicast groups for each slave did not seem like a good use of resources, so I decided to simply send on the curr_active slave of the bond (typically the first enslaved device that is up). This makes failover management simple as IGMP membership reports only need to be sent when the curr_active_slave changes. I tested this patch and it appears to work as expected. Originally reported by Lon Hohberger <lhh@redhat.com>. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> CC: Lon Hohberger <lhh@redhat.com> CC: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27sparc: Fix use of uid16_t and gid16_t in asm/stat.hRob Landley1-2/+2
Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27drivers/net: Fix continuation linesJoe Perches1-1/+1
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27e1000: do not modify tx_queue_len on link speed changeEmil Tantilov2-9/+1
Previously the driver tweaked txqueuelen to avoid false Tx hang reports seen at half duplex. This had the effect of overriding user set values on link change/reset. Testing shows that adjusting only the timeout factor is sufficient to prevent Tx hang reports at half duplex. This patch removes all instances of tx_queue_len in the driver. Based on e1000e patch by Franco Fichtner <franco@lastsummer.de> CC: Franco Fichtner <franco@lastsummer.de> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27net: ipmr/ip6mr: prevent out-of-bounds vif_table accessNicolas Dichtel2-8/+14
When cache is unresolved, c->mf[6]c_parent is set to 65535 and minvif, maxvif are not initialized, hence we must avoid to parse IIF and OIF. A second problem can happen when the user dumps a cache entry where a VIF, that was referenced at creation time, has been removed. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27ixgbe: Do not run all Diagnostic offline tests when VFs are activeGreg Rose1-0/+21
When running the offline diagnostic tests check to see if any VFs are online. If so then only run the link test. This is necessary because the VFs running in guest VMs aren't aware of when the PF is taken offline for a diagnostic test. Also put a message to the system log telling the system administrator to take the VFs offline manually if (s)he wants to run a full diagnostic. Return 1 on each of the tests not run to alert the user of the condition. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27igb: use correct bits to identify if managability is enabledAlexander Duyck1-3/+3
igb was previously checking the wrong bits in the MANC register to determine if managability was enabled. As a result it was incorrectly powering down and resetting the phy when it didn't need to. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27benet: Fix compile warnnings in drivers/net/benet/be_ethtool.cwzt wzt1-1/+1
Fix the following warnings: be_ethtool.c:493: warning: integer constant is too large for 'long' type be_ethtool.c:493: warning: integer constant is too large for 'long' type Signed-off-by: Zhitong Wang <zhitong.wangzt@alibaba-inc.com> Acked-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27net: Add MSG_WAITFORONE flag to recvmmsgBrandon L Black2-0/+5
Add new flag MSG_WAITFORONE for the recvmmsg() syscall. When this flag is specified for a blocking socket, recvmmsg() will only block until at least 1 packet is available. The default behavior is to block until all vlen packets are available. This flag has no effect on non-blocking sockets or when used in combination with MSG_DONTWAIT. Signed-off-by: Brandon L Black <blblack@gmail.com> Acked-by: Ulrich Drepper <drepper@redhat.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-27Revert "via82cxxx: workaround h/w bugs"David S. Miller1-57/+0
This reverts commit f931a5d5785d7b7c44871bd7ad2762e29dfddf29. It causes regressions for some users. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26e1000e: do not modify tx_queue_len on link speed changeEmil Tantilov2-11/+1
Previously the driver tweaked txqueuelen to avoid false Tx hang reports seen at half duplex. This had the effect of overriding user set values on link change/reset. Testing shows that adjusting only the timeout factor is sufficient to prevent Tx hang reports at half duplex. This patch removes all instances of tx_queue_len in the driver. Originally reported and patched by Franco Fichtner CC: Franco Fichtner <franco@lastsummer.de> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26igbvf: do not modify tx_queue_len on link speed changeEmil Tantilov2-11/+1
Previously the driver tweaked txqueuelen to avoid false Tx hang reports seen at half duplex. This had the effect of overriding user set values on link change/reset. Testing shows that adjusting only the timeout factor is sufficient to prevent Tx hang reports at half duplex. Based on e1000e patch by Franco Fichtner <franco@lastsummer.de> CC: Franco Fichtner <franco@lastsummer.de> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ipv4: Restart rt_intern_hash after emergency rebuild (v2)Pavel Emelyanov1-6/+11
The the rebuild changes the genid which in turn is used at the hash calculation. Thus if we don't restart and go on with inserting the rt will happen in wrong chain. (Fixed Neil's comment about the index passed into the rt_intern_hash) Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Reviewed-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ipv4: Cleanup struct net dereference in rt_intern_hashPavel Emelyanov1-2/+2
There's no need in getting it 3 times and gcc isn't smart enough to understand this himself. This is just a cleanup before the fix (next patch). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26net: fix netlink address dumping in IPv4/IPv6Patrick McHardy2-2/+2
When a dump is interrupted at the last device in a hash chain and then continued, "idx" won't get incremented past s_idx, so s_ip_idx is not reset when moving on to the next device. This means of all following devices only the last n - s_ip_idx addresses are dumped. Tested-by: Pawel Staszewski <pstaszewski@itcare.pl> Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-03-26tulip: Fix null dereference in uli526x_rx_packet()Kyle McMartin1-3/+5
Acked-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26gianfar: fix undo of reserve()Ben Menchaca2-2/+9
Fix undo of reserve() before RX recycle gfar_new_skb reserve()s space in the SKB to align it. If an error occurs, and the skb needs to be returned to the RX recycle queue, the current code attempts to reset head, but did not reset tail. This patch remembers the alignment amount, and reverses the reserve() when needed. Signed-off-by: Ben Menchaca <ben@bigfootnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ixgbe: filter FIP frames into the FCoE offload queuesChris Leech2-0/+16
During FCF solicitation, the switch is supposed to pad the solicited advertisement out to the endpoints specified maximum FCoE frame size. That means that we need to receive FIP frames that are larger than the standard MTU. To make sure the receive queue is configured correctly, we should be filtering FIP traffic into the FCoE queues. Signed-off-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ixgbe: Priority tag FIP framesRobert Love1-9/+17
Currently FIP (FCoE Initialization Protocol) frames are going untagged. This causes various problems with FCFs (switches) that have negotiated a priority over dcbx. This patch tags FIP frames with the same priority as the FCoE frames. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ixgbe: Don't allow user buffer count to exceed 256Robert Love1-8/+10
If the user buffer count was 256 the shift would place a 1 in the offset region leading to errors. It also overwrites the uers buffer list. This patch makes sure that at most 256 user buffers are allowed for DDP and the buffer count is masked properly such that it doesn't overwrite the offset when shifting the bits. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Frank Zhang <frank_1.zhang@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ixgbe: cleanup maximum number of tx queuesJohn Fastabend2-3/+5
In the last patch I missed an unecessary min_t comparison. This patch removes it, the path allocates at most 72 tx queues for 82599 and 24 for 82598 there is no need for this check. Additionally this sets MAX_[TX|RX]_QUEUES to 72. Which is used as the size for the tx/rx_ring arrays. There is no reason to have more tx_rings/rx_rings then num_tx_queues. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ixgbe: Change where clear_to_send_flag is reset to zero.Greg Rose1-3/+5
The clear_to_send flag is being cleared before the call to ping all the VFs. It should be called after pinging all the VFs. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ixgbe: In SR-IOV mode insert delay before bring the adapter upGreg Rose1-0/+8
VFs running in guest VMs do not respond in as timely a manner to PF indication it is going down as they do when running in the host domain. If the adapter is in SR-IOV mode insert a two second delay to guarantee that all VFs have had time to respond to the PF reset. In any case resetting the PF while VFs are active should be discouraged but if it must be done then there will be a two second delay to help synchronize resets among the PF and all the VFs. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-26ixgbevf: Fix signed/unsigned int errorGreg Rose1-1/+2
In the Tx mapping function if a DMA error occurred then the unwind of previously mapped sections would improperly check an unsigned int if it was less than zero. Changed the index variable to signed to avoid the error. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>