]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
12 years ago[SCSI] hpsa: use ioremap_nocache instead of ioremap
Stephen M. Cameron [Thu, 26 Jul 2012 16:34:23 +0000 (11:34 -0500)]
[SCSI] hpsa: use ioremap_nocache instead of ioremap

I think ioremap() ends up being equivalent to ioremap_nocache
by default, but we should signal our intent that these mappings
should be non-cacheable.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 088ba34c92055547ef4cc862a863334c01d9a304)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: fix incorrect abort diagnostic message
Stephen M. Cameron [Thu, 26 Jul 2012 16:34:17 +0000 (11:34 -0500)]
[SCSI] hpsa: fix incorrect abort diagnostic message

In the abort handler, when asked to abort a command which
is not known to the driver, SUCCESS is returned, but the
diagnostic message incorrectly indicates the abort failed.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit d6ebd0f758bec06041442aa62c602281005fb9ef)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: dial down lockup detection during firmware flash
Stephen M. Cameron [Tue, 1 May 2012 16:43:42 +0000 (11:43 -0500)]
[SCSI] hpsa: dial down lockup detection during firmware flash

Dial back the aggressiveness of the controller lockup detection thread.
Currently it will declare the controller to be locked up if it goes
for 10 seconds with no interrupts and no change in the heartbeat
register.  Dial back this to 30 seconds with no heartbeat change, and
also snoop the ioctl path and if a firmware flash command is detected,
dial it back further to 4 minutes until the firmware flash command
completes.  The reason for this is that during the firmware flash
operation, the controller apparently doesn't update the heartbeat
register as frequently as it is supposed to, and we can get a false
positive.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit e85c59746957fd6e3595d02cf614370056b5816e)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: add new RAID level "1(ADM)"
Mike Miller [Tue, 1 May 2012 16:43:32 +0000 (11:43 -0500)]
[SCSI] hpsa: add new RAID level "1(ADM)"

Signed-off-by: Mike Miller <mikem@beardog.cce.hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit d82357eaaa4c9b9cb16cbc1b95cb015801506a33)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: factor out hpsa_free_irqs_and_disable_msix
Stephen M. Cameron [Tue, 1 May 2012 16:43:21 +0000 (11:43 -0500)]
[SCSI] hpsa: factor out hpsa_free_irqs_and_disable_msix

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 0097f0f45a70cef4c2af7bdd718fc979be43aecb)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: refine interrupt handler locking for greater concurrency
Matt Gates [Tue, 1 May 2012 16:43:11 +0000 (11:43 -0500)]
[SCSI] hpsa: refine interrupt handler locking for greater concurrency

Use spinlocks with finer granularity in the submission and
completion paths to allow concurrent execution for multiple
reply queues.  In particular, do not hold a spin lock while
submitting a request to the device, nor during most of the
interrupt handler.

Signed-off-by: Matt Gates <matthew.gates@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit e16a33adc0e59aa96a483fd2923d77e674f013c1)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: use multiple reply queues
Matt Gates [Tue, 1 May 2012 16:43:06 +0000 (11:43 -0500)]
[SCSI] hpsa: use multiple reply queues

Smart Arrays can support multiple reply queues onto which command
completions may be deposited.  It can help performance quite a bit
to arrange for command completions to be processed on the same CPU
from which they were submitted to increase the likelihood of cache
hits.

Signed-off-by: Matt Gates <matthew.gates@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 254f796b9f22b1944c64caabc356a56caaa2facd)

Conflicts:
drivers/scsi/hpsa.c

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: factor out tail calls to next_command() in process_(non)indexed_cmd()
Stephen M. Cameron [Tue, 1 May 2012 16:43:01 +0000 (11:43 -0500)]
[SCSI] hpsa: factor out tail calls to next_command() in process_(non)indexed_cmd()

This is in order to smooth the way for upcoming changes to allow use of
multiple reply queues for command completions.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Matt Gates <matthew.gates@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 1d94f94d89848762306b4a8bd5e658c11828ab12)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: do aborts two ways
Stephen M. Cameron [Tue, 1 May 2012 16:42:56 +0000 (11:42 -0500)]
[SCSI] hpsa: do aborts two ways

When aborting a command, the tag is supposed to be
specified as 64-bit little endian.  However, some smart
arrays expect the tag of the command to be aborted to be
specified in a strange byte order.  How to tell which sort
of Smart Array firmware we're dealing with is not obvious.
However, because of the way we construct our tags, the values
of any outstanding tag when specified with the "strange" byte
order will not collide with the value specified in the correct
order.  That means we can safely attempt the abort both ways.

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 6cba3f1972de14421ef4cf4b46a15cc5d604e791)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: add abort error handler function
Stephen M. Cameron [Tue, 1 May 2012 16:42:51 +0000 (11:42 -0500)]
[SCSI] hpsa: add abort error handler function

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 75167d2cc7654f57b90497fe90b1f0ae946c22a6)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: remove unused parameter from finish_cmd
Stephen M. Cameron [Tue, 1 May 2012 16:42:46 +0000 (11:42 -0500)]
[SCSI] hpsa: remove unused parameter from finish_cmd

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 5a3d16f51ef62bf17c9752c469db881dd12bce9b)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: do not give up retry of driver cmds after only 3 retries
Stephen M. Cameron [Tue, 1 May 2012 16:42:40 +0000 (11:42 -0500)]
[SCSI] hpsa: do not give up retry of driver cmds after only 3 retries

Instead of giving up after 3 immediate retries of driver initiated
commands, back off the rate of retries and retry a bunch more times.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reviewed-by: Andi Shyti <andi.shyti@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 9c2fc1605fb917531f7dfb6fa2e84b56332a05b4)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: retry driver initiated commands on busy status
Matt Bondurant [Tue, 1 May 2012 16:42:35 +0000 (11:42 -0500)]
[SCSI] hpsa: retry driver initiated commands on busy status

In shared SAS configurations we might get a busy status
during driver initiated commands (e.g. during rescan for
devices).  We should retry the command in such cases rather
than giving up.

Signed-off-by: Matt Bondurant <Matthew.dav.bondurant@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 852af20aa64ef34ab07de978c676e1e8860dca2e)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: suppress excessively chatty error messages
Stephen M. Cameron [Tue, 1 May 2012 16:42:25 +0000 (11:42 -0500)]
[SCSI] hpsa: suppress excessively chatty error messages

