]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
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 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 agoMerge branch 'v4.1.9-17/be-net' of git://ca-git/linux-manjgovi-public into topic...
Santosh Shilimkar [Mon, 19 Oct 2015 21:33:19 +0000 (14:33 -0700)]
Merge branch 'v4.1.9-17/be-net' of git://ca-git/linux-manjgovi-public into topic/uek-4.1/drivers

9 years agobe2net: bump up the driver version to 10.6.0.4
Suresh Reddy [Thu, 15 Oct 2015 04:37:26 +0000 (10:07 +0530)]
be2net: bump up the driver version to 10.6.0.4

Orabug: 21862339

Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
9 years agoRDS: fix race condition when sending a message on unbound socket.
Quentin Casasnovas [Mon, 19 Oct 2015 21:22:27 +0000 (14:22 -0700)]
RDS: fix race condition when sending a message on unbound socket.

Sasha's found a NULL pointer dereference in the RDS connection code when
sending a message to an apparently unbound socket.  The problem is caused
by the code checking if the socket is bound in rds_sendmsg(), which checks
the rs_bound_addr field without taking a lock on the socket.  This opens a
race where rs_bound_addr is temporarily set but where the transport is not
in rds_bind(), leading to a NULL pointer dereference when trying to
dereference 'trans' in __rds_conn_create().

Vegard wrote a reproducer for this issue, so kindly ask him to share if
you're interested.

I cannot reproduce the NULL pointer dereference using Vegard's reproducer
with this patch, whereas I could without.

Complete earlier incomplete fix to CVE-2015-6937:

  74e98eb08588 ("RDS: verify the underlying transport exists before creating a connection")

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Reviewed-by: Vegard Nossum <vegard.nossum@oracle.com>
Reviewed-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Cc: Vegard Nossum <vegard.nossum@oracle.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Chien Yen <chien.yen@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: stable@vger.kernel.org
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agouek-rpm: unset CONFIG_NFS_USE_LEGACY_DNS for OL7 debug kernel too
Todd Vierling [Mon, 19 Oct 2015 18:15:11 +0000 (14:15 -0400)]
uek-rpm: unset CONFIG_NFS_USE_LEGACY_DNS for OL7 debug kernel too

This was missed in the original bugfix and needs to be made equivalent
for kernel-uek-debug as well.

Orabug: 21483381

Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agouek-rpm: build: Update the base release to 9 with stable v4.1.10
Santosh Shilimkar [Tue, 4 Aug 2015 17:20:25 +0000 (10:20 -0700)]
uek-rpm: build: Update the base release to 9 with stable v4.1.10

Stable v4.1.10 is available so lets get that in. Update the
spec file accordingly.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoMerge tag 'v4.1.6-12#21862307' of git://ca-git/linux-dduval-public into topic/uek...
Santosh Shilimkar [Mon, 19 Oct 2015 21:06:01 +0000 (14:06 -0700)]
Merge tag 'v4.1.6-12#21862307' of git://ca-git/linux-dduval-public into topic/uek-4.1/drivers

9 years agoMerge tag 'v4.1.6-11.i40e.1.3.21.i40evf.1.3.13#bug21764569' of git://ca-git/linux...
Santosh Shilimkar [Mon, 19 Oct 2015 21:05:36 +0000 (14:05 -0700)]
Merge tag 'v4.1.6-11.i40e.1.3.21.i40evf.1.3.13#bug21764569' of git://ca-git/linux-bmaly-public into topic/uek-4.1/drivers

9 years agoMerge tag 'v4.1.6-12#22003659a4' of git://ca-git/linux-dduval-public into topic/uek...
Santosh Shilimkar [Mon, 19 Oct 2015 20:50:35 +0000 (13:50 -0700)]
Merge tag 'v4.1.6-12#22003659a4' of git://ca-git/linux-dduval-public into topic/uek-4.1/drivers

9 years agoPCI: Restore pref MMIO allocation logic for host bridge without mmio64
Yinghai Lu [Thu, 8 Oct 2015 21:38:34 +0000 (14:38 -0700)]
PCI: Restore pref MMIO allocation logic for host bridge without mmio64

From 5b2854155 (PCI: Restrict 64-bit prefetchable bridge windows to 64-bit
resources), we change the logic for pref mmio allocation:
When bridge pref support mmio64, we will only put children pref
that support mmio64 into it, and will put children pref mmio32
into bridge's non-pref mmio32.

That could leave bridge pref bar not used when that pref bar is mmio64,
and children res only has mmio32.
Also could have allocation failure when non-pref mmio32 is not big
enough space for those children pref mmio32.

That is not rational when the host bridge does not 64bit mmio above 4g
at all.

The patch restore to old logic:
when host bridge does not have has_mem64, put children pref mmio64 and
pref mmio32 all under bridges pref bars.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit 3317fa110f1c0c0f0a1d0f3ccd00d20319d76623)

9 years agoPCI: Only treat non-pref mmio64 as pref if host bridge has mmio64
Yinghai Lu [Thu, 8 Oct 2015 21:38:33 +0000 (14:38 -0700)]
PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64

If host bridge does not have mmio64 above 4G, We don't need to
treat device non-pref mmio64 as as pref mmio64.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit 7d9d19e4847c249d5eecd6f6e1316e86e597db24)

9 years agoPCI: Add has_mem64 for struct host_bridge
Yinghai Lu [Thu, 8 Oct 2015 21:38:32 +0000 (14:38 -0700)]
PCI: Add has_mem64 for struct host_bridge

Add has_mem64 for struct host_bridge, on root bus that does not support
mmio64 above 4g, will not set that.

We will use that info next two following patches:
1. Don't treat non-pref mmio64 as pref mmio, so will not put
   it under bridge's pref range when rescan the devices
2. will keep pref mmio64 and pref mmio32 under bridge pref bar.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit a60c5ffaf17466433caac32fea9c45576ecdf5c4)

9 years agoPCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64
Yinghai Lu [Thu, 8 Oct 2015 21:38:31 +0000 (14:38 -0700)]
PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64

If any bridge up to root only have 32bit pref mmio, We don't need to
treat device non-pref mmio64 as as pref mmio64.

We need to move pci_bridge_check_ranges calling early.
for parent bridges pref mmio BAR may not allocated by BIOS, res flags
is still 0, we need to have it correct set before we check them for
child device resources.

