]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
12 years ago[kabi] update kabi
Maxim Uvarov [Tue, 4 Sep 2012 20:19:08 +0000 (13:19 -0700)]
[kabi] update kabi

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years ago[config] clean up NBD settings in kernel config
Maxim Uvarov [Tue, 4 Sep 2012 18:46:28 +0000 (11:46 -0700)]
[config] clean up NBD settings in kernel config

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoMerge branch 'uek2-2.6.39-300-be2iscsi-update' of git://ca-git.us.oracle.com/linux...
Maxim Uvarov [Mon, 3 Sep 2012 08:52:41 +0000 (01:52 -0700)]
Merge branch 'uek2-2.6.39-300-be2iscsi-update' of git://ca-git.us.oracle.com/linux-snits-public

12 years agoqla2xxx: Update the driver version to 8.04.00.08.39.0-k.
Saurav Kashyap [Mon, 3 Sep 2012 06:04:23 +0000 (11:34 +0530)]
qla2xxx: Update the driver version to 8.04.00.08.39.0-k.

Bugdb: 13653
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Correct loop_id_map allocation-size and usage.
Andrew Vasquez [Fri, 31 Aug 2012 04:54:20 +0000 (21:54 -0700)]
qla2xxx: Correct loop_id_map allocation-size and usage.

Bugdb: 13653
Original code incorrectly assigned LOOPID_MAP_SIZE to be the
allocation size in bytes rather than total bit size.
Additionally corrected code to check for bit-allocation failure
in qla2x00_find_new_loop_id().

JIRA Key: V2632FC-270

12 years agodm mpath: delay retry of bypassed pg
Mike Christie [Sat, 2 Jun 2012 23:29:45 +0000 (00:29 +0100)]
dm mpath: delay retry of bypassed pg

Orabug: 14478983
If I/O needs retrying and only bypassed priority groups are available,
set the pg_init_delay_retry flag to wait before retrying.

If, for example, the reason for the bypass is that the controller is
getting reset or there is a firmware upgrade happening, retrying right
away would cause a flood of log messages and retries for what could be a
few seconds or even several minutes.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years ago[kabi] update kabi for ASM and ACFS
Maxim Uvarov [Fri, 31 Aug 2012 12:47:08 +0000 (05:47 -0700)]
[kabi] update kabi for ASM and ACFS

Orabug: 14547312
Bugz: 13687, 13688, 13689
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoMerge branch 'uek-2.6.39-300-nic-drv-update' of git://ca-git.us.oracle.com/linux...
Maxim Uvarov [Fri, 31 Aug 2012 09:22:28 +0000 (02:22 -0700)]
Merge branch 'uek-2.6.39-300-nic-drv-update' of git://ca-git.us.oracle.com/linux-joejin-public

Network drivers update.

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agobe2iscsi: Bump the driver version.
John Soni Jose [Thu, 23 Aug 2012 09:09:28 +0000 (14:39 +0530)]
be2iscsi: Bump the driver version.

 Patch sent 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 a kernel panic because of TCP RST/FIN received.
John Soni Jose [Thu, 23 Aug 2012 09:07:23 +0000 (14:37 +0530)]
be2iscsi: Fix a kernel panic because of TCP RST/FIN received.

 A TCP RST/FIN can be received even before the connection specific
 structures are initialized.This fix checks for the conn structure
 is intialized or not  when RST/FIN is received.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
12 years agobe2iscsi: Configure the VLAN settings on the adapter.
John Soni Jose [Thu, 23 Aug 2012 09:04:36 +0000 (14:34 +0530)]
be2iscsi: Configure the VLAN settings on the adapter.

 Configure the VLAN parameters on the adapter using the iscsiadm
 interface.

 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: Format the MAC_ADDR with sysfs_format_mac.
John Soni Jose [Thu, 23 Aug 2012 09:02:08 +0000 (14:32 +0530)]
be2iscsi: Format the MAC_ADDR with sysfs_format_mac.

 The MAC_ADDR stored in driver private structure is of
 unsigned char data type but strlcpy parameters is of
 signed char data type. This conversion of data types
 lead to change in the value.This changed value is passed
 to the upper layer and junk characters were displayed
 when "iscsiadm -m iface" command was run.

 In case of iSCSI boot, since the the MAC_ADDR was coming
 junk the boot was also not working

 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: Logging mechanism for the driver.
