]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agoproc: mem_release() should check mm != NULL
Oleg Nesterov [Tue, 31 Jan 2012 16:14:38 +0000 (17:14 +0100)]
proc: mem_release() should check mm != NULL

mem_release() can hit mm == NULL, add the necessary check.

Cc: stable@kernel.org
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 71879d3cb3dd8f2dfdefb252775c1b3ea04a3dd4)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
For Oracle bug 13811116

13 years agoproc: unify mem_read() and mem_write()
Oleg Nesterov [Tue, 31 Jan 2012 16:14:54 +0000 (17:14 +0100)]
proc: unify mem_read() and mem_write()

commit 572d34b946bae070debd42db1143034d9687e13f upstream.

No functional changes, cleanup and preparation.

mem_read() and mem_write() are very similar. Move this code into the
new common helper, mem_rw(), which takes the additional "int write"
argument.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b49767a65a6454f7d546068a785e25dbb0eabbcd)
For Oracle bug 13811116

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoSPEC: v2.6.39-100.4.1
Guru Anbalagane [Thu, 1 Mar 2012 22:51:47 +0000 (14:51 -0800)]
SPEC: v2.6.39-100.4.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'b2.6.39-100.3.1rpmsymlink' of git://ca-git.us.oracle.com/linux-muvarov...
Guru Anbalagane [Thu, 1 Mar 2012 22:45:11 +0000 (14:45 -0800)]
Merge branch 'b2.6.39-100.3.1rpmsymlink' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agosysfs: restore upstream sysfs code
Guru Anbalagane [Thu, 1 Mar 2012 21:42:49 +0000 (13:42 -0800)]
sysfs: restore upstream sysfs code

Revert "Partial revert of mainline removal of deprecated sysfs interface for 13568528"

This reverts commit 0c01ee13c10ea3360d517f46cfbe26fd09ee1819.

13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Thu, 1 Mar 2012 21:42:10 +0000 (13:42 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years agorpm: remove symlink on uninstall
Maxim Uvarov [Thu, 1 Mar 2012 20:49:11 +0000 (12:49 -0800)]
rpm: remove symlink on uninstall

Orabug: 13791936
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoBtrfs: fix casting error in scrub reada code
Chris Mason [Tue, 28 Feb 2012 17:42:44 +0000 (12:42 -0500)]
Btrfs: fix casting error in scrub reada code

The reada code from scrub was casting down a u64 to
an unsigned long so it could insert it into a radix tree.

What it really wanted to do was cast down the result of a shift, instead
of casting down the u64.  The bug resulted in trying to insert our
reada struct into the wrong place, which caused soft lockups and other
problems.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoSPEC: v2.6.39-100.3.1
Guru Anbalagane [Wed, 22 Feb 2012 23:11:38 +0000 (15:11 -0800)]
SPEC: v2.6.39-100.3.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Wed, 22 Feb 2012 21:29:55 +0000 (13:29 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years agoBtrfs: clear the extent uptodate bits during parent transid failures
Chris Mason [Wed, 22 Feb 2012 17:36:24 +0000 (12:36 -0500)]
Btrfs: clear the extent uptodate bits during parent transid failures

If btrfs reads a block and finds a parent transid mismatch, it clears
the uptodate flags on the extent buffer, and the pages inside it.  But
we only clear the uptodate bits in the state tree if the block straddles
more than one page.

This is from an old optimization from to reduce contention on the extent
state tree.  But it is buggy because the code that retries a read from
a different copy of the block is going to find the uptodate state bits
set and skip the IO.

The end result of the bug is that we'll never actually read the good
copy (if there is one).

The fix here is to always clear the uptodate state bits, which is safe
because this code is only called when the parent transid fails.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoMerge branch 'uek-2.6.39-stable' of git://ca-git.us.oracle.com/linux-joejin-public...
Guru Anbalagane [Tue, 21 Feb 2012 05:35:44 +0000 (21:35 -0800)]
Merge branch 'uek-2.6.39-stable' of git://ca-git.us.oracle.com/linux-joejin-public into uek2-stable

13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Tue, 21 Feb 2012 05:19:12 +0000 (21:19 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years agoBtrfs: add extra sanity checks on the path names in btrfs_mksubvol
Chris Mason [Tue, 21 Feb 2012 03:14:55 +0000 (22:14 -0500)]
Btrfs: add extra sanity checks on the path names in btrfs_mksubvol

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: make sure we update latest_bdev
Chris Mason [Tue, 21 Feb 2012 01:53:43 +0000 (20:53 -0500)]
Btrfs: make sure we update latest_bdev

When we are setting up the mount, we close all the
devices that were not actually part of the metadata we found.

But, we don't make sure that one of those devices wasn't
fs_devices->latest_bdev, which means we can do a use after free
on the one we closed.

This updates latest_bdev as it goes.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: improve error handling for btrfs_insert_dir_item callers
Chris Mason [Mon, 20 Feb 2012 13:40:56 +0000 (08:40 -0500)]
Btrfs: improve error handling for btrfs_insert_dir_item callers

This allows us to gracefully continue if we aren't able to insert
directory items, both for normal files/dirs and snapshots.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoMerge branch 'uek2-stable' of git://ca-git.us.oracle.com/linux-uek-2.6.39 into uek2...
Joe Jin [Thu, 16 Feb 2012 00:04:29 +0000 (08:04 +0800)]
Merge branch 'uek2-stable' of git://ca-git.us.oracle.com/linux-uek-2.6.39 into uek2-stable

13 years agofnic: return zero on fnic_reset() success
Joe Jin [Thu, 19 Jan 2012 08:04:25 +0000 (16:04 +0800)]
fnic: return zero on fnic_reset() success

When issue LIP by sysfs found write("1") returned 8194, this caused by
fnic_reset() return SUCCESS to store_fc_private_host_issue_lip(). Return 0/-1
for fnic_reset() fix this issue.

Tested-by: Sriharsha <sriharsha.devdas@oracle.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Abhijeet Joglekar <abjoglek@cisco.com>
Cc: Venkata Siva Vijayendra Bhamidipati <vbhamidi@cisco.com>
Cc: Brian Uchino <buchino@cisco.com>
CC: stable@vger.kernel.org
13 years ago[SCSI] libfc: improve flogi retries to avoid lport stuck
Vasu Dev [Fri, 28 Oct 2011 18:34:23 +0000 (11:34 -0700)]
[SCSI] libfc: improve flogi retries to avoid lport stuck

Adds more cases to do flogi retry, now also retry
on getting bad response due to either no ELS response
or flogi response payload length not large enough.
In those cases flogi was not retried and that
was leaving lport offline.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 907c07d45199f954ddcf66c2c9763c87d012cb15)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] libfc: avoid exchanges collision during lport reset
Vasu Dev [Fri, 28 Oct 2011 18:34:17 +0000 (11:34 -0700)]
[SCSI] libfc: avoid exchanges collision during lport reset

Currently timer delay is large and is using msleep to avoid
avoid exchanges collision across lport reset, so instead
do this by initializing exches pool indexes during
reset also.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b6e3c84034b93e6acc895711f74730e235dfe9d2)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoigbvf: update version number
Williams, Mitch A [Thu, 19 May 2011 05:37:59 +0000 (05:37 +0000)]
igbvf: update version number

