]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
12 years agobe2iscsi: Issue MBX Cmd for login to boot target in crashdump mode
John Soni Jose [Thu, 23 Aug 2012 08:55:33 +0000 (14:25 +0530)]
be2iscsi: Issue MBX Cmd for login to boot target in crashdump mode

 When the driver comes up in crashdump mode, it has to explicitly
 issue command to FW for logging to the boot target. This fix issues
 MBX Cmd to login to boot target in crashdump mode.

 Patch Submitted to upstream kernel.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
12 years agobe2iscsi: Removing the iscsi_data_pdu setting.
John Soni Jose [Thu, 23 Aug 2012 08:51:08 +0000 (14:21 +0530)]
be2iscsi: Removing the iscsi_data_pdu setting.

 The setting of iscsi_data_pdu is not required anymore,
 as this was required for BE1 adapters only. The BE1 adapter
 were not supported in any previous versions of the kernel.

 Patch Submitted to upstream kernel.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
12 years agobe2iscsi: fix dma free size mismatch regression
John Soni Jose [Thu, 23 Aug 2012 07:52:35 +0000 (13:22 +0530)]
be2iscsi: fix dma free size mismatch regression

 Upstream kernel commit details are below.

 commit b83d543fd934d565fb243ef348b06a61d794b31d
 Author: Mike Christie <michaelc@cs.wisc.edu>
 Date:   Wed May 23 20:40:54 2012 -0500

 [SCSI] be2iscsi: fix dma free size mismatch regression

 This patch should go into 3.5 fixes. The bug was added in the
 patches for the 3.5 feature window.

 As you can see from the patch I made a mistake. During
 development I switched from passing a struct to the size of
 the struct, but left the sizeof. This results in us allocating
 4 bytes (sizeof(int)) but then calling pci_free_consistent
 with the size of the struct.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
12 years agoMerge branch 'v2.6.39-300.5.0.ol5_bug13910619#ocfs2_for_uek_v5' into master_igb
Maxim Uvarov [Wed, 29 Aug 2012 14:30:05 +0000 (07:30 -0700)]
Merge branch 'v2.6.39-300.5.0.ol5_bug13910619#ocfs2_for_uek_v5' into master_igb

Orabug: 13910619
Merge  git://ca-git.us.oracle.com/linux-xiaowhu-public.git v2.6.39-300.5.0.ol5_bug13910619#ocfs2_for_uek_v5

12 years agox86/nmi: Clean up register_nmi_handler() usage
Maxim Uvarov [Wed, 29 Aug 2012 14:08:14 +0000 (07:08 -0700)]
x86/nmi: Clean up register_nmi_handler() usage

Implement a cleaner and easier to maintain version for the section
warning fixes implemented in commit eeaaa96a3a21
("x86/nmi: Fix section mismatch warnings on 32-bit").

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Jan Beulich <JBeulich@suse.com>
Link: http://lkml.kernel.org/r/1340049393-17771-1-git-send-email-dzickus@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Conflicts:

arch/x86/include/asm/nmi.h
arch/x86/kernel/nmi_selftest.c

12 years agox86/nmi: Fix page faults by nmiaction if kmemcheck is enabled
Li Zhong [Thu, 29 Mar 2012 20:11:17 +0000 (16:11 -0400)]
x86/nmi: Fix page faults by nmiaction if kmemcheck is enabled

This patch tries to fix the problem of page fault exception
caused by accessing nmiaction structure in nmi if kmemcheck
is enabled.

If kmemcheck is enabled, the memory allocated through slab are
in pages that are marked non-present, so that some checks could
be done in the page fault handling code ( e.g. whether the
memory is read before written to ).

As nmiaction is allocated in this way, so it resides in a
non-present page. Then there is a page fault while the nmi code
accessing the nmiaction structure, which would then cause a
warning by WARN_ON_ONCE(in_nmi()) in kmemcheck_fault(), called
by do_page_fault().

This significantly simplifies the code as well, as the whole
dynamic allocation dance goes away.

v2: as Peter suggested, changed the nmiaction to use static
    storage.

v3: as Peter suggested, use macro to shorten the codes. Also
    keep the original usage of register_nmi_handler, so users of
    this call doesn't need change.

