Commit graph

796833 commits

Author SHA1 Message Date
James Smart
529b3ddcff scsi: lpfc: update fault value on successful trunk events.
Currently, when a trunk link goes down due to some fault, the driver
snapshots the fault code.  If the link then comes back up, meaning there is
no fault, the driver is not clearing the fault code so the sysfs link_state
entry reports old/stale data.

Revise the logic so that on successful link up the fault code is cleared.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 22:13:07 -05:00
James Smart
e817e5d703 scsi: lpfc: Correct MDS loopback diagnostics support
The existing MDS loopback diagnostics support processing received frames in
the slowpath work thread. It caps the number of frames it will process at
64, before waiting for another event to indicate additional frame
reception. The net-net is this results in very slow frame processing during
loopback tests and sometimes orphans an io, causing the loopback test to
report failure by the switch.

Move MDS loopback frame processing out of the slow path worker thread and
into the normal RQ processing routines.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 22:13:07 -05:00
James Smart
2977a09512 scsi: lpfc: Fix link state reporting for trunking when adapter is offline
If the adapter is taken offline, the trunk link port attributes continue to
report trunk links as up even though all links are down as the adapter is
offline.

Clear the trunk links state as part of taking the adapter offline.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 22:13:07 -05:00
Colin Ian King
009b715614 scsi: bfa: clean up a couple of indentation issues
There is a break statement with an extra space that needs removed and a
call to bfa_trc that is indented one level too much. Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:54:58 -05:00
Colin Ian King
efad046230 scsi: 3w-xxxx: fix indentation issue, add missing tab
There is a tab missing on a return statement, add the missing tab.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:54:07 -05:00
Varun Prakash
9934613edc scsi: csiostor: fix incorrect dma device in case of vport
In case of ->vport_create() call scsi_add_host_with_dma() instead of
scsi_add_host() to pass correct dma device.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:45:04 -05:00
Christoph Hellwig
34a3492171 scsi: myrs: remove the dma_boundary_limit
The old DAC960 driver was fine with merging over segment boundaries, so
this new driver should be too.

[mkp: typos]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:43:30 -05:00
Christoph Hellwig
c3d6189ffd scsi: myrb: remove the dma_boundary limit
The old DAC960 driver was fine with merging over segment boundaries, so
this new driver should be too.

[mkp: typos]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:43:17 -05:00
Shivasharan S
7b9e2d348c scsi: megaraid_sas: driver version update
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:41:11 -05:00
Shivasharan S
894169db12 scsi: megaraid_sas: Use 63-bit DMA addressing
Although MegaRAID controllers support 64-bit DMA addressing, as per
hardware design, DMA address with all 64-bits set
(0xFFFFFFFF-FFFFFFFF) results in a firmware fault.

Driver will set 63-bit DMA mask to ensure the above address will not be
used.

Cc: stable@vger.kernel.org
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:38:54 -05:00
Shivasharan S
272652fcbf scsi: megaraid_sas: add retry logic in megasas_readl
Due to hardware errata in Aero controllers, reads to certain fusion
registers could intermittently return zero.  This behavior is
transient in nature and subsequent reads will return valid value.