-v2: check all bus resources instead of just res[15].

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit 3aa4594c75c6d3a9e72d54320705859f87ff8f7f)

9 years agoPCI: Check pref compatible bit for mem64 resource of PCIe device
Yinghai Lu [Thu, 8 Oct 2015 21:38:30 +0000 (14:38 -0700)]
PCI: Check pref compatible bit for mem64 resource of PCIe device

We still get "no compatible bridge window" warning on sparc T5-8
after we add support for 64bit resource parsing for root bus.

 PCI: scan_bus[/pci@300/pci@1/pci@0/pci@6] bus no 8
 PCI: Claiming 0000:00:01.0: Resource 15: 0000800100000000..00008004afffffff [220c]
 PCI: Claiming 0000:01:00.0: Resource 15: 0000800100000000..00008004afffffff [220c]
 PCI: Claiming 0000:02:04.0: Resource 15: 0000800100000000..000080012fffffff [220c]
 PCI: Claiming 0000:03:00.0: Resource 15: 0000800100000000..000080012fffffff [220c]
 PCI: Claiming 0000:04:06.0: Resource 14: 0000800100000000..000080010fffffff [220c]
 PCI: Claiming 0000:05:00.0: Resource 0: 0000800100000000..0000800100001fff [204]
 pci 0000:05:00.0: can't claim BAR 0 [mem 0x800100000000-0x800100001fff]: no compatible bridge window

All the bridges 64-bit resource have pref bit, but the device resource does not
have pref set, then we can not find parent for the device resource,
as we can not put non-pref mem under pref mem.

According to pcie spec errta
https://www.pcisig.com/specifications/pciexpress/base2/PCIe_Base_r2.1_Errata_08Jun10.pdf
page 13, in some case it is ok to mark some as pref.

Mark if the entire path from the host to the adapter is over PCI Express.
Then set pref compatible bit for claim/sizing/assign for 64bit mem resource
on that pcie device.

-v2: set pref for mmio 64 when whole path is PCI Express, according to David Miller.
-v3: don't set pref directly, change to UNDER_PREF, and set PREF before
     sizing and assign resource, and cleart PREF afterwards. requested by BenH.
-v4: use on_all_pcie_path device flag instead.

Fixes: commit d63e2e1f3df9 ("sparc/PCI: Clip bridge windows to fit in upstream windows")
Link: http://lkml.kernel.org/r/CAE9FiQU1gJY1LYrxs+ma5LCTEEe4xmtjRG0aXJ9K_Tsu+m9Wuw@mail.gmail.com
Reported-by: David Ahern <david.ahern@oracle.com>
Tested-by: David Ahern <david.ahern@oracle.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431
Tested-by: TJ <linux@iam.tj>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit 35991cd9512c91fb98156f21174b1e9218daebe9)

9 years agoOF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource
Yinghai Lu [Thu, 8 Oct 2015 21:38:29 +0000 (14:38 -0700)]
OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource

For device resource PREF bit setting under bridge 64-bit pref resource,
we need to make sure only set PREF for 64bit resource, so set
IORESOUCE_MEM_64 for 64bit resource during OF device resource flags
parsing.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=96261
Link: https://bugzilla.kernel.org/show_bug.cgi?id=96241
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit 97e654600ccd98d67e462f41e8c56ab55ef6a76b)

9 years agoPCI: kill wrong quirk about M7101
Yinghai Lu [Thu, 8 Oct 2015 21:38:26 +0000 (14:38 -0700)]
PCI: kill wrong quirk about M7101

Meelis reported that qla2000 driver does not get loaded on one sparc system.

schizo f00732d0: PCI host bridge to bus 0001:00
pci_bus 0001:00: root bus resource [io  0x7fe01000000-0x7fe01ffffff] (bus address [0x0000-0xffffff])
pci 0001:00:06.0: quirk: [io  0x7fe01000800-0x7fe0100083f] claimed by ali7101 ACPI
pci 0001:00:06.0: quirk: [io  0x7fe01000600-0x7fe0100061f] claimed by ali7101 SMB
pci 0001:00:07.0: can't claim BAR 0 [io  0x7fe01000000-0x7fe0100ffff]: address conflict with 0001:00:06.0 [io  0x7fe01000600-0x7fe0100061f]

So the quirk for M7101 claim the io range early.

According to spec with M7101 in M1543 page 103/104,
http://www.versalogic.com/Support/Downloads/pdf/ali1543.pdf
0xe0, and 0xe2 do not include address info for acpi/smb.

Kill wrong quirk about them.

Link: http://kodu.ut.ee/~mroos/dm/dm.v240
Link: http://kodu.ut.ee/~mroos/dm/dm.sb100
Reported-by: Meelis Roos <mroos@linux.ee>
Cc: Meelis Roos <mroos@linux.ee>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit 283017f2528cd7d69a9c866150dd1248b8be4d81)

9 years agosparc/PCI: Keep resource idx order with bridge register number
Yinghai Lu [Thu, 8 Oct 2015 21:38:25 +0000 (14:38 -0700)]
sparc/PCI: Keep resource idx order with bridge register number

On one system found strang "no compatible bridge window" warning

PCI: Claiming 0000:00:01.0: Resource 14: 0002000100000000..000200010fffffff [10220c]
PCI: Claiming 0000:01:00.0: Resource 1: 0002000100000000..000200010000ffff [100214]
pci 0000:01:00.0: can't claim BAR 1 [mem 0x2000100000000-0x200010000ffff 64bit]: no compatible bridge window

and we already had pref_compat support that add extra pref bit for device
resource.

It turns out that pci_resource_compatible()/pci_up_path_over_pref_mem64()
just check resource with bridge pref mmio register idx 15, and we have put
resource to use mmio register idx 14 during of_scan_pci_bridge()
as the bridge does not mmio resource.

We already fix pci_up_path_over_pref_mem64() to check all bus resources.

And at the same time, this patch will make resource to consistent sequence
like other arch or directly from pci_read_bridge_bases(),
even non-pref mmio is missing, or out of ordering in firmware reporting.

So hold i = 1 for non pref mmio, and i =2 for pref mmio.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit fa259d80c3d8c7ea9f9dd1f78f0292913a1ebd7e)

9 years agosparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing
Yinghai Lu [Thu, 8 Oct 2015 21:38:24 +0000 (14:38 -0700)]
sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