Update the version number to match version conventions. Bump the major
version to indicate that new hardware support (i350) has been added.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoSPEC: v2.6.39-100.2.1
Guru Anbalagane [Tue, 14 Feb 2012 23:45:30 +0000 (15:45 -0800)]
SPEC: v2.6.39-100.2.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'v2.6.39-100.1.1.bug13709784' of git://ca-git.us.oracle.com/linux-chande...
Guru Anbalagane [Tue, 14 Feb 2012 23:26:36 +0000 (15:26 -0800)]
Merge branch 'v2.6.39-100.1.1.bug13709784' of git://ca-git.us.oracle.com/linux-chander-public into uek2-stable

13 years agoconfig: enable dm-nfs
Guru Anbalagane [Mon, 13 Feb 2012 04:24:32 +0000 (20:24 -0800)]
config: enable dm-nfs

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoUpdate lpfc version for 8.3.5.58.2p driver release
Chuck Anderson [Sat, 11 Feb 2012 02:04:23 +0000 (18:04 -0800)]
Update lpfc version for 8.3.5.58.2p driver release

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

Update lpfc version for 8.3.5.58.2p driver release

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoFix build warning with uninitialized variable
Chuck Anderson [Sat, 11 Feb 2012 01:24:04 +0000 (17:24 -0800)]
Fix build warning with uninitialized variable

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

commit id: 1b51197d0fd0c06877c6df1bba84ac4008a7fc60

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoFix warning on i386 system (CR 123966)
Chuck Anderson [Sat, 11 Feb 2012 01:11:40 +0000 (17:11 -0800)]
Fix warning on i386 system (CR 123966)

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

commit comment:
lpfc 8.3.29: T10 Diff fixes and enhancements.
Fix warning on i386 system (132966)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoFix mailbox and vpi memory leaks causing crashes (CR 126818)
Chuck Anderson [Sat, 11 Feb 2012 01:05:53 +0000 (17:05 -0800)]
Fix mailbox and vpi memory leaks causing crashes (CR 126818)

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

commit comment:
lpfc 8.3.29: Locking fix and Memory leak Fixes
Fix mailbox and vpi memory leaks (126818)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoFixed unbounded firmware revision string from port caused the system panic (CR 126560)
Chuck Anderson [Sat, 11 Feb 2012 00:59:09 +0000 (16:59 -0800)]
Fixed unbounded firmware revision string from port caused the system panic (CR 126560)

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

commit comment:
lpfc 8.3.29: SLI related fixes.
Fix unbounded firmware revision string from port cause panic (126560)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoSPEC: v2.6.39-100.1.1
Guru Anbalagane [Wed, 8 Feb 2012 06:10:28 +0000 (22:10 -0800)]
SPEC: v2.6.39-100.1.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'uek2-stable_modsigndev' of git://ca-git.us.oracle.com/linux-muvarov...
Guru Anbalagane [Wed, 8 Feb 2012 05:47:57 +0000 (21:47 -0800)]
Merge branch 'uek2-stable_modsigndev' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agoMerge branch 'uek2-stable-enic2' of git://ca-git.us.oracle.com/linux-chander-public...
Guru Anbalagane [Wed, 8 Feb 2012 05:38:44 +0000 (21:38 -0800)]
Merge branch 'uek2-stable-enic2' of git://ca-git.us.oracle.com/linux-chander-public into uek2-stable

