]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
9 years agonet/mlx4_core: Fix FMR unmapping to allow remapping afterward
Maor Gottlieb [Mon, 27 Apr 2015 10:47:56 +0000 (13:47 +0300)]
net/mlx4_core: Fix FMR unmapping to allow remapping afterward

According to device spec we only need to set ownership bit to SW at FMR
unmap, all other stuff we did are redundant and not essential.

This fix is ported from Mellanox OFED 3.1.

It covers some of the same issues fixed in UEK2 with the
following UEK2 commits:
 bbdc2821db04 "mlx4_core: Avoid recycling old FMR R_Keys too soon"
 5bddb281c0f1 "mlx4_ib: unmap FMR should update MPT status to 0xF"

Following comments from bbdc2821db04 patch by Olaf Kirch <okir@lst.de>
adds more useful information about impact of this change on RDS usage
in Oracle applications and copied here to retain useful context.

    When a FMR is unmapped, mlx4 resets the map count to 0, and clears the
    upper part of the R_Key which is used as the sequence counter.

    This poses a problem for RDS, which uses ib_fmr_unmap as a fence
    operation.  RDS assumes that after issuing an unmap, the old R_Keys
    will be invalid for a "reasonable" period of time. For instance,
    Oracle processes uses shared memory buffers allocated from a pool of
    buffers.  When a process dies, we want to reclaim these buffers -- but
    we must make sure there are no pending RDMA operations to/from those
    buffers.  The only way to achieve that is by using unmap and sync the
    TPT.

    However, when the sequence count is reset on unmap, there is a high
    likelihood that a new mapping will be given the same R_Key that was
    issued a few milliseconds ago.

    To prevent this, don't reset the sequence count when unmapping a FMR.

Orabug: 21473880

Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
9 years agoIPoIB: Protect tx_outstanding from parallel access
Wengang Wang [Fri, 15 Jan 2016 07:53:46 +0000 (15:53 +0800)]
IPoIB: Protect tx_outstanding from parallel access

Orabug: 22217400(UEK4)
quick ref: 21861366(UEK2) 22217399(UEK3)

In IPoIB code, parallel access of tx_outstanding (send path VS event
process path) needs to be serialized. We use priv->lock to protect it. We
also use that lock to make the stop/open tx queue to be atomic with the
changing on tx_outstanding to protect the race between the opening of tx
queue from completion hander and the closing from the send path.

This patch also make sure the increase of tx_outstanding prior to the
calling of post_send to avoid the possible decreasing before increasing in
case the running of increasing is scheduled later than the event handler.

Impact on Throuput is ~1.5% drop.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
9 years agoRevert "i40e: Set defport behavior for the Main VSI when in promiscuous mode"
Brian Maly [Mon, 25 Jan 2016 15:53:22 +0000 (10:53 -0500)]
Revert "i40e: Set defport behavior for the Main VSI when in promiscuous mode"

Orabug: 22519254

This reverts mainline commit c0496c116b2d6a53f67e1795beca6e7f319a1657.

Conflicts:
drivers/net/ethernet/intel/i40e/i40e_main.c
Signed-off-by: Brian Maly <brian.maly@oracle.com>
9 years agoscsi: Fix a bdi reregistration race
Bart Van Assche [Sat, 19 Sep 2015 00:23:42 +0000 (17:23 -0700)]
scsi: Fix a bdi reregistration race

Unregister and reregister BDI devices in the proper order. This patch
avoids that the following kernel warning can get triggered:

WARNING: CPU: 7 PID: 203 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x68/0x80()
sysfs: cannot create duplicate filename '/devices/virtual/bdi/8:32'
Workqueue: events_unbound async_run_entry_fn
Call Trace:
[<ffffffff814ff5a4>] dump_stack+0x4c/0x65
[<ffffffff810746ba>] warn_slowpath_common+0x8a/0xc0
[<ffffffff81074736>] warn_slowpath_fmt+0x46/0x50
[<ffffffff81237ca8>] sysfs_warn_dup+0x68/0x80
[<ffffffff81237d8e>] sysfs_create_dir_ns+0x7e/0x90
[<ffffffff81291f58>] kobject_add_internal+0xa8/0x320
[<ffffffff812923a0>] kobject_add+0x60/0xb0
[<ffffffff8138c937>] device_add+0x107/0x5e0
[<ffffffff8138d018>] device_create_groups_vargs+0xd8/0x100
[<ffffffff8138d05c>] device_create_vargs+0x1c/0x20
[<ffffffff8117f233>] bdi_register+0x63/0x2a0
[<ffffffff8117f497>] bdi_register_dev+0x27/0x30
[<ffffffff81281549>] add_disk+0x1a9/0x4e0
[<ffffffffa00c5739>] sd_probe_async+0x119/0x1d0 [sd_mod]
[<ffffffff8109a81a>] async_run_entry_fn+0x4a/0x140
[<ffffffff81091078>] process_one_work+0x1d8/0x7c0
[<ffffffff81091774>] worker_thread+0x114/0x460
[<ffffffff81097878>] kthread+0xf8/0x110
[<ffffffff8150801f>] ret_from_fork+0x3f/0x70

See also patch "block: destroy bdi before blockdev is unregistered"
(commit ID 6cd18e711dd8).

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit bf2cf3baa20b0a6cd2d08707ef05dc0e992a8aa0)

Orabug: 22250360
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
Conflicts:
drivers/scsi/scsi_sysfs.c

9 years agoi40e: Fix for recursive RTNL lock during PROMISC change
Anjali Singhai [Mon, 28 Sep 2015 20:37:12 +0000 (13:37 -0700)]
i40e: Fix for recursive RTNL lock during PROMISC change

The sync_vsi_filters function can be called directly under RTNL
or through the timer subtask without one. This was causing a deadlock.

If sync_vsi_filters is called from a thread which held the lock,
and in another thread the PROMISC setting got changed we would
be executing the PROMISC change in the thread which already held
the lock alongside the other filter update. The PROMISC change
requires a reset if we are on a VEB, which requires it to be called
under RTNL.

Earlier the driver would call reset for PROMISC change without
checking if we were already under RTNL and would try to grab it
causing a deadlock. This patch changes the flow to see if we are
already under RTNL before trying to grab it.

Orabug: 22328907

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
9 years agoixgbe: make a workaround to tx hang issue under dom
Ethan Zhao [Wed, 9 Dec 2015 10:50:41 +0000 (02:50 -0800)]
ixgbe: make a workaround to tx hang issue under dom

report 1 tx queue to net core to workaround the tx hang
issue reported in Xen  environment.
The change is only limited to dom0 and baremetal is left unchanged.

Orabug: 22171500
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
9 years agoi40e: relax fw api minor version for fortville 4 nvm image
Brian Maly [Wed, 21 Oct 2015 21:04:10 +0000 (17:04 -0400)]
i40e: relax fw api minor version for fortville 4 nvm image

Orabug: 22074738