Tested-by: Seiji Aguchi <seiji.aguchi@hds.com>
Fixes: https://lkml.org/lkml/2012/3/2/356
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
[ simplified the wrappers ]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: thomas.mingarelli@hp.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1333051877-15755-4-git-send-email-dzickus@redhat.com
[ tidied the patch a bit ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
12 years ago[hpwdt] add include NMI
Maxim Uvarov [Wed, 29 Aug 2012 13:14:04 +0000 (06:14 -0700)]
[hpwdt] add include NMI

Commit:
x86/nmi: Add new NMI queues to deal with IO_CHK and SERR
Added new NMI calls. But skipped to add nmi.h. Fix
merge commit here.
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agobe2net: Add functionality to support RoCE driver
Parav Pandit [Wed, 29 Aug 2012 13:06:04 +0000 (06:06 -0700)]
be2net: Add functionality to support RoCE driver

- Increase MSI-X vectors by 5 for RoCE traffic.
- Add macro to check roce support on a device.
- Add device-specific doorbell and MSI-X vector fields shared with NIC
  functionality.
- Provide RoCE driver registration and deregistration functions.
- Add support functions which will be invoked on adapter add/remove
  and port up/down events.
- Traverse through the list of adapters to invoke callback functions.

Signed-off-by: Parav Pandit <parav.pandit@emulex.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years ago[igb] uek2 fix driver merge
Maxim Uvarov [Wed, 29 Aug 2012 12:54:17 +0000 (05:54 -0700)]
[igb] uek2 fix driver merge

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years ago[igb] update to version 3.4.8
Maxim Uvarov [Wed, 29 Aug 2012 12:47:27 +0000 (05:47 -0700)]
[igb] update to version 3.4.8

Update driver from e1000.sf.net

12 years agoocfs2: use list_for_each_entry in ocfs2_find_local_alias()
Al Viro [Sat, 9 Jun 2012 17:09:15 +0000 (13:09 -0400)]
ocfs2: use list_for_each_entry in ocfs2_find_local_alias()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit a614a092bf28d58c742b9ec43209f3f78c3d9fb3)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: fix NULL pointer dereference in __ocfs2_change_file_space()
Luis Henriques [Wed, 11 Jul 2012 21:02:10 +0000 (14:02 -0700)]
ocfs2: fix NULL pointer dereference in __ocfs2_change_file_space()

As ocfs2_fallocate() will invoke __ocfs2_change_file_space() with a NULL
as the first parameter (file), it may trigger a NULL pointer dereferrence
due to a missing check.

Addresses http://bugs.launchpad.net/bugs/1006012

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Reported-by: Bret Towe <magnade@gmail.com>
Tested-by: Bret Towe <magnade@gmail.com>
Cc: Sunil Mushran <sunil.mushran@oracle.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit a4e08d001f2e50bb8b3c4eebadcf08e5535f02ee)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Fix bogus error message from ocfs2_global_read_info
Jan Kara [Fri, 10 Feb 2012 09:50:07 +0000 (10:50 +0100)]
ocfs2: Fix bogus error message from ocfs2_global_read_info

'status' variable in ocfs2_global_read_info() is always != 0 when leaving the
function because it happens to contain number of read bytes. Thus we always log
error message although everything is OK. Since all error cases properly call
mlog_errno() before jumping to out_err, there's no reason to call mlog_errno()
on exit at all. This is a fallout of c1e8d35e (conversion of mlog_exit()
calls).

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit a4564ead763a9264edbec6d4e72aa273f05eb39c)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Misplaced parens in unlikley
roel [Mon, 12 Dec 2011 22:40:51 +0000 (23:40 +0100)]
ocfs2: Misplaced parens in unlikley

Fix misplaced parentheses

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit 16865b7c42fbce8a4d2b278460e387e719e289cb)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs: simplify symlink handling
Al Viro [Thu, 3 May 2012 14:14:29 +0000 (10:14 -0400)]
ocfs: simplify symlink handling

seeing that "fast" symlinks still get allocation + copy, we might as
well simply switch them to pagecache-based variant of ->follow_link();
just need an appropriate ->readpage() for them...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit ea022dfb3c2a4680483b00eb2fecc9fc4f6091d1)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: kill endianness abuses in blockcheck.c
Al Viro [Thu, 12 Apr 2012 23:58:53 +0000 (19:58 -0400)]
ocfs2: kill endianness abuses in blockcheck.c

ocfs2_block_check is for little-endian contents; if we just want to
its fields converted to host-endian in a couple of functions, just
put those values into local u32 and u16...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 1db5df98faaf7aa6c25bc7d9703342d13678452a)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: deal with __user misannotations
Al Viro [Thu, 12 Apr 2012 23:52:19 +0000 (19:52 -0400)]
ocfs2: deal with __user misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit f6a5690324d5ab9c33bbc0a6b4cc59c7fa34eeec)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: trivial endianness misannotations
Al Viro [Thu, 12 Apr 2012 22:47:13 +0000 (18:47 -0400)]
ocfs2: trivial endianness misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 8515841086d14594b24cdc8febdcc7fd1bbc313e)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: ->rl_count endianness breakage
Al Viro [Fri, 13 Apr 2012 16:28:21 +0000 (12:28 -0400)]
ocfs2: ->rl_count endianness breakage

le16, not le32...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 28748b325dc2d730ccc312830a91c4ae0c0d9379)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs: ->rl_used breakage on big-endian
Al Viro [Fri, 13 Apr 2012 16:27:11 +0000 (12:27 -0400)]
ocfs: ->rl_used breakage on big-endian

it's le16, not le32 or le64...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: fix leaks on failure exits in module_init
Al Viro [Sun, 18 Mar 2012 02:03:58 +0000 (22:03 -0400)]
ocfs2: fix leaks on failure exits in module_init

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 342827d7d19cb52b562bb3efeb4d4b672d008c35)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years ago... and the same failure exits cleanup for ocfs2
Al Viro [Mon, 13 Feb 2012 02:46:49 +0000 (21:46 -0500)]
... and the same failure exits cleanup for ocfs2

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit be0d93f0aa5682a24a2a9ec0dd26fffaad608cce)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: remove the second argument of k[un]map_atomic()
Cong Wang [Fri, 25 Nov 2011 15:14:34 +0000 (23:14 +0800)]
ocfs2: remove the second argument of k[un]map_atomic()