Default behavior for any CHECK CONDITION excepting a few special cases is to
print out certain parts of the sense buffer and the CDB.  Default behavior
should be to print nothing and let the upper layers or applications decide what
to do about these.  The same information is already available by setting the
appropriate bits of the scsi_logging_level kernel parameter or via
/proc/sys/dev/scsi/logging_level.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 21b8e4ef0357041854819d0f97bf1052ab4763e6)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: enable bus master bit after pci_enable_device
Stephen M. Cameron [Tue, 1 May 2012 16:42:20 +0000 (11:42 -0500)]
[SCSI] hpsa: enable bus master bit after pci_enable_device

pci_disable_device() disables the bus master bit and pci_enable_device does
not re-enable it.  It needs to be enabled.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 5cb460a640cc733fee03adbbc9257246e6c3de08)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: do not skip disabled devices
Stephen M. Cameron [Tue, 1 May 2012 16:42:14 +0000 (11:42 -0500)]
[SCSI] hpsa: do not skip disabled devices

There was code to skip "disabled" devices which was intended to
skip devices disabled in the BIOS, but it really just checks to
see if the device can write to host memory, which this is disabled
by pci_disable_device on driver unload, so this check has the effect
of preventing subsequent load of the driver.  And devices disabled in
the BIOS don't show up at all anyway, so this check never made any
sense to begin with, and should be removed.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit e754b42424e0bd5949f47118f71720c42b93c6e0)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: call pci_disable_device on driver unload
Stephen M. Cameron [Tue, 1 May 2012 16:42:09 +0000 (11:42 -0500)]
[SCSI] hpsa: call pci_disable_device on driver unload

As Jenx Axboe explained to me: "In earlier times (2.6.18 and pre, iirc), Linux
disabled IO and mem bars on pci_disable_device(). Now in newer kernel it does
not. And in the newer kernels you run into problems if you DON'T disable the
device on exit, since when it later loads the device is already in the enabled
state - and pci_enable_device() then does nothing. This typically screws
MSI/MSI-X." This is what the big scary comment that says pci_disable_device
does "something nasty" to smart arrays was evidently referring to.

If pci_disable_device is not called on driver rmmod, subsequently insmod'ing
the driver may in result in some cases fail to be able to receive interrupts,
esp.  if other drivers are loaded between unloading and loading hpsa.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit f0bd0b68220aaba354f84518173498cae160afdc)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: factor out driver name
Stephen M. Cameron [Thu, 19 Jan 2012 20:00:59 +0000 (14:00 -0600)]
[SCSI] hpsa: factor out driver name

Sometimes, for testing purposes (e.g. testing rmmod on a system
that normally boots using hpsa) it's nice to rename the driver
and split it into two drivers and restrict it to certain
controllers.  This makes that easier.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit f79cfec6b1906ab10ef70dccd601db25c97bae17)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years ago[SCSI] hpsa: gen8plus Smart Array IDs
Mike Miller [Thu, 20 Sep 2012 21:05:18 +0000 (16:05 -0500)]
[SCSI] hpsa: gen8plus Smart Array IDs

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit fe0c9610bb68dd0aad1017456f5e3c31264d70c2)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agomm/hotplug: correctly add new zone to all other nodes' zone lists
Jiang Liu [Wed, 19 Dec 2012 08:02:03 +0000 (00:02 -0800)]
mm/hotplug: correctly add new zone to all other nodes' zone lists

Bug-db: 14798
(mainline commit 08dff7b7d629807dbb1f398c68dd9cd58dd657a1)
CVE: CVE-2012-5517

BugLink: http://bugs.launchpad.net/bugs/1079860
    When online_pages() is called to add new memory to an empty zone, it
    rebuilds all zone lists by calling build_all_zonelists().  But there's a
    bug which prevents the new zone to be added to other nodes' zone lists.

    online_pages() {
        build_all_zonelists()
        .....
        node_set_state(zone_to_nid(zone), N_HIGH_MEMORY)
    }

    Here the node of the zone is put into N_HIGH_MEMORY state after calling
    build_all_zonelists(), but build_all_zonelists() only adds zones from
    nodes in N_HIGH_MEMORY state to the fallback zone lists.
    build_all_zonelists()

        ->__build_all_zonelists()
        ->build_zonelists()
            ->find_next_best_node()
                ->for_each_node_state(n, N_HIGH_MEMORY)

    So memory in the new zone will never be used by other nodes, and it may
    cause strange behavor when system is under memory pressure.  So put node
    into N_HIGH_MEMORY state before calling build_all_zonelists().

Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
Signed-off-by: Jiang Liu <liuj97@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Keping Chen <chenkeping@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    (back ported from commit 08dff7b7d629807dbb1f398c68dd9cd58dd657a1)
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Orabug: 16020976
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Reviewed-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agoDivide by zero in TCP congestion control Algorithm.
Jesper Dangaard Brouer [Wed, 19 Dec 2012 06:59:03 +0000 (22:59 -0800)]
Divide by zero in TCP congestion control Algorithm.

Orabug: 16020656
Bug-db: 14798
CVE: CVE-2012-4565
The TCP Illinois congestion control algorithm does not correctly handle a
zero number of RTTs when reading TCP stats, leading to a divide-by-zero
and kernel panic. A remote attacker could potentially use this flaw to
cause a remote denial of service.

Cc: Petr Matousek <pmatouse@redhat.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Reviewed-by: Guangyu Sun <guangyu.sun@oracle.com>
12 years agoFix length of buffer copied in __nfs4_get_acl_uncached
Sachin Prabhu [Thu, 22 Mar 2012 16:46:28 +0000 (16:46 +0000)]
Fix length of buffer copied in __nfs4_get_acl_uncached

Bug-db: 14798
CVE: CVE-2012-2375
(mainline commit 785d76dbd877fb3e631a26f67d86a2dd0c862f8e)
_copy_from_pages() used to copy data from the temporary buffer to the
user passed buffer is passed the wrong size parameter when copying
data. res.acl_len contains both the bitmap and acl lenghts while
acl_len contains the acl length after adjusting for the bitmap size.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoAvoid reading past buffer when calling GETACL
Sachin Prabhu [Tue, 17 Apr 2012 13:35:39 +0000 (14:35 +0100)]
Avoid reading past buffer when calling GETACL