Change I40E_FW_API_VERSION_MINOR to be consistent with 1.3.38
sourceforge driver. Currently i40e driver is reporting NVM
image is too old with the latest production image from 1.3.38.

Signed-off-by: Brian Maly <brian.maly@oracle.com>
9 years agoMerge tag 'v4.1.10-18#bug22013781v1' of git://ca-git.us.oracle.com/linux-etzhao-publi...
Santosh Shilimkar [Fri, 23 Oct 2015 16:24:38 +0000 (09:24 -0700)]
Merge tag 'v4.1.10-18#bug22013781v1' of git://ca-git.us.oracle.com/linux-etzhao-public into topic/uek-4.1/drivers

9 years agoMerge tag 'v4.1.10-18#bug22066190v1' of git://ca-git.us.oracle.com/linux-etzhao-publi...
Santosh Shilimkar [Fri, 23 Oct 2015 16:21:32 +0000 (09:21 -0700)]
Merge tag 'v4.1.10-18#bug22066190v1' of git://ca-git.us.oracle.com/linux-etzhao-public into topic/uek-4.1/drivers

9 years agoMerge tag '4.1.6-12#22066196a1' of git://ca-git.us.oracle.com/linux-dduval-public...
Santosh Shilimkar [Thu, 22 Oct 2015 16:14:24 +0000 (09:14 -0700)]
Merge tag '4.1.6-12#22066196a1' of git://ca-git.us.oracle.com/linux-dduval-public into topic/uek-4.1/drivers

9 years agobnx2i: Fix call trace while device reset
Nilesh Javali [Tue, 19 May 2015 09:51:58 +0000 (05:51 -0400)]
bnx2i: Fix call trace while device reset

Orabug: 22066191

The driver waits for command completion event while cleanup of task
within the frwd lock and back locks. The frwd lock was still held
which caused the call trace while issuing a device reset.
Release the frwd lock along with the back lock
to avoid waiting in the lock context.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 35843048e7e979df3b7b9f2ad49e21797a11386b)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2i: Fixed firmware assert, during target logout.
Tej Parkash [Tue, 19 May 2015 09:51:57 +0000 (05:51 -0400)]
bnx2i: Fixed firmware assert, during target logout.

Orabug: 22066191

Fix the firmware assert, during target logout in
case driver received FIN from target before waiting for
asyncronous response.

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 5fc956c243852608db1e4ef74b92bb4445313912)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agoMerge branch 'topic-uek-4.1-drivers-b182e071.bug22029622' of git://ca-git.us.oracle...
Santosh Shilimkar [Thu, 22 Oct 2015 15:37:40 +0000 (08:37 -0700)]
Merge branch 'topic-uek-4.1-drivers-b182e071.bug22029622' of git://ca-git.us.oracle.com/linux-chander-public into topic/uek-4.1/drivers

9 years agoMerge tag 'v4.1.10-18#bug22049739' of git://ca-git.us.oracle.com/linux-zhaluo-public...
Santosh Shilimkar [Thu, 22 Oct 2015 15:36:23 +0000 (08:36 -0700)]
Merge tag 'v4.1.10-18#bug22049739' of git://ca-git.us.oracle.com/linux-zhaluo-public into topic/uek-4.1/drivers

9 years agofnic: Updating fnic driver version.
Jason Luo [Thu, 22 Oct 2015 06:23:50 +0000 (14:23 +0800)]
fnic: Updating fnic driver version.

From: Narsimhulu Musini <nmusini@cisco.com>

Update the driver versioin

Orabug: 22049739

Conflict:
    drivers/scsi/fnic/fnic.h

Signed-off-by: Narsimhulu Musini <nmusini@cisco.com>
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
9 years agofnic: fix for fnic crash when blk-mq enabled in UEK4
Jason Luo [Thu, 22 Oct 2015 06:23:04 +0000 (14:23 +0800)]
fnic: fix for fnic crash when blk-mq enabled in UEK4

From: Narsimhulu Musini <nmusini@cisco.com>

fnic driver hits crash on accessing global tag set when blk-mq enabled.
fix disables blk-mq support for fnic.

Orabug: 22049739

Signed-off-by: Narsimhulu Musini <nmusini@cisco.com>
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
9 years agoMerge branch 'uek4-avago' of git://ca-git.us.oracle.com/linux-mkp-public into topic...
Santosh Shilimkar [Wed, 21 Oct 2015 00:53:40 +0000 (17:53 -0700)]
Merge branch 'uek4-avago' of git://ca-git.us.oracle.com/linux-mkp-public into topic/uek-4.1/drivers

* 'uek4-avago' of git://ca-git.us.oracle.com/linux-mkp-public: (76 commits)
  mpt3sas : Bump mpt3sas driver version to 9.100.00.00
  mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os
  mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API
  mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API
  mpt3sas: Added support for customer specific branding
  mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command
  mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081
  mpt3sas: MPI 2.5 Rev K (2.5.6) specifications
  mpt3sas: Bump mpt3sas driver version to v6.100.00.00
  mpt3sas: Add branding string support for OEM custom HBA
  mpt3sas: Add branding string support for OEM's HBA
  mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
  mpt3sas: Update MPI2 strings to MPI2.5
  mpt3sas: Bump mpt3sas Driver version to v5.100.00.00
  mpt3sas: Provides the physical location of sas drives
  mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.
  mpt3sas: Remove redundancy code while freeing the controller resources.
  mpt3sas: Don't block the drive when drive addition under the control of SML
  mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.
  mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
  ...

9 years agompt3sas : Bump mpt3sas driver version to 9.100.00.00
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:06 +0000 (12:25 +0530)]
mpt3sas : Bump mpt3sas driver version to 9.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit c75683ca13d12a700531864bcd3118e94bc9eaa0)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:05 +0000 (12:25 +0530)]
mpt3sas: When device is blocked followed by unblock fails, unfreeze the I/Os

Issue: When the disks are getting discovered and assigned device
handles by the kernel, a device block followed by an unblock
(due to broadcast primitives) issued by the driver is
interspersed by the kernel changing the state of the device.
Therefore the unblock by the driver results in a no operation
within the kernel API.

To fix this one, the below patch checks the return of the unblock API
and performs a block followed by an unblock to unfreeze the block
layer's I/O queue. Sufficient checks and prints are also added in the
driver to identify this condition caused by the kernel.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit df838f92f3f5240dca54e1629e8547818e8ea646)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single...
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:04 +0000 (12:25 +0530)]
mpt3sas: Call dma_mapping_error() API after mapping an address with dma_map_single() API

Added dma_mapping_error() API after mapping an address with dma_map_single()
API.  Otherwise when CONFIG_DMA_API_DEBUG is enabled in the kernel, then it
complains about mpt3sas driver not calling dma_mapping_error after mapping an
address with dma_map_single

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 36814028ad720165a6febcf9ddd7de20833fd240)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue...
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:03 +0000 (12:25 +0530)]
mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API