Acked-by: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Cong Wang <amwang@redhat.com>
(cherry picked from commit c4bc8dcbbe7a7876d76e3f3e129a2ccec46d7cdb)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: deal with wraparounds of i_nlink in ocfs2_rename()
Al Viro [Mon, 13 Feb 2012 02:00:05 +0000 (21:00 -0500)]
ocfs2: deal with wraparounds of i_nlink in ocfs2_rename()

unfortunately, nlink_t may be smaller than 32 bits and ->i_nlink
on ocfs2 can grow up to 0xffffffff; storing it in nlink_t variable
will lose upper bits on such architectures.  Needs to be made u32,
until we get kernel-side nlink_t uniformly 32bit...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 847c9db5cb50841589b8ebd3da0769b1b02fb3b2)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:55:32 +0000 (02:55 -0400)]
ocfs2: propagate umode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 67697cbdccb8b63eae892a9437bcc79d08b79578)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agodlmfs: use inode_init_owner()
Al Viro [Sun, 24 Jul 2011 17:43:19 +0000 (13:43 -0400)]
dlmfs: use inode_init_owner()

don't open-code it...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 2b15ad068418a91687c2d5819c6c03c227d391f2)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: avoid unaligned access to dqc_bitmap
Akinobu Mita [Tue, 15 Nov 2011 22:56:34 +0000 (14:56 -0800)]
ocfs2: avoid unaligned access to dqc_bitmap

The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned,
but not 64-bit aligned.  The dqc_bitmap is accessed by ocfs2_set_bit(),
ocfs2_clear_bit(), ocfs2_test_bit(), or ocfs2_find_next_zero_bit().  These
are wrapper macros for ext2_*_bit() which need to take an unsigned long
aligned address (though some architectures are able to handle unaligned
address correctly)

So some 64bit architectures may not be able to access the dqc_bitmap
correctly.

This avoids such unaligned access by using another wrapper functions for
ext2_*_bit().  The code is taken from fs/ext4/mballoc.c which also need to
handle unaligned bitmap access.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit 939255798a468e1a92f03546de6e87be7b491e57)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Use filemap_write_and_wait() instead of write_inode_now()
Jan Kara [Mon, 7 Nov 2011 23:20:39 +0000 (00:20 +0100)]
ocfs2: Use filemap_write_and_wait() instead of write_inode_now()

Since ocfs2 has no ->write_inode method, there's no point in calling
write_inode_now() from ocfs2_cleanup_delete_inode().  Use
filemap_write_and_wait() instead. This helps us to cleanup inode writing
interfaces...

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit 249ec93c01db8898058899a80ffb537c8d27f86f)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: honor O_(D)SYNC flag in fallocate
Mark Fasheh [Wed, 16 Nov 2011 20:03:10 +0000 (12:03 -0800)]
ocfs2: honor O_(D)SYNC flag in fallocate

We need to sync the transaction which updates i_size if the file is marked
as needing sync semantics.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit df295d4a4b3c98af1a2445a82aef169e7e5d96b8)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Add a missing journal credit in ocfs2_link_credits() -v2
Xiaowei.Hu [Wed, 19 Oct 2011 01:34:19 +0000 (09:34 +0800)]
ocfs2: Add a missing journal credit in ocfs2_link_credits() -v2

With indexed_dir enabled, ocfs2 maintains a list of dirblocks having
space.

The credit calculation in ocfs2_link_credits() did not correctly account
for adding an entry that exactly fills a dirblock that triggers removing
that dirblock by changing the pointer in the previous block in the list.
The credit calculation did not account for that previous block.

To expose, do:

mkfs.ocfs2 -b 512 -M local /dev/sdX
mount /dev/sdX /ocfs2
mkdir /ocfs2/linkdir
touch /ocfs2/linkdir/file1
for i in `seq 1 29` ; do link /ocfs2/linkdir/file1
/ocfs2/linkdir/linklinklinklinklinklink$i; done
rm -f /ocfs2/linkdir/linklinklinklinklinklink10
sleep 8
link /ocfs2/linkdir/file1
/ocfs2/linkdir/linklinklinklinklinklinkaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Note:
The link names have been crafted for a 512 byte blocksize. Reproducing
with a larger blocksize will require longer (or more) links. The sleep
is important. We want jbd2 to commit the transaction so that the missing
block does not piggy back on account of the previous transaction.

Signed-off-by: XiaoweiHu <xiaowei.hu at oracle.com>
Reviewed-by: WengangWang <wen.gang.wang at oracle.com>
Reviewed-by: Sunil.Mushran <sunil.mushran at oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit 0393afea31874947b1d149b82d17b7dccac4f210)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Commit transactions in error cases -v2
Wengang Wang [Wed, 12 Oct 2011 07:22:15 +0000 (15:22 +0800)]
ocfs2: Commit transactions in error cases -v2