Bug-db: 14798
CVE: CVE-2012-2375
(mainline commit 5a00689930ab975fdd1b37b034475017e460cf2a)
Bug noticed in commit
bf118a342f10dafe44b14451a1392c3254629a1f

When calling GETACL, if the size of the bitmap array, the length
attribute and the acl returned by the server is greater than the
allocated buffer(args.acl_len), we can Oops with a General Protection
fault at _copy_from_pages() when we attempt to read past the pages
allocated.

This patch allocates an extra PAGE for the bitmap and checks to see that
the bitmap + attribute_length + ACLs don't exceed the buffer space
allocated to it.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reported-by: Jian Li <jiali@redhat.com>
[Trond: Fixed a size_t vs unsigned int printk() warning]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
Conflicts:
fs/nfs/nfs4proc.c

12 years agoAvoid beyond bounds copy while caching ACL
Sachin Prabhu [Tue, 17 Apr 2012 13:36:40 +0000 (14:36 +0100)]
Avoid beyond bounds copy while caching ACL

Bug-db: 14798
CVE: CVE-2012-2375
(mainline commit 5a00689930ab975fdd1b37b034475017e460cf2a)
When attempting to cache ACLs returned from the server, if the bitmap
size + the ACL size is greater than a PAGE_SIZE but the ACL size itself
is smaller than a PAGE_SIZE, we can read past the buffer page boundary.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reported-by: Jian Li <jiali@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Conflicts:
fs/nfs/nfs4xdr.c

12 years agoMerge tag 'v2.6.39-400#bug16011154' of git://ca-git.us.oracle.com/linux-snits-public
Maxim Uvarov [Tue, 18 Dec 2012 07:26:17 +0000 (23:26 -0800)]
Merge tag 'v2.6.39-400#bug16011154' of git://ca-git.us.oracle.com/linux-snits-public

Orabug: 16011154
OLdev v2.6.39-400#bug16011154

12 years agoqla2xxx: Update the driver version to 8.04.00.11.39.0-k.
Saurav Kashyap [Mon, 26 Nov 2012 07:18:44 +0000 (12:48 +0530)]
qla2xxx: Update the driver version to 8.04.00.11.39.0-k.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Obtain loopback iteration count from bsg request.
Joe Carnuccio [Fri, 21 Sep 2012 22:13:44 +0000 (15:13 -0700)]
qla2xxx: Obtain loopback iteration count from bsg request.

qla2x00_loopback_test() was hard setting the loopback iteration
count to 1 rather than obtaining it from the bsg request.

JIRA Key: V2632FC-279

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Acked-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Acked-by: Armen Baloyan <armen.baloyan@qlogic.com>
12 years agoqla2xxx: Update the FTP site references in the driver sources.
Giridhar Malavali [Thu, 22 Nov 2012 02:13:33 +0000 (18:13 -0800)]
qla2xxx: Update the FTP site references in the driver sources.

JIRA Key: V2632FC-311

12 years agoqla2xxx: Debug ID corrections.
Chad Dupuis [Thu, 22 Nov 2012 06:58:43 +0000 (12:28 +0530)]
qla2xxx: Debug ID corrections.

Correct the comments at the top of qla_dbg.c to reflect the current state of
debug ID's in the driver.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Reject loopback request if one is already in progress.
Chad Dupuis [Thu, 22 Nov 2012 06:56:03 +0000 (12:26 +0530)]
qla2xxx: Reject loopback request if one is already in progress.

If another function on the port has initiated a loopback operation do not
process the current request.

JIRA Key: V2632FC-309
ER: 99818

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Print ignore message when thermal is not supported.
Joe Carnuccio [Thu, 22 Nov 2012 06:52:38 +0000 (12:22 +0530)]
qla2xxx: Print ignore message when thermal is not supported.

When the Read SFP mailbox command fails on the thermal device,
print a message explaining that thermal is not supported.

JIRA key: V2632FC-308
ER: 99940

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Avoid null pointer dereference in shutdown routine.
Masanari Iida [Wed, 21 Nov 2012 03:45:03 +0000 (09:15 +0530)]
qla2xxx: Avoid null pointer dereference in shutdown routine.

JIRA Key: V2632FC-307
ER: ER100463

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Acked-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Get VPD information from common location for CNA.
Saurav Kashyap [Tue, 20 Nov 2012 21:29:19 +0000 (13:29 -0800)]
qla2xxx: Get VPD information from common location for CNA.

JIRA Key: V2632FC-300

Acked-by: Girihar Malavali <giridhar.malavali@qlogic.com>
Acked-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
12 years agoqla2xxx: Correct race in loop_state assignment during reset handling.
Andrew Vasquez [Tue, 13 Nov 2012 16:19:11 +0000 (08:19 -0800)]
qla2xxx: Correct race in loop_state assignment during reset handling.

There's a subtle race in the loop/bus-reset handling whereby a
VHA's loop-state can get incorrectly set to 'down' after the
loop-reset and firmware's completion of link re-negotiation.  The
original code incorrectly assumes that firmware AENs would arrive
only after mailbox-command execution to initiate the link-flap.

Here's a good case with the old code (AENs arrive after
mailbox-command completion):

qla2xxx [0000:03:00.1]-8012:91: BUS RESET ISSUED nexus=91:0:4.
qla2xxx [0000:03:00.1]-287d:91: FCPort state transitioned from ONLINE to LOST - portid=010100.
qla2xxx [0000:03:00.1]-580e:91: Asynchronous P2P MODE received.
qla2xxx [0000:03:00.1]-287d:91: FCPort state transitioned from ONLINE to LOST - portid=010400.
qla2xxx [0000:03:00.1]-802b:91: BUS RESET SUCCEEDED nexus=91:0:4.
qla2xxx [0000:03:00.1]-480b:91: Reset marker scheduled.
qla2xxx [0000:03:00.1]-5812:91: Port database changed ffff 0006 0000.
qla2xxx [0000:03:00.1]-505f:91: Link is operational (4 Gbps).
qla2xxx [0000:03:00.1]-480c:91: Reset marker end.
qla2xxx [0000:03:00.1]-480f:91: Loop resync scheduled.
qla2xxx [0000:03:00.1]-8837:91: F/W Ready - OK.
qla2xxx [0000:03:00.1]-883a:91: fw_state=3 (7, 0, 0, 0) curr time=170b8f315.
qla2xxx [0000:03:00.1]-280e:91: HBA in F P2P topology.
qla2xxx [0000:03:00.1]-2812:91: qla2x00_configure_hba success
qla2xxx [0000:03:00.1]-2814:91: Configure loop -- dpc flags = 0x5260.