Created a thread using alloc_ordered_workqueue() API in order to process
the works from firmware Work-queue sequentially instead of
create_singlethread_workqueue() API.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Joe Lawrence <joe.lawrence@stratus.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit bdff785e4f593218816fa3677e043aae1481aa98)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Added support for customer specific branding
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:02 +0000 (12:25 +0530)]
mpt3sas: Added support for customer specific branding

"VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
0x1000         0x97           0x1137                 0x154           Cisco 9300-8i 12Gbps SAS HBA
0x1000         0x97           0x1137                 0x155           Cisco 12G Modular SAS Pass through Controller
0x1000         0x97           0x1137                 0x156           UCS C3X60 12G SAS Pass through Controller

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit d8eb4a47c70b4bab34b938d2f682044687f53c64)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Return host busy error status to SML when DMA mapping of scatter gather...
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:01 +0000 (12:25 +0530)]
mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command

scsi_dma_map API will return a negative value (i.e. -ENOMEM)
if DMA mapping of sg lists fails and zero if the sg list in the
SCSI cmd is NULL. But drivers doesn't handled sg list DMA mapping
failure case properly.

So, Updated the code to return host busy error status to SCSI MID Layer(SML),
when DMA mapping of scatter gather list fails for a SCSI command.
So that SML will retry this SCSI cmd after some time.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 62f5c74c97037c7c00fdefb69dcfe39810c34a05)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081
Sreekanth Reddy [Tue, 30 Jun 2015 06:55:00 +0000 (12:25 +0530)]
mpt3sas: Complete the SCSI command with DID_RESET status for log_info value 0x0x32010081

For any SCSI command, if the driver receives
IOC status = SCSI_IOC_TERMINATED and log info = 0x32010081 then
that command will be completed with DID_RESET host status.

The definition of this log info value is
"Virtual IO has failed and has to be retried".

Firmware will provide this log info value with IOC Status
"SCSI_IOC_TERMINATED", whenever a drive (with is a part of a volume)
is pulled and pushed back within some minimal delay.
With this log info value, firmware informs the driver to retry the
failed IO command infinite times, so to provide some time for the
firmware to discover the reinserted drive successfully instated of
just retrying failed command for five times(doesn't giving enough
time for firmware to complete the drive discovery) and failing the
IO permanently even though drive came back successfully.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 3898f08e8ccfc8b7b4c297960ecdde970869e950)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: MPI 2.5 Rev K (2.5.6) specifications
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:59 +0000 (12:24 +0530)]
mpt3sas: MPI 2.5 Rev K (2.5.6) specifications

Below are the new changes to MPI 2.5 Rev K(2.5.6) specification and 2.00.35
header files

1) Added a minimum size requirement for target mode command buffers.

2) Added MinMSIxIndex and MaxMSIxIndex fields to CommandBufferPostBase
   Request.

3) For BIOS Page 1, added SSUTimeout field, and added Product Name String
   Format bits to the BiosOptions field

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit a6f84009b9d7ca97c400ca929f9d58f43b0ece9d)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Bump mpt3sas driver version to v6.100.00.00
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:58 +0000 (12:24 +0530)]
mpt3sas: Bump mpt3sas driver version to v6.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 2b89669ae4addfa68a58e0fc16afdd24739720d8)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Add branding string support for OEM custom HBA
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:57 +0000 (12:24 +0530)]
mpt3sas: Add branding string support for OEM custom HBA

Add the following OEM's branding to the mpt3sas driver.

"VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
0x1000         0x97         SVID = 0x1137             0x014C          Cisco 9300-8E 12G SAS HBA

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 38e4141ecb0e59c93d85ec5948f98d1f1e331a88)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Add branding string support for OEM's HBA
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:56 +0000 (12:24 +0530)]
mpt3sas: Add branding string support for OEM's HBA

Added the following Dell branding to the mpt3sas driver.

"VendorID"   "DeviceID"  "SubsystemVendor ID"  "SubsystemDevice ID"  Dell Branding String
0x1000        0x0097          0x1028                 0x1F46            DELL 12Gbps HBA

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit fb84dfc44718ef4099a827d147f738e428828d02)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:55 +0000 (12:24 +0530)]
mpt3sas: MPI 2.5 Rev J (2.5.5) specification and 2.00.34 header files

Following is the change set,

1. Added more defines for the BiosOptions field of MPI2_CONFIG_PAGE_BIOS_1.

2. Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC definition.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 35c319b47884e49d9d0a84779097916ccb173947)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Update MPI2 strings to MPI2.5
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:54 +0000 (12:24 +0530)]
mpt3sas: Update MPI2 strings to MPI2.5

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 2e26c3853206ba166c3434e5f2ca4c82078ad84e)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Bump mpt3sas Driver version to v5.100.00.00
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:53 +0000 (12:24 +0530)]
mpt3sas: Bump mpt3sas Driver version to v5.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit f9d81cfc23151eb6e9e498663c9784c351646d0e)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Provides the physical location of sas drives
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:52 +0000 (12:24 +0530)]
mpt3sas: Provides the physical location of sas drives

This Patch will provide more details of the devices such as slot number,
enclosure logical id, enclosure level & connector name in the following
scenarios,

- When end device is added in the topology,

- When the end device is removed from the setup,

- When the SCSI mid layer issues TASK ABORT/ DEVICE RESET/ TARGET RESET during
  error handling,

- When any command to the device fails with Sense key Hardware error or Medium
  error or Unit Attention,

- When firmware returns device error or device not ready status for the end
  device,

- When a Predicted fault is detected on an end device.

This information can be used by the user to identify the location of the
desired drive in the topology.

Driver will get these information by reading the sas device page0.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit e6d45e3e7e6582fa206ef84631639ce70d50e5c5)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: MPI 2.5 Rev I (2.5.4) specifications.
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:51 +0000 (12:24 +0530)]
mpt3sas: MPI 2.5 Rev I (2.5.4) specifications.

Update MPI 2.5 Release: MPI 2.5 Rev I (2.5.4) specification and 2.00.33 header
files

Below is the change set from the MPI specification for I Rev

1) Added Base Enclosure Level bit to the Flags field of Manufacturing Page 7.

2) Updated description of the MaxTargetPortConnectTime field of SAS IO Unit
   Page 1.

3) Added EnclosureLevel and ConnectorName fields to SAS Device Page 0. Also,
   added EnclosureLevel and ConnectorName Valid bit to the Flags field.

4) Added EnclosureLevel field to SAS Enclosure Page 0. Also, added
   EnclosureLevel Valid bit to the Flags field.

5) Added value for BIOS image to HashImageType.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit a94bea343c2f747c62ef66b52d2430e6aeb75434)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Remove redundancy code while freeing the controller resources.
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:50 +0000 (12:24 +0530)]
mpt3sas: Remove redundancy code while freeing the controller resources.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 580d4e3153f0d7a9a9235b675b0b7b13e2185a8b)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Don't block the drive when drive addition under the control of SML
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:49 +0000 (12:24 +0530)]
mpt3sas: Don't block the drive when drive addition under the control of SML

During hot-plugging of a disk(having a flaky link), the disk addition
stops and any further disk addition or removal doesn't happen on that
controller.