There are three cases found that in error cases, journal transactions are not
committed nor aborted. We should take care of these case by committing the
transactions. Otherwise, there would left a journal handle which will lead to
, in same process context, the comming ocfs2_start_trans() gets wrong credits.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit b8a0ae579fb8d9b21008ac386be08b9428902455)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: make direntry invalid when deleting it
Wengang Wang [Tue, 12 Jul 2011 08:43:14 +0000 (16:43 +0800)]
ocfs2: make direntry invalid when deleting it

When we deleting a direntry from a directory, if it's the first in a block we
invalid it by setting inode to 0; otherwise, we merge the deleted one to the
prior and contiguous direntry. And we don't truncate directories.

There is a problem for the later case since inode is not set to 0.
This problem happens when the caller passes a file position as parameter to
ocfs2_dir_foreach_blk(). If the position happens to point to a stale(not
the first, deleted in betweens of ocfs2_dir_foreach_blk()s) direntry, we are
not able to recognize its staleness. So that we treat it as a live one wrongly.

The fix is to set inode to 0 in both cases indicating the direntry is stale.
This won't introduce additional IOs.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit 8298524803339a9a8df053ebdfebc2975ec55be9)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agofs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_free
Julia Lawall [Sat, 9 Jul 2011 16:04:39 +0000 (18:04 +0200)]
fs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_free

Memory allocated using kmem_cache_zalloc should be freed using
kmem_cache_free, not kfree.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,e,e1,e2;
@@

x = kmem_cache_zalloc(e1,e2)
... when != x = e
?-kfree(x)
+kmem_cache_free(e1,x)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit fc9f899483435935c1cd7005df29681929d1c99b)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: remove unnecessary nlink setting
Miklos Szeredi [Fri, 28 Oct 2011 12:13:26 +0000 (14:13 +0200)]
ocfs2: remove unnecessary nlink setting

alloc_inode() initializes i_nlink to 1.  Remove unnecessary
re-initialization.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Joel Becker <jlbec@evilplan.org>
CC: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
(cherry picked from commit a7732b05f775a5575baac34c03bb0e8d16950edf)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Fix ocfs2_page_mkwrite()
Wengang Wang [Sun, 24 Jul 2011 17:36:54 +0000 (10:36 -0700)]
ocfs2: Fix ocfs2_page_mkwrite()

This patch address two shortcomings in ocfs2_page_mkwrite():
1. Makes the function return better VM_FAULT_* errors.
2. It handles a error that is triggered when a page is dropped from the mapping
due to memory pressure. This patch locks the page to prevent that.

[Patch was cleaned up by Sunil Mushran.]

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
(cherry picked from commit 5cffff9e29866a3de98c2c25135b3199491f93b0)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Add comment about orphan scanning
Sunil Mushran [Sun, 24 Jul 2011 17:35:54 +0000 (10:35 -0700)]
ocfs2: Add comment about orphan scanning

Add a comment that explains the reason as to why orphan scan scans all the slots.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
(cherry picked from commit a035bff6b82aca89c1223e2c614adc2d17ec8aa2)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Clean up messages in the fs
Sunil Mushran [Sun, 24 Jul 2011 17:34:54 +0000 (10:34 -0700)]
ocfs2: Clean up messages in the fs

Convert useful messages from ML_NOTICE to KERN_NOTICE to improve readability.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
(cherry picked from commit 619c200de144b44f5e405305241bcd7edbb8c6cf)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: Clean up messages in stack_o2cb.c
Sunil Mushran [Sun, 24 Jul 2011 17:24:54 +0000 (10:24 -0700)]
ocfs2: Clean up messages in stack_o2cb.c

o2cb messages needed a facelift.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
(cherry picked from commit 394eb3d38a3ecc549cc34a3040103a9164be516b)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2_init_acl(): fix a leak
Al Viro [Sat, 23 Jul 2011 04:22:31 +0000 (00:22 -0400)]
ocfs2_init_acl(): fix a leak

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit c0d960f038bdfe0fa73c9f698ba836ed20b672c9)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: use proper little-endian bitops
Akinobu Mita [Mon, 30 May 2011 12:58:05 +0000 (21:58 +0900)]
ocfs2: use proper little-endian bitops

Using __test_and_{set,clear}_bit_le() with ignoring its return value
can be replaced with __{set,clear}_bit_le().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: ocfs2-devel@oss.oracle.com
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit 730e663bd82c1a10a85ff00728d34152a5a67ec8)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoocfs2: checking the wrong variable in ocfs2_move_extent()
Dan Carpenter [Sun, 29 May 2011 19:56:31 +0000 (22:56 +0300)]
ocfs2: checking the wrong variable in ocfs2_move_extent()

"new_phys_cpos" is always a valid pointer here.
ocfs2_probe_alloc_group() allocates "*new_phys_cpos".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
(cherry picked from commit 3d75be7c4771c7e4d5b5fa586a599af8473de32c)

Signed-off-by: Xiaowei.Hu <xiaowei.hu@oracle.com>
12 years agoMerge branch 'for-uek2' of git://ca-git.us.oracle.com/linux-mkp-public
Maxim Uvarov [Tue, 28 Aug 2012 14:58:35 +0000 (07:58 -0700)]
Merge branch 'for-uek2' of git://ca-git.us.oracle.com/linux-mkp-public