Conflicts:
drivers/net/ixgbe/ixgbe_82599.c

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'for_uek' of git://ca-git.us.oracle.com/linux-bpicco-public into uek2...
Guru Anbalagane [Wed, 8 Feb 2012 05:04:02 +0000 (21:04 -0800)]
Merge branch 'for_uek' of git://ca-git.us.oracle.com/linux-bpicco-public into uek2-stable

13 years agomm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during...
Mel Gorman [Fri, 3 Feb 2012 23:37:18 +0000 (15:37 -0800)]
mm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration

commit 0bf380bc70ecba68cb4d74dc656cc2fa8c4d801a upstream.

When isolating for migration, migration starts at the start of a zone
which is not necessarily pageblock aligned.  Further, it stops isolating
when COMPACT_CLUSTER_MAX pages are isolated so migrate_pfn is generally
not aligned.  This allows isolate_migratepages() to call pfn_to_page() on
an invalid PFN which can result in a crash.  This was originally reported
against a 3.0-based kernel with the following trace in a crash dump.

PID: 9902   TASK: d47aecd0  CPU: 0   COMMAND: "memcg_process_s"
 #0 [d72d3ad0] crash_kexec at c028cfdb
 #1 [d72d3b24] oops_end at c05c5322
 #2 [d72d3b38] __bad_area_nosemaphore at c0227e60
 #3 [d72d3bec] bad_area at c0227fb6
 #4 [d72d3c00] do_page_fault at c05c72ec
 #5 [d72d3c80] error_code (via page_fault) at c05c47a4
    EAX: 00000000  EBX: 000c0000  ECX: 00000001  EDX: 00000807  EBP: 000c0000
    DS:  007b      ESI: 00000001  ES:  007b      EDI: f3000a80  GS:  6f50
    CS:  0060      EIP: c030b15a  ERR: ffffffff  EFLAGS: 00010002
 #6 [d72d3cb4] isolate_migratepages at c030b15a
 #7 [d72d3d14] zone_watermark_ok at c02d26cb
 #8 [d72d3d2c] compact_zone at c030b8de
 #9 [d72d3d68] compact_zone_order at c030bba1
#10 [d72d3db4] try_to_compact_pages at c030bc84
#11 [d72d3ddc] __alloc_pages_direct_compact at c02d61e7
#12 [d72d3e08] __alloc_pages_slowpath at c02d66c7
#13 [d72d3e78] __alloc_pages_nodemask at c02d6a97
#14 [d72d3eb8] alloc_pages_vma at c030a845
#15 [d72d3ed4] do_huge_pmd_anonymous_page at c03178eb
#16 [d72d3f00] handle_mm_fault at c02f36c6
#17 [d72d3f30] do_page_fault at c05c70ed
#18 [d72d3fb0] error_code (via page_fault) at c05c47a4
    EAX: b71ff000  EBX: 00000001  ECX: 00001600  EDX: 00000431
    DS:  007b      ESI: 08048950  ES:  007b      EDI: bfaa3788
    SS:  007b      ESP: bfaa36e0  EBP: bfaa3828  GS:  6f50
    CS:  0073      EIP: 080487c8  ERR: ffffffff  EFLAGS: 00010202

It was also reported by Herbert van den Bergh against 3.1-based kernel
with the following snippet from the console log.

BUG: unable to handle kernel paging request at 01c00008
IP: [<c0522399>] isolate_migratepages+0x119/0x390
*pdpt = 000000002f7ce001 *pde = 0000000000000000

It is expected that it also affects 3.2.x and current mainline.

The problem is that pfn_valid is only called on the first PFN being
checked and that PFN is not necessarily aligned.  Lets say we have a case
like this

H = MAX_ORDER_NR_PAGES boundary
| = pageblock boundary
m = cc->migrate_pfn
f = cc->free_pfn
o = memory hole

H------|------H------|----m-Hoooooo|ooooooH-f----|------H

The migrate_pfn is just below a memory hole and the free scanner is beyond
the hole.  When isolate_migratepages started, it scans from migrate_pfn to
migrate_pfn+pageblock_nr_pages which is now in a memory hole.  It checks
pfn_valid() on the first PFN but then scans into the hole where there are
not necessarily valid struct pages.

This patch ensures that isolate_migratepages calls pfn_valid when
necessary.

Reported-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Tested-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoblock: Disable autoprotect
Martin K. Petersen [Wed, 22 Sep 2010 19:33:37 +0000 (15:33 -0400)]
block: Disable autoprotect

Not all filesystems keep their pages stable during I/O leading to
checksum failures.  Disable automatic protection.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
13 years agoMerge branch 'uek2-stable_hpwdt' of git://ca-git.us.oracle.com/linux-muvarov-public...
Guru Anbalagane [Wed, 8 Feb 2012 00:41:55 +0000 (16:41 -0800)]
Merge branch 'uek2-stable_hpwdt' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agoenic: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:18 +0000 (04:54 +0000)]
enic: do vlan cleanup

- unify vlan and nonvlan rx path
- kill enic->vlan_group and enic_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6ede746b62627b6f03fe88afad1a07d38917b85d)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Add support to configure hardware interrupt coalesce timers in a platform indep...
Vasanthy Kolluri [Fri, 17 Jun 2011 07:56:48 +0000 (07:56 +0000)]
enic: Add support to configure hardware interrupt coalesce timers in a platform independent way