This is because, when driver receives DELAY_NOT_RESPONDING event for a disk
while it is undergoing addition at the SCSI Transport layer, the driver
would block the I/O to that disk resulting in a deadlock. i.e the disk
addition work couldn't be completed at the SCSI Transport Layer as it
can't send any I/Os (such as Inquiry, Report LUNs etc) to the disk as
I/Os are blocked to this drive. Also any subsequent device removal
(TARGET_NOT_RESPONDING) or link update(RC_PHY_CHANGED) event couldn't be
processed as they are in the queue to get processed after disk addition
event.

Description of Change:
Don't block the drive when drive addition is under the control of SML.
So that SML won't be blocked of issuing the device dicovery commands
(such as Inquiry, Report LUNs etc).

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit e4bc7f5c21a18cab9acd30940df0ee791fcd7b9e)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets...
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:48 +0000 (12:24 +0530)]
mpt3sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.

Driver initialization fails if driver tries to send IOC facts request message
when the IOC is in reset or in a fault state.

This patch will make sure that

 1.Driver to send IOC facts request message only if HBA is in operational or
   ready state.

 2.If IOC is in fault state, a diagnostic reset would be issued.

 3.If IOC is in reset state then driver will wait for 10 seconds to exit out
   of reset state.  If the HBA continues to be in reset state, then the HBA
   wouldn't be claimed by the driver.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 4dc8c8087f0304ff8d06f862520406b11aac4a66)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support
Sreekanth Reddy [Tue, 30 Jun 2015 06:54:47 +0000 (12:24 +0530)]
mpt3sas: Added Combined Reply Queue feature to extend up-to 96 MSIX vector support

In this patch, increased the number of MSIX vector support for SAS3 C0 HBAs to
up-to 96.

Following are changes that are done in this patch

1. This feature is enabled only for SAS3 C0 and higher revision cards and also
only when reply post free queue count is greater than 8.

2. To support this feature 12 SupplementalReplyPostHostIndex system interfaces
are used. MSI-X index numbered from 0 to 7 use the first
SupplementalReplyPostHostIndex system interface to update its corresponding
ReplyPostHostIndex values, MSI-X index numbered from 8 to 15 will use the
second SupplementalReplyPostHostIndex system interface and so on. These 12
SuppementalReplyPostHostIndex system interfaces address are saved in the array
replyPostRegisterIndex[].

3. As each SupplementalReplyPostHostIndex register supports 8 MSI-X
vectors. So MSIxIndex field in these register must contain a value between 0
and 7.

4. After processing the reply descriptors from a reply post free queues then
update the new reply post host index value in ReplyPostHostIndex field and
(msix_index mod 8) value in MSIxIndex field of SupplementalReplyPostHostIndex
register. The Address of this SupplementalReplyPostHostIndex register is
retrived from (msix_index/8)th entry of replyPostRegisterIndex[] array.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit fb77bb5376a55f4e6c8d9243249e82831a276ee5)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt2sas: Refcount fw_events and fix unsafe list usage
Calvin Owens [Fri, 14 Aug 2015 01:48:10 +0000 (18:48 -0700)]
mpt2sas: Refcount fw_events and fix unsafe list usage

The fw_event_work struct is concurrently referenced at shutdown, so
add a refcount to protect it, and refactor the code to use it.

Additionally, refactor _scsih_fw_event_cleanup_queue() such that it
no longer iterates over the list without holding the lock, since
_firmware_event_work() concurrently deletes items from the list.

Signed-off-by: Calvin Owens <calvinowens@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Tested-by: Chaitra Basappa <chaitra.basappa@avagotech.com>
Acked-by: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 008549f6e8a1dc4aeea4a8d64184909786b27713)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt2sas: Refcount sas_device objects and fix unsafe list usage
Calvin Owens [Fri, 14 Aug 2015 01:48:09 +0000 (18:48 -0700)]
mpt2sas: Refcount sas_device objects and fix unsafe list usage

These objects can be referenced concurrently throughout the driver, we
need a way to make sure threads can't delete them out from under each
other. This patch adds the refcount, and refactors the code to use it.

Additionally, we cannot iterate over the sas_device_list without
holding the lock, or we risk corrupting random memory if items are
added or deleted as we iterate. This patch refactors _scsih_probe_sas()
to use the sas_device_list in a safe way.

Signed-off-by: Calvin Owens <calvinowens@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Tested-by: Chaitra Basappa <chaitra.basappa@avagotech.com>
Acked-by: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit d224fe0d609734888af63656ddaf3a8352f0a7b5)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agompt2sas, mpt3sas: Abort initialization if no memory I/O resources detected
Sreekanth Reddy [Wed, 15 Jul 2015 04:49:56 +0000 (10:19 +0530)]
mpt2sas, mpt3sas: Abort initialization if no memory I/O resources detected

Driver crashes if the BIOS do not set up at least one
memory I/O resource. This failure can happen if the device is too
slow to respond during POST and is missed by the BIOS, but Linux
then detects the device later in the boot process.

Based on a patch from Timothy Pearson <tpearson@raptorengineeringinc.com>

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 5aeeb78aeb4c8607cbda54a7b0dc7315171e214f)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
9 years agoqlcnic: Fix mailbox completion handling in spurious interrupt
Rajesh Borundia [Fri, 16 Oct 2015 05:50:36 +0000 (11:20 +0530)]
qlcnic: Fix mailbox completion handling in spurious interrupt

Orabug: 22066190

o While the driver is in the middle of a MB completion processing
and it receives a spurious MB interrupt, it is mistaken as a good MB
completion interrupt leading to premature completion of the next MB
request. Fix the driver to guard against this by checking the current
state of MB processing and ignore the spurious interrupt.
Also added a stats counter to record this condition.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Update version to 5.3.63
Shahed Shaikh [Fri, 7 Aug 2015 11:17:07 +0000 (07:17 -0400)]
qlcnic: Update version to 5.3.63

Orabug: 22066190

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Don't use kzalloc unncecessarily for allocating large chunk of memory
Shahed Shaikh [Fri, 7 Aug 2015 11:17:06 +0000 (07:17 -0400)]
qlcnic: Don't use kzalloc unncecessarily for allocating large chunk of memory

Orabug: 22066190

Driver allocates a large chunk of temporary buffer using kzalloc
to copy FW image. As there is no real need of this memory to be
physically contiguous, use vzalloc instead.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Add new VF device ID 0x8C30
Shahed Shaikh [Fri, 7 Aug 2015 11:17:05 +0000 (07:17 -0400)]
qlcnic: Add new VF device ID 0x8C30

Orabug: 22066190

This is a 83xx series based VF device

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Print firmware minidump buffer and template header addresses
Shahed Shaikh [Fri, 7 Aug 2015 11:17:04 +0000 (07:17 -0400)]
qlcnic: Print firmware minidump buffer and template header addresses