John Soni Jose [Thu, 23 Aug 2012 08:59:39 +0000 (14:29 +0530)]
be2iscsi: Logging mechanism for the driver.

 Log level mechanism for different events enabled. These
 log levels can be set at driver load time/run time. The
 log level is set for each Scsi_host.

 Fixed few multi-line print warning to get over the new checkpatch.pl
 warnings on multi-line strings.

 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: 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 agoe1000e: disable rxhash when try to enable jumbo frame also rxhash and rxcsum have...
Joe Jin [Tue, 28 Aug 2012 13:05:09 +0000 (21:05 +0800)]
e1000e: disable rxhash when try to enable jumbo frame also rxhash and rxcsum have enabled

commit ffd3d6 check if both rxhash and rxcsum enabled when enable jumbo
frames and disallowed all of them enabled at the same time.
Since jumbo frame widely be used in real world, and el5 did not supported
enable/disable rxhash, so we changed default behavior to disable rxhash
when try to enable jumbo frames also rxhash and rxcsum have enabled.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
Acked-by: Adnan Misherfi <adnan.misherfi@oracle.com>
12 years agor8169: verbose error message.
Francois Romieu [Wed, 11 Jul 2012 21:39:51 +0000 (23:39 +0200)]
r8169: verbose error message.

(cherry picked from commit 82e316efbd1c68946c8760f930b81d73e9c4425a)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: remove rtl_ocpdr_cond.
Hayes Wang [Wed, 11 Jul 2012 12:31:56 +0000 (20:31 +0800)]
r8169: remove rtl_ocpdr_cond.

It is not needed for mac_ocp_{write / read}. Actually bit 31 of OCPDR
does not change and r8168_mac_ocp_read always returns ~0.

(cherry picked from commit 3a83ad12b850c3c5b89fa9008bdd0c0782f0cf68)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Tested-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: fix argument in rtl_hw_init_8168g.
Hayes Wang [Tue, 10 Jul 2012 06:47:05 +0000 (08:47 +0200)]
r8169: fix argument in rtl_hw_init_8168g.

(cherry picked from commit 5f8bcce99e83b1155954b1ae7291dc754ad9025e)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: support RTL8168G
Joe Jin [Tue, 28 Aug 2012 00:28:17 +0000 (08:28 +0800)]
r8169: support RTL8168G

For RTL8111G, the settings of phy and firmware are replaced with
ocp functions. r8168g_mdio_{write / read} redirects the relative
settings to suitable ocp functions. A per-device variable is needed
to evaluate the real address of ocp functions.
rtl_writephy(tp, 0x1f, xxxx) is dedicated to keeping said variable
up-to-date.

(backported from upstream commit c558386b836ee97762e12495101c6e373f20e69d)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: abstract out loop conditions.
Francois Romieu [Fri, 6 Jul 2012 12:19:23 +0000 (14:19 +0200)]
r8169: abstract out loop conditions.

Twelve functions can fail silently. Now they have a chance to complain.

Macro and pasting abuse has been kept at a level where tags and
friends should not be hurt.

(cherry picked from commit ffc46952b313ff037debca1b4e3da9472ff4b441)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: ephy, eri and efuse functions signature changes.
Francois Romieu [Fri, 6 Jul 2012 20:40:38 +0000 (22:40 +0200)]
r8169: ephy, eri and efuse functions signature changes.

(cherry picked from commit fdf6fc067aaeb13aba89d1b56aa39d3bf06fde43)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: csi_ops signature change.
Francois Romieu [Fri, 6 Jul 2012 11:37:00 +0000 (13:37 +0200)]
r8169: csi_ops signature change.

(cherry picked from commit 52989f0e429a97bc9075245e2e14ece2a4ebca5c)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: mdio_ops signature change.
Francois Romieu [Fri, 6 Jul 2012 18:19:42 +0000 (20:19 +0200)]
r8169: mdio_ops signature change.

Further changes need more context down in the call stack.