For device resource PREF bit setting under bridge 64-bit pref resource,
we need to make sure only set PREF for 64bit resource, so set
IORESOUCE_MEM_64 for 64bit resource during of device resource flags
parsing.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=96261
Link: https://bugzilla.kernel.org/show_bug.cgi?id=96241
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit 16323876c6b2b5437c6c1ada805e22d4f63bbc5f)

9 years agosparc/PCI: Reserve legacy mmio after PCI mmio
Yinghai Lu [Thu, 8 Oct 2015 21:38:23 +0000 (14:38 -0700)]
sparc/PCI: Reserve legacy mmio after PCI mmio

On one system found bunch of claim resource fail from pci device.
pci_sun4v f02b894c: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x2007e00000000-0x2007e0fffffff] (bus address [0x0000-0xfffffff])
pci_bus 0000:00: root bus resource [mem 0x2000000000000-0x200007effffff] (bus address [0x00000000-0x7effffff])
pci_bus 0000:00: root bus resource [mem 0x2000100000000-0x20007ffffffff] (bus address [0x100000000-0x7ffffffff])
...
PCI: Claiming 0000:00:02.0: Resource 14: 0002000000000000..00020000004fffff [200]
pci 0000:00:02.0: can't claim BAR 14 [mem 0x2000000000000-0x20000004fffff]: address conflict with Video RAM area [??? 0x20000000a0000-0x20000000bffff flags 0x80000000]
pci 0000:02:00.0: can't claim BAR 0 [mem 0x2000000000000-0x20000000fffff]: no compatible bridge window
PCI: Claiming 0000:02:00.0: Resource 3: 0002000000100000..0002000000103fff [200]
pci 0000:02:00.0: can't claim BAR 3 [mem 0x2000000100000-0x2000000103fff]: no compatible bridge window
PCI: Claiming 0000:02:00.1: Resource 0: 0002000000200000..00020000002fffff [200]
pci 0000:02:00.1: can't claim BAR 0 [mem 0x2000000200000-0x20000002fffff]: no compatible bridge window
PCI: Claiming 0000:02:00.1: Resource 3: 0002000000104000..0002000000107fff [200]
pci 0000:02:00.1: can't claim BAR 3 [mem 0x2000000104000-0x2000000107fff]: no compatible bridge window
PCI: Claiming 0000:02:00.2: Resource 0: 0002000000300000..00020000003fffff [200]
pci 0000:02:00.2: can't claim BAR 0 [mem 0x2000000300000-0x20000003fffff]: no compatible bridge window
PCI: Claiming 0000:02:00.2: Resource 3: 0002000000108000..000200000010bfff [200]
pci 0000:02:00.2: can't claim BAR 3 [mem 0x2000000108000-0x200000010bfff]: no compatible bridge window
PCI: Claiming 0000:02:00.3: Resource 0: 0002000000400000..00020000004fffff [200]
pci 0000:02:00.3: can't claim BAR 0 [mem 0x2000000400000-0x20000004fffff]: no compatible bridge window
PCI: Claiming 0000:02:00.3: Resource 3: 000200000010c000..000200000010ffff [200]
pci 0000:02:00.3: can't claim BAR 3 [mem 0x200000010c000-0x200000010ffff]: no compatible bridge window

The bridge 00:02.0 resource does not get reserved as Video RAM take the position early,
and following children all failed.

Move down Video RAM area reservation after pci mmio get reserved,
so we leave pci driver to use those regions.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit cc265ed0d546e2b46b6ae745d6510f2067b0a6d0)

9 years agosparc/PCI: Unify pci_register_region()
Yinghai Lu [Thu, 8 Oct 2015 21:38:22 +0000 (14:38 -0700)]
sparc/PCI: Unify pci_register_region()

We register regions for legacy and iommu and all have open code.

Unify them to pci_register_region() and call it accordingly.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit e558b3d3d16a269f12d3de3d0c759751588d7924)

9 years agosparc/PCI: Use correct bus address to resource offset
Yinghai Lu [Thu, 8 Oct 2015 21:38:21 +0000 (14:38 -0700)]
sparc/PCI: Use correct bus address to resource offset

After we add 64bit mmio parsing, we got some "no compatible bridge window"
warning on anther new model that support 64bit resource.

It turns out that we can not use mem_space.start as 64bit mem space
offset, aka mem_space.start != offset.

Use child_phys_addr to calculate exact offset and recorder offset in
pbm.  Still assume all mem have same offset, otherwise panic early.

After patch we get correct offset.

/pci@305: PCI IO [io  0x2007e00000000-0x2007e0fffffff] offset 2007e00000000
/pci@305: PCI MEM [mem 0x2000000100000-0x200007effffff] offset 2000000000000
/pci@305: PCI MEM64 [mem 0x2000100000000-0x2000dffffffff] offset 2000000000000
...
pci_sun4v f02ae7f8: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x2007e00000000-0x2007e0fffffff] (bus address [0x0000-0xfffffff])
pci_bus 0000:00: root bus resource [mem 0x2000000100000-0x200007effffff] (bus address [0x00100000-0x7effffff])
pci_bus 0000:00: root bus resource [mem 0x2000100000000-0x2000dffffffff] (bus address [0x100000000-0xdffffffff])

-v2: to make is simple, do not add mem64_offset, and assume
     mem64_offset == mem_offset, otherwise would make
     pci_mmap_resource() path too complicated.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit 5c2485097a4ab217507c26893e0f489567e9a866)

9 years agosparc/PCI: Add mem64 resource parsing for root bus
Yinghai Lu [Thu, 8 Oct 2015 21:38:20 +0000 (14:38 -0700)]
sparc/PCI: Add mem64 resource parsing for root bus

Found "no compatible bridge window" warning in boot log from T5-8.

pci 0000:00:01.0: can't claim BAR 15 [mem 0x100000000-0x4afffffff pref]: no compatible bridge window

That resource is above 4G, but does not get offset correctly as
root bus only report io and mem32.

pci_sun4v f02dbcfc: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x804000000000-0x80400fffffff] (bus address [0x0000-0xfffffff])
pci_bus 0000:00: root bus resource [mem 0x800000000000-0x80007effffff] (bus address [0x00000000-0x7effffff])
pci_bus 0000:00: root bus resource [bus 00-77]

Add mem64 handling in pci_common for sparc, so we can have 64bit resource
registered for root bus at first.