enic driver and the underlying hardware use different units for representing the interrupt coalesce timer.
Driver converts the interrupt coalesce timer in usec to hardware cycles while setting the relevant hardware
registers. The conversion factor can be different for each of the adapter hardware types. So it is dynamically
learnt from the adapter firmware using the devcmd CMD_INTR_COAL_CONVERT. This allows the driver to configure
the hardware interrupt coalesce timers in a platform independent way.

Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit ea7ea65a3b37bf207d5c352ac6254506b3dc3901)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Partial: Bug Fix: Fix hardware transmit queue indexing in enic_poll_controller
Vasanthy Kolluri [Thu, 9 Jun 2011 10:37:07 +0000 (10:37 +0000)]
enic: Partial: Bug Fix: Fix hardware transmit queue indexing in enic_poll_controller

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b880a954b9e2585ce325aedd76e4741880cab180)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Get/Set interrupt resource index for transmit and receive queues
Vasanthy Kolluri [Thu, 9 Jun 2011 10:37:02 +0000 (10:37 +0000)]
enic: Get/Set interrupt resource index for transmit and receive queues

Instead of deriving the index of a transmit/receive interrupt resource
from the transmit/receive queue index, always save and retrieve it
using an additional variable.

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 7d260ec26ee56495bcb32491d44ed4590cc838a0)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Log device configuration in detail during driver load
Vasanthy Kolluri [Thu, 9 Jun 2011 10:36:57 +0000 (10:36 +0000)]
enic: Log device configuration in detail during driver load

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e1fb77bfd062b8d38fb0e428ae0edcd2dc4ec07b)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Pass 802.1p bits for packets tagged with vlan zero
Vasanthy Kolluri [Thu, 9 Jun 2011 10:36:52 +0000 (10:36 +0000)]
enic: Pass 802.1p bits for packets tagged with vlan zero

enic driver currently passes 802.1p bits to the upper layers for packets
tagged with non-zero vlan ids only. This patch extends such behaviour to
zero vlan tagged packets also.

The patch is dependant on the following kernel patches:

1) vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
   - net-next-2.6 git commit: ad1afb00393915a51c21b1ae8704562bf036855f
   - Available 2.6.36 and later
2) vlan: Centralize handling of hardware acceleration.
  - net-next-2.6 git commit: 3701e51382a026cba10c60b03efabe534fba4ca4
  - Available 2.6.37 and later

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8757446d8df4446fc7f5d24ad6d53e9f265cc021)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: update to support 64 bit stats
stephen hemminger [Wed, 8 Jun 2011 14:54:02 +0000 (14:54 +0000)]
enic: update to support 64 bit stats

The device driver already uses 64 bit statistics, it just
doesn't use the 64 bit interface.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f20530bc982d67ebde84b3e0a043549d7ccd85a1)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Add support for MTU change via port profile on a dynamic vnic
Roopa Prabhu [Fri, 3 Jun 2011 14:35:17 +0000 (14:35 +0000)]
enic: Add support for MTU change via port profile on a dynamic vnic

enic driver gets MTU change notifications for MTU changes in the
port profile associated to a dynamic vnic. This patch adds support
in enic driver to set new MTU on the dynamic vnic and dynamically
adjust its buffers with new MTU size in response to such notifications.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit c97c894dc7bcae28d0308dbcd010185079de4a28)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agodrivers/net: Remove unnecessary semicolons
Joe Perches [Fri, 3 Jun 2011 11:51:20 +0000 (11:51 +0000)]
drivers/net: Remove unnecessary semicolons

Semicolons are not necessary after switch/while/for/if braces
so remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6403eab143205a45a5493166ff8bf7e3646f4a77)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoMerge branch 'uek-2.6.39-stable' of git://ca-git.us.oracle.com/linux-joejin-public...
Guru Anbalagane [Mon, 6 Feb 2012 21:45:16 +0000 (13:45 -0800)]
Merge branch 'uek-2.6.39-stable' of git://ca-git.us.oracle.com/linux-joejin-public into uek2-stable

13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Sat, 4 Feb 2012 00:24:27 +0000 (16:24 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years ago[SCSI] megaraid_sas Version to 5.40-rc1 and Changelog update
adam radford [Tue, 26 Jul 2011 22:43:01 +0000 (15:43 -0700)]
[SCSI] megaraid_sas Version to 5.40-rc1 and Changelog update

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Add .change_queue_depth support
adam radford [Tue, 26 Jul 2011 22:42:52 +0000 (15:42 -0700)]
[SCSI] megaraid_sas: Add .change_queue_depth support

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] megaraid_sas: Fix FastPath I/O to work on degraded raid 1
adam radford [Tue, 26 Jul 2011 23:16:40 +0000 (16:16 -0700)]
[SCSI] megaraid_sas: Fix FastPath I/O to work on degraded raid 1

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years agobnx2x: add missing break in bnx2x_dcbnl_get_cap
Shmulik Ravid [Thu, 22 Sep 2011 02:33:33 +0000 (02:33 +0000)]
bnx2x: add missing break in bnx2x_dcbnl_get_cap

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a0babc80eb375aad69dab4687c3b44c47d42f241)

13 years agobnx2x: fix hw attention handling
Dmitry Kravkov [Thu, 22 Sep 2011 02:33:31 +0000 (02:33 +0000)]
bnx2x: fix hw attention handling