(cherry picked from commit 24192210a57a24a45b29dc3519dc42e073ea7b0a)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: add RTL8106E support.
Hayes Wang [Mon, 2 Jul 2012 09:23:21 +0000 (17:23 +0800)]
r8169: add RTL8106E support.

(cherry picked from commit 5598bfe5191d09cdd622aeac39badc42508b227f)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: RxConfig hack for the 8168evl.
françois romieu [Wed, 20 Jun 2012 12:09:18 +0000 (12:09 +0000)]
r8169: RxConfig hack for the 8168evl.

The 8168evl (RTL_GIGA_MAC_VER_34) based Gigabyte GA-990FXA motherboards
are very prone to NETDEV watchdog problems without this change. See
https://bugzilla.kernel.org/show_bug.cgi?id=42899 for instance.

I don't know why it *works*. It's depressingly effective though.

For the record:
- the problem may go along IOMMU (AMD-Vi) errors but it really looks
  like a red herring.
- the patch sets the RX_MULTI_EN bit. If the 8168c doc is any guide,
  the chipset now fetches several Rx descriptors at a time.
- long ago the driver ignored the RX_MULTI_EN bit.
  e542a2269f232d61270ceddd42b73a4348dee2bb changed the RxConfig
  settings. Whatever the problem it's now labeled a regression.
- Realtek's own driver can identify two different 8168evl devices
  (CFG_METHOD_16 and CFG_METHOD_17) where the r8169 driver only
  sees one. It sucks.

(cherry picked from commit eb2dc35d99028b698cdedba4f5522bc43e576bd2)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: avoid NAPI scheduling delay.
françois romieu [Sat, 9 Jun 2012 10:53:16 +0000 (10:53 +0000)]
r8169: avoid NAPI scheduling delay.

While reworking the r8169 driver a few months ago to perform the
smallest amount of work in the irq handler, I took care of avoiding
any irq mask register operation in the slow work dedicated user
context thread. The slow work thread scheduled an extra round of NAPI
work which would ultimately set the irq mask register as required,
thus keeping such irq mask operations in the NAPI handler.
It would eventually race with the irq handler and delay NAPI execution
for - assuming no further irq - a whole ksoftirqd period. Mildly a
problem for rare link changes or corner case PCI events.

The race was always lost after the last bh disabling lock had been
removed from the work thread and people started wondering where those
pesky "NOHZ: local_softirq_pending 08" messages came from.

Actually the irq mask register _can_ be set up directly in the slow
work thread.

(cherry picked from commit 7dbb491878a2c51d372a8890fa45a8ff80358af1)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Reported-by: Dave Jones <davej@redhat.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: call netif_napi_del at errpaths and at driver unload
Devendra Naga [Thu, 31 May 2012 01:51:20 +0000 (01:51 +0000)]
r8169: call netif_napi_del at errpaths and at driver unload

when register_netdev fails, the init'ed NAPIs by netif_napi_add must be
deleted with netif_napi_del, and also when driver unloads, it should
delete the NAPI before unregistering netdevice using unregister_netdev.

(cherry picked from commit ad1be8d345416a794dea39761a374032aa471a76)
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago8139cp/8139too: terminate the eeprom access with the right opmode
Jason Wang [Thu, 31 May 2012 18:19:48 +0000 (18:19 +0000)]
8139cp/8139too: terminate the eeprom access with the right opmode

Currently, we terminate the eeprom access through clearing the CS by:

RTL_W8 (Cfg9346, ~EE_CS); or writeb (~EE_CS, ee_addr);

This would left the eeprom into "Config. Register Write Enable:"
state which is not expcted as the highest two bits were set to
0x11 ( expected is the "Normal" mode (0x00)). Solving this by write
0x0 instead of ~EE_CS when terminating the eeprom access.

(cherry picked from commit 0bc777bca480357941418952cf228484f5485daf)
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago8139cp: set ring address before enabling receiver
Jason Wang [Thu, 31 May 2012 18:19:39 +0000 (18:19 +0000)]
8139cp: set ring address before enabling receiver

Currently, we enable the receiver before setting the ring address which could
lead the card DMA into unexpected areas. Solving this by set the ring address
before enabling the receiver.