Orabug: 22066190

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Add support to enable capability to extend minidump for iSCSI
Shahed Shaikh [Fri, 7 Aug 2015 11:17:03 +0000 (07:17 -0400)]
qlcnic: Add support to enable capability to extend minidump for iSCSI

Orabug: 22066190

In some cases it is required to capture minidump for iSCSI functions
as part of default minidump collection process. To enable this, firmware
exports it's capability and driver need to enable that capability
by issuing a mailbox command.

With this feature, firmware can provide additional iSCSI function's
minidump with smaller minidump capture mask (0x1f).

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Rearrange ordering of header files inclusion
Harish Patil [Fri, 7 Aug 2015 11:17:02 +0000 (07:17 -0400)]
qlcnic: Rearrange ordering of header files inclusion

Orabug: 22066190

Include local headers files after kernel's header files.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: Fix corruption while copying
Shahed Shaikh [Wed, 29 Jul 2015 11:55:35 +0000 (07:55 -0400)]
qlcnic: Fix corruption while copying

Orabug: 22066190

Use proper typecasting while performing byte-by-byte copy

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agonet: qlcnic: Deletion of unnecessary memset
Christophe Jaillet [Mon, 13 Jul 2015 19:51:38 +0000 (21:51 +0200)]
net: qlcnic: Deletion of unnecessary memset

Orabug: 22066190

There is no need to memset memory allocated with vzalloc.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agonet: qlcnic: clean up sysfs error codes
Vladimir Zapolskiy [Tue, 26 May 2015 00:49:45 +0000 (03:49 +0300)]
net: qlcnic: clean up sysfs error codes

Orabug: 22066190

Replace confusing QL_STATUS_INVALID_PARAM == -1 == -EPERM with -EINVAL
and QLC_STATUS_UNSUPPORTED_CMD == -2 == -ENOENT with -EOPNOTSUPP, the
latter error code is arguable, but it is already used in the driver,
so let it be here as well.

Also remove always false (!buf) check on read(), the driver should
not care if userspace gets its EFAULT or not.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoqlcnic: sysfs interface for PCI BAR access
Sony Chacko [Sat, 29 Sep 2012 16:05:34 +0000 (12:05 -0400)]
qlcnic: sysfs interface for PCI BAR access

Orabug: 22066190

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Update driver version to 2.9.6.
Chad Dupuis [Thu, 15 Oct 2015 17:26:56 +0000 (22:56 +0530)]
bnx2fc: Update driver version to 2.9.6.

Orabug: 22013781

Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Add HZ to task management timeout.
Chad Dupuis [Mon, 20 Jul 2015 21:09:54 +0000 (14:09 -0700)]
bnx2fc: Add HZ to task management timeout.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Remove explicit logouts.
Chad Dupuis [Mon, 20 Jul 2015 20:46:55 +0000 (13:46 -0700)]
bnx2fc: Remove explicit logouts.

Orabug: 22013781

Explicit logouts from bnx2fc were causing race conditions in either returning
stale SCSI commands or not allowing a target to log back in.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Fix FCP RSP residual parsing.
Chad Dupuis [Mon, 20 Jul 2015 20:30:19 +0000 (13:30 -0700)]
bnx2fc: Fix FCP RSP residual parsing.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Set ELS transfer length correctly for middle path commands.
Chad Dupuis [Mon, 20 Jul 2015 20:26:01 +0000 (13:26 -0700)]
bnx2fc: Set ELS transfer length correctly for middle path commands.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Remove 'NetXtreme II' from source files.
Chad Dupuis [Mon, 20 Jul 2015 20:18:54 +0000 (13:18 -0700)]
bnx2fc: Remove 'NetXtreme II' from source files.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Update copyright for 2015.
Chad Dupuis [Mon, 20 Jul 2015 20:10:26 +0000 (13:10 -0700)]
bnx2fc: Update copyright for 2015.

Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agobnx2fc: Read npiv table from nvram and create vports.
Chad Dupuis [Thu, 23 Jul 2015 13:43:06 +0000 (06:43 -0700)]
bnx2fc: Read npiv table from nvram and create vports.

Orabug: 22013781

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agocnic: Add the interfaces to get FC-NPIV table.
Chad Dupuis [Mon, 20 Jul 2015 15:00:24 +0000 (08:00 -0700)]
cnic: Add the interfaces to get FC-NPIV table.

Orabug: 22013781

Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Tue, 20 Oct 2015 01:20:23 +0000 (18:20 -0700)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: unset CONFIG_NFS_USE_LEGACY_DNS for OL7 debug kernel too
  uek-rpm: build: Update the base release to 9 with stable v4.1.10
  uek-rpm: configs: sparc: Enable VCC as a module
  uek-rpm: configs: sparc64: enable i40e modules
  uek-rpm: configs: sparc64: synced config files

9 years agoMerge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com...
Santosh Shilimkar [Tue, 20 Oct 2015 01:20:14 +0000 (18:20 -0700)]
Merge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek:
  tcp_cubic: better follow cubic curve after idle period

9 years agoMerge branch 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux...
Santosh Shilimkar [Tue, 20 Oct 2015 01:19:31 +0000 (18:19 -0700)]
Merge branch 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux-uek: (30 commits)
  Linux 4.1.10
  hp-wmi: limit hotkey enable
  zram: fix possible use after free in zcomp_create()
  netlink: Replace rhash_portid with bound
  netlink: Fix autobind race condition that leads to zero port ID
  mvneta: use inband status only when explicitly enabled
  of_mdio: add new DT property 'managed' to specify the PHY management type
  net: phy: fixed_phy: handle link-down case
  net: dsa: bcm_sf2: Do not override speed settings
  fib_rules: fix fib rule dumps across multiple skbs
  net: revert "net_sched: move tp->root allocation into fw_init()"
  tcp: add proper TS val into RST packets
  openvswitch: Zero flows on allocation.
  macvtap: fix TUNSETSNDBUF values > 64k
  net/mlx4_en: really allow to change RSS key
  bridge: fix igmpv3 / mldv2 report parsing
  sctp: fix race on protocol/netns initialization
  netlink, mmap: transform mmap skb into full skb on taps
  net: dsa: bcm_sf2: Fix 64-bits register writes
  ipv6: fix multipath route replace error recovery
  ...

9 years agoMerge branch 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Tue, 20 Oct 2015 01:19:19 +0000 (18:19 -0700)]
Merge branch 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek:
  PCI: Restore pref MMIO allocation logic for host bridge without mmio64
  PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64
  PCI: Add has_mem64 for struct host_bridge
  PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64
  PCI: Check pref compatible bit for mem64 resource of PCIe device
  OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource
  PCI: kill wrong quirk about M7101
  sparc/PCI: Keep resource idx order with bridge register number
  sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing
  sparc/PCI: Reserve legacy mmio after PCI mmio
  sparc/PCI: Unify pci_register_region()
  sparc/PCI: Use correct bus address to resource offset
  sparc/PCI: Add mem64 resource parsing for root bus
  sparc: Revert commits that broke ixgbe and igb drivers on T7
  sparc: vdso: lockdep fixes
  SPARC64: LDoms suspend domain service.