12 years agompt2sas: Bump driver vesion to 14.100.00.00
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:26:15 +0000 (15:56 +0530)]
mpt2sas: Bump driver vesion to 14.100.00.00

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agompt2sas: Fix for With post diag reset same set of device gets added, removed and...
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:26:13 +0000 (15:56 +0530)]
mpt2sas: Fix for With post diag reset same set of device gets added, removed and then again gets added with new target ids

When device discovery is disabled during driver load time using module
parameter "disable_discovery=1" and when diag reset is issued then from logs,
it is observed that the devices get added, removed and then added with new
target ids.

So, in order to limit this turn-off the code which is deleting and devices
across host reset when the disable_discovery module parameter is turned on.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agompt2sas: Fix for staged device discovery functionality of driver not working
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:26:12 +0000 (15:56 +0530)]
mpt2sas: Fix for staged device discovery functionality of driver not working

This patch provides a command line option to disable "Port enable" during
the driver load.

The objective of this command line option is to load the driver and do
all the necessary initialization excluding port enable(i.e. delay
device discovery)

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agompt2sas : MPI 2.0 Rev V(2.0.14) specification
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:26:10 +0000 (15:56 +0530)]
mpt2sas : MPI 2.0 Rev V(2.0.14) specification

Changeset in MPI 2.0 Rev V(2.0.14) specification

        1) Bumped MPI2_HEADER_VERSION_UNIT.
        2) Added a product specific range to event values.
        3) Added clarification to Direct-Attached SAS PHY Power condition.
        4) Updated timing requirements for performing Hard Reset.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agompt2sas: Fix for max_sectors warning message is stating the incorrect range
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:26:09 +0000 (15:56 +0530)]
mpt2sas: Fix for max_sectors warning message is stating the incorrect range

When specifying the command line option "max_sectors" less than 64, then
warning message should provide correct upper boundary value 32767 instead of
8192.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agompt2sas: Provide sysfs attribute to report Backup Rail Monitor Status
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:26:07 +0000 (15:56 +0530)]
mpt2sas: Provide sysfs attribute to report Backup Rail Monitor Status

A new sysfs shost attribute called "BMR_status" is implemented to
report Backup Rail Monitor status.

This attribute is located in the path
        /sys/class/scsi_host/host#/BMR_status

when reading this adapter attribute, then driver will output the state
of GPIO[24]. It returns "0" if BMR is healthy and it returns "1" for failure.

if it returns an empty string then it means that there was an error while
obtaining the BMR status. Then check dmesg for what error has occured.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agompt2sas: Fix for Driver oops, when loading driver with max_queue_depth command line...
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:27:05 +0000 (15:57 +0530)]
mpt2sas: Fix for Driver oops, when loading driver with max_queue_depth command line option to a very small value

If the specified max_queue_depth setting is less than the
expected number of internal commands, then driver will calculate
the queue depth size to a negitive number. This negitive number
is actually a very large number because variable is unsigned
16bit integer. So, the driver will ask for a very large amount of
memory for message frames and resulting into oops as memory
allocation routines will not able to handle such a large request.

So, in order to limit this kind of oops, The driver need to set
the max_queue_depth to a scsi mid layer's can_queue value. Then
the overall message frames required for IO is minimum of either
(max_queue_depth plus internal commands) or the IOC global
credits.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Cc: <stable@kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agompt2sas: To include more Intel Branding
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:26:05 +0000 (15:56 +0530)]
mpt2sas: To include more Intel Branding

Updating the customer branding string for "SSD 910 Series" controller

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agompt2sas: 2012 source code copyright
sreekanth.reddy@lsi.com [Tue, 17 Jul 2012 10:26:03 +0000 (15:56 +0530)]
mpt2sas: 2012 source code copyright

The Copyright String in all the drivers sources were changed to 2012

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agobenet: Add a missing CR in the end of message
Masanari Iida [Fri, 24 Aug 2012 15:03:04 +0000 (20:33 +0530)]
benet: Add a missing CR in the end of message

Missing a CR in printk causes 2 messages printed in one line.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix to parse RSS hash from Receive completions correctly.
Sarveshwar Bandi [Wed, 25 Jul 2012 21:29:50 +0000 (21:29 +0000)]
be2net: Fix to parse RSS hash from Receive completions correctly.

Wrong pointer variable is being used to parse the rss hash from
receive completions leading to corrupted rss_hash values filled into skb.

Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Missing byteswap in be_get_fw_log_level causes oops on PowerPC
Anton Blanchard [Tue, 24 Jul 2012 15:05:25 +0000 (15:05 +0000)]
be2net: Missing byteswap in be_get_fw_log_level causes oops on PowerPC

We are seeing an oops in be_get_fw_log_level on ppc64 where we walk
off the end of memory.

commit 941a77d582c8 (be2net: Fix to allow get/set of debug levels in
the firmware.) requires byteswapping of num_modes and num_modules.

Cc: stable@vger.kernel.org # 3.5+
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Sathya Perla <sperla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Ignore physical link async event for Lancer
Padmanabh Ratnakar [Wed, 18 Jul 2012 02:52:15 +0000 (02:52 +0000)]
be2net: Ignore physical link async event for Lancer