btw. I find and test this in qemu as I didn't have a 8139cp card in hand. please
review it carefully.

(cherry picked from commit b01af4579ec41f48e9b9c774e70bd6474ad210db)
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: support the new RTL8411 chip.
Hayes Wang [Fri, 30 Mar 2012 06:48:06 +0000 (14:48 +0800)]
r8169: support the new RTL8411 chip.

Compared with previous chipsets, it needs no special action trough the
jumbo{enable/disable} helpers to operate with jumbo frames.

(cherry picked from commit b3d7b2f2f07ff0ab87442f2d499f2860ef59bfaa)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: adjust some functions of 8111f
Hayes Wang [Fri, 30 Mar 2012 06:33:03 +0000 (14:33 +0800)]
r8169: adjust some functions of 8111f

Put some settings of 8111f into one function which may be reused.

(cherry picked from commit 5f886e08901adaaaa1c79d1f964035aee6a29370)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: support the new RTL8402 chip.
Hayes Wang [Fri, 30 Mar 2012 06:33:02 +0000 (14:33 +0800)]
r8169: support the new RTL8402 chip.

(cherry picked from commit 7e18dca16246b2891239cfc3c6e2dfcea715d353)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: add device specific CSI access helpers.
Hayes Wang [Fri, 30 Mar 2012 06:33:01 +0000 (14:33 +0800)]
r8169: add device specific CSI access helpers.

New chipsets need it.

(cherry picked from commit beb1fe184f673fae83ddd9beca3fe662019ef876)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: modify pll power function
Hayes Wang [Fri, 30 Mar 2012 06:33:00 +0000 (14:33 +0800)]
r8169: modify pll power function

Adjust r810x_pll_power_down, r810x_pll_power_up, and r8168_pll_power_up.
Always power up device during rtl_open. For r810x, turn off more power
when the WOL is disabled.

(cherry picked from commit 0004299ad41885a0a1fd321715fe7396be17ce35)
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: 8168c and later require bit 0x20 to be set in Config2 for PME signaling.
Francois Romieu [Tue, 17 Apr 2012 09:12:01 +0000 (11:12 +0200)]
r8169: 8168c and later require bit 0x20 to be set in Config2 for PME signaling.

The new 84xx stopped flying below the radars.

(cherry picked from commit d387b427c973974dd619a33549c070ac5d0e089f)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: Config1 is read-only on 8168c and later.
Francois Romieu [Tue, 17 Apr 2012 09:10:11 +0000 (11:10 +0200)]
r8169: Config1 is read-only on 8168c and later.

Suggested by Hayes.

(cherry picked from commit 851e60221926a53344b4227879858bef841b0477)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago8139too: dev->{base_addr, irq} removal.
Joe Jin [Tue, 28 Aug 2012 00:21:47 +0000 (08:21 +0800)]
8139too: dev->{base_addr, irq} removal.

(backported from upstream commit 65712ec016788538d27c0b0452e57b751776914e)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago8139cp: stop using net_device.{base_addr, irq}.
Joe Jin [Tue, 28 Aug 2012 00:20:25 +0000 (08:20 +0800)]
8139cp: stop using net_device.{base_addr, irq}.

(backported from upstream commit a69afe3263717ba9384cf18d05722c598f6820af)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169.c: fix comment typo
Justin P. Mattock [Sat, 24 Mar 2012 16:00:04 +0000 (09:00 -0700)]
r8169.c: fix comment typo

The below patch fixes a typo that I found while reading the code.

(cherry picked from commit a9d7e794ea66902a255be6e87f633286d04c2b39)
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: move rtl_cfg_info closer to its caller.
Francois Romieu [Thu, 8 Mar 2012 09:09:40 +0000 (10:09 +0100)]
r8169: move rtl_cfg_info closer to its caller.

(cherry picked from commit 31fa8b1855cb1f1fd99e2f2f9b8f2c8f113e9f2e)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: move the netpoll handler after the irq handler.
Francois Romieu [Thu, 8 Mar 2012 09:06:18 +0000 (10:06 +0100)]
r8169: move the netpoll handler after the irq handler.