After patch, will have:
pci_sun4v f02dbcfc: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x804000000000-0x80400fffffff] (bus address [0x0000-0xfffffff])
pci_bus 0000:00: root bus resource [mem 0x800000000000-0x80007effffff] (bus address [0x00000000-0x7effffff])
pci_bus 0000:00: root bus resource [mem 0x800100000000-0x8007ffffffff] (bus address [0x100000000-0x7ffffffff])
pci_bus 0000:00: root bus resource [bus 00-77]

-v2: mem64_space should use mem_space.start as offset.
-v3: add IORESOURCE_MEM_64 flag
-v4: set name for mem64_space, otherwise /proc/iomem will have <bad> for name

Fixes: commit d63e2e1f3df9 ("sparc/PCI: Clip bridge windows to fit in upstream windows")
Link: http://lkml.kernel.org/r/CAE9FiQU1gJY1LYrxs+ma5LCTEEe4xmtjRG0aXJ9K_Tsu+m9Wuw@mail.gmail.com
Reported-by: David Ahern <david.ahern@oracle.com>
Tested-by: David Ahern <david.ahern@oracle.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
 arch/sparc/kernel/pci.c        |    7 ++++++-
 arch/sparc/kernel/pci_common.c |   17 +++++++++++++++--
 arch/sparc/kernel/pci_impl.h   |    1 +
 3 files changed, 22 insertions(+), 3 deletions(-)
(cherry picked from commit c9bf614a29d223f1c20bfb47668f817d963eb8a2)

9 years agosparc: Revert commits that broke ixgbe and igb drivers on T7
Khalid Aziz [Sat, 3 Oct 2015 03:54:14 +0000 (21:54 -0600)]
sparc: Revert commits that broke ixgbe and igb drivers on T7

Revert commits 6293dbd686528e1b9275b80234b199b9e579e547 and
8672b341047f3c28ca6e59b5177dd6d29a377f42 which break ixgbe and igb
drivers on T7. These two commits can cause BAR 0 of some PCI devices
to fail to map. This will cause those PCI devices to be unusable.

Orabug: 21826746

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
(cherry picked from commit b5b765b0f2676cb42a52f771767d2548466106fc)

9 years agosparc: vdso: lockdep fixes
Dave Kleikamp [Tue, 6 Oct 2015 22:57:39 +0000 (17:57 -0500)]
sparc: vdso: lockdep fixes

Allow UEK4 kernel to be built with CONFIG_LOCK_STAT and initialize
seqcount in vdso data structure.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
9 years agoSPARC64: LDoms suspend domain service.
Bijan Mottahedeh [Wed, 8 Jul 2015 23:35:03 +0000 (16:35 -0700)]
SPARC64: LDoms suspend domain service.

Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewd-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Reviewd-by: Aaron Young <aaron.young@oracle.com>
Orabug: 21970743
(cherry picked from commit 21d81b0e030cd18f85f7059ec304b7b8f3833162)

9 years agoenic: do hang reset only in case of tx timeout
Sujith Sankar [Tue, 13 Oct 2015 10:04:02 +0000 (15:34 +0530)]
enic: do hang reset only in case of tx timeout

The current code invokes hang reset in case of error interrupt. We should
hang reset only in case of tx timeout. This because of the way hang reset
is implemented in firmware. Hang reset takes more firmware resources than
soft reset. Adaptor does not generate error interrupt in case of tx
timeout.

Hang reset only in case of tx timeout, in .ndo_tx_timeout. Do soft reset
otherwise. Introduce deferred work, enic_tx_hang_reset, to do hang reset.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: handle spurious error interrupt
Sujith Sankar [Tue, 13 Oct 2015 10:02:31 +0000 (15:32 +0530)]
enic: handle spurious error interrupt

Some of the enic adaptors are know to generate spurious interrupts. When
error interrupt is generated, driver just resets the device. This patch
resets the device only when an error is occurred.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: reduce ioread in devcmd2
Sujith Sankar [Tue, 13 Oct 2015 10:01:14 +0000 (15:31 +0530)]
enic: reduce ioread in devcmd2

posted_index is RO in firmware. We need not do ioread everytime to get
posted index. Store posted index locally.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: Fix build failure with SRIOV disabled.
Sujith Sankar [Tue, 13 Oct 2015 10:00:01 +0000 (15:30 +0530)]
enic: Fix build failure with SRIOV disabled.

err_out_vnic_unregister is used regardless of whether
SRIOV is enabled or not.

Reported-by: Jesse Brandeburg <jesse.brangeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: Fix namespace pollution causing build errors.
Sujith Sankar [Tue, 13 Oct 2015 09:58:55 +0000 (15:28 +0530)]
enic: Fix namespace pollution causing build errors.

drivers/net/built-in.o: In function `.vnic_wq_devcmd2_alloc':
(.text+0x49fe40): multiple definition of `.vnic_wq_devcmd2_alloc'
drivers/scsi/built-in.o:(.text+0xb4318): first defined here
drivers/net/built-in.o:(.opd+0x2af00): multiple definition of `vnic_wq_devcmd2_alloc'
drivers/scsi/built-in.o:(.opd+0xad70): first defined here
drivers/net/built-in.o: In function `.vnic_wq_init_start':
(.text+0x49f9c0): multiple definition of `.vnic_wq_init_start'
drivers/scsi/built-in.o:(.text+0xb3b58): first defined here
drivers/net/built-in.o:(.opd+0x2ae88): multiple definition of `vnic_wq_init_start'
drivers/scsi/built-in.o:(.opd+0xace0): first defined here

Rename these to 'enic_*' to avoid the conflict with the functiosn of
the same name in the snic scsi driver.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: Fix sparse warning in vnic_devcmd_init().
Sujith Sankar [Tue, 13 Oct 2015 09:57:54 +0000 (15:27 +0530)]
enic: Fix sparse warning in vnic_devcmd_init().

>> drivers/net/ethernet/cisco/enic/vnic_dev.c:1095:13: sparse: incorrect type in assignment (different address spaces)
   drivers/net/ethernet/cisco/enic/vnic_dev.c:1095:13:    expected void *res
   drivers/net/ethernet/cisco/enic/vnic_dev.c:1095:13:    got void [noderef] <asn:2>*

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: add devcmd2
Sujith Sankar [Tue, 13 Oct 2015 09:55:27 +0000 (15:25 +0530)]
enic: add devcmd2

