[PATCH 04/13] mpt3sas: Free diag buffer without any status check

2019-09-13 Thread Sreekanth Reddy
Issue: Memory leak can happen when diag buffer is released but not unregistered(where buffer is deallocated) by the user. since during module unload time driver is not deallocating the buffer if the buffer is in released state. Fix: Deallocate the diag buffer during module unload time without any

[PATCH 01/13] mpt3sas: Register trace buffer based on NVDATA settings

2019-09-13 Thread Sreekanth Reddy
Currently if user has to enable the host trace buffer during driver load time then user has to load the driver with module parameter 'diag_buffer_enable' set to one. Alternatively now user can enable host trace buffer by enabling below fields in manufacture page11 in NVDATA (nvdata xml is used whi

[PATCH 00/13] Enhancements w.r.t to diag buffer and few bug fixes

2019-09-13 Thread Sreekanth Reddy
This patch series contains enhancements w.r.t to diag buffer support and few bug fix patches. Sreekanth Reddy (13): mpt3sas: Register trace buffer based on NVDATA settings mpt3sas: Display message before releasing diag buffer mpt3sas: Fix clear pending bit in ioctl status mpt3sas: Free dia

[PATCH 05/13] mpt3sas: Maintain owner of buffer through UniqueID

2019-09-13 Thread Sreekanth Reddy
Problem statement: Application A has registered a diag buffer and looking for particular event to happen to release & read the trace buffer. Meanwhile application B has unregister the diag buffer and now Application A can't get the required diag buffer. So proper diag buffer ownership is missing.

[PATCH 02/13] mpt3sas: Display message before releasing diag buffer

2019-09-13 Thread Sreekanth Reddy
Display message before releasing the diag buffer so that user knows which event caused the release of diag buffer. Releasing of diag buffer means HBA firmware stops posting the firmware logs on the registered diag buffer. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_ctl.c

[PATCH 13/13] mpt3sas: Bump mpt3sas driver version to 32.100.00.00

2019-09-13 Thread Sreekanth Reddy
Bump mpt3sas driver version to 32.100.00.00 Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 91f6636..4ebf81e 100644 ---

[PATCH 12/13] mpt3sas: Fix module parameter max_msix_vectors

2019-09-13 Thread Sreekanth Reddy
Issue: Load driver with module parameter "max_msix_vectors". Value provided in module parameter is not used by mpt3sas driver. Driver loads with max controller supported MSIX value. Fix: In _base_alloc_irq_vectors use reply_queue_count which is determined using user provided msix value insted of i

[PATCH 07/13] mpt3sas: Reuse diag buffer allocated at load time

2019-09-13 Thread Sreekanth Reddy
The diag buffer which is allocated during driver load time or through sysfs parameter is marked as driver allocated diag buffer. MPT3_DIAG_BUFFER_IS_DRIVER_ALLOCATED bit will be set for this buffer. This buffer won't be de-allocated even when application issues unregister command, driver just clea

[PATCH 10/13] mpt3sas: Use Component img header to get Package ver

2019-09-13 Thread Sreekanth Reddy
The firmware image layout has been changed for Aero controllers. All compatible HBA's has to get Firmware Package version from Component Image Header layout. The Signature field in FW header is set to 0xEB42 for products compatible with Component Image Header. For compatible Controllers, Driv

[PATCH 03/13] mpt3sas: Fix clear pending bit in ioctl status

2019-09-13 Thread Sreekanth Reddy
Issue: when user issues diag register command from application with required size and if driver unable to allocate the memory then it will fail the register command. While failing the register command currently driver is not clearing MPT3_CMD_PENDING bit in ctl_cmds.status variable which was s

[PATCH 06/13] mpt3sas: clear release bit when buffer reregistered

2019-09-13 Thread Sreekanth Reddy
Clear MPT3_DIAG_BUFFER_IS_RELEASED bit once diag buffer is re-registered after reading the buffer, else driver won't release the buffer and return the ' diag release' command with -EINVAL status saying that buffer is already released. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3s

[PATCH 08/13] mpt3sas: Add app owned flag support for diag buffer

2019-09-13 Thread Sreekanth Reddy
Added a new status flag named MPT3_DIAG_BUFFER_IS_APP_OWNED and it will set whenever application registers the diag buffer & it will be cleared when application unregisters the buffer. When this flag is enabled and if application issues diag buffer register command without releasing the buffer the

[PATCH 09/13] mpt3sas: Fail release cmnd if diag buffer is released

2019-09-13 Thread Sreekanth Reddy
Return the diag buffer release command with -EINVAL status if the buffer is already released. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3s

[PATCH 11/13] mpt3sas: Reject NVMe Encap cmnds to unsupported HBA

2019-09-13 Thread Sreekanth Reddy
If any faulty application issues an NVMe Encapsulated commands to HBA which doesn't support NVMe protocol then driver should return the command as invalid with below message. "HBA doesn't supports NVMe. Hence rejecting NVMe Encapsulated request." Otherwise below page fault kernel panic will be ob

[Bug 204815] qla2xxx: firmware is not responding to mailbox commands

2019-09-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204815 Martin Wilck (mwi...@suse.com) changed: What|Removed |Added CC||mwi...@suse.com --- Comm

[Bug 204815] qla2xxx: firmware is not responding to mailbox commands

2019-09-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204815 --- Comment #3 from Roman Bolshakov (r.bolsha...@yadro.com) --- Hi Martin, I can't tell for sure, because f8f97b0c5b7f7 introduces a regression fixed in 1710ac17547ac8b ("scsi: qla2xxx: Fix read offset in qla24xx_load_risc_flash()"). Here's the

Re: [PATCH 2/6] qla2xxx: Fix flash read for Qlogic ISPs

2019-09-13 Thread Martin Wilck
On Fri, 2019-08-30 at 15:23 -0700, Himanshu Madhani wrote: > From: Quinn Tran > > Use adapter specific callback to read flash instead of ISP > adapter specific. > > Signed-off-by: Quinn Tran > Signed-off-by: Himanshu Madhani > --- > drivers/scsi/qla2xxx/qla_init.c | 4 ++-- > drivers/scsi/qla

Re: [PATCH v2 07/14] qla2xxx: Fix Nport ID display value

2019-09-13 Thread Roman Bolshakov
On Thu, Sep 12, 2019 at 11:09:11AM -0700, Himanshu Madhani wrote: > From: Quinn Tran > > For N2N, the NPort ID is assigned by driver in the PLOGI ELS. > According to FW Spec the byte order for SID is not the same as > DID. > > Signed-off-by: Quinn Tran > Signed-off-by: Himanshu Madhani > --- >

Re: [PATCH 2/6] qla2xxx: Fix flash read for Qlogic ISPs

2019-09-13 Thread Martin K. Petersen
Hi Martin, > I believe this patch should be tagged with > > Fixes: 5fa8774c7f38 (scsi: qla2xxx: Add 28xx flash primary/secondary > status/image mechanism) > > I just bisected the FW initialization problems on my 8200 series CNA > to that commit, and I can confirm that this patch fixes it. I am