Use register name to initialize attention mask

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f2eaeb58bf6995a979c413ea0cc73289533feacb)

13 years agobnx2x: prevent flooded warnning kernel info
Joe Jin [Tue, 27 Sep 2011 07:17:10 +0000 (15:17 +0800)]
bnx2x: prevent flooded warnning kernel info

This fixes orabug 12687487 and backported fixes for RHBZ 712000.
When a VN is configured to invalid Max BW, we only need to be told once.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Reported-by: Sriharsha Devdas <sriharsha.devdas@oracle.com>
(cherry picked from commit 8cac1300f2d0dd18b2104ccc20aa00ca237343e1)

13 years agoBtrfs: don't reserve data with extents locked in btrfs_fallocate
Chris Mason [Wed, 1 Feb 2012 01:27:41 +0000 (20:27 -0500)]
Btrfs: don't reserve data with extents locked in btrfs_fallocate

btrfs_fallocate tries to allocate space only if ranges in the file don't
already exist.  But the enospc checks it does are not allowed with
extents locked.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agowatchdog: hpwdt: prevent multiple "NMI occurred" messages
Naga Chumbalkar [Tue, 9 Aug 2011 22:27:26 +0000 (22:27 +0000)]
watchdog: hpwdt: prevent multiple "NMI occurred" messages

On platforms with no iCRU support don't print two, (possibly conflicting),
"NMI occurred" messages when the firmware is unable to source the NMI.

Please note that one of the enhancements to the v1.3.0 hpwdt driver is to panic and allow
KDUMP to succeed even on NMIs that are unknown to the platform firmware.

Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Reviewed-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agowatchdog: hpwdt: add next gen HP servers
Thomas Mingarelli [Tue, 26 Jul 2011 13:05:53 +0000 (14:05 +0100)]
watchdog: hpwdt: add next gen HP servers

This patch is required to enable hpwdt to work on next generation HP servers
with iLO.

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agobnx2fc: Update copyright and bump version to 1.0.4
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:13 +0000 (11:32 -0700)]
bnx2fc: Update copyright and bump version to 1.0.4

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 9b35baae3a62c33a73a6fd8bf4d1b6c4e3b5b5f3)

13 years agobnx2fc: Tx BDs cache in write tasks
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:12 +0000 (11:32 -0700)]
bnx2fc: Tx BDs cache in write tasks

When there is a single BD for the entire data to be transmitted, use the BD
inside the SGL context and set the cached SGE indication in the task context

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 3c75108fce9be6c72c45e50973b3cbb0fcdb4f19)

13 years agobnx2fc: Do not arm CQ when there are no CQEs
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:11 +0000 (11:32 -0700)]
bnx2fc: Do not arm CQ when there are no CQEs

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit fd08bd622d255252095a7d5b20b8305916c6f64e)

13 years agobnx2fc: hold tgt lock when calling cmd_release
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:10 +0000 (11:32 -0700)]
bnx2fc: hold tgt lock when calling cmd_release

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit bd4d5de8b9b97ff100342948c39634b44c43fe81)

13 years agobnx2fc: Enable support for sequence level error recovery
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:09 +0000 (11:32 -0700)]
bnx2fc: Enable support for sequence level error recovery

Driver advertises its support for 'retry' bit and 'conf completion' bit in PRLI
params to enable support for 'sequence level error recovery'

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 72812ee0bd2098a7709dbcff61395fbba3f27cda)

13 years agobnx2fc: HSI changes for tape
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:08 +0000 (11:32 -0700)]
bnx2fc: HSI changes for tape

Program the firmware task structure with init_flags indicating the device is
'sequence level error recovery' capable.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit f3820b719d91a0ed1e26831b1cfdcdf1641ab586)

13 years agobnx2fc: Handle REC_TOV error code from firmware
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:07 +0000 (11:32 -0700)]
bnx2fc: Handle REC_TOV error code from firmware

Driver decides to initiate REC on REC_TOV timer pop. The firmware maintains the
REC timer and informs the driver as a firmware error message, which is an
unsolicited event to the driver. Driver also issues REC on other unsolicited
events from firmware that indicate data loss.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 7b594769120b43b8da1ff8f7b4c31a47fabd6ac0)

13 years agobnx2fc: REC/SRR link service request and response handling
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:06 +0000 (11:32 -0700)]
bnx2fc: REC/SRR link service request and response handling

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 744469542951d32979a8dcb1dbed560bfed1745e)

13 years agobnx2fc: Support 'sequence cleanup' task
Bhanu Prakash Gollapudi [Wed, 27 Jul 2011 18:32:05 +0000 (11:32 -0700)]
bnx2fc: Support 'sequence cleanup' task

For the devices that support sequence level error recovery, based on the REC
response, the firmware has to be informed about the offset from which the
retransmission should happen. Driver initiates sequence cleanup task to
firmware so that the firmware can program the task. Upon the sequence cleanup
completion, SRR is issued to retransmit the sequence.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 6c5a7ce4f176b641fd11e59be4df31ee3e6202dd)

13 years agobnx2fc: Enable REC & CONF support for the session
Bhanu Prakash Gollapudi [Tue, 26 Jul 2011 21:51:40 +0000 (14:51 -0700)]
bnx2fc: Enable REC & CONF support for the session