devcmd is an interface for driver to communicate with fw/adaptor. It
involves writing data to hardware registers and waiting for the result.
This mechanism does not scale well. The queuing of "no wait" devcmds is
done in firmware memory rather than on the host. Firmware memory is a
rather more scarce and valuable resource than host memory. A devcmd storm
from one vf can disrupt the service on other pf/vf. The lack of flow
control allows for possible denial of server from one VM to another.

Devcmd2 uses work queue to post the devcmds, just like tx work queue. This
allows better flow control.

Initialize devcmd2, if fails we fall back to devcmd1.

Also change the driver version.

Signed-off-by: N V V Satyanarayana Reddy <nalreddy@cisco.com>
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: add devcmd2 resources
Sujith Sankar [Tue, 13 Oct 2015 09:49:59 +0000 (15:19 +0530)]
enic: add devcmd2 resources

Add devcmd resources to vnic_res_type. Add data types used by devcmd.

Signed-off-by: N V V Satyanarayana Reddy <nalreddy@cisco.com>
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: use netdev_<foo> or dev_<foo> instead of pr_<foo>
Sujith Sankar [Tue, 13 Oct 2015 09:47:36 +0000 (15:17 +0530)]
enic: use netdev_<foo> or dev_<foo> instead of pr_<foo>

pr_info does not give any details about the interface involved. This patch
uses netdev_info for printing the message. Use dev_info where netdev is not
ready.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: move struct definition from .c to .h file
Sujith Sankar [Tue, 13 Oct 2015 09:46:19 +0000 (15:16 +0530)]
enic: move struct definition from .c to .h file

Some of the structure definitions are in .c file to make them private to
that file. This patch moves the struct definition to .h file, So that their
definitions are accessible from other files.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: allow adaptive coalesce setting for msi/legacy intr
Sujith Sankar [Tue, 13 Oct 2015 09:44:45 +0000 (15:14 +0530)]
enic: allow adaptive coalesce setting for msi/legacy intr

* Allow setting of adaptive coalescing setting for all types of interrupt.

* In msi & legacy intr, we use single interrupt for rx & tx. In this case
  tx_coalesce_usecs is invalid. We should use only rx_coalesce_usecs.
  Do not display tx_coal values for msi/intx. And do not allow user to set
  this as well.

* Driver supports only tx/rx_coalesce_usec and adaptive coalesce settings.
  For other values, driver does not return error. So ethtool succeeds for
  unsupported values. Introduce enic_coalesce_valid() function to validate
  the coalescing values.

* If user requests for coalesce value greater than what adaptor supports,
  driver uses the max value. We should at least log this.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: add adaptive coalescing intr for intx and msi poll
Sujith Sankar [Tue, 13 Oct 2015 09:42:52 +0000 (15:12 +0530)]
enic: add adaptive coalescing intr for intx and msi poll

Adaptive interrupt coalescing is available for msix. This patch adds the support
for msi poll. Interface for adaptive interrupt coalescing is already added in
driver. We just did not enable it for legacy intr & msi.

enic_calc_int_moderation() & enic_set_int_moderation() are defined as static
after enic_poll. Since enic_poll needs it, move both of these function
definitions above enic_poll. No change in functionality.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: fix issues in enic_poll
Sujith Sankar [Tue, 13 Oct 2015 09:32:18 +0000 (15:02 +0530)]
enic: fix issues in enic_poll

In enic_poll, we clean tx and rx queues, when low latency busy socket polling
is happening, enic_poll will only clean tx queue. After cleaning tx, it should
return total budget for re-poll.

There is a small window between vnic_intr_unmask() and enic_poll_unlock_napi().
In this window if an irq occurs and napi is scheduled on different cpu, it tries
to acquire enic_poll_lock_napi() and fails. Unlock napi_poll before unmasking
the interrupt.

v2:
Do not change tx wonk done behaviour. Consider only rx work done for completing
napi.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: use atomic_t instead of spin_lock in busy poll
Sujith Sankar [Tue, 13 Oct 2015 09:27:34 +0000 (14:57 +0530)]
enic: use atomic_t instead of spin_lock in busy poll

We use spinlock to access a single flag. We can avoid spin_locks by using
atomic variable and atomic_cmpxchg(). Use atomic_cmpxchg to set the flag
for idle to poll. And a simple atomic_set to unlock (set idle from poll).

In napi poll, if gro is enabled, we call napi_gro_receive() to deliver the
packets. Before we call napi_complete(), i.e while re-polling, if low
latency busy poll is called, we use netif_receive_skb() to deliver the packets.
At this point if there are some skb's held in GRO, busy poll could deliver the
packets out of order. So we call napi_gro_flush() to flush skbs before we
move the napi poll to idle.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodrivers/net: remove all references to obsolete Ethernet-HOWTO
Sujith Sankar [Tue, 13 Oct 2015 09:21:06 +0000 (14:51 +0530)]
drivers/net: remove all references to obsolete Ethernet-HOWTO

This howto made sense in the 1990s when users had to manually configure
ISA cards with jumpers or vendor utilities, but with the implementation
of PCI it became increasingly less and less relevant, to the point where
it has been well over a decade since I last updated it.  And there is
no value in anyone else taking over updating it either.

However the references to it continue to spread as boiler plate text
from one Kconfig file into the next.  We are not doing end users any
favours by pointing them at this old document, so lets kill it with
fire, once and for all, to hopefully stop any further spread.

No code is changed in this commit, just Kconfig help text.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoenic: Grammar s/an negative/a negative/
Sujith Sankar [Tue, 13 Oct 2015 09:19:19 +0000 (14:49 +0530)]
enic: Grammar s/an negative/a negative/

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agouek-rpm: configs: sparc: Enable VCC as a module
Santosh Shilimkar [Thu, 15 Oct 2015 17:00:10 +0000 (10:00 -0700)]
uek-rpm: configs: sparc: Enable VCC as a module

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agouek-rpm: configs: sparc64: enable i40e modules
Allen Pais [Thu, 15 Oct 2015 16:28:06 +0000 (21:58 +0530)]
uek-rpm: configs: sparc64: enable i40e modules

Signed-of-by: Allen Pais <allen.pais@oracle.com>
9 years agouek-rpm: configs: sparc64: synced config files
Allen Pais [Thu, 15 Oct 2015 16:25:01 +0000 (21:55 +0530)]
uek-rpm: configs: sparc64: synced config files