The ability of driver to transmit packets depends on logical state
of the link. Ignore physical link status.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix VF driver load for Lancer
Padmanabh Ratnakar [Wed, 18 Jul 2012 02:51:58 +0000 (02:51 +0000)]
be2net: Fix VF driver load for Lancer

Lancer FW has added new capability checks for VFs.
Driver should only use those capabilities which are allowed for VFs.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: dont pull too much data in skb linear part
Eric Dumazet [Fri, 24 Aug 2012 14:56:22 +0000 (20:26 +0530)]
be2net: dont pull too much data in skb linear part

skb_fill_rx_data() pulls 64 byte of data in skb->data

Its too much for TCP (with no options) on IPv4, as total size of headers
is 14 + 40 = 54

This means tcp stack and splice() are suboptimal, since tcp payload
is in part in tcp->data, and in part in skb frag.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: update driver version
Padmanabh Ratnakar [Fri, 24 Aug 2012 14:48:50 +0000 (20:18 +0530)]
be2net: update driver version

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Add description about various RSS hash types
Padmanabh Ratnakar [Fri, 13 Jul 2012 02:45:51 +0000 (02:45 +0000)]
be2net: Add description about various RSS hash types

Incorporated review comment from Eric Dumazet. Added description
about different RSS hash types which adapter is capable of.
Will add support for ETHTOOL_GRXFH and ETHTOOL_SRXFX as suggested
by Ben Hutchings in a later patch.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Enable RSS UDP hashing for Lancer and Skyhawk
Padmanabh Ratnakar [Thu, 12 Jul 2012 03:57:47 +0000 (03:57 +0000)]
be2net: Enable RSS UDP hashing for Lancer and Skyhawk

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix port name in message during driver load
Padmanabh Ratnakar [Fri, 24 Aug 2012 14:31:03 +0000 (20:01 +0530)]
be2net: Fix port name in message during driver load

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix cleanup path when EQ creation fails
Padmanabh Ratnakar [Thu, 12 Jul 2012 03:57:21 +0000 (03:57 +0000)]
be2net: Fix cleanup path when EQ creation fails

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Activate new FW after FW download for Lancer
Padmanabh Ratnakar [Fri, 24 Aug 2012 14:28:00 +0000 (19:58 +0530)]
be2net: Activate new FW after FW download for Lancer

After FW download, activate new FW by invoking FW reset.
Recreate rings once new FW is operational.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix initialization sequence for Lancer
Padmanabh Ratnakar [Thu, 12 Jul 2012 03:56:58 +0000 (03:56 +0000)]
be2net: Fix initialization sequence for Lancer

Invoke only required initialization routines for Lancer.
Remove invocation of unnecessary routines.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net : Fix die temperature stat for Lancer
Padmanabh Ratnakar [Fri, 24 Aug 2012 14:22:28 +0000 (19:52 +0530)]
be2net : Fix die temperature stat for Lancer

Query die temperature stat for Lancer to report it correctly
in ethtool.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix error while toggling autoneg of pause parameters
Padmanabh Ratnakar [Thu, 12 Jul 2012 03:56:11 +0000 (03:56 +0000)]
be2net: Fix error while toggling autoneg of pause parameters

Autonegotiation of pause parameters is possible only on some PHYs.
Ability of autoneg of pause parameters is reported by adapter.
Autoneg of pause parameters cannot be changed from driver.
Fix driver to give error when autoneg mode is toggled by user.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix Endian
Li RongQing [Wed, 4 Jul 2012 16:05:42 +0000 (16:05 +0000)]
be2net: Fix Endian

ETH_P_IP is host Endian, skb->protocol is big Endian, when
compare them, we should change ETH_P_IP from host endian
to big endian, htons, not ntohs.

CC: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix to trim skb for padded vlan packets to workaround an ASIC Bug
Somnath Kotur [Tue, 26 Jun 2012 22:32:10 +0000 (22:32 +0000)]
be2net: Fix to trim skb for padded vlan packets to workaround an ASIC Bug

Fixed spelling error in a comment as pointed out by DaveM.
Also refactored existing code a bit to provide placeholders for another ASIC
Bug workaround that will be checked-in soon after this.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Regression bug wherein VFs creation broken for multiple cards.
Somnath Kotur [Sun, 24 Jun 2012 19:42:00 +0000 (19:42 +0000)]
be2net: Regression bug wherein VFs creation broken for multiple cards.

Fix be_find_vfs() to check for matching bus number as well along with devfn

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Explicitly clear the reserved field in the Tx Descriptor
Somnath Kotur [Sun, 24 Jun 2012 19:40:55 +0000 (19:40 +0000)]
be2net: Explicitly clear the reserved field in the Tx Descriptor

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Increase statistics structure size for skyhawk.
Vasundhara Volam [Wed, 13 Jun 2012 19:51:45 +0000 (19:51 +0000)]
be2net: Increase statistics structure size for skyhawk.

Increasing the hardware statistics structure to accomodate statistics for skyhawk.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Modify error message to incorporate subsystem
Vasundhara Volam [Wed, 13 Jun 2012 19:51:44 +0000 (19:51 +0000)]
be2net: Modify error message to incorporate subsystem