notice how the 'Port database changed' (8014) arrived after the
bus-reset handler completed 'BUS RESET SUCCEEDED'.

Now, here's a failing case with the old code (AENs arrive before
mailbox-command completion):

qla2xxx [0000:03:00.1]-8012:91: BUS RESET ISSUED nexus=91:0:0.
qla2xxx [0000:03:00.1]-580e:91: Asynchronous P2P MODE received.
qla2xxx [0000:03:00.1]-287d:91: FCPort state transitioned from ONLINE to LOST - portid=010100.
qla2xxx [0000:03:00.1]-287d:91: FCPort state transitioned from ONLINE to LOST - portid=010400.
qla2xxx [0000:03:00.1]-4800:91: DPC handler sleeping.
qla2xxx [0000:03:00.1]-5812:91: Port database changed ffff 0006 0000.
qla2xxx [0000:03:00.1]-505f:91: Link is operational (4 Gbps).
qla2xxx [0000:03:00.1]-802b:91: BUS RESET SUCCEEDED nexus=91:0:0.
qla2xxx [0000:03:00.1]-480b:91: Reset marker scheduled.
qla2xxx [0000:03:00.1]-480c:91: Reset marker end.
qla2xxx [0000:03:00.1]-480f:91: Loop resync scheduled.
qla2xxx [0000:03:00.1]-8837:91: F/W Ready - OK.
qla2xxx [0000:03:00.1]-883a:91: fw_state=3 (7, 0, 0, 0) curr time=170be9eb2.
qla2xxx [0000:03:00.1]-280e:91: HBA in F P2P topology.
qla2xxx [0000:03:00.1]-2812:91: qla2x00_configure_hba success
qla2xxx [0000:03:00.1]-2814:91: Configure loop -- dpc flags = 0x5260.
qla2xxx [0000:03:00.1]-281e:91: Needs RSCN update and loop transition.
qla2xxx [0000:03:00.1]-286a:91: qla2x00_configure_loop *** FAILED ***.
qla2xxx [0000:03:00.1]-4810:91: Loop resync end.
qla2xxx [0000:03:00.1]-4800:91: DPC handler sleeping.

This race would ultimately lead to devices go unexpectedly
offline until another link-flap or chip-reset would cause driver
re-discovery to take place.

JIRA Key: V2632FC-306

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
12 years agoqla2xxx: Display that driver is operating in legacy interrupt mode.
Saurav Kashyap [Mon, 12 Nov 2012 20:50:24 +0000 (12:50 -0800)]
qla2xxx: Display that driver is operating in legacy interrupt mode.

JIRA Key: V2632FC-304
ER: ER100161

Acked-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
12 years agoqla2xxx: Free rsp_data even on error in qla2x00_process_loopback().
Steve Hodgson [Mon, 12 Nov 2012 20:16:05 +0000 (12:16 -0800)]
qla2xxx: Free rsp_data even on error in qla2x00_process_loopback().

JIRA Key: V2632FC-305

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Acked-by: Armen Baloyan <armen.baloyan@qlogic.com>
12 years agoqla2xxx: Dont clear drv active on iospace config failure.
Saurav Kashyap [Tue, 6 Nov 2012 06:57:54 +0000 (12:27 +0530)]
qla2xxx: Dont clear drv active on iospace config failure.

JIRA Key: V2632FC-303
ER: ER100190

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Fix typo in qla2xxx driver.
Masanari Iida [Thu, 8 Nov 2012 01:06:23 +0000 (06:36 +0530)]
qla2xxx: Fix typo in qla2xxx driver.

JIRA Key: V2632FC-302

Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Update ql2xextended_error_logging parameter description with new option.
Chad Dupuis [Thu, 8 Nov 2012 00:54:28 +0000 (06:24 +0530)]
qla2xxx: Update ql2xextended_error_logging parameter description with new option.

Update the parameter description for the ql2xextended_error_logging parameter
with the following new option:

0x00008000 - Verbose output

JIRA Key: V2632FC-297

Acked-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Parameterize the link speed string conversion function.
Joe Carnuccio [Thu, 8 Nov 2012 00:46:32 +0000 (06:16 +0530)]
qla2xxx: Parameterize the link speed string conversion function.

Parameterize qla2x00_get_link_speed_str() to be generic on link speed.

JIRA Key: V2632FC-296

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Acked by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Add 16Gb/s case to get port speed capability.
Joe Carnuccio [Thu, 8 Nov 2012 00:24:23 +0000 (05:54 +0530)]
qla2xxx: Add 16Gb/s case to get port speed capability.

JIRA Key: V2632FC-295

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Acked-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoqla2xxx: Move marking fcport online ahead of setting iiDMA speed.
Joe Carnuccio [Thu, 8 Nov 2012 00:20:13 +0000 (05:50 +0530)]
qla2xxx: Move marking fcport online ahead of setting iiDMA speed.

JIRA Key: V2632FC-294

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Acked-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
12 years agoMerge tag 'v2.6.39-400.5.0#bugdb13826' of ca-git.us.oracle.com:linux-muvarov-public
Maxim Uvarov [Mon, 17 Dec 2012 12:19:48 +0000 (04:19 -0800)]
Merge tag 'v2.6.39-400.5.0#bugdb13826' of ca-git.us.oracle.com:linux-muvarov-public

Bug-db: 13826
Update be2net driver to 4.4.161.0o +.

12 years agobe2net: fix INTx ISR for interrupt behaviour on BE2
Sathya Perla [Fri, 7 Dec 2012 14:25:55 +0000 (09:25 -0500)]
be2net: fix INTx ISR for interrupt behaviour on BE2

On BE2 chip, an interrupt may be raised even when EQ is in un-armed state.
As a result be_intx()::events_get() and be_poll:events_get() can race and
notify an EQ wrongly.

Fix this by counting events only in be_poll(). Commit 0b545a629 fixes
the same issue in the MSI-x path.