9 years agoMerge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Tue, 20 Oct 2015 01:18:59 +0000 (18:18 -0700)]
Merge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek:
  RDS: fix race condition when sending a message on unbound socket.

9 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Tue, 20 Oct 2015 01:18:46 +0000 (18:18 -0700)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek: (122 commits)
  be2net: bump up the driver version to 10.6.0.4
  enic: do hang reset only in case of tx timeout
  enic: handle spurious error interrupt
  enic: reduce ioread in devcmd2
  enic: Fix build failure with SRIOV disabled.
  enic: Fix namespace pollution causing build errors.
  enic: Fix sparse warning in vnic_devcmd_init().
  enic: add devcmd2
  enic: add devcmd2 resources
  enic: use netdev_<foo> or dev_<foo> instead of pr_<foo>
  enic: move struct definition from .c to .h file
  enic: allow adaptive coalesce setting for msi/legacy intr
  enic: add adaptive coalescing intr for intx and msi poll
  enic: fix issues in enic_poll
  enic: use atomic_t instead of spin_lock in busy poll
  drivers/net: remove all references to obsolete Ethernet-HOWTO
  enic: Grammar s/an negative/a negative/
  qla2xxx: Update driver version to 8.07.00.26.39.0-k.
  be2net: remove vlan promisc capability from VF's profile descriptors
  be2net: set pci_func_num while issuing GET_PROFILE_CONFIG cmd
  ...

9 years agocnic: Add the interfaces to get FC-NPIV table.
Adheer Chandravanshi [Tue, 4 Aug 2015 06:37:28 +0000 (09:37 +0300)]
cnic: Add the interfaces to get FC-NPIV table.

Orabug: 22066196

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9b8d5044024df97edfcce8f0c4a6ca0abd99300e)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agocnic: Populate upper layer driver state in MFW
Tej Parkash [Tue, 4 Aug 2015 06:37:27 +0000 (09:37 +0300)]
cnic: Populate upper layer driver state in MFW

Orabug: 22066196

Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit eddb755428e6e723bf587a4e2c15055c8ac02f5b)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Prevent UDP 4-tuple configurations on older adapters
Yuval Mintz [Thu, 8 Oct 2015 13:19:01 +0000 (16:19 +0300)]
bnx2x: Prevent UDP 4-tuple configurations on older adapters

Orabug: 22066196