(cherry picked from commit dc1c00ce70da5d3bb3fc97707e04f598ff72e7ba)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: move rtl8169_open after rtl_task it depends on.
Joe Jin [Tue, 28 Aug 2012 00:18:28 +0000 (08:18 +0800)]
r8169: move rtl8169_open after rtl_task it depends on.

(backported from upstream commit df43ac7831a0e321b6b183b7eb48ae4577207453)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: move rtl_set_rx_mode before its rtl_hw_start callers.
Joe Jin [Tue, 28 Aug 2012 00:16:01 +0000 (08:16 +0800)]
r8169: move rtl_set_rx_mode before its rtl_hw_start callers.

(backporteded from upstream commit e6b763ea0527f1038752a591e4b45cffacc4bba2)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: move net_device_ops beyond the methods it references.
Francois Romieu [Thu, 8 Mar 2012 09:01:50 +0000 (10:01 +0100)]
r8169: move net_device_ops beyond the methods it references.

(cherry picked from commit fa9c385ef57c1a04966f01314f96fb7c9347d924)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: move the driver probe method to the end of the driver file.
Joe Jin [Tue, 28 Aug 2012 00:13:32 +0000 (08:13 +0800)]
r8169: move the driver probe method to the end of the driver file.

(backported from upstream commit 3b6cf25de260d5607fa1fe48ba1af0f6d057708e)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agor8169: add firmware for RTL8168G RTL8106E RTL8411 RTL8402
Joe Jin [Tue, 28 Aug 2012 01:41:02 +0000 (09:41 +0800)]
r8169: add firmware for RTL8168G RTL8106E RTL8411 RTL8402

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: replace open-coded ARRAY_SIZE with macro
Jim Cromie [Tue, 10 Apr 2012 14:56:09 +0000 (14:56 +0000)]
enic: replace open-coded ARRAY_SIZE with macro

(cherry picked from commit 4133099b3e1ffd63476ede836a5a10aa26fa93d0)
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Stop using NLA_PUT*().
David S. Miller [Mon, 2 Apr 2012 00:22:22 +0000 (20:22 -0400)]
enic: Stop using NLA_PUT*().

These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

(cherry picked from commit 1a106de6e6543e7d44dbe1bc5f37a8964607dfa6)
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Fix addr valid check in enic_set_vf_mac
Roopa Prabhu [Wed, 7 Mar 2012 03:50:44 +0000 (03:50 +0000)]
enic: Fix addr valid check in enic_set_vf_mac

zero mac address is a valid address for VIC dynamic vnic and sriov Vf's.
Fix the check in enic_set_vf_mac appropriately

(cherry picked from commit b8622cbd58f345d48f683d881abe3037c60aa673)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: fix an endian bug in enic_probe()
Dan Carpenter [Wed, 29 Feb 2012 21:19:54 +0000 (21:19 +0000)]
enic: fix an endian bug in enic_probe()

"num_vfs" is a u32 but we only use the high 16 bits and the low 16bits
are left as zero.  That isn't a problem for little endian systems but it
will break on big endian ones.

(cherry picked from commit 413708bbaf5c85c4c8a264145f7d6c3afcd97f99)
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Fix endianness bug.
Santosh Nayak [Fri, 24 Feb 2012 06:56:39 +0000 (06:56 +0000)]
enic: Fix endianness bug.

Sparse complaints the endian bug.

(cherry picked from commit 21ca54e99b085b9ff4c91ca41afe42a439966109)
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Add support for fw init command on sriov vf's
Roopa Prabhu [Mon, 20 Feb 2012 00:12:04 +0000 (00:12 +0000)]
enic: Add support for fw init command on sriov vf's

This patch fixes enic_probe to do a fw init devcmd for sriov vfs.
This enables vf driver in the guest to get into adapter init state without
having to explicitly issue an init fw cmd with portprofile info. But a
successful init on the vf will require the port profile information to be
pre-provisioned by the hypervisor via the pf

(cherry picked from commit 2b68c18194b078489a84023564bcf7464b6c7b37)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Fix ndo_set_vf_mac and ndo_set_vf_port to set/get the sriov vf's mac
Roopa Prabhu [Mon, 20 Feb 2012 00:11:58 +0000 (00:11 +0000)]
enic: Fix ndo_set_vf_mac and ndo_set_vf_port to set/get the sriov vf's mac