But, on Lancer, INTx can be de-asserted only by notifying num evts. This
is not an issue as the above BE2 behavior doesn't exist/has never been
seen on Lancer.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix a possible events_get() race on BE2
Sathya Perla [Fri, 7 Dec 2012 14:02:41 +0000 (09:02 -0500)]
be2net: fix a possible events_get() race on BE2

On BE2 chip, an interrupt being raised even when EQ is in un-armed state has
been observed a few times.  This is not expected and has never been
observed on BE3/Lancer chips.

As a consequence, be_msix()::events_get() and be_poll()::events_get()
can race and notify an EQ wrongly causing a CEV UE. The other possible
side-effect would be traffic stalling because after notifying EQ,
napi_schedule() is ignored as NAPI is already running.

This patch fixes this issue by counting events only in be_poll().

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Remove bogus dependencies on INET
Ben Hutchings [Fri, 7 Dec 2012 14:01:08 +0000 (09:01 -0500)]
net: Remove bogus dependencies on INET

Various drivers depend on INET because they used to select INET_LRO,
but they have all been converted to use GRO which has no such
dependency.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: remove adapter->eq_next_idx
Sathya Perla [Tue, 6 Nov 2012 17:49:01 +0000 (17:49 +0000)]
be2net: remove adapter->eq_next_idx

It's not used anywhere

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: remove roce on lancer
Sathya Perla [Fri, 7 Dec 2012 13:59:46 +0000 (08:59 -0500)]
be2net: remove roce on lancer

roce interface is suppored only on Skyhawk-R.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix access to SEMAPHORE reg
Sathya Perla [Tue, 6 Nov 2012 17:48:59 +0000 (17:48 +0000)]
be2net: fix access to SEMAPHORE reg

The SEMAPHORE register was being accessed from the csr BAR space. This BAR
may not be available in some Skyhawk-R configurations. Instead, access this
register via the PCI config space (it's available there too).

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: re-factor bar mapping code
Sathya Perla [Tue, 6 Nov 2012 17:48:58 +0000 (17:48 +0000)]
be2net: re-factor bar mapping code

1) separate NIC and roce bar mapping code
2) parse sli_intf::if_type inside be_map_pci_bars() as if_type must be
   used only to identify bars.
3) Use pci_iomap/unmap() routines

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: do not use sli_family to identify skyhawk-R chip
Sathya Perla [Fri, 7 Dec 2012 13:57:53 +0000 (08:57 -0500)]
be2net: do not use sli_family to identify skyhawk-R chip

SKYHAWK_FAMILY will not identify all revisions of the chip.
Use device-id check (skyhawk_chip() macro) instead.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix wrong usage of adapter->generation
Sathya Perla [Fri, 7 Dec 2012 13:55:45 +0000 (08:55 -0500)]
be2net: fix wrong usage of adapter->generation

adapter->generation was being incorrectly set as BE_GEN3 for Skyhawk-R.
Replace generation usage with XXX_chip() macros to identify the chip.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: remove LANCER A0 workaround
Sathya Perla [Tue, 6 Nov 2012 17:48:55 +0000 (17:48 +0000)]
be2net: remove LANCER A0 workaround

It's not needed anymore.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix smatch warnings in be_main.c
Padmanabh Ratnakar [Mon, 22 Oct 2012 23:02:44 +0000 (23:02 +0000)]
be2net: Fix smatch warnings in be_main.c

FW flashing code, even though it works correctly, makes some hidden
assumptions about buffer sizes. This is causing code analysers to
report error. Cleanup FW flashing code to remove these hidden assumptions.

Reported-by: Yuanhan Liu <yuanhan.liu@intel.com>
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-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, 7 Dec 2012 13:52:20 +0000 (08:52 -0500)]
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: Fix skyhawk VF PCI Device ID
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:04:40 +0000 (06:04 +0000)]
be2net: Fix skyhawk VF PCI Device ID

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix FW flashing on Skyhawk-R
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:04:16 +0000 (06:04 +0000)]
be2net: Fix FW flashing on Skyhawk-R

FW flash layout on Skyhawk-R is different from BE3-R.
Hence the code needs to be fixed to flash FW on Skyhawk-R.
Also cleaning up code in BE3-R flashing function.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Enabling Wake-on-LAN is not supported in S5 state
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:04:00 +0000 (06:04 +0000)]
be2net: Enabling Wake-on-LAN is not supported in S5 state

be_shutdown is enabling wake-on-lan by calling be_setup_wol.
Emulex adapter do not support wake-on-lan in S5 state.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
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 on newer Lancer FW
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:03:49 +0000 (06:03 +0000)]
be2net: Fix VF driver load on newer Lancer FW

PF driver should enable VF so that VF goes to ready state in
new Lancer FW.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix unnecessary delay in PCI EEH
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:03:37 +0000 (06:03 +0000)]
be2net: Fix unnecessary delay in PCI EEH

During PCI EEH, driver waits for all functions in the card.
Wait is needed only once per card. Fix is to wait only for the
first PCI function.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix issues in error recovery due to wrong queue state
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:03:25 +0000 (06:03 +0000)]
be2net: Fix issues in error recovery due to wrong queue state

During recovery from a FW error, destroy queue operation may fail.
Queue should be marked as destroyed so that recovery code can recreate
the queue. Also fix queue created state not getting checked at one instance.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix ethtool get_settings output for VF
Padmanabh Ratnakar [Fri, 7 Dec 2012 13:49:58 +0000 (08:49 -0500)]
be2net: Fix ethtool get_settings output for VF

Return default values for fields for which VFs dont have privilege to get the
required information from FW.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix error messages while driver load for VFs
Padmanabh Ratnakar [Fri, 7 Dec 2012 13:44:38 +0000 (08:44 -0500)]
be2net: Fix error messages while driver load for VFs

VF does not have privileges to execute many commands. When VFs try
to execute those commands there are unnecessary error messages.
Fix this by executing only those commands for which VF has privilege.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix configuring VLAN for VF for Lancer
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:02:40 +0000 (06:02 +0000)]
be2net: Fix configuring VLAN for VF for Lancer

Allow adding VLANs for Lancer VF.
VLAN ID 0 should not be added to list of VLANs sent to FW.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Wait till resources are available for VF in error recovery
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:02:27 +0000 (06:02 +0000)]
be2net: Wait till resources are available for VF in error recovery