Configuring 4-tuple RSS hsahing for UDP
[E.g., by using `ethtool -N <interface> rx-flow-hash udp4 sdfn']
on a 57710/57711 adapter would cause it to assert as HW does not
support such a configuration.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f9468e8dc87e31f807fae04aae70380a461b95c6)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agodrivers/net: get rid of unnecessary initializations in .get_drvinfo()
Ivan Vecera [Thu, 15 Oct 2015 19:28:52 +0000 (21:28 +0200)]
drivers/net: get rid of unnecessary initializations in .get_drvinfo()

Orabug: 22066196

Many drivers initialize uselessly n_priv_flags, n_stats, testinfo_len,
eedump_len & regdump_len fields in their .get_drvinfo() ethtool op.
It's not necessary as these fields is filled in ethtool_get_drvinfo().

v2: removed unused variable
v3: removed another unused variable

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: byte swap rss_key to comply to Toeplitz specs
Eric Dumazet [Wed, 23 Sep 2015 00:04:58 +0000 (17:04 -0700)]
bnx2x: byte swap rss_key to comply to Toeplitz specs

Orabug: 22066196

After a good amount of debugging, I found bnx2x was byte swaping
the 40 bytes of rss_key.

If we byte swap the key, then bnx2x generates hashes matching
MSDN specs as documented in (Verifying the RSS Hash Calculation)

https://msdn.microsoft.com/en-us/library/windows/hardware/ff571021%
28v=vs.85%29.aspx

It is mostly a non issue, unless we want to mix different NIC
in a host, and want consistent hashing among all of them, ie
if they all use the boot time generated rss key, or if some application
is choosing specific tuple(s) so that incoming traffic lands into known
rx queue(s).

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit d682d2bdc30650a5c7ce9908ab83ab674b658744)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: track vxlan port count
Jiri Benc [Thu, 17 Sep 2015 14:11:14 +0000 (16:11 +0200)]
bnx2x: track vxlan port count

Orabug: 22066196

The callback for adding vxlan port can be called with the same port for
both IPv4 and IPv6. Do not disable the offloading when the same port for
both protocols is added and later one of them removed.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ac7eccd4d48fcc70d9fd6e4d10657bcde0a73f9f)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: use ktime_get_seconds() for timestamp
Arnd Bergmann [Fri, 11 Sep 2015 09:33:01 +0000 (11:33 +0200)]
bnx2x: use ktime_get_seconds() for timestamp

Orabug: 22066196

commit c48f350ff5e7 "bnx2x: Add MFW dump support" added the
bnx2x_update_mfw_dump() function that reads the current time and stores
it in a 32-bit field that gets passed into a buffer in a fixed format.

This is potentially broken when the epoch overflows in 2038, and
otherwise overflows in 2106. As we're trying to avoid uses of
struct timeval for this reason, I noticed the addition of this
function, and tried to rewrite it in a way that is more explicit
about the overflow and that will keep working once we deprecate
struct timeval.

I assume that it is not possible to change the ABI any more, otherwise
we should try to use a 64-bit field for the seconds right away.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: Ariel Elior <Ariel.Elior@qlogic.com>
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a19a19de8310fb8ca2ca0621a9db1aab082943c5)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Add new device ids under the Qlogic vendor
Yuval Mintz [Thu, 27 Aug 2015 05:03:08 +0000 (08:03 +0300)]
bnx2x: Add new device ids under the Qlogic vendor

Orabug: 22066196

This adds support for 3 new PCI device combinations -
1077:16a1, 1077:16a4 and 1077:16ad.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9c9a6524b5fdf6cb57c9ff627b7f242a6a4e0b00)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Fix vxlan endianity issue
Yuval Mintz [Wed, 19 Aug 2015 07:21:58 +0000 (10:21 +0300)]
bnx2x: Fix vxlan endianity issue

Orabug: 22066196

Commit f34fa14cc033 ("bnx2x: Add vxlan RSS support") has introduced an
endianity issue when passing the vxlan UDP port to the HW.

Reported-by: <fengguang.wu@intel.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0f8f27de19667075591eaffbf435dd78c73a2df4)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Add vxlan RSS support
Rajesh Borundia [Tue, 18 Aug 2015 07:22:59 +0000 (10:22 +0300)]
bnx2x: Add vxlan RSS support

Orabug: 22066196

Latest FW submission added some vxlan offload capabilities to our device.
This patch adds the ability to connect to the vxlan NDOs and configure
the UDP port associated with it in the HW.

The device would now be capable of performing RSS according to the
inner headers of the vxlan packets.

Signed-off-by: Rajesh Borundia <Rajesh.Borundia@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f34fa14cc033239037622dbe84faf53923bb7e74)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2: Fix bandwidth allocation for some MF modes
Yuval Mintz [Mon, 17 Aug 2015 05:28:25 +0000 (08:28 +0300)]
bnx2: Fix bandwidth allocation for some MF modes

Orabug: 22066196

Management firmware tells driver in case bandwidth configuration for
a specific function exists, but [regretably] the same field has different
meanings depending on the multi-function mode - it can either be
a percentile value or an actual speed.

For newer multi-function modes current logic is incorrect -
driver understands values as actual speeds instead of percentages,
causing the resulting chip configuration to be incorrect.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit da3cc2da7c08dc1f4371a4cc2eb83b22a0cf83a8)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Free NVRAM lock at end of each page
Yuval Mintz [Mon, 10 Aug 2015 09:49:36 +0000 (12:49 +0300)]
bnx2x: Free NVRAM lock at end of each page

Orabug: 22066196

Writing each 4Kb page into flash might take up-to ~100 miliseconds,
during which time management firmware cannot acces the nvram for its
own uses.

Firmware upgrade utility use the ethtool API to burn new flash images
for the device via the ethtool API, doing so by writing several page-worth
of data on each command. Such action might create problems for the
management firmware, as the nvram might not be accessible for a long time.

This patch changes the write implementation, releasing the nvram lock on
the completion of each page, allowing the management firmware time to
claim it and perform its own required actions.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0ea853dfa93371e651d8b7b27fd2344e973a86ed)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Prevent null pointer dereference on SKB release
Yuval Mintz [Mon, 10 Aug 2015 09:49:35 +0000 (12:49 +0300)]
bnx2x: Prevent null pointer dereference on SKB release

Orabug: 22066196

On error flows its possible to free an SKB even if it was not allocated.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e1615903eb6b5e599396d4b3d8e3e96f6d432a6e)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Add BD support for storage
Yuval Mintz [Tue, 4 Aug 2015 06:37:29 +0000 (09:37 +0300)]
bnx2x: Add BD support for storage

Orabug: 22066196

Commit 230d00eb4bfe ("bnx2x: new Multi-function mode - BD") adds support
for the new mode in bnx2x. This expands this support by implementing
APIs required by our storage drivers to support that mode.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 97ac4ef78e6d44019745de7761da8536a9068cf8)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Correct logic for pvid configuration.
Yuval Mintz [Sun, 2 Aug 2015 09:42:41 +0000 (12:42 +0300)]
bnx2x: Correct logic for pvid configuration.

Orabug: 22066196

Commit 05cc5a39ddb7 ("bnx2x: add vlan filtering offload") has introduced
an incorrect logic for checking whether pvid should be configured for
a vf, causing the hypervisor driver to send unneeded ramrods for all of
the vfs each time a pvid has changed.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit c46309c7f8e7923a1311fbdf6884a59a5f9954cf)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Fix compilation when CONFIG_BNX2X_SRIOV is not set
Yuval Mintz [Thu, 30 Jul 2015 11:30:29 +0000 (14:30 +0300)]
bnx2x: Fix compilation when CONFIG_BNX2X_SRIOV is not set

Orabug: 22066196

Commit 05cc5a39ddb7 ("bnx2x: add vlan filtering offload") has broken
compilation when CONFIG_BNX2X_SRIOV is not set.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ce7fa78ce16e476a610e165dd0e8c1e85a75d60f)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: add vlan filtering offload
Yuval Mintz [Wed, 29 Jul 2015 12:52:46 +0000 (15:52 +0300)]
bnx2x: add vlan filtering offload

Orabug: 22066196

Current driver always uses vlan-promisc mode, i.e., it receives both
tagged and untagged traffic and lets the network stack drop packets
tagged with unrequested vlan tags.

This patch implements vlan-filtering offload in the driver -
Unless explicitly configured to promisc mode, only untagged packets or
packets tagged with requested vlans would reach the Rx flow.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 05cc5a39ddb74dd81a716a45e67b938d8ebed463)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Bump up driver version to 1.712.30
Yuval Mintz [Wed, 22 Jul 2015 06:16:27 +0000 (09:16 +0300)]
bnx2x: Bump up driver version to 1.712.30

Orabug: 22066196

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3a375e3caf2b424386f9e32d0c55f8907c52981d)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Add MFW dump support
Yuval Mintz [Wed, 22 Jul 2015 06:16:26 +0000 (09:16 +0300)]
bnx2x: Add MFW dump support

Orabug: 22066196

Devices with up-to-date management FW will be able to store register dumps
on their persistent storage - in case management FW identifies a fatal
error it would gather and store such dumps, which could later be retrieved
using specific debug tools.

This patch adds the necessary part in the driver in order to make the
feature operational, as well as update users [under debug] during load
in case their device contains a dump of a previous crash.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit c48f350ff5e75abae2627c2531780264f9e49130)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: new Multi-function mode - BD
Yuval Mintz [Wed, 22 Jul 2015 06:16:25 +0000 (09:16 +0300)]
bnx2x: new Multi-function mode - BD

Orabug: 22066196

This adds support to a new multi-function mode, enabling driver to
initialize such devices and correctly interacting with management FW
for fully utilizing their features.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 230d00eb4bfe0ddc88b848fd953f7b871ee2ecd7)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Add 84858 phy support
Yaniv Rosner [Wed, 22 Jul 2015 06:16:24 +0000 (09:16 +0300)]
bnx2x: Add 84858 phy support

Orabug: 22066196

This adds support to a new copper phy.

Signed-off-by: Yaniv Rosner <Yaniv.Rosner@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 924c6216f88172050a519639722e949b838529cc)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Rebrand from 'broadcom' into 'qlogic'
Yuval Mintz [Wed, 22 Jul 2015 06:16:23 +0000 (09:16 +0300)]
bnx2x: Rebrand from 'broadcom' into 'qlogic'

Orabug: 22066196

bnx2x still appears as a Broadcom driver even though the devices it
utilizes belong to Qlogic for more than a year.

This patch changes the various headers and the device strings to indicate
the correct ownership of the device.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 4ad79e1301f48b8c4ed2cc71c85e9b224a16b3e3)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Utilize FW 7.12.30
Yuval Mintz [Wed, 22 Jul 2015 06:16:22 +0000 (09:16 +0300)]
bnx2x: Utilize FW 7.12.30

Orabug: 22066196

This moves bnx2x into using 7.12.30 FW. Said firmware fixes the following:

 - Packets from a VF with pvid configured which were sent with a
   different vlan were transmitted instead of being discarded.

 - FCoE traffic might not recover after a failue while there's traffic
   to another function.

In addition, this FW opens the door for the driver to implement several
new features; Specifically, this enhances the device's support for
encapsulated packets and will allow vxlan/geneve offloads to be added in
the future, as well as vlan filtering offload.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 28311f8e7c3f52a810c0e0d2aa62deb549c9687d)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: only report most generic filters in get_ts_info
Jacob Keller [Wed, 22 Apr 2015 21:40:32 +0000 (14:40 -0700)]
bnx2x: only report most generic filters in get_ts_info

Orabug: 22066196

CC: Ariel Elior <ariel.elior@qlogic.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit dd3950c6d7185fbf9ec78a451b18d8807f35c6f7)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: fix DMA API usage
Michal Schmidt [Fri, 26 Jun 2015 15:50:00 +0000 (17:50 +0200)]
bnx2x: fix DMA API usage

Orabug: 22066196

With CONFIG_DMA_API_DEBUG=y bnx2x triggers the error "DMA-API: device
driver frees DMA memory with wrong function".
On archs where PAGE_SIZE > SGE_PAGE_SIZE it also triggers "DMA-API:
device driver frees DMA memory with different size".

Fix this by making the mapping and unmapping symmetric:
 - Do not map the whole pool page at once. Instead map the
   SGE_PAGE_SIZE-sized pieces individually, so they can be unmapped in
   the same manner.
 - What's mapped using dma_map_page() must be unmapped using
   dma_unmap_page().

Tested on ppc64.

Fixes: 4cace675d687 ("bnx2x: Alloc 4k fragment for each rx ring buffer element")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8031612d7fa8e49589a91da238a93a067826c668)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Fix linearization for encapsulated packets
Yuval Mintz [Thu, 25 Jun 2015 12:19:29 +0000 (15:19 +0300)]
bnx2x: Fix linearization for encapsulated packets

Orabug: 22066196

Due to FW constraints, driver must make sure that transmitted SKBs will
not be too fragmented, or in the case that they are - that each 'window'
of fragments passed to the FW would contain at least an mss worth of data.

For encapsultaed packets the calculation is wrong, since it ignores the
inner headers in the calculation of the headers' length.
This could lead to a FW assertion in case of a too-fragmented encapsulated
packet.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 592b9b8d687827086344705631494e5f232bee50)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Release nvram lock on error flow
Yuval Mintz [Thu, 25 Jun 2015 12:19:28 +0000 (15:19 +0300)]
bnx2x: Release nvram lock on error flow

Orabug: 22066196

During an error flow when trying to access the nvram the driver doesn't
release the hw lock it acquired.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit efd38b8f52265a1b0ae08a8ee0048958c7fb820f)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Fix statistics gathering on link change
Ariel Elior [Thu, 25 Jun 2015 12:19:27 +0000 (15:19 +0300)]
bnx2x: Fix statistics gathering on link change

Orabug: 22066196

Since driver statistics flow access MACs and those might reset during
link re-configurations, when we're about to change link properties we
have to make sure that statistics are not operational.
Statisics would be re-enabled [i.e., gathering of statistics would
re-commence] once physical link is achieved again.

Since driver employs a link-flap avoidance scheme, there are scenarios
where driver will receive no indication that the new link is up, and
as a result the statistics would not be re-enabled.

Preventing LFA from working in such cases would guarantee that we'll
always receive such indications and thus will fix statistics gathering.

Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit dc6a20aa3bfcdd23cbc6e2aae79457397e6b6012)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Fix self-test for 20g devices
Yuval Mintz [Thu, 25 Jun 2015 12:19:26 +0000 (15:19 +0300)]
bnx2x: Fix self-test for 20g devices

Orabug: 22066196

20g-capable devices are not configured properly for self-test, using
10g as their speed which cause the link indication to remain down and
fail the internal loopback test.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2f43b821b5c00f1f6d66fd183f8e4fc261e02f8a)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Fix VF MAC removal
Shahed Shaikh [Thu, 25 Jun 2015 12:19:25 +0000 (15:19 +0300)]
bnx2x: Fix VF MAC removal

Orabug: 22066196

There's a bug in today's driver where VF requests to add/remove MAC filters
always reach the Hypervisor as add requests.
This prevents the VF from changing its MAC address, as it cannot remove the
previously configured MAC and runs out of MAC credits.

Signed-off-by: Shahed Shaikh <Shahed.Shaikh@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit bb9e9c1d2093135f55bf72697498b3eb6137b66b)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Don't notify about scratchpad parities
Manish Chopra [Thu, 25 Jun 2015 12:19:24 +0000 (15:19 +0300)]
bnx2x: Don't notify about scratchpad parities

Orabug: 22066196

The scratchpad is a shared block between all functions of a given device.
Due to HW limitations, we can't properly close its parity notifications
to all functions on legal flows.
E.g., it's possible that while taking a register dump from one function
a parity error would be triggered on other functions.

Today driver doesn't consider this parity as a 'real' parity unless its
being accompanied by additional indications [which would happen in a real
parity scenario]; But it does print notifications for such events in the
system logs.

This eliminates such prints - in case of real parities driver would have
additional indications; But if this is the only signal user will not even
see a parity being logged in the system.

Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ad6afbe9578d1fa26680faf78c846bd8c00d1d6e)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Prevent false warning when accessing MACs
Yuval Mintz [Thu, 25 Jun 2015 12:19:23 +0000 (15:19 +0300)]
bnx2x: Prevent false warning when accessing MACs

Orabug: 22066196

Each time a flow finishes reads from the classification shadow
configuration in the driver, that flow would check for pending commands
and pass them to FW if possible.
In case there's already a completion pending command, I.e., a ramrod
that has been sent to the FW and is yet to be completed while said flow
tries to configure the pending command we would get a false error message
in logs [and panic if SOE was used for driver compilation] since the
command could not have been completed.

This prevents said print [and panic]; The pending command will be sent by
the time the completion of the current sent command would arrive.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9d18d270d7d160d8fa2f9d9af4545d17cbab91d8)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Correct speed from baseT into KR.
Yuval Mintz [Thu, 25 Jun 2015 12:19:22 +0000 (15:19 +0300)]
bnx2x: Correct speed from baseT into KR.

Orabug: 22066196

ethtool shows KR supported/advertised speeds incorrectly as baseT
in cases the board is in fact KR-base.

Signed-off-by: Yaniv Rosner <Yaniv.Rosner@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5d67c1c593d005653357d638569d85ede4a365a3)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agobnx2x: Correct asymmetric flow-control
Yuval Mintz [Thu, 25 Jun 2015 12:19:21 +0000 (15:19 +0300)]
bnx2x: Correct asymmetric flow-control

Orabug: 22066196

This fixes several issues relating to asymmetric configuration:
 1. When user requests to disable TX, the local-device needs to
    advertise both PAUSE and ASM_DIR, but to avoid transmitting pause
    frames. In the 578xx, it would ignore the TX disable.

 2. When user advertises RX-only, ASM_DIR was advertised instead of
    PAUSE/ASM_DIR.

 3. When changing mode, the advertised PAUSE/ASM_DIR was not cleared
    before setting new one, so disabling RX or TX had no impact on the
    'advertised' as appeared in the 'ethtool -a' output.

Signed-off-by: Yaniv Rosner <Yaniv.Rosner@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 1359d73c1d6fa737545d946f9bcb4b9a6b13a6ea)

Signed-off-by: Dan Duval <dan.duval@oracle.com>