This patch fixes the ndo_set_vf_mac netdev op to set the sriov vf mac
in adapter using the new fw devcmd CMD_SET_MAC_ADDR. During port profile
associate the pf driver gets the vf mac using CMD_GET_MAC_ADDR.

(cherry picked from commit b476583354fc62cae433eb24d4027597c03be4c9)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Add new fw devcmd to set mac address of an interface
Roopa Prabhu [Mon, 20 Feb 2012 00:11:53 +0000 (00:11 +0000)]
enic: Add new fw devcmd to set mac address of an interface

This patch adds a new devcmd CMD_SET_MAC_ADDR to set the mac address of an
interface.

(cherry picked from commit d6c81bc6dca768dff1a3f127beee11e8102669a7)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: rename CMD_MAC_ADDR to CMD_GET_MAC_ADDR
Roopa Prabhu [Mon, 20 Feb 2012 00:11:48 +0000 (00:11 +0000)]
enic: rename CMD_MAC_ADDR to CMD_GET_MAC_ADDR

firmware devcmd CMD_MAC_ADDR gets the mac address of a vnic from adapter.
This patch renames it to CMD_GET_MAC_ADDR more appropriately.

(cherry picked from commit b13423ee0cba4dc23ca21e61ca45f482d6713509)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agocisco/enic: use eth_hw_addr_random() instead of random_ether_addr()
Danny Kukawka [Sat, 18 Feb 2012 06:50:43 +0000 (01:50 -0500)]
cisco/enic: use eth_hw_addr_random() instead of random_ether_addr()

Use dev_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.

Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.

v3: adapt to net-next
v2: use bitops, adapt to eth_hw_addr_random(), add a comment

(cherry picked from commit da1943164677ae2cdd630196b79089d476726348)
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: remove assignment of random mac on enic vf
Roopa Prabhu [Sat, 11 Feb 2012 22:12:44 +0000 (22:12 +0000)]
enic: remove assignment of random mac on enic vf

This patch removes random mac assignment on vf's. The vf's will start with
a zero mac and with upcoming support in fw/driver, a vf mac can be set
via the pf. vf's also support ndo_set_mac_address. This decision was made
based on the fact that a random mac on a vf is not really needed. And this
will reduce some of the problems with the vf's getting a new mac on
every driver load/unload (one of them being udev renaming the device on ever
load/unload and reboot).

(cherry picked from commit 73c2ae763af0eaa1794dda68c63f97c2905722a8)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: sujith sankar <ssujith@cisco.com>
Signed-off-by: ChingWei Chang <cwchang@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Fix address deregistration for sriov vf during port profile disassociate
Roopa Prabhu [Sat, 11 Feb 2012 21:37:37 +0000 (21:37 +0000)]
enic: Fix address deregistration for sriov vf during port profile disassociate

This patch fixes erroneous PF address deregistration in cases where
a port profile disassociate is called on an already disassociated interface.

(cherry picked from commit 9f1de88ddd5eac43c14ed20835b4c738be61e162)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: sujith sankar <ssujith@cisco.com>
Signed-off-by: ChingWei Chang <cwchang@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Check firmware capability before issuing firmware commands
Neel Patel [Fri, 3 Feb 2012 08:25:19 +0000 (08:25 +0000)]
enic: Check firmware capability before issuing firmware commands

Check if firmware supports a particular command by first checking capability
using devcmd CMD_CAPABILITY.

(cherry picked from commit f8a6dd59f79f83d7188909331dcdf6e45e1b2c1f)
Signed-off-by: Neel Patel <neepatel@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Enable support for multiple hardware receive queues
Neel Patel [Fri, 3 Feb 2012 08:25:14 +0000 (08:25 +0000)]
enic: Enable support for multiple hardware receive queues

This patch enables support for multiple receive queues. If multiple receive
queues are used ingress traffic is hashed into one of the receive queues based
on IP or TCP or both headers. The max number of supported receive queues per
vnic is 8.

(cherry picked from commit 63da93d932af04cf80507b110afe894a8a8d1f90)
Signed-off-by: Neel Patel <neepatel@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>