After FW error, driver should wait for NO_RESOURCE error to disappear before
proceeding with recovery.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix change MAC operation for VF for Lancer
Padmanabh Ratnakar [Sat, 20 Oct 2012 06:02:13 +0000 (06:02 +0000)]
be2net: Fix change MAC operation for VF for Lancer

For changing MAC of VF from PF, delete MAC operation needs to be done before
assigning new MAC. Also in ndo_set_mac_address operation avoid delete MAC if
it has been already deleted by PF.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix setting QoS for VF for Lancer
Padmanabh Ratnakar [Fri, 7 Dec 2012 13:42:19 +0000 (08:42 -0500)]
be2net: Fix setting QoS for VF for Lancer

Use Lancer specific command to set QoS for VF.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix driver load failure for different FW configs in Lancer
Padmanabh Ratnakar [Fri, 7 Dec 2012 13:37:42 +0000 (08:37 -0500)]
be2net: Fix driver load failure for different FW configs in Lancer

Driver assumes FW resource counts and capabilities while creating queues and
using functionality like RSS. This causes driver load to fail in FW configs
where resources and capabilities are reduced. Fix this by querying FW
configuration during probe and using resources and capabilities accordingly.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: create RSS rings even in multi-channel configs
Sathya Perla [Tue, 28 Aug 2012 20:37:40 +0000 (20:37 +0000)]
be2net: create RSS rings even in multi-channel configs

Changes from commit df505e were incorrectly over-written by commit 10ef9ab.
Fixing the same.

Change log of the original fix:
    Currently RSS rings are not created in a multi-channel config.
    RSS rings can be created on one (out of four) interfaces per port in a
    multi-channel config. Doing this insulates the driver from a FW bug wherin
    multi-channel config is wrongly reported even when not enabled. This also
    helps performance in a multi-channel config, as one interface per port gets
    RSS rings.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:19:00 +0000 (03:19 +0000)]
be2net: set maximal number of default RSS queues

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Program secondary UC MAC address into MAC filter
Ajit Khaparde [Fri, 7 Dec 2012 12:53:52 +0000 (07:53 -0500)]
be2net: Program secondary UC MAC address into MAC filter

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Remove code that stops further access to BE NIC based on UE bits
Ajit Khaparde [Mon, 8 Oct 2012 18:18:21 +0000 (18:18 +0000)]
be2net: Remove code that stops further access to BE NIC based on UE bits

On certain platforms, BE hardware could  falsely indicate UE.
For BE family of NICs, do not set hw_error based on the UE bits.
If there was a real fatal error, the corresponding h/w block will
automatically go offline and stop traffic.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix vfs enumeration
Ivan Vecera [Mon, 1 Oct 2012 01:56:55 +0000 (01:56 +0000)]
be2net: fix vfs enumeration

Current VFs enumeration algorithm used in be_find_vfs does not take domain
number into the match. The match found in igb/ixgbe is more elegant and
safe.

This 2nd version uses pci_physfn instead of checking dev->physfn directly.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fixup log messages
Sathya Perla [Fri, 7 Dec 2012 11:00:23 +0000 (06:00 -0500)]
be2net: fixup log messages

Added and modified a few log messages mostly in probe path.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: cleanup code related to be_link_status_query()
Sathya Perla [Fri, 7 Dec 2012 10:52:46 +0000 (05:52 -0500)]
be2net: cleanup code related to be_link_status_query()

1) link_status_query() is always called to query the link-speed (speed
after applying qos). When there is no qos setting, link-speed is derived from
port-speed. Do all this inside this routine and hide this from the callers.

2) adpater->phy.forced_port_speed is not being set anywhere after being
initialized. Get rid of this variable.

3) Ignore async link_speed notifications till the initial value has been
fetched from FW.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix wrong handling of be_setup() failure in be_probe()
Sathya Perla [Fri, 28 Sep 2012 04:39:42 +0000 (04:39 +0000)]
be2net: fix wrong handling of be_setup() failure in be_probe()

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: remove type argument of be_cmd_mac_addr_query()
Sathya Perla [Tue, 4 Dec 2012 08:49:15 +0000 (03:49 -0500)]
be2net: remove type argument of be_cmd_mac_addr_query()

All invocations of this routine use the same type value.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoRevert "be2net: fix vfs enumeration"
David S. Miller [Fri, 28 Sep 2012 02:19:02 +0000 (22:19 -0400)]
Revert "be2net: fix vfs enumeration"

This reverts commit 51af6d7c1f31e0f3d42c87d53657ec7acb6e3462.

Breaks the build with CONFIG_PCI_ATS not enabled.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix vfs enumeration
Ivan Vecera [Tue, 25 Sep 2012 02:50:42 +0000 (02:50 +0000)]
be2net: fix vfs enumeration

Current VFs enumeration algorithm used in be_find_vfs does not take domain
number into the match. The match found in igb/ixgbe is more elegant and
safe.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: use PCIe AER capability
Sathya Perla [Wed, 5 Sep 2012 01:56:48 +0000 (01:56 +0000)]
be2net: use PCIe AER capability

This patch allows code to handle the PCIe AER capability.
The PCI callbacks for error handling/reset/recovery already exist in be2net
and have been tested with EEH/ppc.
This patch has been tested using the aer-inject tool.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: modify log msg for lack of privilege error
Vasundhara Volam [Tue, 28 Aug 2012 20:37:44 +0000 (20:37 +0000)]
be2net: modify log msg for lack of privilege error

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix FW default for VF tx-rate
Vasundhara Volam [Tue, 4 Dec 2012 08:32:24 +0000 (03:32 -0500)]
be2net: fix FW default for VF tx-rate

BE3 FW initializes VF tx-rate to 100Mbps. Fix this to 10Gbps.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix max VFs reported by HW
Vasundhara Volam [Tue, 28 Aug 2012 20:37:41 +0000 (20:37 +0000)]
be2net: fix max VFs reported by HW

BE3 FW allocates VF resources for upto 30 VFs per PF while a max value of 32
may be reported via PCI config space. Fix this in the driver.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetpoll: revert 6bdb7fe3104 and fix be_poll() instead
Amerigo Wang [Fri, 24 Aug 2012 21:41:11 +0000 (21:41 +0000)]
netpoll: revert 6bdb7fe3104 and fix be_poll() instead

Against -net.