Based on PRLI response, identify if the target is FCP-2 (seq level error
recovery) capable, and appropriately set the corresponding CONF, REC flags when
offloading the session.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b252f4c7c39cc43c1a34c68951f98d7391a1a103)

13 years agobnx2fc: Introduce interface structure for each vlan interface
Bhanu Prakash Gollapudi [Tue, 26 Jul 2011 21:51:39 +0000 (14:51 -0700)]
bnx2fc: Introduce interface structure for each vlan interface

Currently, bnx2fc has a hba structure that can work with only a single vlan
interface.  When there is a change in vlan id, it does not have the capability
to switch to different vlan interface. To solve this problem, a new structure
called 'interface' has been introduced, and each hba can now have multiple
interfaces, one per vlan id.

Most of the patch is a moving the interface specific fields from hba to the
interface structure, and appropriately modifying the dereferences. A list of
interfaces (if_list) is maintained along with adapter list. During a create
call, the interface structure is allocated and added to if_list and deleted &
freed on a destroy call.  Link events are propagated to all interfaces
belonging to the hba.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit aea71a024914e8b5b8bed31256dae42195a0a207)

13 years agobnx2fc: Replace printks with KERN_ALERT to KERN_ERR/KERN_INFO
Bhanu Prakash Gollapudi [Tue, 28 Jun 2011 06:30:53 +0000 (23:30 -0700)]
bnx2fc: Replace printks with KERN_ALERT to KERN_ERR/KERN_INFO

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b2a554ff9ad5cdd8d00dac168f2bb3db7ccedb61)

13 years agocnic: Add VLAN ID as a parameter during netevent upcall
Michael Chan [Wed, 20 Jul 2011 14:55:24 +0000 (14:55 +0000)]
cnic: Add VLAN ID as a parameter during netevent upcall

The bnx2fc driver needs to handle netdev events on VLAN devices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 415199f2bd977fa4065d4e836b4b7543f7993bc3)

13 years agobnx2i: Updated copyright and bump version
Eddie Wai [Thu, 23 Jun 2011 22:51:37 +0000 (15:51 -0700)]
bnx2i: Updated copyright and bump version

Bumped version from 2.6.2.3 to 2.7.0.3

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit ea9582d721a0d711fb046a25f5e94dcbbc5be410)

13 years agobnx2i: Modified to skip CNIC registration if iSCSI is not supported
Eddie Wai [Thu, 23 Jun 2011 22:51:35 +0000 (15:51 -0700)]
bnx2i: Modified to skip CNIC registration if iSCSI is not supported

The init routine will now examine the cnic->max_iscsi_conn variable
before registering to CNIC during ulp_init.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 3601b531987ea9f861300ae1189256f7118f4f09)

13 years agobnx2i: Added the use of kthreads to handle SCSI cmd completion
Eddie Wai [Thu, 23 Jun 2011 22:51:34 +0000 (15:51 -0700)]
bnx2i: Added the use of kthreads to handle SCSI cmd completion

This patch breaks the SCSI cmd completion into two parts:
1. The bh will allocate and queued work to the cmd specific CPU IO
completion kthread.  The CPU for the cmd is from the sc->request->cpu.

2. The CPU specific IO completion kthread will call the scsi_cmd_resp
routine to do the actual cmd completion.

In the normal case, these IO completion kthreads should complete before
the blk IO times out at 60s.  However, in the case when these kthreads
are blocked for whatever reason and exceeded the timeout, the call
to conn_destroy will have to iterate and exhaust all related work in the
percpu work list for all online CPUs.  This will guarantee the protection
of the work->session and conn pointers before they get freed.

Also modified the event coalescing formula to have at least the
event_coal_min outstanding cmds in the pipeline so the SCSI producer
would not get underrun.

Also changed the following SCSI parameters:
- can_queue from 1024 to 2048
- cmds_per_lun from 24 to 128

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Acked-by: Benjamin Li <benli@broadcom.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b5cf6b63f73abdc051035f0050b367beeb2ef94c)

13 years agoiscsi: Use struct scsi_lun in iscsi structs instead of u8[8]
Andy Grover [Thu, 16 Jun 2011 22:57:09 +0000 (15:57 -0700)]
iscsi: Use struct scsi_lun in iscsi structs instead of u8[8]

struct scsi_lun is also just a struct with an array of 8 octets (64 bits)
but using it instead in iscsi structs lets us call scsilun_to_int
without a cast, and also lets us copy it using assignment, instead of
memcpy().

Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 516f43a2a555000e77c1d59b8298cb46aad9ecc1)

13 years agocnic: Wait for all Context IDs to be deleted before sending FCOE_DESTROY_FUNC
Michael Chan [Wed, 20 Jul 2011 14:55:23 +0000 (14:55 +0000)]
cnic: Wait for all Context IDs to be deleted before sending FCOE_DESTROY_FUNC

Otherwise, the firmware will not respond and we'll have to wait for
timeout.  Refactor the wait loop we already have into a separate
function for this purpose.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 74e49bbdabbac34c77b280152b1de9bef9bf9be7)

13 years agocnic: Fix Context ID space calculation
Michael Chan [Wed, 20 Jul 2011 14:55:22 +0000 (14:55 +0000)]
cnic: Fix Context ID space calculation

Include FCoE CID space only for E2_PLUS devices.  Remove old CID
offset adjustments that are no longer needed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b37a41e390310429d4171b0f7b6c6eab04512dc0)