For Aero controllers, any calls to readl to read from certain
registers will be retried for maximum three times, if read returns
zero.

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:37:15 -05:00
Shivasharan S
de516379e8 scsi: megaraid_sas: changes to function prototypes
Instead of the register address, pass the instance pointer to clear_intr
and read_fw_status_reg functions.  This is done in preparation for adding
adapter type based checks in these functions in later patches of this
series.

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:36:23 -05:00
Shivasharan S
154a7cde9a scsi: megaraid_sas: Introduce new Aero adapter type
Identify all Aero controller PCI IDs with new adapter type.

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:34:46 -05:00
Shivasharan S
630d42b70f scsi: megaraid_sas: Fix Ventura series based checks
In preparation for the new Aero series adapter type, all the places where
we check adapter type for Ventura series needs to include any later adapter
types.

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:34:07 -05:00
Stephan Günther
23c3828aa2 scsi: mpt3sas: fix memory ordering on 64bit writes
With commit 09c2f95ad4 ("scsi: mpt3sas: Swap I/O memory read value back
to cpu endianness"), 64bit writes in _base_writeq() were rewritten to use
__raw_writeq() instad of writeq().

This introduced a bug apparent on powerpc64 systems such as the Raptor
Talos II that causes the HBA to drop from the PCIe bus under heavy load and
being reinitialized after a couple of seconds.

It can easily be triggered on affacted systems by using something like

  fio --name=random-write --iodepth=4 --rw=randwrite --bs=4k --direct=0 \
    --size=128M --numjobs=64 --end_fsync=1
  fio --name=random-write --iodepth=4 --rw=randwrite --bs=64k --direct=0 \
    --size=128M --numjobs=64 --end_fsync=1

a couple of times. In my case I tested it on both a ZFS raidz2 and a btrfs
raid6 using LSI 9300-8i and 9400-8i controllers.

The fix consists in resembling the write ordering of writeq() by adding a
mandatory write memory barrier before device access and a compiler barrier
afterwards. The additional MMIO barrier is superfluous.

Signed-off-by: Stephan Günther <moepi@moepi.net>
Reported-by: Matt Corallo <linux@bluematt.me>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:31:41 -05:00
Anatoliy Glagolev
17b18eaa6f scsi: qla2xxx: deadlock by configfs_depend_item
The intent of invoking configfs_depend_item in commit 7474f52a82
("tcm_qla2xxx: Perform configfs depend/undepend for base_tpg")
was to prevent a physical Fibre Channel port removal when
virtual (NPIV) ports announced through that physical port are active.
The change does not work as expected: it makes enabled physical port
dependent on target configfs subsystem (the port's parent), something
the configfs guarantees anyway.

Besides, scheduling work in a worker thread and waiting for the work's
completion is not really a valid workaround for the requirement not to call
configfs_depend_item from a configfs callback: the call occasionally
deadlocks.

Thus, removing configfs_depend_item calls does not break anything and fixes
the deadlock problem.

Signed-off-by: Anatoliy Glagolev <glagolig@gmail.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-19 21:26:38 -05:00
Christoph Hellwig
38417468d4 scsi: block: remove the cluster flag
Now that the the SCSI layer replaced the use of the cluster flag with
segment size limits and the DMA boundary we can remove the cluster flag
from the block layer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:39:26 -05:00
Xiang Chen
d6a9000b81 scsi: hisi_sas: Add support for DIF feature for v2 hw
For v3 hw, we support DIF operation for SAS, but not SATA.

In addition, DIF CRC16 is supported.

This patchset adds the SW support for the described features. The main
components are as follows:

- Get protection mask from module param
- Fill PI fields
- Fill related to DIF in DQ and protection iu memories

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:35:02 -05:00
Ewan D. Milne
4e87eb2f46 scsi: lpfc: do not set queue->page_count to 0 if pc_sli4_params.wqpcnt is invalid
Certain older adapters such as the OneConnect OCe10100 may not have a valid
wqpcnt value.  In this case, do not set queue->page_count to 0 in
lpfc_sli4_queue_alloc() as this will prevent the driver from initializing.

Fixes: 895427bd01 ("scsi: lpfc: NVME Initiator: Base modifications")
Cc: stable@vger.kernel.org # 4.11+
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Tested-by:   Laurence Oberman <loberman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:25:35 -05:00
Christoph Hellwig
4af14d113b scsi: remove the use_clustering flag
The same effects can be achieved by setting the dma_boundary to
PAGE_SIZE - 1 and the max_segment_size to PAGE_SIZE, so shift those
settings into the drivers.  Note that in many cases the setting might
be bogus, but this keeps the status quo.

[mkp: fix myrs and myrb]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:19:21 -05:00
Christoph Hellwig
1c3726ad30 scsi: mac53c94: remove DISABLE_CLUSTERING
mac53c94 has no limitations on crossing pages for segments.  Just make
the 65535 byte segment size limit explicit, even if it matches the
current block layer limit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:13:12 -05:00
Christoph Hellwig
5bd6cd54bd scsi: mesh: remove DISABLE_CLUSTERING
mesh has no limitations on crossing pages for segments.  Just make
the 65535 byte segment size limit explicit, even if it matches the
current block layer limit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:13:12 -05:00
Christoph Hellwig
e08ea3009f scsi: xen-scsifront: remove DISABLE_CLUSTERING
There is no such limitation in the protocol or implementation, so
remove it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:13:12 -05:00
Christoph Hellwig
7b44047bce scsi: powertec: remove the explicit use_clustering setting
This driver already sets the dma_boundary to PAGE_SIZE - 1, which
has the same result.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:13:12 -05:00
Christoph Hellwig
736c23d6ca scsi: cumana_2: remove the explicit use_clustering setting
This driver already sets the dma_boundary to PAGE_SIZE - 1, which
has the same result.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:13:12 -05:00
Christoph Hellwig
50c2e9107f scsi: introduce a max_segment_size host_template parameters
This allows the host driver to indicate the maximum supported
segment size in a nice an easy way, so that the driver doesn't
have to worry about DMA-layer imposed limitations.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:13:12 -05:00
Christoph Hellwig
2a3d4eb8e2 scsi: flip the default on use_clustering
Most SCSI drivers want to enable "clustering", that is merging of
segments so that they might span more than a single page.  Remove the
ENABLE_CLUSTERING define, and require drivers to explicitly set
DISABLE_CLUSTERING to disable this feature.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:13:12 -05:00
Christoph Hellwig
4dd4130a72 scsi: make sure all drivers set the use_clustering flag
A few drivers were not setting the use_clustering flag at all and thus
default to disable.  Fix them up to explicitly set this field in
preparation for additional cleanups.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:08:07 -05:00
Wei Yongjun
8b2db98e81 scsi: target/core: Use kmem_cache_free() instead of kfree()
memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().

Fixes: ad669505c4 ("scsi: target/core: Make sure that target_wait_for_sess_cmds() waits long enough")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 22:52:14 -05:00
Bart Van Assche
c29d7d10cd scsi: virtio_scsi: Remove per-target data because it is no longer used
Commit b5b6e8c8d3 ("scsi: virtio_scsi: fix IO hang caused by automatic
irq vector affinity") removed all virtio_scsi hostdata users. Since the
SCSI host data is no longer used, also remove the host data itself.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 22:47:44 -05:00
YueHaibing
6c8d5f0512 scsi: ufs: Fix platform_no_drv_owner.cocci warnings
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 21:37:56 -05:00
Suganath Prabu
ed4c1136ac scsi: mpt3sas: Update driver version to 27.101.00.00
Update driver version from 27.100.00.00 to 27.101.00.00.

Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 21:29:07 -05:00
Suganath Prabu
306eaf276b scsi: mpt3sas: Replace readl with ioc->base_readl
Use ioc->base_readl to restrict the readl retries to only Aero controllers.

Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 21:29:07 -05:00
Suganath Prabu
b899202901 scsi: mpt3sas: Add separate function for aero doorbell reads
Sometimes Aero controllers appears to be returning bad data (0) for
doorbell register read and if retries are performed immediately after the
bad read, they return good data.

Workaround is added to retry read from doorbell registers for maximum three
times if driver get the zero.  Added functions base_readl_aero for Aero IOC
and base_readl for gen35 and other controllers.

Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 21:29:07 -05:00
Suganath Prabu
cc68e6077b scsi: mpt3sas: Introduce flag for aero based controllers
Adding flag "is_aero_ioc" to differentiate aero based controllers from
other gen35 controllers.

Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 21:29:07 -05:00
Xiang Chen
6db831f4ef scsi: hisi_sas: Make sg_tablesize consistent value
Sht->sg_tablesize is set in the driver, and it will be assigned to
shost->sg_tablesize in SCSI mid-layer. So it is not necessary to assign
shost->sg_table one more time in the driver.

In addition to the change, change each scsi_host_template.sg_tablesize
to HISI_SAS_SGE_PAGE_CNT instead of SG_ALL.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 21:23:17 -05:00
Xiang Chen
6e1b731b53 scsi: hisi_sas: Relocate some code to reduce complexity
Relocate the codes related to dma_map/unmap in hisi_sas_task_prep() to
reduce complexity, with a view to add DIF/DIX support.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 21:23:16 -05:00
John Garry
735bcc77e6 scsi: hisi_sas: Fix warnings detected by sparse
This patchset fixes some warnings detected by the sparse tool, like these:
drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: warning: incorrect type in assignment (different base types)
drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52:    expected unsigned short [unsigned] [assigned] [usertype] tag_of_task_to_be_managed
drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52:    got restricted __le16 [usertype] <noident>
drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52: warning: incorrect type in assignment (different base types)
drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52:    expected unsigned short [unsigned] [assigned] [usertype] tag_of_task_to_be_managed
drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52:    got restricted __le16 [usertype] <noident>

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 21:23:16 -05:00
Himanshu Madhani
86d540ff33 scsi: qla2xxx: Update driver version to 10.00.00.12-k
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 20:38:14 -05:00
Giridhar Malavali
835aa4f269 scsi: qla2xxx: Fix for FC-NVMe discovery for NPIV port
This patch fixes NVMe discovery by setting SKIP_PRLI flag, so that PRLI is
driven by driver and is retried when the NPIV port is detected to have NVMe
capability.

Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 20:38:13 -05:00
Himanshu Madhani
5e6803b409 scsi: qla2xxx: Fix NPIV handling for FC-NVMe
This patch fixes issues with NPIV port with FC-NVMe. Clean up code for
remoteport delete and also call nvme_delete when deleting VPs.

Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 20:38:13 -05:00
Anil Gurumurthy
850f6acd34 scsi: qla2xxx: Enable FC-NVME on NPIV ports
Signed-off-by: Anil Gurumurthy <agurumurthy@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 20:38:13 -05:00
Arnd Bergmann
bc127d93e4 scsi: aacraid: change event_wait to a completion
The event_wait semaphore has completion semantics, so we can
change it over to the completion interface for clarity without
changing the behavior.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 20:35:33 -05:00
Arnd Bergmann
dc71eccc17 scsi: aacraid: change wait_sem to a completion
The wait_sem member is used like a completion, so we should
use the respective API. The behavior is unchanged.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 20:35:33 -05:00
James Smart
719162bd5b scsi: lpfc: Enable Management features for IF_TYPE=6
Addition of support for if_type=6 missed several checks for interface type,
resulting in the failure of several key management features such as
firmware dump and loopback testing.

Correct the checks on the if_type so that both SLI4 IF_TYPE's 2 and 6 are
supported.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 20:33:08 -05:00
Martin K. Petersen
2d1036aea4 Revert "scsi: lpfc: ls_rjt erroneus FLOGIs"
This reverts commit 287aba2592.

We killed the bad firmware and this mod is no longer necessary.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-12 20:26:56 -05:00
James Smart
de55b786b8 scsi: lpfc: update driver version to 12.0.0.9
Update the driver version to 12.0.0.9

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-07 22:35:33 -05:00
James Smart
7c4042a4d0 scsi: lpfc: Fix dif and first burst use in write commands
When dif and first burst is used in a write command wqe, the driver was not
properly setting fields in the io command request. This resulted in no dif
bytes being sent and invalid xfer_rdy's, resulting in the io being aborted
by the hardware.

Correct the wqe initializaton when both dif and first burst are used.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-07 22:35:33 -05:00
James Smart
1165a5c220 scsi: lpfc: Fix driver release of fw-logging buffers
On driver termination, after the driver stops fw logging by writing a
register on the chip, the driver immediately unmaps and frees the logging
buffer, without confirming in any way that the chip has received the write
and terminated the logging. As termination on the chip is not immediate,
the chip may issue a dma request to the now unmapped dma buffer, resulting
in a iommu fault.

Change the driver to receive a confirmation that logging ahs been
terminated. As the driver always issues an SLI reset with the device as
part of shutdown, and as part of that is receiving confirmation that the
reset is complete - the driver was modified to perform the write to disable
fw logging prior to the SLI reset and only free the fw log buffer after the
SLI reset is complete. That guarantees use of the fw log buffer is fully
terminated when it is unmapped.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-07 22:35:33 -05:00
James Smart
76558b2573 scsi: lpfc: Correct topology type reporting on G7 adapters
Driver missed classifying the chip type for G7 when reporting supported
topologies. This resulted in loop being shown as supported on FC links that
are not supported per the standard.

Add the chip classifications to the topology checks in the driver.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-07 22:35:33 -05:00