[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

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

2019-09-13 Thread Sreekanth Reddy
llers, Driver fetches firmware package version from ApplicationSpecific field of Component Image Header. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 32 +++- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/mp

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

2019-09-13 Thread Sreekanth Reddy
memory status. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index 76ca416..a195cae 100644 --- a/drivers/scsi/mpt3sas

[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 --- drive

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

2019-09-13 Thread Sreekanth Reddy
ning it then driver will unregister the buffer by itself and freshly registers the 1MB sized trace buffer with the HBA firmware. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_ctl.c | 43 - 2 f

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

2019-09-13 Thread Sreekanth Reddy
prepare_to_wait+0xb0/0xb0 ? tty_ldisc_deref+0x16/0x20 _ctl_ioctl+0x1a/0x20 [mpt3sas] do_vfs_ioctl+0xaa/0x620 ? vfs_read+0x117/0x140 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x60/0x190 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Sreekanth Reddy --- drivers/s

[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
insted of ioc->msix_vector_count which tells max supported msix value of the controller. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/m

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

2019-09-13 Thread Sreekanth Reddy
the buffer size which is allocated during driver load time will be enough for most of the cases for collecting the firmware logs. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_ctl.c | 88 - drivers/scsi/mp

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

2019-09-13 Thread Sreekanth Reddy
diag buffer should be released before re-registering it. By allowing this, driver no need to deallocate and allocate a new buffer for re-register command, same buffer can be re-used. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 114 ++---

[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 01/13] mpt3sas: Register trace buffer based on NVDATA settings

2019-09-13 Thread Sreekanth Reddy
KB then driver won't register trace buffer with HBA firmware. - if HostTraceBufferMaxSizeKB is zero then driver won't register trace buffer with HBA firmware. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.h | 9 +++-- drivers/scs

[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

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

2019-09-13 Thread Sreekanth Reddy
diag buffer status checks. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index a195cae..9b37a32 100644 --- a/drivers/scsi/mpt3sas

[PATCH] mpt3sas: Add sysfs parameter to set sdev qd to host can_queue

2019-08-21 Thread Sreekanth Reddy
o shost's can_queue value. When this sysfs is reset to zero then all the devices queue depth is set to corresponding device type's default (i.e. optimal) value defined by the driver. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 + drivers

Re: [PATCH] mpt3sas: Use 63-bit DMA addressing on SAS35 HBA

2019-07-29 Thread Sreekanth Reddy
On Fri, Jul 26, 2019 at 7:57 PM Christoph Hellwig wrote: > > On Fri, Jul 26, 2019 at 06:00:57AM -0400, Suganath Prabu wrote: > > Although SAS3 & SAS3.5 IT HBA controllers support > > 64-bit DMA addressing, as per hardware design, > > DMA address with all 64-bits set (0x-) > > resul

Re: [PATCH v2] scsi: mpt3sas: clean up a couple sizeof() uses

2019-07-26 Thread Sreekanth Reddy
sizeof(object) instead of > sizeof(type) so I have updated the function to the latest style as well. > > Signed-off-by: Dan Carpenter Acked-by: Sreekanth Reddy > --- > v2: Update the style to the 21st Century > > drivers/scsi/mpt3sas/mpt3sas_ctl.c | 5 ++--- > 1 file ch

[PATCH 1/4] mpt3sas: Remove CPU arch check to determine perf_mode

2019-06-24 Thread Sreekanth Reddy
7; mode on all machines. User can choose the required performance mode using perf_mode module parameter. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_

[PATCH 4/4] mpt3sas: Fix msix load balance on and off settings

2019-06-24 Thread Sreekanth Reddy
ogical CPU and HBA expose 128 MSIx vector, driver will disable msix load balance. - After this patch if system has 256 logical CPU and HBA expose 16 MSIx vector (due to combined reply queue mode is off in HW), driver will enable msix load balance. Signed-off-by: Sreekanth Reddy --- driver

[PATCH 0/4] mpt3sas: bug fix patches

2019-06-24 Thread Sreekanth Reddy
This patch set contains some mpt3sas driver's bug fix patches. Sreekanth Reddy (4): mpt3sas: Remove CPU arch check to determine perf_mode mpt3sas: Fix look configured PCIe link speed not cap mpt3sas: Fix determine smp affinity on per HBA basis mpt3sas: Fix msix load balance on an

[PATCH 2/4] mpt3sas: Fix look configured PCIe link speed not cap

2019-06-24 Thread Sreekanth Reddy
While enabling high iops queues driver should look for HBA's configured PCIe link speed instead of looking for HBA's max capacity link speed. i.e. Enable high iops queues only if Aero/Sea HBA's configured PCIe link speed is set to 16GT/s speed. Signed-off-by: Sreekanth Reddy --

[PATCH 3/4] mpt3sas: Fix determine smp affinity on per HBA basis

2019-06-24 Thread Sreekanth Reddy
e. If this HBA has less number of msix vectors configured when compare to number of online cpus then only this HBA's variable smp_affinity_enable is set to zero. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 10 ++ drivers/scsi/mpt3sas/mpt3sas_base.h | 1 +

Re: [PATCH v2 06/10] mpt3sas:save msix index and use same while posting RD

2019-05-30 Thread Sreekanth Reddy
On Thu, May 30, 2019 at 6:34 AM Martin K. Petersen wrote: > > > Suganath, > > > +static u8 > > +_base_set_and_get_msix_index(struct MPT3SAS_ADAPTER *ioc, u16 smid) > > +{ > > + struct scsiio_tracker *st; > > + > > + st = (smid < ioc->hi_priority_smid) ? > > + (_get_st_from_smid

Re: [PATCH v2 08/10] mpt3sas: Enable interrupt coalescing on high iops

2019-05-30 Thread Sreekanth Reddy
On Thu, May 30, 2019 at 6:36 AM Martin K. Petersen wrote: > > > Suganath, > > > This configuration should reset during driver unload or shutdown to > > the default settings. For this driver takes copy of default ioc page 1 > > and copy backs the default or unmodified ioc page1 during unload and >

Re: [PATCH] mpt3sas: Fix kernel panic occurs during expander reset

2019-03-20 Thread Sreekanth Reddy
On Wed, Mar 13, 2019 at 10:43 PM Sreekanth Reddy wrote: > > On Tue, Mar 12, 2019 at 3:46 PM Sreekanth Reddy > wrote: > > > > On Tue, Mar 12, 2019 at 3:17 PM Michal Soltys wrote: > > > > > > On 3/11/19 10:17 AM, Sreekanth Reddy wrote: > > > &g

Re: [PATCH] mpt3sas: Fix kernel panic occurs during expander reset

2019-03-13 Thread Sreekanth Reddy
On Tue, Mar 12, 2019 at 3:46 PM Sreekanth Reddy wrote: > > On Tue, Mar 12, 2019 at 3:17 PM Michal Soltys wrote: > > > > On 3/11/19 10:17 AM, Sreekanth Reddy wrote: > > > On Fri, Mar 8, 2019 at 6:52 PM Christoph Hellwig > > > wrote: > > >> > &g

Re: [PATCH] mpt3sas: Fix kernel panic occurs during expander reset

2019-03-12 Thread Sreekanth Reddy
On Tue, Mar 12, 2019 at 3:17 PM Michal Soltys wrote: > > On 3/11/19 10:17 AM, Sreekanth Reddy wrote: > > On Fri, Mar 8, 2019 at 6:52 PM Christoph Hellwig wrote: > >> > >> On Wed, Mar 06, 2019 at 12:49:55PM -0500, Martin K. Petersen wrote: > >>> &

Re: [PATCH] mpt3sas: Fix kernel panic occurs during expander reset

2019-03-11 Thread Sreekanth Reddy
On Fri, Mar 8, 2019 at 6:52 PM Christoph Hellwig wrote: > > On Wed, Mar 06, 2019 at 12:49:55PM -0500, Martin K. Petersen wrote: > > > > Hannes & Christoph: Please comment on Sreekanth's proposed approach. > > Iterating over all tags from the driver is always wrong. We've been > though this a few

[PATCH] mpt3sas: Fix kernel panic occurs during expander reset

2019-03-04 Thread Sreekanth Reddy
ce the corresponding scmd is processed (i.e. just before calling scmd->done function). Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 6 ++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 12 2 files changed, 18 insertions(+) diff --git a/drivers/scsi/mpt3sas

Re: [PATCH v1] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-28 Thread Sreekanth Reddy
On Wed, Feb 27, 2019 at 8:20 PM Martin K. Petersen wrote: > > > Kashyap, > > > Primary drawback of using "blk_mq_tagset_busy_iter" is API is only for > > blk-mq and it is not available for all the kernel with blk-mq > > support. We have seen multiple failures from customer and those > > kernels do

Re: [PATCH v1] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-26 Thread Sreekanth Reddy
On Tue, Feb 26, 2019 at 5:59 PM Hannes Reinecke wrote: > > On 2/26/19 12:48 PM, Sreekanth Reddy wrote: > > On Tue, Feb 26, 2019 at 12:38 AM Hannes Reinecke wrote: > >> > >> On 2/21/19 1:11 PM, Sreekanth Reddy wrote: > >>> During expander reset ha

Re: [PATCH v1] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-26 Thread Sreekanth Reddy
On Tue, Feb 26, 2019 at 12:38 AM Hannes Reinecke wrote: > > On 2/21/19 1:11 PM, Sreekanth Reddy wrote: > > During expander reset handling, the driver invokes kernel function > > scsi_host_find_tag() to obtain outstanding requests associated with > > the scsi host managed

[PATCH v2] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-26 Thread Sreekanth Reddy
able kernels. Since this patch has some dependencies in the stable kernels. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 45 +--- drivers/scsi/mpt3sas/mpt3sas_base.h | 10 +++ drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2

Re: [PATCH v1] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-24 Thread Sreekanth Reddy
On Fri, Feb 22, 2019 at 8:54 PM Sasha Levin wrote: > > Hi, > > [This is an automated email] > > This commit has been processed because it contains a -stable tag. > The stable tag indicates that it's relevant for the following trees: all > > The bot has tested the following trees: v4.20.11, v4.19.2

RE: kernel panic in late shutdown stage (after syncing) in _scsih_set_satl_pending() in mpt3sas

2019-02-21 Thread Sreekanth Reddy
Thanks for conformation. Regards, Sreekanth -Original Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi-ow...@vger.kernel.org] On Behalf Of Michal Soltys Sent: Thursday, February 21, 2019 3:43 PM To: Sreekanth Reddy ; linux-scsi@vger.kernel.org Subject: Re: kernel panic

[PATCH v1] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-21 Thread Sreekanth Reddy
h this scsi_lookup table and if it observe any entry with non-null scmd then it means that scmd is outstanding at the driver level. v1 change set: Updated the patch description. Cc: Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 45 ++

RE: [PATCH] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-19 Thread Sreekanth Reddy
--- From: Greg KH [mailto:gre...@linuxfoundation.org] Sent: Tuesday, February 19, 2019 5:44 PM To: Sreekanth Reddy Cc: linux-scsi@vger.kernel.org; sathya.prak...@broadcom.com; suganath-prabu.subram...@broadcom.com; sta...@vger.kernel.org Subject: Re: [PATCH] mpt3sas: Use driver scsi lookup to track out

RE: kernel panic in late shutdown stage (after syncing) in _scsih_set_satl_pending() in mpt3sas

2019-02-19 Thread Sreekanth Reddy
Thanks for conformation. Can you please try once with the below patch which I have posted today https://patchwork.kernel.org/patch/10819769/ Thanks, Sreekanth -Original Message- From: Michal Soltys [mailto:sol...@ziu.info] Sent: Monday, February 18, 2019 7:09 PM To: Sreekanth Reddy

[PATCH] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-19 Thread Sreekanth Reddy
outstanding IOs at the driver level then driver can go through this scsi_lookup table and if it observe any entry with non-null scmd then it means that scmd is outstanding at the driver level. Cc: Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 45

RE: kernel panic in late shutdown stage (after syncing) in _scsih_set_satl_pending() in mpt3sas

2019-02-18 Thread Sreekanth Reddy
Hi Michal, This issue looks to be same as issue discussed in below URL thread, https://patchwork.kernel.org/patch/10734933/ This issue happens only when MQ is enabled, can you please try once with disabling the MQ? Thanks, Sreekanth -Original Message- From: linux-scsi-ow...@vger.kernel.

Re: [PATCH] scsi: mpt3sas: fix memory ordering on 64bit writes

2018-12-18 Thread Sreekanth Reddy
Please consider this patch as Acked-by: Sreekanth Reddy On Wed, Dec 19, 2018 at 9:22 AM Martin K. Petersen wrote: > > > > With revision 09c2f95ad404, 64bit writes in _base_writeq() were rewritten > > to use __raw_writeq() instad of writeq(). > > > > This introduc

[PATCH v2] mpt3sas: Display message on Configurable secure HBA

2018-11-09 Thread Sreekanth Reddy
Display below warning message only up on detection of Configurable secure type controllers. "HBA is in Configurable Secure mode" v2 change set: Replaced dev_warn() with dev_info() function while displaying above message. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3s

[PATCH] mpt3sas: Display message on Configurable secure HBA

2018-11-08 Thread Sreekanth Reddy
Display below warning message only up on detection of Configurable secure type controllers. "HBA is in Configurable Secure mode" Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dr

RE: [PATCH v4 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available

2018-10-11 Thread Sreekanth Reddy
@vger.kernel.org; linux-...@vger.kernel.org; Andy Shevchenko; Sathya Prakash; Sreekanth Reddy; linux-ker...@vger.kernel.org; b...@kernel.crashing.org; rus...@russell.cc; sbobr...@linux.ibm.com; Oliver Subject: Re: [PATCH v4 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available On Tue, Oct 2, 2018 at 7:34

Re: [PATCH v2 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available

2018-09-20 Thread Sreekanth Reddy
On Thu, Sep 20, 2018 at 4:37 PM Christoph Hellwig wrote: > > > +u8 > > +mpt3sas_base_pci_device_is_available(struct MPT3SAS_ADAPTER *ioc) > > +{ > > + if (ioc->pci_error_recovery || > > + (!pci_device_is_present(ioc->pdev))) > > + return 0; > > + > > + return 1; >

Re: [Patch v1 0/7] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-09-12 Thread Sreekanth Reddy
On Wed, Sep 5, 2018 at 1:08 PM, Lukas Wunner wrote: > On Wed, Sep 05, 2018 at 11:45:45AM +0530, Sreekanth Reddy wrote: >> On Tue, Sep 4, 2018 at 3:12 PM, Lukas Wunner wrote: >> > Many scsi drivers call pci_channel_offline() to detect inaccessibility >> > of th

Re: [Patch v1 0/7] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-09-04 Thread Sreekanth Reddy
l On Tue, Sep 4, 2018 at 3:12 PM, Lukas Wunner wrote: > On Tue, Sep 04, 2018 at 11:19:04AM +0530, Sreekanth Reddy wrote: >> On Fri, Aug 31, 2018 at 2:25 PM, Lukas Wunner wrote: >> > * Just reading the vendor ID may not be sufficient to detect unplug, >> > it may

Re: [Patch v1 0/7] mpt3sas: Hot-Plug Surprise removal support on IOC.

2018-09-03 Thread Sreekanth Reddy
On Fri, Aug 31, 2018 at 2:25 PM, Lukas Wunner wrote: > [cc += linux-pci, benh] > > On Fri, Aug 31, 2018 at 7:37 AM Suganath Prabu S > wrote: >> Posting below set of patches to support PCIe Hot Plug surprise removal, >> and few defect fixes. > > Please cross-post to linux-pci in the future. > > >

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-07 Thread Sreekanth Reddy
On Wed, Aug 8, 2018 at 1:27 AM, Bart Van Assche wrote: > On Tue, 2018-08-07 at 21:46 +0530, Sreekanth Reddy wrote: >> [Sreekanth] In the patch description I mentioned that I have done a >> manual mistake and I am correcting with this patch. >> >> Hope I have answered

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-07 Thread Sreekanth Reddy
On Tue, Aug 7, 2018 at 8:27 PM, Bart Van Assche wrote: > On Tue, 2018-08-07 at 20:03 +0530, Sreekanth Reddy wrote: >> The main intention of this patch to reset the smid to zero after >> resetting the corresponding smid entry's chain_offset to zero. While >> posti

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-07 Thread Sreekanth Reddy
On Tue, Aug 7, 2018 at 7:29 PM, Bart Van Assche wrote: > On Tue, 2018-08-07 at 12:10 +0530, Sreekanth Reddy wrote: >> This function _base_get_chain_buffer_tracker() is called only during >> the IO submission time and mpt3sas_base_clear_st() is called during IO >> completion t

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-06 Thread Sreekanth Reddy
On Mon, Aug 6, 2018 at 11:41 PM, Bart Van Assche wrote: > On Sat, 2018-08-04 at 18:56 +0530, Sreekanth Reddy wrote: >> No Bart, their is no race condition here. Since chain lookup table >> entry is uniquely accessed using smid value. And this smid (which is >> scmd->reques

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-04 Thread Sreekanth Reddy
On Fri, Aug 3, 2018 at 10:02 PM, Bart Van Assche wrote: > On Fri, 2018-08-03 at 12:16 -0400, Sreekanth Reddy wrote: >> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c >> b/drivers/scsi/mpt3sas/mpt3sas_base.c >> index 902610d..2c5a5b4 100644 >> --- a/drivers/scsi/mpt3

[PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-03 Thread Sreekanth Reddy
to make sure that proper chain tracker is retrieved from the corresponding smid's pool from chain table before incrementing smid pool's chain offset value. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 16 +++- 1 file changed, 15 insertions(+),

Re: [PATCH v1 RESEND] mpt3sas: Swap I/O memory read value back to cpu endianness

2018-08-03 Thread Sreekanth Reddy
On Fri, Aug 3, 2018 at 3:07 PM, Andy Shevchenko wrote: > On Thu, 2018-08-02 at 16:16 -0400, Martin K. Petersen wrote: >> Andy, >> >> Please review the changes Sreekanth made to address your feedback. > > From my point of view they look good. > > I assume Sreekanth tested them on real hardware and

[PATCH v2] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-03 Thread Sreekanth Reddy
g smid's pool from chain table before incrementing smid pool's chain offset value. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi

[PATCH v1 RESEND] mpt3sas: Swap I/O memory read value back to cpu endianness

2018-07-30 Thread Sreekanth Reddy
& mmiowb() APIs. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 94359d8..c75e88a 100644 --- a/drivers

[PATCH v1] mpt3sas: correct reset of smid while clearing scsi tracker

2018-07-30 Thread Sreekanth Reddy
correcting with this patch. v1 changelog: Added memory barriers before & after atomic_set() API. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt

[PATCH v1] mpt3sas: Swap I/O memory read value back to cpu endianness

2018-07-27 Thread Sreekanth Reddy
& mmiowb() APIs. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 94359d8..c75e88a 100644 --- a/drivers

Re: [PATCH] mpt3sas: correct reset of smid while clearing scsi tracker

2018-07-26 Thread Sreekanth Reddy
On Tue, Jul 24, 2018 at 10:37 AM, Sreekanth Reddy wrote: > Any update on this patch!. Just Ping once again. Any update on this patch. > Thanks, > Sreekanth > > On Fri, Jul 20, 2018 at 5:56 PM, Sreekanth Reddy > wrote: >> In mpt3sas_base_clear_st() function smid value

Re: [PATCH] mpt3sas: Swap I/O memory read value back to cpu endianness

2018-07-26 Thread Sreekanth Reddy
On Wed, Jul 25, 2018 at 8:32 PM, Andy Shevchenko wrote: > On Wed, Jul 25, 2018 at 12:42 PM, Sreekanth Reddy > wrote: >> Swap the I/O memory read value back to cpu endianness before storing it >> in a data structures which are defined in the MPI headers where >> u8 compo

[PATCH] mpt3sas: Swap I/O memory read value back to cpu endianness

2018-07-25 Thread Sreekanth Reddy
atch cf6bf9710c (mpt3sas: Bug fix for big endian systems) we have removed these APIs before reading I/O memory which we should haven't done it. So in this patch I am correcting it by adding these APIs back before accessing I/O memory. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3s

Re: [PATCH] mpt3sas: correct reset of smid while clearing scsi tracker

2018-07-23 Thread Sreekanth Reddy
Any update on this patch!. Thanks, Sreekanth On Fri, Jul 20, 2018 at 5:56 PM, Sreekanth Reddy wrote: > In mpt3sas_base_clear_st() function smid value is reseted in wrong line, > i.e. driver should reset smid value to zero after decrementing chain_offset > counter in chain_lookup tab

[PATCH] mpt3sas: correct reset of smid while clearing scsi tracker

2018-07-20 Thread Sreekanth Reddy
correcting with this patch. v1 changelog: Added memory barriers before & after atomic_set() API. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt

Re: [PATCH] mpt3sas: correct reset of smid while clearing scsi tracker

2018-07-18 Thread Sreekanth Reddy
On Wed, Jul 18, 2018 at 7:38 PM, Bart Van Assche wrote: > On Wed, 2018-07-18 at 01:22 -0400, Sreekanth Reddy wrote: >> In mpt3sas_base_clear_st() function smid value is reseted in wrong line, >> i.e. driver should reset smid value to zero after decrementing chain_offset >> co

[PATCH] mpt3sas: correct reset of smid while clearing scsi tracker

2018-07-17 Thread Sreekanth Reddy
correcting with this patch. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 902610d..94b939b 100644 --- a/drivers/scsi/mpt3sas

[PATCH][RESEND v1]mpt3sas: Fix calltrace observed while running IO & reset

2018-07-12 Thread Sreekanth Reddy
re it returns the scmd pointer to the caller. If smid is zero then this function returns scmd pointer as NULL and driver won't flushout those scsi cmnds at driver level with DID_RESET host byte thus this issue will not be observed. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt

Re: [PATCH v1] mpt3sas: Fix calltrace observed while running IO & host reset

2018-07-12 Thread Sreekanth Reddy
On Tue, Jul 10, 2018 at 10:58 PM, Sreekanth Reddy wrote: > On Mon, Jul 9, 2018 at 5:14 PM, Sreekanth Reddy > wrote: >> On Thu, Jun 28, 2018 at 10:56 AM, Sreekanth Reddy >> wrote: >>> On Thu, Jun 28, 2018 at 3:48 AM, Bart Van Assche >>> wrote: >>&

Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

2018-07-10 Thread Sreekanth Reddy
On Wed, Jul 11, 2018 at 8:32 AM, Martin K. Petersen wrote: > >> Since this commit is buried a bit deep in the pile, please submit an >> incremental patch that addresses Dave's problem. This patch "Fix for regression caused due to cf6bf9710c" addresses the Dave's problem. > > I obviously missed t

Re: [PATCH v1] mpt3sas: Fix calltrace observed while running IO & host reset

2018-07-10 Thread Sreekanth Reddy
On Mon, Jul 9, 2018 at 5:14 PM, Sreekanth Reddy wrote: > On Thu, Jun 28, 2018 at 10:56 AM, Sreekanth Reddy > wrote: >> On Thu, Jun 28, 2018 at 3:48 AM, Bart Van Assche >> wrote: >>> On 06/24/18 23:10, Sreekanth Reddy wrote: >>>> >>>> Bef

Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

2018-07-10 Thread Sreekanth Reddy
On Tue, Jul 10, 2018 at 2:38 AM, David Miller wrote: > From: Sreekanth Reddy > Date: Mon, 9 Jul 2018 17:12:51 +0530 > >> This is a shared structure between the host drivers and HBA device. >> HBA Firmware sends the information though this structures which are >> defi

Re: [PATCH v1] mpt3sas: Fix calltrace observed while running IO & host reset

2018-07-09 Thread Sreekanth Reddy
On Thu, Jun 28, 2018 at 10:56 AM, Sreekanth Reddy wrote: > On Thu, Jun 28, 2018 at 3:48 AM, Bart Van Assche > wrote: >> On 06/24/18 23:10, Sreekanth Reddy wrote: >>> >>> Before calling scsi_internal_device_block_nowait() API; driver sets >>> sas_device_p

Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

2018-07-09 Thread Sreekanth Reddy
On Wed, Jul 4, 2018 at 5:52 PM, David Miller wrote: > From: Sreekanth Reddy > Date: Wed, 4 Jul 2018 16:54:05 +0530 > >> >> Also I tried replacing readl() API with readw()API (as HBA FW will >> send 16 bit data at a time) as shown below and still I see same issue, >&

Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

2018-07-04 Thread Sreekanth Reddy
On Tue, Jul 3, 2018 at 8:53 PM, James Bottomley wrote: > On Tue, 2018-07-03 at 22:49 +0900, David Miller wrote: >> From: Sreekanth Reddy >> Date: Tue, 3 Jul 2018 17:48:49 +0530 >> >> > Any suggestion/update over my previous mail. I am using 4.13 >> kernel. &g

Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

2018-07-03 Thread Sreekanth Reddy
Hi, Any suggestion/update over my previous mail. I am using 4.13 kernel. Thanks, Sreekanth On Sat, Jun 30, 2018 at 12:34 AM, Sreekanth Reddy wrote: > Hi All, > > Here is the issue which we are observing when driver don't use > le16_to_cpu() in below code snippet on Sparc64 ma

Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

2018-06-29 Thread Sreekanth Reddy
Hi All, Here is the issue which we are observing when driver don't use le16_to_cpu() in below code snippet on Sparc64 machine when driver is reading 2 bytes of data which is posted by HBA firmware, u32 reply1; reply1 = readl(&ioc->chip->Doorbell); reply[1] = (reply1 & MPI2

Re: [PATCH v1] mpt3sas: Fix calltrace observed while running IO & host reset

2018-06-27 Thread Sreekanth Reddy
On Thu, Jun 28, 2018 at 3:48 AM, Bart Van Assche wrote: > On 06/24/18 23:10, Sreekanth Reddy wrote: >> >> Before calling scsi_internal_device_block_nowait() API; driver sets >> sas_device_priv_data->block flag as one. And in the scsih_qcmd() >> driver checks fo

Re: [PATCH v1] mpt3sas: Fix calltrace observed while running IO & host reset

2018-06-24 Thread Sreekanth Reddy
On Sat, Jun 23, 2018 at 2:56 AM, Bart Van Assche wrote: > On 06/22/18 09:38, Sreekanth Reddy wrote: >> >> In driver's .resume() callback function, driver is doing IOC reset >> operation. And as per your suggestion we tried using >> scsi_internal_device_block_nowai

Re: [PATCH v1] mpt3sas: Fix calltrace observed while running IO & host reset

2018-06-22 Thread Sreekanth Reddy
On Fri, Jun 22, 2018 at 8:22 PM, Bart Van Assche wrote: > On 06/21/18 22:35, Sreekanth Reddy wrote: >> >> No, lock_system_sleep() is not inserted in the interrupt context. we >> have inserted it in .resume() call back function just before issuing >> the IOC reset. >

Re: [PATCH v1] mpt3sas: Fix calltrace observed while running IO & host reset

2018-06-21 Thread Sreekanth Reddy
On Thu, Jun 21, 2018 at 7:49 PM, Bart Van Assche wrote: > On Thu, 2018-06-21 at 15:41 +0530, Sreekanth Reddy wrote: >> Bart, we tried using lock_system_sleep() before calling IOC reset >> operation in .resume() callback function and unlock_system_sleep() >> after the IOC

Re: [PATCH v1] mpt3sas: Fix calltrace observed while running IO & host reset

2018-06-21 Thread Sreekanth Reddy
On Wed, Jun 20, 2018 at 11:43 PM, Bart Van Assche wrote: > On Wed, 2018-06-20 at 09:18 +0530, Chaitra Basappa wrote: >> We have tried with calling scsi_internal_device_block_nowait() API before >> doing IOC reset (i.e. host reset) and called >> scsi_internal_device_unblock_nowait() after performin

RE: [PATCH v3 00/14] mpt3sas: Enhancements and Defect fixes.

2018-05-07 Thread Sreekanth Reddy
Hi, Any update on this patch set. Thanks, Sreekanth -Original Message- From: Chaitra P B [mailto:chaitra.basa...@broadcom.com] Sent: Tuesday, April 24, 2018 2:58 PM To: linux-scsi@vger.kernel.org Cc: sathya.prak...@broadcom.com; sreekanth.re...@broadcom.com; suganath-prabu.subram...@b

Re: [PATCH v2 01/14] mpt3sas: Bug fix for big endian systems.

2018-05-01 Thread Sreekanth Reddy
On Wed, May 2, 2018 at 9:21 AM, Martin K. Petersen wrote: > > Hi Chaitra, > >>> for (i = 0; i < ioc->combined_reply_index_count; i++) { >>> -ioc->replyPostRegisterIndex[i] = (resource_size_t >> *) >>> - ((u8 *)&ioc->chip->Doorbell + >>> +

Re: [PATCH v2] block: ratelimite pr_err on IO path

2018-04-16 Thread Sreekanth Reddy
On Mon, Apr 16, 2018 at 1:46 PM, Jinpu Wang wrote: > On Fri, Apr 13, 2018 at 6:59 PM, Martin K. Petersen > wrote: >> >> Jinpu, >> >> [CC:ed the mpt3sas maintainers] >> >> The ratelimit patch is just an attempt to treat the symptom, not the >> cause. > Agree. If we can fix the root cause, it will

RE: [PATCH v1 14/15] mpt3sas: fix possible memory leak.

2018-04-10 Thread Sreekanth Reddy
Yes Sasha, We like to have this patch included in a stable tree. Thanks, Sreekanth -Original Message- From: Sasha Levin [mailto:alexander.le...@microsoft.com] Sent: Tuesday, April 10, 2018 7:19 PM To: Sasha Levin; Chaitra P B; linux-scsi@vger.kernel.org Cc: sathya.prak...@broadcom.com; sr

RE: [PATCH v1 03/15] mpt3sas: Add sanity checks for scsi tracker before accessing it.

2018-04-10 Thread Sreekanth Reddy
Yes Sasha, We like to have this patch included in a stable tree. Thanks, Sreekanth -Original Message- From: Sasha Levin [mailto:alexander.le...@microsoft.com] Sent: Tuesday, April 10, 2018 7:19 PM To: Sasha Levin; Chaitra P B; linux-scsi@vger.kernel.org Cc: sathya.prak...@broadcom.com; sr

Re: [PATCH 03/15] mpt3sas: Add sanity checks for scsi tracker before accessing it.

2018-04-04 Thread Sreekanth Reddy
On Tue, Apr 3, 2018 at 9:26 PM, Bart Van Assche wrote: > On Tue, 2018-04-03 at 10:11 +0530, Sreekanth Reddy wrote: >> [SR] No, driver calls _scsih_flush_running_cmds during Host reset time >> and during host reset time driver will set 'ioc->shost_recovery' flag. >

Re: [PATCH 03/15] mpt3sas: Add sanity checks for scsi tracker before accessing it.

2018-04-02 Thread Sreekanth Reddy
On Mon, Apr 2, 2018 at 8:55 PM, Bart Van Assche wrote: > On Mon, 2018-04-02 at 11:53 +0530, Sreekanth Reddy wrote: >> On Fri, Mar 30, 2018 at 5:29 PM, Christoph Hellwig >> wrote: >> > On Fri, Mar 30, 2018 at 03:07:12PM +0530, Chaitra P B wrote: >> > >

Re: [PATCH 03/15] mpt3sas: Add sanity checks for scsi tracker before accessing it.

2018-04-01 Thread Sreekanth Reddy
On Fri, Mar 30, 2018 at 5:29 PM, Christoph Hellwig wrote: > On Fri, Mar 30, 2018 at 03:07:12PM +0530, Chaitra P B wrote: >> Check scsi tracker for NULL before accessing it. >> And in some places there are possibilities for getting valid st >> but still other fields are not set. > > Please explain

RE: [PATCH v3 0/2] scsi: mpt3sas: prevent oops in the shutdown/unload path

2018-03-06 Thread Sreekanth Reddy
-Original Message- From: Martin K. Petersen [mailto:martin.peter...@oracle.com] Sent: Wednesday, March 7, 2018 6:48 AM To: Mauricio Faria de Oliveira Cc: Martin K. Petersen; j...@linux.vnet.ibm.com; linux-scsi@vger.kernel.org; bart.vanass...@wdc.com; sreekanth.re...@broadcom.com; dougm...@l

RE: [PATCH] scsi: mpt3sas: clarify mmio pointer types

2018-03-04 Thread Sreekanth Reddy
-Original Message- From: Arnd Bergmann [mailto:a...@arndb.de] Sent: Thursday, March 1, 2018 6:37 PM To: Suganath Prabu S; Sathya Prakash; Chaitra P B; James E.J. Bottomley; Martin K. Petersen Cc: Arnd Bergmann; Hannes Reinecke; Sreekanth Reddy; mpt-fusionlinux@broadcom.com; linux-scsi

RE: [PATCH] mpt3sas: Do not mark fw_event workqueue as WQ_MEM_RECLAIM

2018-02-28 Thread Sreekanth Reddy
-Original Message- From: Hannes Reinecke [mailto:h...@suse.de] Sent: Monday, February 26, 2018 7:56 PM To: Martin K. Petersen Cc: Christoph Hellwig; James Bottomley; linux-scsi@vger.kernel.org; Hannes Reinecke; Sreekanth Reddy; Suganath Prabu Subramani; Hannes Reinecke Subject: [PATCH

RE: [PATCH v2 1/2] scsi: mpt3sas: fix oops in error handlers after shutdown/unload

2018-02-19 Thread Sreekanth Reddy
if (ioc->is_driver_loading) { + if (ioc->is_driver_loading || ioc->remove_host) { pr_info(MPT3SAS_FMT "Blocking the host reset\n", ioc->name); r = FAILED; -- 1.8.3.1 Acked-by: Sreekanth Reddy Thanks, Sreekanth

RE: [PATCH v2] scsi: mpt3sas: fix oops in error handlers after shutdown/unload

2018-02-14 Thread Sreekanth Reddy
05 PM To: Sreekanth Reddy; linux-scsi@vger.kernel.org; bart.vanass...@wdc.com Cc: Sathya Prakash Veerichetty; Chaitra Basappa; Suganath Prabu Subramani; j...@linux.vnet.ibm.com; martin.peter...@oracle.com; dougm...@linux.vnet.ibm.com Subject: Re: [PATCH v2] scsi: mpt3sas: fix oops in error handlers

RE: [PATCH v2] scsi: mpt3sas: fix oops in error handlers after shutdown/unload

2018-02-11 Thread Sreekanth Reddy
Mauricio, Instead of returning the scmd with DID_NO_CONNECT in TM path, can we wait for some time (10 seconds) in shutdown/unload path for the outstanding commands to complete and even then the scmds are outstanding then return all the outstanding scmds with DID_NO_CONNECT in the shutdown/unload p

[PATCH 01/10] mpt3sas: Processing of Cable Exception events

2017-10-10 Thread Sreekanth Reddy
. MPI 2.5 spec supporting HBAs) earlier this event was enabled only for MPI 2.6 spec supporting HBA devices. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 5 ++--- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 20 +++- 2 files changed, 13 insertions(+), 12 deletions(

[PATCH 00/10] [SCSI] mpt3sas: Phase15 driver enhancements and fixes

2017-10-10 Thread Sreekanth Reddy
Phase15 driver enhancements and fixes. Sreekanth Reddy (10): mpt3sas: Processing of Cable Exception events mpt3sas: Fixed memory leaks in driver mpt3sas: Reduce memory footprints in kdump kernel mpt3sas: Fix removal and addition of vSES device during host reset mpt3sas: Fix IO error

[PATCH 04/10] mpt3sas: Fix removal and addition of vSES device during host reset

2017-10-10 Thread Sreekanth Reddy
ddress for Virtual SES device instead of HBA's sas address. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.

[PATCH 03/10] mpt3sas: Reduce memory footprints in kdump kernel

2017-10-10 Thread Sreekanth Reddy
To reduce the memory footprints of the driver in kdump kernel, we have made below driver setting when system boots in to kdump kernel, 1. Used single MSI-x vector. 2. Disable RDPQ mode. 3. Set sg_table_size to 32 by default. 4) Set SCSI IO Queue depth to 200. Signed-off-by: Sreekanth Reddy

[PATCH 02/10] mpt3sas: Fixed memory leaks in driver

2017-10-10 Thread Sreekanth Reddy
cated data structures. Updated the driver to remove the expander device from the list only after freeing all its child devices. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/sc

  1   2   3   4   5   >