13 years agobnx2x: Implementation for netdev->ndo_fcoe_get_wwn
Vladislav Zolotarov [Thu, 21 Jul 2011 07:56:51 +0000 (07:56 +0000)]
bnx2x: Implementation for netdev->ndo_fcoe_get_wwn

(
note this was hand merged. should we need ndo_setup_tc then
revert/reapply and/or merge away.
)

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Fix endian swapping on firmware version string
Michael Chan [Wed, 20 Jul 2011 14:55:25 +0000 (14:55 +0000)]
bnx2: Fix endian swapping on firmware version string

so that ethtool -i will display it correctly on big endian systems.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3aeb7d2243e55ddcad3c0b402e7b09619a67f5da)

13 years agobnx2: Close device if tx_timeout reset fails
Michael Chan [Fri, 15 Jul 2011 06:53:58 +0000 (06:53 +0000)]
bnx2: Close device if tx_timeout reset fails

Based on original patch and description from Flavio Leitner <fbl@redhat.com>

When bnx2_reset_task() is called, it will stop,
(re)initialize and start the interface to restore
the working condition.

The bnx2_init_nic() calls bnx2_reset_nic() which will
reset the chip and then calls bnx2_free_skbs() to free
all the skbs.

The problem happens when bnx2_init_chip() fails because
bnx2_reset_nic() will just return skipping the ring
initializations at bnx2_init_all_rings(). Later, the
reset task starts the interface again and the system
crashes due a NULL pointer access (no skb in the ring).

To fix it, we call dev_close() if bnx2_init_nic() fails.
One minor wrinkle to deal with is the cancel_work_sync()
call in bnx2_close() to cancel bnx2_reset_task().  The
call will wait forever because it is trying to cancel
itself and the workqueue will be stuck.

Since bnx2_reset_task() holds the rtnl_lock() and checks
for netif_running() before proceeding, there is no need
to cancel bnx2_reset_task() in bnx2_close() even if
bnx2_close() and bnx2_reset_task() are running concurrently.
The rtnl_lock() serializes the 2 calls.

We need to move the cancel_work_sync() call to
bnx2_remove_one() to make sure it is canceled before freeing
the netdev struct.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Cc: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cd6340199f65cad63262db0fd561bdcfd69df3bd)

13 years agobnx2: Read iSCSI config from shared memory during ->probe()
Michael Chan [Wed, 13 Jul 2011 17:24:22 +0000 (17:24 +0000)]
bnx2: Read iSCSI config from shared memory during ->probe()

The scratchpad location that we were reading from has not been
initialized yet during ->probe(), so we were getting inaccurate
information.

Update version to 2.1.10.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 41c2178adce37b249147063624f8a27b064b471e)

13 years agobnx2: Add MCP dump
Jeffrey Huang [Wed, 13 Jul 2011 17:24:21 +0000 (17:24 +0000)]
bnx2: Add MCP dump

to help debug issues related to management firmware.

Signed-off-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ecdbf6e0d555d353188647d1b2dee9a79db69c68)

13 years agobnx2: remove unnecessary read of PCI_CAP_ID_EXP
Jon Mason [Mon, 27 Jun 2011 07:44:43 +0000 (07:44 +0000)]
bnx2: remove unnecessary read of PCI_CAP_ID_EXP

The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e82760e7d6498d24d1a92f22767ba578c8980a6d)

13 years agocnic: Return proper error code if we fail to send netlink message
Michael Chan [Wed, 13 Jul 2011 17:24:20 +0000 (17:24 +0000)]
cnic: Return proper error code if we fail to send netlink message

to allow iSCSI connection to fail faster instead of waiting for the
long timeout.

Update version to 2.5.6.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 558e4c758c4c7bf209325f5865189c6558860b2b)

13 years agocnic: Fix ring setup/shutdown code
Michael Chan [Wed, 13 Jul 2011 17:24:19 +0000 (17:24 +0000)]
cnic: Fix ring setup/shutdown code

Latest bnx2x driver uses different CID for the iSCSI rings, so
we need to pass it in the ring init data.  The rx ring is also
zeroed out to prevent stale DMA addresses from being used after
shutdown.

The same cp local variable redefined inside the else branch is
also eliminated.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e1dd883cb15310dc2ded9995a1f1d8b1cb1e88f3)

13 years agocnic: Fix port_mode setting
Michael Chan [Wed, 13 Jul 2011 17:24:18 +0000 (17:24 +0000)]
cnic: Fix port_mode setting

CHIP_2_PORT_MODE was not set correctly.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b7d40315c9643034ac4b5c9dda480d0124416f89)

13 years agocnic: Replace get_random_bytes() with random32()
Michael Chan [Wed, 13 Jul 2011 17:24:17 +0000 (17:24 +0000)]
cnic: Replace get_random_bytes() with random32()

Suggested by Stephen Hemminger <shemminger@vyatta.com>

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 973e574e26cc8f4704e5d7f112fd566386e37f04)

13 years agocnic, bnx2i: Add support for new devices - 57800, 57810, and 57840
Michael Chan [Mon, 20 Jun 2011 15:15:56 +0000 (15:15 +0000)]
cnic, bnx2i: Add support for new devices - 57800, 57810, and 57840

And change iSCSI RQ doorbell size from 16B to 64B to match new firmware.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f4b5ad26bcb983c493e131ff34b2fa60100c82e5)