Signed-of-by: Allen Pais <allen.pais@oracle.com>
9 years agoThis is the revsion change for lpfc 11.0.0.3 for UEK4 4.2.x release.
rkennedy [Tue, 13 Oct 2015 20:17:10 +0000 (13:17 -0700)]
This is the revsion change for lpfc 11.0.0.3 for UEK4 4.2.x release.

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Fix default RA_TOV and ED_TOV in the FC/FCoE driver for all topologies
rkennedy [Tue, 13 Oct 2015 20:15:40 +0000 (13:15 -0700)]
lpfc: Fix default RA_TOV and ED_TOV in the FC/FCoE driver for all topologies

Submitted by james.smart () james.smart.()@emulex.com

Fix default RA_TOV and ED_TOV in the FC/FCoE driver for all topologies

Initial link up defaults were not properly being tracked relative to
initial FLOGI or pt2pt PLOGI. Add code to initialize them.

Signed-off-by: Dick Kennedy dick.kennedy@avagotech.com
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105412203750&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: The linux driver does not reinitiate discovery after a failed FLOGI
rkennedy [Tue, 13 Oct 2015 20:15:36 +0000 (13:15 -0700)]
lpfc: The linux driver does not reinitiate discovery after a failed FLOGI

Submitted by james.smart () james.smart.()@emulex.com

The linux driver does not reinitiate discovery after a failed FLOGI

Forgot to clear FCF Discovery in-progress flag upon FLOGI failures.
Thus we didn't restart FLOGI.

Signed-off-by: Dick Kennedy dick.kennedy@avagotech.com
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105413003760&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Fix for discovery failure in PT2PT when FLOGI's ELS ACC response gets aborted
rkennedy [Tue, 13 Oct 2015 20:15:31 +0000 (13:15 -0700)]
lpfc: Fix for discovery failure in PT2PT when FLOGI's ELS ACC response gets aborted

Submitted by james.smart () james.smart.()@emulex.com

Fix for discovery failure in PT2PT when FLOGI's ELS ACC response gets aborted

Change login state machine to:
- Restart FLOGI if prior is ABTS'd
- Reject incoming FLOGIs if we have one pending

The above ensures that we always finish FLOGI processing, regardless
of who initated FLOGI, before processing PLOGI's.

Signed-off-by: Dick Kennedy dick.kennedy@avagotech.com
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105413003759&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Add support for Lancer G6 and 32G FC links
rkennedy [Tue, 13 Oct 2015 20:15:26 +0000 (13:15 -0700)]
lpfc: Add support for Lancer G6 and 32G FC links

Submitted by james.smart () james.smart.()@emulex.com

Add support for Lancer G6 and 32G FC links

Signed-off-by: Dick Kennedy dick.kennedy@avagotech.com
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105411903746&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agofix: lpfc_send_rscn_event sends bigger buffer size
rkennedy [Tue, 13 Oct 2015 20:15:21 +0000 (13:15 -0700)]
fix: lpfc_send_rscn_event sends bigger buffer size

Submitted by james.smart () james.smart.()@emulex.comSubmitted by Ales Novak Ales.Novak@emulex.com

From: Ales Novak alnovak@suse.cz

lpfc_send_rscn_event() allocates data for sizeof(struct
lpfc_rscn_event_header) + payload_len, but claims that the data has size
of sizeof(struct lpfc_els_event_header) + payload_len. That leads to
buffer overruns.

Signed-off-by: Ales Novak alnovak@suse.cz
Signed-off-by: James Smart james.smart@avagotech.com
Reviewed-by: Hannes Reinecke hare@suse.de
http://marc.info/?l=linux-scsi&m=144105411603743&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()
rkennedy [Tue, 13 Oct 2015 20:15:17 +0000 (13:15 -0700)]
lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()

Submitted by james.smart () james.smart.()@emulex.comSubmitted by Johannes Thumshirn Johannes.Thumshirn@emulex.com

From: Johannes Thumshirn jthumshirn@suse.de

If the bf_get() call in lpfc_mbx_cmpl_rdp_page_a2() does succeeds, execution
continues normally and mp gets kfree()d.

If the subsequent call to lpfc_sli_issue_mbox() fails execution jumps to the
error label where lpfc_mbuf_free() is called with mp-virt and mp-phys as
function arguments. This is the use after free. Following the use after free mp
gets kfree()d again which is a double free.

Signed-off-by: Johannes Thumshirn jthumshirn@suse.de
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105412703755&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: remove set but not used variables
rkennedy [Tue, 13 Oct 2015 20:15:12 +0000 (13:15 -0700)]
lpfc: remove set but not used variables

Submitted by james.smart () james.smart.()@emulex.comSubmitted by Sebastian Herbszt Sebastian.Herbszt@emulex.com

From: Sebastian Herbszt herbszt@gmx.de

Remove set but not used variables.

Signed-off-by: Sebastian Herbszt herbszt@gmx.de
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105412703757&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc:Make the function lpfc_sli4_mbox_completions_pending static in order to comply wi
rkennedy [Tue, 13 Oct 2015 20:15:07 +0000 (13:15 -0700)]
lpfc:Make the function lpfc_sli4_mbox_completions_pending static in order to comply wi

Submitted by james.smart () james.smart.()@emulex.comSubmitted by Nicholas Krause Nicholas.Krause@emulex.com

From: Nicholas Krause xerofoify@gmail.com

This makes the function lpfc_sli4_mbox_completion's definition
static now in order to comply with its prototype being also
declared as static too.

Signed-off-by: Nicholas Krause xerofoify@gmail.com
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105411503741&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agoFix kmalloc overflow in LPFC driver at large core count
rkennedy [Tue, 13 Oct 2015 20:13:30 +0000 (13:13 -0700)]
Fix kmalloc overflow in LPFC driver at large core count

Submitted by james.smart  james.smart.@avagotech.com

From:       james.smart@avagotech.com (James Smart)

Note: original patch modified by me to resolve unused variable warning

From: ian mitchell <imitchell@sgi.com>

This patch allows the LPFC to start up without a fatal kernel bug based
on an exceeded KMALLOC_MAX_SIZE and a too large NR_CPU-based maskbits
field. The bug was based on the number of CPU cores in a system.
Using the get_cpu_mask() function declared in kernel/cpu.c allows the
driver to load on the community kernel 4.2 RC1.