In the patch "netpoll: re-enable irq in poll_napi()", I tried to
fix the following warning:

[100718.051041] ------------[ cut here ]------------
[100718.051048] WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0x7d/0xb0()
(Not tainted)
[100718.051049] Hardware name: ProLiant BL460c G7
...
[100718.051068] Call Trace:
[100718.051073]  [<ffffffff8106b747>] ? warn_slowpath_common+0x87/0xc0
[100718.051075]  [<ffffffff8106b79a>] ? warn_slowpath_null+0x1a/0x20
[100718.051077]  [<ffffffff810747ed>] ? local_bh_enable_ip+0x7d/0xb0
[100718.051080]  [<ffffffff8150041b>] ? _spin_unlock_bh+0x1b/0x20
[100718.051085]  [<ffffffffa00ee974>] ? be_process_mcc+0x74/0x230 [be2net]
[100718.051088]  [<ffffffffa00ea68c>] ? be_poll_tx_mcc+0x16c/0x290 [be2net]
[100718.051090]  [<ffffffff8144fe76>] ? netpoll_poll_dev+0xd6/0x490
[100718.051095]  [<ffffffffa01d24a5>] ? bond_poll_controller+0x75/0x80 [bonding]
[100718.051097]  [<ffffffff8144fde5>] ? netpoll_poll_dev+0x45/0x490
[100718.051100]  [<ffffffff81161b19>] ? ksize+0x19/0x80
[100718.051102]  [<ffffffff81450437>] ? netpoll_send_skb_on_dev+0x157/0x240

by reenabling IRQ before calling ->poll, but it seems more
problems are introduced after that patch:

http://ozlabs.org/~akpm/stuff/IMG_20120824_122054.jpg
http://marc.info/?l=linux-netdev&m=134563282530588&w=2

So it is safe to fix be2net driver code directly.

This patch reverts the offending commit and fixes be_poll() by
avoid disabling BH there, this is okay because be_poll()
can be called either by poll_napi() which already disables
IRQ, or by net_rx_action() which already disables BH.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Tested-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoSPEC: OL5 kernel firmware rpm depends on all others firmwares
Maxim Uvarov [Thu, 13 Dec 2012 12:48:04 +0000 (04:48 -0800)]
SPEC: OL5 kernel firmware rpm depends on all others firmwares

Orabug: 15987332
Without this change yum update installs kernel rpm before firmware
rpm. So that initial initrd created without required firmware in case
if firmware is shipped in separate package. Because we can not force
users to rebuild initrd manually after each yum update, adding dependencies
for kernel-firmware package.
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agoSPEC: v2.6.39-400.5.0
Maxim Uvarov [Wed, 12 Dec 2012 21:23:34 +0000 (13:23 -0800)]
SPEC: v2.6.39-400.5.0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
12 years agox86, tsc: Fix SMI induced variation in quick_pit_calibrate()
Linus Torvalds [Tue, 17 Jan 2012 23:35:37 +0000 (15:35 -0800)]
x86, tsc: Fix SMI induced variation in quick_pit_calibrate()

Orabug: 13256166
pit_expect_msb() returns success wrongly in the below SMI scenario:

a. pit_verify_msb() has not yet seen the MSB transition.

b. we are close to the MSB transition though and got a SMI immediately after
   returning from pit_verify_msb() which didn't see the MSB transition. PIT MSB
   transition has happened somewhere during SMI execution.

c. returned from SMI and we noted down the 'tsc', saw the pit MSB change now and
   exited the loop to calculate 'deltatsc'. Instead of noting the TSC at the MSB
   transition, we are way off because of the SMI.  And as the SMI happened
   between the pit_verify_msb() and before the 'tsc' is recorded in the
   for loop, 'delattsc' (d1/d2 in quick_pit_calibrate()) will be small and
   quick_pit_calibrate() will not notice this error.

Depending on whether SMI disturbance happens while computing d1 or d2, we will
see the TSC calibrated value smaller or bigger than the expected value. As a
result, in a cluster we were seeing a variation of approximately +/- 20MHz in
the calibrated values, resulting in NTP failures.

  [ As far as the SMI source is concerned, this is a periodic SMI that gets
    disabled after ACPI is enabled by the OS. But the TSC calibration happens
    before the ACPI is enabled. ]

To address this, change pit_expect_msb() so that

 - the 'tsc' is the TSC in between the two reads that read the MSB
change from the PIT (same as before)

 - the 'delta' is the difference in TSC from *before* the MSB changed
to *after* the MSB changed.

Now the delta is twice as big as before (it covers four PIT accesses,
roughly 4us) and quick_pit_calibrate() will loop a bit longer to get
the calibrated value with in the 500ppm precision. As the delta (d1/d2)
covers four PIT accesses, actual calibrated result might be closer to
250ppm precision.

As the loop now takes longer to stabilize, double MAX_QUICK_PIT_MS to 50.

SMI disturbance will showup as much larger delta's and the loop will take
longer than usual for the result to be with in the accepted precision. Or will
fallback to slow PIT calibration if it takes more than 50msec.

Also while we are at this, remove the calibration correction that aims to
get the result to the middle of the error bars. We really don't know which
direction to correct into, so remove it.

Reported-and-tested-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/1326843337.5291.4.camel@sbsiddha-mobl2
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agox86, tsc: Skip TSC synchronization checks for tsc=reliable
Suresh Siddha [Fri, 4 Nov 2011 22:42:17 +0000 (15:42 -0700)]
x86, tsc: Skip TSC synchronization checks for tsc=reliable

Orabug: 13256166
(mainline commit 28a00184be261e3dc152ba0d664a067bbe235b6a)
tsc=reliable boot parameter is supposed to skip all the TSC
stablility checks during boot time.

On a 8-socket system where we want to run an experiment with the
"tsc=reliable" boot option, TSC synchronization checks are not
getting skipped and marking the TSC as not stable.

Check for tsc_clocksource_reliable (which is set via
tsc=reliable or for platforms supporting synthetic TSC_RELIABLE
feature bit etc) and when set, skip the TSC synchronization
tests during boot.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Tested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1320446537.15071.14.camel@sbsiddha-desk.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
Conflicts:
arch/x86/include/asm/tsc.h

12 years agobonding: rlb mode of bond should not alter ARP originating via bridge
zheng.li [Tue, 27 Nov 2012 23:57:04 +0000 (23:57 +0000)]
bonding: rlb mode of bond should not alter ARP originating via bridge