13 years agodrivers/net: Remove casts of void *
Joe Perches [Thu, 16 Jun 2011 19:08:06 +0000 (19:08 +0000)]
drivers/net: Remove casts of void *

Unnecessary casts of void * clutter the code.
(
43d620c82985b19008d87a437b4cf83f356264f7
we only include the part which impacts broadcom drivers/net/cnic.c
)

These are the remainder casts after several specific
patches to remove netdev_priv and dev_priv.

Done via coccinelle script (and a little editing):

$ cat cast_void_pointer.cocci
@@
type T;
T *pt;
void *pv;
@@

- pt = (T *)pv;
+ pt = pv;

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Acked-By: Chris Snook <chris.snook@gmail.com>
Acked-by: Jon Mason <jdmason@kudzu.us>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2fc: Fix kernel panic when deleting NPIV ports
Bhanu Prakash Gollapudi [Fri, 27 May 2011 18:47:27 +0000 (11:47 -0700)]
bnx2fc: Fix kernel panic when deleting NPIV ports

Deleting NPIV port causes a kernel panic when the NPIV port is in the same zone
as the physical port and shares the same LUN. This happens due to the fact that
vport destroy and unsolicited ELS are scheduled to run on the same workqueue,
and vport destroy destroys the lport and the unsolicited ELS tries to access
the invalid lport.  This patch fixes this issue by maintaining a list of valid
lports and verifying if the lport is valid or not before accessing it.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit d36b3279e157641c345b12eddb3db78fb42da80f)

13 years agobnx2fc: scsi_dma_unmap() not invoked on IO completions
Bhanu Prakash Gollapudi [Fri, 27 May 2011 18:47:26 +0000 (11:47 -0700)]
bnx2fc: scsi_dma_unmap() not invoked on IO completions

Do not set io_req->sc_cmd to NULL until bnx2fc_unmap_sg_list() is called to
enable it to unmap the DMA mappings.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b5a95fe7ef464a67fab6ff870aa740739e788f90)

13 years agobnx2fc: host stats show the link speed 'unknown' on NIC partitioned interfaces
Bhanu Prakash Gollapudi [Fri, 27 May 2011 18:47:25 +0000 (11:47 -0700)]
bnx2fc: host stats show the link speed 'unknown' on NIC partitioned interfaces

NIC partitioned interfaces reports the speed of 2500 which was not handled by
the driver.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit a4dc08cecfdb3172be61227324a4d2c5fe2de9e5)

13 years agobnx2x: Update date to 2011/06/13 and version to 1.70.00-0
Vladislav Zolotarov [Tue, 14 Jun 2011 01:34:46 +0000 (01:34 +0000)]
bnx2x: Update date to 2011/06/13 and version to 1.70.00-0

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit b96368e9365a4db7429da87cfd25bb54b24954f8)

13 years agobnx2x: PFC support for 578xx
Dmitry Kravkov [Tue, 14 Jun 2011 01:34:42 +0000 (01:34 +0000)]
bnx2x: PFC support for 578xx

Add supoprt for 3 COSes for 578xx devices.
Fix HW configuration for PFC feature according to new HSI in link layer.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit d1976b2e6478a1b8ff2dc35979e7791e2d668285)

13 years agobnx2x: Rename LASI registers to definitions in mdio.h
Yaniv Rosner [Tue, 14 Jun 2011 01:34:38 +0000 (01:34 +0000)]
bnx2x: Rename LASI registers to definitions in mdio.h

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 60d2fe0312b3301fb5a65e9ed0b44465c8237055)

13 years agobnx2x: Add a periodic task for link PHY events
Yaniv Rosner [Tue, 14 Jun 2011 01:34:33 +0000 (01:34 +0000)]
bnx2x: Add a periodic task for link PHY events

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 3deb8167ea66974b0bc8c13c8ee0beafc02a73a1)

13 years agobnx2x: Adjust BCM84833 to BCM578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:27 +0000 (01:34 +0000)]
bnx2x: Adjust BCM84833 to BCM578xx

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 0d40f0d425ec632956547bd8efd8965e5945e1dc)

13 years agobnx2x: Adjust ETS to 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:23 +0000 (01:34 +0000)]
bnx2x: Adjust ETS to 578xx

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 6c3218c6f7e5be6d785486797d48203d54cfd893)

13 years agobnx2x: Add new PHY 54616s
Yaniv Rosner [Tue, 14 Jun 2011 01:34:17 +0000 (01:34 +0000)]
bnx2x: Add new PHY 54616s

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 6583e33baefbe4dea04999ec91be1a1371cd1528)

13 years agobnx2x: Add Warpcore support for 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:12 +0000 (01:34 +0000)]
bnx2x: Add Warpcore support for 578xx

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 3c9ada227c56c6f41e24b01d183b00b007c7ac93)

13 years agobnx2x: Add new MAC support for 578xx
Yaniv Rosner [Tue, 14 Jun 2011 01:34:07 +0000 (01:34 +0000)]
bnx2x: Add new MAC support for 578xx

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 9380bb9e88831bd3d85636b3e4fec30e330d5266)

13 years agobnx2x: Cosmetic changes.
Dmitry Kravkov [Tue, 14 Jun 2011 01:34:02 +0000 (01:34 +0000)]
bnx2x: Cosmetic changes.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 754a2f5220ac7d597454df3104cfce9c83d68df0)