Below is the kernel bug reproduced:

8<--------------------------------------------------------------------
2199382.828437 (    0.005216)| lpfc 0003:02:00.0: enabling device (0140 ->
0142)
2199382.999272 (    0.170835)| ------------[ cut here ]------------
2199382.999337 (    0.000065)| WARNING: CPU: 84 PID: 404 at
mm/slab_common.c:653 \
kmalloc_slab+0x2f/0x89() 2199383.004534 (    0.005197)| Modules linked in:
lpfc(+) \
usbcore(+) mptctl scsi_transport_fc sg lpc_ich i2c_i801 usb_common tpm_tis
mfd_core \
tpm acpi_cpufreq button scsi_dh_alua scsi_dh_rdacusbcore: registered new
device \
driver usb 2199383.020568 (    0.016034)|
2199383.020581 (    0.000013)|  scsi_dh_hp_sw scsi_dh_emc scsi_dh gru thermal
sata_nv \
processor piix fan thermal_sysehci_hcd: USB 2.0 'Enhanced' Host Controller
(EHCI) \
Driver 2199383.035288 (    0.014707)|
2199383.035306 (    0.000018)|  hwmon ata_piix
2199383.035336 (    0.000030)| CPU: 84 PID: 404 Comm: kworker/84:0 Not tainted
\
3.18.0-rc2-gat-00106-ga7ca10f-dirty #178 2199383.047077 (    0.011741)|
ehci-pci: \
EHCI PCI platform driver 2199383.047134 (    0.000057)| Hardware name: SGI \
UV2000/ROMLEY, BIOS SGI UV 2000/3000 series BIOS 01/15/2013 2199383.056245 (
\
0.009111)| Workqueue: events work_for_cpu_fn 2199383.066174 (    0.009929)|  \
000000000000028d ffff88eef827bbe8 ffffffff815a542f 000000000000028d
2199383.069545 (  \
0.003371)|  ffffffff810ea142 ffff88eef827bc28 ffffffff8104365c
ffff88eefe4006c8 \
2199383.076214 (    0.006669)|  0000000000000000 00000000000080d0
0000000000000000 \
0000000000000004 2199383.079213 (    0.002999)| Call Trace:
2199383.084084 (    0.004871)|  [<ffffffff815a542f>] dump_stack+0x49/0x62
2199383.087283 (    0.003199)|  [<ffffffff810ea142>] ? kmalloc_slab+0x2f/0x89
2199383.091415 (    0.004132)|  [<ffffffff8104365c>]
warn_slowpath_common+0x77/0x92
2199383.095197 (    0.003782)|  [<ffffffff8104368c>]
warn_slowpath_null+0x15/0x17
2199383.103336 (    0.008139)|  [<ffffffff810ea142>] kmalloc_slab+0x2f/0x89
2199383.107082 (    0.003746)|  [<ffffffff8110fd9e>] __kmalloc+0x13/0x16a
2199383.112531 (    0.005449)|  [<ffffffffa01a8ed9>] \
lpfc_pci_probe_one_s4+0x105b/0x1644 [lpfc] 2199383.115316 (    0.002785)|  \
[<ffffffff81302b92>] ? pci_bus_read_config_dword+0x75/0x87 2199383.123431 (
\
0.008115)|  [<ffffffffa01a951f>] lpfc_pci_probe_one+0x5d/0xcb5 [lpfc]
2199383.127364 \
(    0.003933)|  [<ffffffff81497119>] ? dbs_check_cpu+0x168/0x177
2199383.136438 (    \
0.009074)|  [<ffffffff81496fa5>] ? gov_queue_work+0xb4/0xc0 2199383.140407 (
\
0.003969)|  [<ffffffff8130b2a1>] local_pci_probe+0x1e/0x52 2199383.143105 (
\
0.002698)|  [<ffffffff81052c47>] work_for_cpu_fn+0x13/0x1b 2199383.147315 (
\
0.004210)|  [<ffffffff81054965>] process_one_work+0x222/0x35e 2199383.151379 (
\
0.004064)|  [<ffffffff81054e76>] worker_thread+0x3d5/0x46e 2199383.159402 (
\
0.008023)|  [<ffffffff81054aa1>] ? process_one_work+0x35e/0x35e 2199383.163097
(    \
0.003695)|  [<ffffffff810599c6>] kthread+0xc8/0xd2 2199383.167476 (
0.004379)|  \
[<ffffffff810598fe>] ? kthread_freezable_should_stop+0x5b/0x5b 2199383.176434
(    \
0.008958)|  [<ffffffff815a8cac>] ret_from_fork+0x7c/0xb0 2199383.180086 (    \
0.003652)|  [<ffffffff810598fe>] ? kthread_freezable_should_stop+0x5b/0x5b \
                2199383.192333 (    0.012247)| ehci-pci 0000:00:1a.0: EHCI
Host \
                Controller
-------------------------------------------------------------------->8
The proposed solution was approved by James Smart at Emulex and tested
on a UV2 machine with 6144 cores. With the fix, the LPFC module loads
with no unwanted effects on the system.

Signed-off-by: Ian Mitchell <imitchell@sgi.com>
Signed-off-by: Alex Thorlton <athorlton@sgi.com>
Suggested-by: Robert Elliot <elliott@hp.com>
Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Destroy lpfc_hba_index IDR on module exit
rkennedy [Tue, 13 Oct 2015 19:48:28 +0000 (12:48 -0700)]
lpfc: Destroy lpfc_hba_index IDR on module exit

Submitted by james.smart () james.smart.()@emulex.comSubmitted by Johannes Thumshirn Johannes.Thumshirn@emulex.com

From: Johannes Thumshirn jthumshirn@suse.de

Destroy lpfc_hba_index IDR on module exit, reclaiming the allocated memory.

This was detected by the following semantic patch (written by Luis Rodriguez
mcgrof@suse.com)
SmPL
@ defines_module_init @
declarer name module_init, module_exit;
declarer name DEFINE_IDR;
identifier init;
@@

module_init(init);

@ defines_module_exit @
identifier exit;
@@

module_exit(exit);

@ declares_idr depends on defines_module_init &amp;&amp; defines_module_exit @
identifier idr;
@@

DEFINE_IDR(idr);

@ on_exit_calls_destroy depends on declares_idr &amp;&amp; defines_module_exit @
identifier declares_idr.idr, defines_module_exit.exit;
@@