Modify IOCTL error message to print subsystem also.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: reduce gso_max_size setting to account for ethernet header.
Sarveshwar Bandi [Wed, 13 Jun 2012 19:51:43 +0000 (19:51 +0000)]
be2net: reduce gso_max_size setting to account for ethernet header.

The maximum size of packet that can be handled by controller including ethernet
header is 65535. Reducing gso_max_size accordingly.

Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix a race in be_xmit()
Eric Dumazet [Thu, 7 Jun 2012 22:59:59 +0000 (22:59 +0000)]
be2net: fix a race in be_xmit()

As soon as hardware is notified of a transmit, we no longer can assume
skb can be dereferenced, as TX completion might have freed the packet.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix driver load for VFs for Lancer
Padmanabh Ratnakar [Fri, 24 Aug 2012 13:26:33 +0000 (18:56 +0530)]
be2net: Fix driver load for VFs for Lancer

Permanent MAC is wrongly supplied in create iface command. Call the
command with no MAC address and then MAC address should be later queried
and applied.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: update driver version
Sathya Perla [Fri, 24 Aug 2012 13:08:24 +0000 (18:38 +0530)]
be2net: update driver version

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: do not use SCRATCHPAD register
Sathya Perla [Fri, 24 Aug 2012 13:05:10 +0000 (18:35 +0530)]
be2net: do not use SCRATCHPAD register

The CUST_SCRATCHPAD_CSR register is used for marking if FW cleanup is
needed. This is used in a crash kernel scenario. Do no use this register as
it is not available for some functions. Instead, always issue an FLR when
a function is probed *except* when VFs are preset (enabled in the previous
PF load).

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: remove unnecessary usage of unlikely()
Sathya Perla [Tue, 5 Jun 2012 19:37:21 +0000 (19:37 +0000)]
be2net: remove unnecessary usage of unlikely()

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix reporting number of actual rx queues
Sathya Perla [Tue, 5 Jun 2012 19:37:20 +0000 (19:37 +0000)]
be2net: fix reporting number of actual rx queues

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: do not modify PCI MaxReadReq size
Sathya Perla [Tue, 5 Jun 2012 19:37:19 +0000 (19:37 +0000)]
be2net: do not modify PCI MaxReadReq size

Setting the PCI MRRS to a value of 4096 (overriding the system decided
value) had provided perf improvement in TX.
But, IBM has provided feedback that on POWER platforms, this value is set
by the system firmware, and drivers modifying this value can cause
unpredictable results (like EEH errors.) So, backing off this change.
On POWER7 platforms most slots, it seems, do get a MRRS of 4096.

This patch reverts the following commit:
"be2net: Modified PCI MaxReadReq size to 4096 bytes"
commit 5a56eb10babbcd7b3796dc3c28c271260aa3608d.

Suggested-by: Brian King <bjking1@us.ibm.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: cleanup be_vid_config()
Sathya Perla [Tue, 5 Jun 2012 19:37:18 +0000 (19:37 +0000)]
be2net: cleanup be_vid_config()

- get rid of 2 unused arguments to the routine and some unused code
- don't use the term "vlan_tag" in place of "vid" as they are different

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: don't call vid_config() when there's no vlan config
Sathya Perla [Tue, 5 Jun 2012 19:37:17 +0000 (19:37 +0000)]
be2net: don't call vid_config() when there's no vlan config

be_vid_config() is called from be_setup() to replay config cmds after
a card reset. Skip calling it when no vlans are configured.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix to allow get/set of debug levels in the firmware.
Somnath Kotur [Fri, 24 Aug 2012 13:00:51 +0000 (18:30 +0530)]
be2net: Fix to allow get/set of debug levels in the firmware.

Patch re-spin.
Incorporated review comments by Ben Hutchings.

Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: avoid disabling sriov while VFs are assigned
Sathya Perla [Fri, 24 Aug 2012 12:08:10 +0000 (17:38 +0530)]
be2net: avoid disabling sriov while VFs are assigned

Calling pci_disable_sriov() while VFs are assigned to VMs causes
kernel panic. This patch uses PCI_DEV_FLAGS_ASSIGNED bit state of the
VF's pci_dev to avoid this. Also, the unconditional function reset cmd
issued on a PF probe can delete the VF configuration for the
previously enabled VFs. A scratchpad register is now used to issue a
function reset only when needed (i.e., in a crash dump scenario.)

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Add functionality to support RoCE driver
Parav Pandit [Fri, 24 Aug 2012 10:01:27 +0000 (15:31 +0530)]
be2net: Add functionality to support RoCE driver

- Increase MSI-X vectors by 5 for RoCE traffic.
- Add macro to check roce support on a device.
- Add device-specific doorbell and MSI-X vector fields shared with NIC
  functionality.
- Provide RoCE driver registration and deregistration functions.
- Add support functions which will be invoked on adapter add/remove
  and port up/down events.
- Traverse through the list of adapters to invoke callback functions.