Orabug: 14650975
Do not modify or load balance ARP packets passing through balance-alb
mode (wherein the ARP did not originate locally, and arrived via a bridge).

Modifying pass-through ARP replies causes an incorrect MAC address
to be placed into the ARP packet, rendering peers unable to communicate
with the actual destination from which the ARP reply originated.

Load balancing pass-through ARP requests causes an entry to be
created for the peer in the rlb table, and bond_alb_monitor will
occasionally issue ARP updates to all peers in the table instrucing them
as to which MAC address they should communicate with; this occurs when
some event sets rx_ntt.  In the bridged case, however, the MAC address
used for the update would be the MAC of the slave, not the actual source
MAC of the originating destination.  This would render peers unable to
communicate with the destinations beyond the bridge.

Signed-off-by: Zheng Li <zheng.x.li@oracle.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Conflicts:
drivers/net/bonding/bonding.h

12 years agoMerge tag 'v2.6.39-400#rdac' of git://ca-git.us.oracle.com/linux-snits-public
Maxim Uvarov [Tue, 11 Dec 2012 10:33:12 +0000 (02:33 -0800)]
Merge tag 'v2.6.39-400#rdac' of git://ca-git.us.oracle.com/linux-snits-public

OLdev v2.6.39-400#rdac

12 years ago[SCSI] scsi_dh_rdac: Fix error path
Richard Weinberger [Fri, 18 Nov 2011 00:44:27 +0000 (01:44 +0100)]
[SCSI] scsi_dh_rdac: Fix error path

If create_singlethread_workqueue() failes, rdac_init should fail too.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: "Moger, Babu" <Babu.Moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 9fc397fc0878c9540af20cbffc4d546541fe8b23)

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years ago[SCSI] scsi_dh_rdac: Adding NetApp as a brand name for rdac
Chauhan, Vijay [Fri, 2 Sep 2011 07:56:32 +0000 (13:26 +0530)]
[SCSI] scsi_dh_rdac: Adding NetApp as a brand name for rdac

Signed-off-by: Vijay Chauhan <Vijay.chauhan@netapp.com>
Reviewed-by: Bob Stankey <Robert.stankey@netapp.com>
Reviewed-by: Babu Moger <Babu.moger@netapp.com>
Acked-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 5f7a643304553e87f531df95de0ed0d60c002627)

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
12 years agoMerge tag 'uek2-merge-400-3.8-fixes-tag' of git://ca-git.us.oracle.com/linux-konrad...
Maxim Uvarov [Mon, 10 Dec 2012 19:26:37 +0000 (11:26 -0800)]
Merge tag 'uek2-merge-400-3.8-fixes-tag' of git://ca-git.us.oracle.com/linux-konrad-public

Fixes to xen-blkfront for v3.8.
There are two fixes found by Dan Carpenter and one LVM
corruption issue found by Konrad.

12 years agoMerge branch 'stable/for-linus-3.8.rebased' into uek2-merge-400
Konrad Rzeszutek Wilk [Fri, 7 Dec 2012 19:28:31 +0000 (14:28 -0500)]
Merge branch 'stable/for-linus-3.8.rebased' into uek2-merge-400

* stable/for-linus-3.8.rebased:
  xen-blkfront: handle bvecs with partial data

12 years agoxen-blkfront: handle bvecs with partial data
Roger Pau Monne [Fri, 7 Dec 2012 18:00:31 +0000 (19:00 +0100)]
xen-blkfront: handle bvecs with partial data

Currently blkfront fails to handle cases in blkif_completion like the
following:

1st loop in rq_for_each_segment
 * bv_offset: 3584
 * bv_len: 512
 * offset += bv_len
 * i: 0

2nd loop:
 * bv_offset: 0
 * bv_len: 512
 * i: 0

In the second loop i should be 1, since we assume we only wanted to
read a part of the previous page. This patches fixes this cases where
only a part of the shared page is read, and blkif_completion assumes
that if the bv_offset of a bvec is less than the previous bv_offset
plus the bv_size we have to switch to the next shared page.

Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: linux-kernel@vger.kernel.org
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoMerge branch 'uek2-merge' into uek2-merge-400
Konrad Rzeszutek Wilk [Fri, 7 Dec 2012 17:33:56 +0000 (12:33 -0500)]
Merge branch 'uek2-merge' into uek2-merge-400

* uek2-merge:
  xen-blkfront: implement safe version of llist_for_each_entry
  xen-blkback: implement safe iterator for the list of persistent grants

12 years agoMerge branch 'stable/for-linus-3.8.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Fri, 7 Dec 2012 17:33:30 +0000 (12:33 -0500)]
Merge branch 'stable/for-linus-3.8.rebased' into uek2-merge

* stable/for-linus-3.8.rebased:
  xen-blkfront: implement safe version of llist_for_each_entry
  xen-blkback: implement safe iterator for the list of persistent grants

12 years agoxen-blkfront: implement safe version of llist_for_each_entry
Roger Pau Monne [Tue, 4 Dec 2012 14:21:53 +0000 (15:21 +0100)]
xen-blkfront: implement safe version of llist_for_each_entry

Implement a safe version of llist_for_each_entry, and use it in
blkif_free. Previously grants where freed while iterating the list,
which lead to dereferences when trying to fetch the next item.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
Cc: xen-devel@lists.xen.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoxen-blkback: implement safe iterator for the list of persistent grants
Roger Pau Monne [Tue, 4 Dec 2012 14:21:52 +0000 (15:21 +0100)]
xen-blkback: implement safe iterator for the list of persistent grants

Change foreach_grant iterator to a safe version, that allows freeing
the element while iterating. Also move the free code in
free_persistent_gnts to prevent freeing the element before the rb_next
call.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
Cc: xen-devel@lists.xen.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
12 years agoMerge tag 'uek2-merge-400-3.8-tag' of git://ca-git.us.oracle.com/linux-konrad-public
Maxim Uvarov [Thu, 6 Dec 2012 21:29:14 +0000 (13:29 -0800)]
Merge tag 'uek2-merge-400-3.8-tag' of git://ca-git.us.oracle.com/linux-konrad-public

2.6.39-400 + Backports from v3.8 from Xen and not-yet-upstreamed patches.