exit(void)
{
 ...
 idr_destroy(&amp;idr);
 ...
}

@ missing_module_idr_destroy depends on declares_idr &amp;&amp; defines_module_exit &amp;&amp; !on_exit_calls_destroy @
identifier declares_idr.idr, defines_module_exit.exit;
@@

exit(void)
{
 ...
 +idr_destroy(&amp;idr);
}
/SmPL

Signed-off-by: Johannes Thumshirn jthumshirn@suse.de
Signed-off-by: James Smart james.smart@avagotech.com
Reviewed-by: Hannes Reinecke hare@suse.de
http://marc.info/?l=linux-scsi&m=144105411403740&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: in sli3 use configured sg_seg_cnt for sg_tablesize
rkennedy [Tue, 13 Oct 2015 19:48:24 +0000 (12:48 -0700)]
lpfc: in sli3 use configured sg_seg_cnt for sg_tablesize

Submitted by james.smart () james.smart.()@emulex.comSubmitted by Bodo Stroesser Bodo.Stroesser@emulex.com

From: Bodo Stroesser bstroesser@ts.fujitsu.com

Hi James,

We had some performance problems with RAID systems connected to LPe12k.
AFAICS, the reason is a small bug in lpfc.ko, causing the IO-size to
be smaller than expected.

The patch below fixes it for us.

Please CC me, I'm not on the list.

Best regards
Bodo

http://marc.info/?l=linux-scsi&m=144105411003735&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Remove unnessary cast
rkennedy [Tue, 13 Oct 2015 19:48:20 +0000 (12:48 -0700)]
lpfc: Remove unnessary cast

Submitted by james.smart () james.smart.()@emulex.comSubmitted by Firo Yang Firo.Yang@emulex.com

From: Firo Yang firogm@gmail.com

kzalloc() returns a void pointer - no need to cast it in
drivers/scsi/lpfc/lpfc_init.c::lpfc_sli_driver_resource_setup()

Signed-off-by: Firo Yang firogm@gmail.com
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105411103737&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: fix model description
rkennedy [Tue, 13 Oct 2015 19:48:15 +0000 (12:48 -0700)]
lpfc: fix model description

Submitted by james.smart () james.smart.()@emulex.comSubmitted by Sebastian Herbszt Sebastian.Herbszt@emulex.com

From: Sebastian Herbszt herbszt@gmx.de

Remove trailing space from model description.

Signed-off-by: Sebastian Herbszt herbszt@gmx.de
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=144105410703733&w=2

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Check for active portpeerbeacon.
James Smart [Fri, 22 May 2015 14:42:35 +0000 (10:42 -0400)]
lpfc: Check for active portpeerbeacon.

LCB requests to set Beacon would fail if the beacon was already enabled
internally as the mailbox command used to query the state failes with
an already-set status.

Correct by enhancing the check so we don't fail if if the already set
status comes back.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 481ad967991e1ff00d627d365de398b7a77e4d7f)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Fix vport deletion failure.
James Smart [Fri, 22 May 2015 14:42:36 +0000 (10:42 -0400)]
lpfc: Fix vport deletion failure.

If a vport was deleted while in the middle of discovery, we weren't
clearing the nport discovery flag. Correct by clearing the flag and
cancelling our discovery timeout timer.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 73dc0dbed3f9f65c6f80fab429dd9771de794714)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Devices are not discovered during takeaway/giveback testing
James Smart [Fri, 22 May 2015 14:42:37 +0000 (10:42 -0400)]
lpfc: Devices are not discovered during takeaway/giveback testing

When a remote nport changes it's DID, a new ndlp is used.
However, we left the old ndlp state unchanged and still in
a discovery state. The may stall discovery resulting in some
devices not being discovered.  Correct by swapping the state
of the 2 ndlp's when a DID swap is detected.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 953ceeda97ddfed2c6e0bea3706257d57197f269)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Add support for using block multi-queue
James Smart [Fri, 22 May 2015 14:42:38 +0000 (10:42 -0400)]
lpfc: Add support for using block multi-queue

With blk-mq support in the mid-layer, lpfc can do IO steering based
on the information in the request tag.  This patch allows lpfc to use
blk-mq if enabled. If not enabled, we fall back into the emulex-internal
affinity mappings.

This feature can be turned on via CONFIG_SCSI_MQ_DEFAULT or passing
scsi_mod.use_blk_mq=Y as a parameter to the kernel.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 8b0dff14164d3f43eba8365950b506d898e0e1e6)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Fix scsi prep dma buf error.
James Smart [Fri, 22 May 2015 14:42:39 +0000 (10:42 -0400)]
lpfc: Fix scsi prep dma buf error.

Didn't check for less-than-or-equal zero. Means we may later call
scsi_dma_unmap() even though we don't have valid mappings.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 5116fbf136ea21b8678a85eee5c03508736ada9f)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Fix cq_id masking problem.
James Smart [Fri, 22 May 2015 14:42:40 +0000 (10:42 -0400)]
lpfc: Fix cq_id masking problem.

The driver inadvertainly constrained the id space to 8 bits, when its
a full 16 bits from hw. This resulted in bad id's being written to the
hardware. Resulted in symptoms such as incomplete initialization, no
detection of link events, etc.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 16f3b48d26ac069abc020826f0c429c4ddcfb20c)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Fix scsi task management error message.
James Smart [Fri, 22 May 2015 14:42:41 +0000 (10:42 -0400)]
lpfc: Fix scsi task management error message.

TMF's were getting error messages on FCP_RSP errors (underrun). Underruns
aren't meaningful in the scenario. Change the error message to filter out
these response check errors, and don't unconditionally mark the cmd as
in error.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit ae374a308cbfeab3cf72ef7c57695d2145defeab)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
9 years agolpfc: Fix to drop PLOGIs from fabric node till LOGO processing completes
James Smart [Fri, 22 May 2015 14:42:43 +0000 (10:42 -0400)]
lpfc: Fix to drop PLOGIs from fabric node till LOGO processing completes

The domain controller PLOGI's concurrent with prior LOGO's/unreg_rpi's
completing created a race condition where driver rpi ref count can
inadvertantly hit 0 and the rpi attempted to be freed. This error
sometimes resulted in Warning messages indicating kref.h via
lfpc_nlp_get+0x128.

Correct by dropping any new PLOGI until the prior nport state has settled.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>