Signed-off-by: Parav Pandit <parav.pandit@emulex.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agobe2net: Add function to issue mailbox cmd on MQ
Parav Pandit [Mon, 26 Mar 2012 14:27:12 +0000 (14:27 +0000)]
be2net: Add function to issue mailbox cmd on MQ

- Add generic function to issue mailbox cmd on MQ as export function.
- RoCE driver will use this before it setups its own MQ.

Signed-off-by: Parav Pandit <parav.pandit@emulex.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoMerge branch '2.6.39-300#bug14096387' of git://ca-git.us.oracle.com/linux-guasun...
Maxim Uvarov [Mon, 27 Aug 2012 13:53:10 +0000 (06:53 -0700)]
Merge branch '2.6.39-300#bug14096387' of git://ca-git.us.oracle.com/linux-guasun-public

12 years agoqla2xxx: Update the driver version to 8.04.00.07.39.0-k.
Saurav Kashyap [Mon, 27 Aug 2012 07:35:32 +0000 (13:05 +0530)]
qla2xxx: Update the driver version to 8.04.00.07.39.0-k.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Delay for legacy interrupts not rquired for all board for ISP83xx.
Giridhar Malavali [Tue, 21 Aug 2012 21:18:00 +0000 (14:18 -0700)]
qla2xxx: Delay for legacy interrupts not rquired for all board for ISP83xx.

JIRA Key: V2632FC-263

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
12 years agoqla2xxx: Use the right field for container_of.
Arun Easi [Thu, 9 Aug 2012 19:01:17 +0000 (12:01 -0700)]
qla2xxx: Use the right field for container_of.

JIRA Key: V2632FC-259

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
12 years agoqla2xxx: Allow MSI interrupt registration for ISP82xx.
Giridhar Malavali [Fri, 10 Aug 2012 13:39:56 +0000 (06:39 -0700)]
qla2xxx: Allow MSI interrupt registration for ISP82xx.

JIRA Key: V2632FC-260

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
12 years agoqla2xxx: Don't toggle RISC interrupt bits after IRQ lines are attached.
Giridhar Malavali [Wed, 8 Aug 2012 14:21:28 +0000 (07:21 -0700)]
qla2xxx: Don't toggle RISC interrupt bits after IRQ lines are attached.

JIRA Key: V2632FC-246.

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Acked-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
12 years agoqla2xxx: Fix incorrect status reporting on DIF errors.
Arun Easi [Fri, 3 Aug 2012 17:09:35 +0000 (10:09 -0700)]
qla2xxx: Fix incorrect status reporting on DIF errors.

JIRA Key: V2632FC-254

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
12 years agoqla2xxx: Remove dumping fw on timeout for bidirectional commands.
Chad Dupuis [Fri, 3 Aug 2012 19:19:42 +0000 (12:19 -0700)]
qla2xxx: Remove dumping fw on timeout for bidirectional commands.

JIRA Key: V2632FC-255

12 years agoqla2xxx: T10 DIF - ISP83xx changes.
Arun Easi [Mon, 27 Aug 2012 07:31:59 +0000 (13:01 +0530)]
qla2xxx: T10 DIF - ISP83xx changes.

JIRA Key: V2632FC-136

Acked-by: Giridhar Malvali <giridhar.malvali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Fix for legacy interrupts for ISP83xx.
Chad Dupuis [Fri, 3 Aug 2012 02:46:01 +0000 (08:16 +0530)]
qla2xxx: Fix for legacy interrupts for ISP83xx.

JIRA Key: V2632FC-253

Acked-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Acked-by: Chad Dupuis <chad.dupuis.qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Restrict nic core reset to one function for mctp.
Saurav Kashyap [Thu, 2 Aug 2012 06:04:17 +0000 (11:34 +0530)]
qla2xxx: Restrict nic core reset to one function for mctp.

In case of mctp enable board both functions receive 8200 AEN, both captures
the dump and both ends up restarting the nic core. This patch prevents allow
only function to perform nic core reset.

JIRA Key: V2632FC-251

ER: ER96691

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
12 years agoqla2xxx: Update to Implementation of the mctp.
Saurav Kashyap [Mon, 27 Aug 2012 07:28:00 +0000 (12:58 +0530)]
qla2xxx: Update to Implementation of the mctp.

- Changes the size to 0x86064.
- The fw expects dword len instead of bytes.
- removed family version, its removed from requirements.
- Do nic core reset even on dump failure.
- mctp dump failure used to return failure even in case of success.
- memset mailbox regs and correctly set them.

Jira Key: V2632FC-213

ER: ER95908

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Enable fw attributes for ISP24xx and above.
Saurav Kashyap [Tue, 31 Jul 2012 07:59:46 +0000 (13:29 +0530)]
qla2xxx: Enable fw attributes for ISP24xx and above.

JIRA Key: V2632FC-250

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Acked-by: Armen Baloyan <armen.baloyan@qlogic.com>
12 years agoqla2xxx: Get fcal position map should not be called for p2p topology.
Saurav Kashyap [Tue, 31 Jul 2012 07:34:51 +0000 (13:04 +0530)]
qla2xxx: Get fcal position map should not be called for p2p topology.

JIRA Key: V2632FC-249

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Acked-by: Armen Baloyan <armen.baloyan@qlogic.com>