Re: [PATCH 3/4] qla2xxx: Add Block Multi Queue functionality.

2016-11-04 Thread Madhani, Himanshu
Hi Christoph, On 11/4/16, 4:00 PM, "Christoph Hellwig" wrote: >On Fri, Nov 04, 2016 at 09:33:32AM -0700, himanshu.madh...@cavium.com wrote: >> From: Michael Hernandez >> >> Tell the SCSI layer how many hardware queues we have based on the >> number of max queue pairs created. The number of

Re: [PATCH 0/2] qla2xxx: fix errors in PCI device remove with ongoing I/O

2016-11-08 Thread Madhani, Himanshu
On 11/7/16, 11:53 AM, "Mauricio Faria de Oliveira" wrote: >This patchset addresses a couple of errors that might happen during >PCI device remove (e.g., PCI hotplug, PowerVM DLPAR), which prevent >the successful removal and re-addition of the adapter to the system, >and cause an oops and/or in

Re: [PATCH 3/4] qla2xxx: Add Block Multi Queue functionality.

2016-11-08 Thread Madhani, Himanshu
Hi Ewan, On 11/7/16, 8:43 AM, "Ewan D. Milne" wrote: >On Fri, 2016-11-04 at 09:33 -0700, himanshu.madh...@cavium.com wrote: >> From: Michael Hernandez >> >> Tell the SCSI layer how many hardware queues we have based on the >> number of max queue pairs created. The number of max queue pairs >

Re: [PATCH 2/4] qla2xxx: Fix mailbox command timeout due to starvation

2016-11-08 Thread Madhani, Himanshu
Hi Ewan, On 11/7/16, 7:53 AM, "Ewan D. Milne" wrote: >On Fri, 2016-11-04 at 09:33 -0700, himanshu.madh...@cavium.com wrote: >... >> @@ -2349,6 +2349,17 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha) >> return atomic_read(&vha->loop_state) == LOOP_READY; >> } >> >> +static voi

Re: [PATCH] qla2xxx: do not abort all commands in the adapter during EEH recovery

2016-11-14 Thread Madhani, Himanshu
On 11/14/16, 1:26 PM, "Mauricio Faria de Oliveira" wrote: >The previous commit ("qla2xxx: fix invalid DMA access after command >aborts in PCI device remove") introduced a regression during an EEH >recovery, since the change to the qla2x00_abort_all_cmds() function >calls qla2xxx_eh_abort(), wh

Re: [PATCH v2 2/5] qla2xxx: Fix mailbox command timeout due to starvation

2016-12-01 Thread Madhani, Himanshu
On 11/30/16, 11:58 PM, "Hannes Reinecke" wrote: >On 11/30/2016 09:24 PM, Himanshu Madhani wrote: >> From: Samy >> >> Signed-off-by: Samy >> Signed-off-by: Himanshu Madhani >> --- >> drivers/scsi/qla2xxx/qla_def.h | 3 ++ >> drivers/scsi/qla2xxx/qla_mbx.c | 88 >> ++

Re: [PATCH v2 3/5] qla2xxx: Add multiple queue pair functionality.

2016-12-02 Thread Madhani, Himanshu
Hi Hannes, On 12/1/16, 12:39 AM, "Hannes Reinecke" wrote: >On 11/30/2016 09:24 PM, Himanshu Madhani wrote: >> From: Michael Hernandez >> >> Replaced existing multiple queue functionality with framework >> that allows for the creation of pairs of request and response queues, >> either at st

Re: [PATCH v2 4/5] qla2xxx: Add Block Multi Queue functionality.

2016-12-02 Thread Madhani, Himanshu
On 12/1/16, 2:25 AM, "Christoph Hellwig" wrote: >> -pci_disable_msix(ha->pdev); >> +pci_free_irq_vectors(ha->pdev); > >Please make the switch to pci_alloc_irq_vectors / pci_free_irq_vectors >a se[arate patch. Ack. We’ll split up patch. > >> +ret = pci_alloc_irq_vectors(ha->pdev,

Re: [PATCH v3 1/6] qla2xxx: Only allow operational MBX to proceed during RESET.

2016-12-05 Thread Madhani, Himanshu
On 12/5/16, 8:01 AM, "Christoph Hellwig" wrote: >Can you describe the changes in the body a bit more? Why do you >only want these commands to be sent? Why is the warning added >when it takes longer than nessecary? Otherwise this patch >looks fine to me. This patch is allowing only ROM mailbo

Re: [PATCH v3 2/6] qla2xxx: Fix mailbox command timeout due to starvation

2016-12-05 Thread Madhani, Himanshu
On 12/5/16, 8:03 AM, "Christoph Hellwig" wrote: >On Fri, Dec 02, 2016 at 01:44:53PM -0800, Himanshu Madhani wrote: >> From: Samy >> >> This patch helps resolve some of the mailbox timeout issue discovered >> during large SAN emulation testing where 1000+ initiators are trying >> to log into t

Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-05 Thread Madhani, Himanshu
On 12/4/16, 11:38 PM, "Hannes Reinecke" wrote: >On 12/02/2016 10:44 PM, Himanshu Madhani wrote: >> From: Michael Hernandez >> >> Replaced existing multiple queue functionality with framework >> that allows for the creation of pairs of request and response queues, >> either at start of day or d

Re: [PATCH v3 6/6] qla2xxx: Fix Target mode handling with Multiqueue changes.

2016-12-05 Thread Madhani, Himanshu
On 12/4/16, 11:42 PM, "Hannes Reinecke" wrote: >On 12/02/2016 10:44 PM, Himanshu Madhani wrote: >> From: Quinn Tran >> >> - Fix race condition between dpc_thread accessing Multiqueue resources >> and qla2x00_remove_one thread trying to free resource. >> - Fix out of order free for Multiqueue

Re: [PATCH v3 3/6] qla2xxx: Utilize pci_alloc_irq_vectors/pci_free_irq_vectors calls.

2016-12-05 Thread Madhani, Himanshu
On 12/5/16, 4:55 AM, "Christoph Hellwig" wrote: >>+ void *handle; > >Just curious: why do you need this new handle field instead of just >passing the rsp as the old code did? We wanted to make it more generic pointer with new Q-pair frameworks. So just renamed it. we’ll remove old rsp ref

Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-05 Thread Madhani, Himanshu
On 12/5/16, 12:43 PM, "linux-scsi-ow...@vger.kernel.org on behalf of Madhani, Himanshu" wrote: > >We need to have the spinlock because currently our NPIV implementation does >not utilizes >Q-pair framework. Looks like sent it prematurely. This comment should be read as

Re: [PATCH v3 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-05 Thread Madhani, Himanshu
On 12/5/16, 8:20 AM, "Christoph Hellwig" wrote: >> create mode 100644 drivers/scsi/qla2xxx/qla_bottom.c >> create mode 100644 drivers/scsi/qla2xxx/qla_mq.c >> create mode 100644 drivers/scsi/qla2xxx/qla_top.c > >What's the point of three new fairly small files, two of them very >oddly named?

Re: [PATCH v4 3/6] qla2xxx: Utilize pci_alloc_irq_vectors/pci_free_irq_vectors calls.

2016-12-08 Thread Madhani, Himanshu
Hi Christoph, On 12/7/16, 11:03 AM, "Christoph Hellwig" wrote: >> static int >> qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) >> { >> #define MIN_MSIX_COUNT 2 >> #define ATIO_VECTOR 2 >> int i, ret; >> struct qla_msix_entry *qentry; >> scsi_qla_host

Re: [PATCH v4 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-08 Thread Madhani, Himanshu
Hi Christoph, On 12/7/16, 11:05 AM, "Christoph Hellwig" wrote: >On Tue, Dec 06, 2016 at 11:07:44AM -0800, Himanshu Madhani wrote: >> From: Michael Hernandez >> >> Replaced existing multiple queue functionality with framework >> that allows for the creation of pairs of request and response qu

Re: [PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-08 Thread Madhani, Himanshu
Hi Mike/Bart, On 12/8/16, 8:17 AM, "virtualization-boun...@lists.linux-foundation.org on behalf of Michael S. Tsirkin" wrote: >On Thu, Dec 08, 2016 at 06:38:11AM +, Bart Van Assche wrote: >> On 12/07/16 21:54, Michael S. Tsirkin wrote: >> > On Thu, Dec 08, 2016 at 05:21:47AM +,

Re: [PATCH 16/22] qla2xxx: Improve RSCN handling in driver

2016-12-09 Thread Madhani, Himanshu
Hi Hannes, On 12/7/16, 3:32 AM, "Hannes Reinecke" wrote: >This is a bit odd. >If you already have code for fixing the to-do, why is the to-do there? >And if the code doesn't work, what's the point of including it here? > >I would suggest removing the code; the comment should be giving enough

Re: [PATCH v4 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-09 Thread Madhani, Himanshu
On 12/9/16, 5:10 AM, "Christoph Hellwig" wrote: >Ok. We'll still need to use PCI_IRQ_AFFINITY here after it's removed >i nthe previous patch, but with pci_irq_alloc_vectors_affinity so that >we can get the separate non-assignment vector right as in the previous >discussion. Ack. Will fix up pa

Re: [PATCH] scsi/qla2xxx: label endian-ness for many fields

2016-12-09 Thread Madhani, Himanshu
On 12/9/16, 12:45 PM, "Michael S. Tsirkin" wrote: >This adds endian-ness labels for lots of qla structs. >Doing this cuts down number of sparse warnings from ~1700 to ~1400. >Will help find and resolve some of real issues down the road. > >Signed-off-by: Michael S. Tsirkin > >--- > >Compile-tes

Re: [PATCH v4 4/6] qla2xxx: Add multiple queue pair functionality.

2016-12-09 Thread Madhani, Himanshu
Hi Martin, On 12/9/16, 11:39 AM, "Madhani, Himanshu" wrote: > >On 12/9/16, 5:10 AM, "Christoph Hellwig" wrote: > >>Ok. We'll still need to use PCI_IRQ_AFFINITY here after it's removed >>i nthe previous patch, but with pci_irq_alloc_vec

Re: [PATCH 00/22] qla2xxx: Target code enhancemets and feature update

2016-12-12 Thread Madhani, Himanshu
Hi Nic, On 12/6/16, 12:30 PM, "Himanshu Madhani" wrote: >Hi Nic, > >Please consider this series for target-pending. This series is based on >scsi-misc series that was submitted earlier today. > >Here's link for that series > http://marc.info/?l=linux-scsi&m=148105128210090&w=2 > >This serie

Re: [PATCH 00/22] qla2xxx: Target code enhancemets and feature update

2016-12-14 Thread Madhani, Himanshu
Hi Bart, On 12/12/16, 3:10 PM, "Madhani, Himanshu" wrote: >Hi Nic, > > > >On 12/6/16, 12:30 PM, "Himanshu Madhani" wrote: > >>Hi Nic, >> >>Please consider this series for target-pending. This series is based on >>scsi-misc

Re: [PATCH 14/22] qla2xxx: Add interrupt polling mechanism

2016-12-15 Thread Madhani, Himanshu
Hi Bart, Christoph, On 12/15/16, 1:27 AM, "Bart Van Assche" wrote: >On 12/14/2016 10:06 PM, Christoph Hellwig wrote: >> On Tue, Dec 06, 2016 at 12:30:43PM -0800, Himanshu Madhani wrote: >>> From: Quinn Tran >>> >>> This patch adds capability to poll for an interrupt, If hardware >>> does not

Re: [PATCH 03/22] qla2xxx: Set tcm_qla2xxx version to automatically track qla2xxx version.

2016-12-15 Thread Madhani, Himanshu
On 12/14/16, 1:12 PM, "Christoph Hellwig" wrote: >Please just remove TCM_QLA2XXX_VERSION entirely and use QLA2XXX_VERSION >directly instead. Ack. Will update patch and resubmit. >

Re: [PATCH 15/22] qla2xxx: Rename qlini_mode parameter

2016-12-15 Thread Madhani, Himanshu
On 12/14/16, 1:07 PM, "Christoph Hellwig" wrote: >On Tue, Dec 06, 2016 at 12:30:44PM -0800, Himanshu Madhani wrote: >> From: Quinn Tran >> >> Qlogic's adapter is able to behave in multiple modes: >> initiator, target, exclusive/either, and dual/both. >> >> This patch renames the qlini_mode ->

Re: [PATCH 01/22] qla2xxx: Fix wrong IOCB type assumption.

2016-12-15 Thread Madhani, Himanshu
On 12/14/16, 1:09 PM, "Christoph Hellwig" wrote: >On Tue, Dec 06, 2016 at 12:30:30PM -0800, Himanshu Madhani wrote: >> +uint32_t unpacked_lun = 0; > >Please remove the unpacked_lun variable as well, and just directly >pass 0 to qlt_issue_task_mgmt. Ack, will update and resend this patch. >

Re: [PATCH 08/22] qla2xxx: Refactore target code to remove symbol dependency

2016-12-15 Thread Madhani, Himanshu
Hi Christoph, On 12/14/16, 1:18 PM, "Christoph Hellwig" wrote: > - the new qla2x00_free_fcport is entirely pointless, please drop > that part of the patch (and even if it wasn't pointless it should > have been a patch on it's own) > - please use struct names and not typedefs for your new

Re: [PATCH 05/22] qla2xxx: Add DebugFS node of irq vector cpuid

2016-12-15 Thread Madhani, Himanshu
Hi Christoph, On 12/14/16, 1:13 PM, "Christoph Hellwig" wrote: >Doesn't make sense - an interrupt can be assigned to multiple >CPUIDs, and you can see the assignment based on the irq count >in /proc/interrupts > We Added this for our debug purpose. We’ll drop this patch in next series. Tha

Re: [PATCH v2 00/10] qla2xxx: Bug fixes for driver.

2016-12-22 Thread Madhani, Himanshu
On 12/22/16, 1:25 AM, "Christoph Hellwig" wrote: >The whole series looks fine: > >Reviewed-by: Christoph Hellwig > >(not sure why you dropped my Reviewed-by: tags for all the previously >reviewed patches, though) Thanks for the review. Looks like oversight while sending updated series. Bart,

Re: [PATCH v2 00/10] qla2xxx: Bug fixes for driver.

2016-12-22 Thread Madhani, Himanshu
Hi Bart, On 12/22/16, 9:02 AM, "Bart Van Assche" wrote: >On Thu, 2016-12-22 at 16:44 +0000, Madhani, Himanshu wrote: >> Do you want me to send series updating Reviewed-by Tag or would you be able >> to update >> while applying to target-pending tree? >

Re: [PATCH v2 07/10] qla2xxx: Terminate exchange if corrputed.

2016-12-23 Thread Madhani, Himanshu
On 12/23/16, 1:01 AM, "Bart Van Assche" wrote: >On Wed, 2016-12-21 at 13:57 -0800, Himanshu Madhani wrote: >> diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h >> index f7df01b..b14455e 100644 >> --- a/drivers/scsi/qla2xxx/qla_def.h >> +++ b/drivers/scsi/qla2xxx/qla_d

Re: [PATCH v2 06/10] qla2xxx: Fix crash due to null pointer access.

2016-12-23 Thread Madhani, Himanshu
On 12/23/16, 12:47 AM, "Bart Van Assche" wrote: >This patch needs a more detailed description. There are many changes in this >patch. What changes are the changes that prevent the NULL pointer dereference? >What changes (if any) were made as the result of code inspection? We saw this stack trac

Re: [PATCH v2 04/10] qla2xxx: Reset reserved field in firmware options to 0.

2016-12-23 Thread Madhani, Himanshu
On 12/23/16, 12:37 AM, "Bart Van Assche" wrote: >Please use cpu_to_le32() in new code instead of __constant_cpu_to_le32(). >gcc generates the same code for both conversion functions but the former >function makes source code easier to read. Ack. Will update the patch. >

Re: [PATCH v2 02/10] qla2xxx: Include ATIO queue in firmware dump when in target mode

2016-12-23 Thread Madhani, Himanshu
On 12/23/16, 12:32 AM, "Bart Van Assche" wrote: >Sparse reports this because the atio_q_in pointer is declared as uint32_t >__iomem*. >Does this perhaps mean that a readl() call is missing? Ack. Will fix in revised series. N�r��yb�X��ǧv�^�)޺{.n�+{���"�{ay�ʇڙ�,j��f���h���z��w��

Re: [PATCH 1/2] scsi: qla2xxx: silent -Wformat-security warning

2017-01-06 Thread Madhani, Himanshu
On 12/26/16, 5:23 AM, "Nicolas Iooss" wrote: >qla24xx_enable_msix() calls scnprintf() with a non-literal format >string. This makes clang report -Wformat-security warnings when >compiling this function: > >drivers/scsi/qla2xxx/qla_isr.c:3083:7: error: format string is not a >string lite

Re: [PATCH 2/2] scsi: qla2xxx: make msix_entries const

2017-01-06 Thread Madhani, Himanshu
On 12/26/16, 5:23 AM, "Nicolas Iooss" wrote: >msix_entries and qla82xx_msix_entries arrays are never modified in >drivers/scsi/qla2xxx/qla_isr.c. Move their contents to read-only data. > >Signed-off-by: Nicolas Iooss >--- > drivers/scsi/qla2xxx/qla_isr.c | 6 +++--- > 1 file changed, 3 insertio

Re: [PATCH] qla2xxx: Get mutex lock before checking optrom_state

2017-01-06 Thread Madhani, Himanshu
Hi Milan, On 12/24/16, 8:32 AM, "linux-scsi-ow...@vger.kernel.org on behalf of Milan P. Gandhi" wrote: >Hello, > >There is a race condition with qla2xxx optrom functions where >one thread might modify optrom buffer, optrom_state while >other thread is still reading from it. > >In couple of

Re: [PATCH 05/11] qla2xxx: Fix wrong argument in sp done callback.

2017-01-09 Thread Madhani, Himanshu
On 1/9/17, 5:17 AM, "Christoph Hellwig" wrote: >On Fri, Dec 23, 2016 at 08:23:33PM -0800, Himanshu Madhani wrote: >> From: Quinn Tran >> >> Callback for sp->done expects scsi_qla_host is passed in as argument, >> Instead qla_hw_data is passed in. > >Please also fix the prototype of the done an

Re: [PATCH 03/11] qla2xxx: Make trace flags more readable.

2017-01-09 Thread Madhani, Himanshu
On 1/9/17, 5:11 AM, "Christoph Hellwig" wrote: >On Fri, Dec 23, 2016 at 08:23:31PM -0800, Himanshu Madhani wrote: >> From: Quinn Tran >> >> This patch does not change any functionality. > >... >> +++ b/drivers/scsi/qla2xxx/qla_target.c >> @@ -3294,7 +3294,6 @@ int qlt_abort_cmd(struct qla_tgt

Re: [PATCH] qla2xxx: rename {vendor|hba}_indentifer to {vendor|hba}_identifer

2017-01-09 Thread Madhani, Himanshu
On 12/29/16, 2:20 PM, "Colin King" wrote: >From: Colin Ian King > >Rename the vendor_indentifer and hba_indentifer fields to correct spelling. > >Signed-off-by: Colin Ian King >--- > drivers/scsi/qla2xxx/qla_def.h | 4 ++-- > drivers/scsi/qla2xxx/qla_gs.c | 6 +++--- > 2 files changed, 5 insert

Re: [PATCH 04/11] qla2xxx: Cleanup SRR code.

2017-01-10 Thread Madhani, Himanshu
Hi Christoph, On 1/9/17, 5:13 AM, "Christoph Hellwig" wrote: >s/Cleanup/Remove/ ? > >Maybe add a little blurb on why we even had this huge pile of dead code >despite not using selective retransmissions, and why you don't plan to >use it any time soon. > >Otherwise looks fine: > >Reviewed-by:

Re: [PATCH 1/2] qla2xxx: fix MSI-X vector affinity

2017-01-11 Thread Madhani, Himanshu
On 1/11/17, 8:55 AM, "Christoph Hellwig" wrote: >The first two or three vectors in qla2xxx adapter are global and >not associated with a specific queue. They should not have IRQ >affinity assigned. > >Signed-off-by: Christoph Hellwig >--- > drivers/scsi/qla2xxx/qla_def.h | 2 +- > drivers/scsi

Re: [PATCH 2/2] qla2xxx: remove irq_affinity_notifier

2017-01-11 Thread Madhani, Himanshu
On 1/11/17, 8:55 AM, "Christoph Hellwig" wrote: >Now that qla2xxx uses the IRQ layer affinity assignment affinity >won't change over the life time of a device and the notifiers are >useless. > >Signed-off-by: Christoph Hellwig >--- > drivers/scsi/qla2xxx/qla_def.h | 1 - > drivers/scsi/qla2xxx/

Re: [PATCH 02/11] qla2xxx: Cleanup TMF code translation from qla_target.

2017-01-11 Thread Madhani, Himanshu
On 1/11/17, 12:05 PM, "Bart Van Assche" wrote: >On 12/23/2016 08:23 PM, Himanshu Madhani wrote: >> static int tcm_qla2xxx_handle_tmr(struct qla_tgt_mgmt_cmd *mcmd, uint32_t >> lun, >> -uint8_t tmr_func, uint32_t tag) >> +uint16_t tmr_func, uint32_t tag) >> { >> struct qla_tgt_ses

Re: [PATCH 03/11] qla2xxx: Make trace flags more readable.

2017-01-11 Thread Madhani, Himanshu
On 1/11/17, 12:47 PM, "Bart Van Assche" wrote: >On Fri, 2016-12-23 at 20:23 -0800, Himanshu Madhani wrote: >> From: Quinn Tran >> >> This patch does not change any functionality. > >Please also mention in the patch description what the purpose of cmd_flags >is. If I remember correctly the only

Re: [PATCH 02/11] qla2xxx: Cleanup TMF code translation from qla_target.

2017-01-11 Thread Madhani, Himanshu
On 1/11/17, 1:08 PM, "Bart Van Assche" wrote: >On 12/23/2016 08:23 PM, Himanshu Madhani wrote: >> From: Quinn Tran >> >> Move code code which converts Task Mgmt Command flags for >> ATIO to TCM #defines, from qla2xxx driver to tcm_qla2xxx >> driver. >> >> Reviewed-by: Christoph Hellwig >> Si

Re: [PATCH 08/11] qla2xxx: Add framework for Async fabric discovery.

2017-01-13 Thread Madhani, Himanshu
On 1/11/17, 12:08 PM, "Bart Van Assche" wrote: >On 12/23/2016 08:23 PM, Himanshu Madhani wrote: >> +sess->logout_completed = 0; >> +be_sid[0] = sess->d_id.b.domain; >> +be_sid[1] = sess->d_id.b.area; >> +be_sid[2] = sess->d_id.b.al_pa; > >Hello Himanshu and Quinn, > >When buildi

Re: [PATCH 09/11] qla2xxx: Add Dual mode support in the driver

2017-01-13 Thread Madhani, Himanshu
On 1/11/17, 11:51 AM, "Bart Van Assche" wrote: >On 12/23/2016 08:23 PM, Himanshu Madhani wrote: >> -#define QLA_TGT_MODE_ENABLED() (ql2x_ini_mode != QLA2XXX_INI_MODE_ENABLED) >> +#define QLA_TGT_MODE_ENABLED() \ >> +((ql2x_ini_mode != QLA2XXX_INI_MODE_ENABLED) || \ >> + (ql2x_ini_mode =

Re: [PATCH v2 00/12] qla2xxx: Feature updates for target.

2017-01-17 Thread Madhani, Himanshu
Hi Bart, On 1/17/17, 8:56 AM, "Bart Van Assche" wrote: >On Mon, 2017-01-16 at 12:35 -0800, Himanshu Madhani wrote: >> Please consider this updated series for inclusion in target-pending. > >Hello Himanshu, > >What kernel have these patches been generated against? These patches >neither apply

Re: [PATCH v2 08/12] qla2xxx: Add framework for Async fabric discovery.

2017-01-17 Thread Madhani, Himanshu
On 1/17/17, 2:27 PM, "Bart Van Assche" wrote: >%phC Yes. It looks like typo in the message. Will update this patch with other sparse warnings fixes. Thanks, Himanshu >

Re: [PATCH 1/2] qla2xxx: Fix a recently introduced memory leak

2017-01-23 Thread Madhani, Himanshu
On 1/23/17, 8:34 AM, "Bart Van Assche" wrote: >qla2x00_probe_one() allocates IRQs before it initializes rsp_q_map >so IRQs must be freed even if rsp_q_map allocation did not occur. >This was detected by kmemleak. > >Fixes: 4fa183455988 ("scsi: qla2xxx: Utilize >pci_alloc_irq_vectors/pci_free_ir

Re: [PATCH 2/2] qla2xxx: Avoid that issuing a LIP triggers a kernel crash

2017-01-23 Thread Madhani, Himanshu
On 1/23/17, 8:34 AM, "Bart Van Assche" wrote: >Avoid that issuing a LIP as follows: > > find /sys -name 'issue_lip'|while read f; do echo 1 > $f; done > >triggers the following: > >BUG: unable to handle kernel NULL pointer dereference at (null) >Call Trace: > qla2x00_abort_all_cmds+0xed/0x140 [

Re: [PATCH v4 00/12] qla2xxx: Feature updates for target.

2017-01-24 Thread Madhani, Himanshu
On 1/24/17, 9:24 AM, "Bart Van Assche" wrote: >On 01/19/2017 10:29 PM, Himanshu Madhani wrote: >> Please consider this updated series for inclusion in target-pending. >> >> Changes from v3 --> v4 >> >> o Fixed warnings reported by smatch tool. >> o Fixed indentatation warnings reported by smat

Re: [PATCH 2/2] qla2xxx: Avoid that issuing a LIP triggers a kernel crash

2017-01-25 Thread Madhani, Himanshu
On 1/24/17, 6:59 AM, "Mauricio Faria de Oliveira" wrote: >Hi Bart, > >First of all, sorry for the new bug; I didn't realize the pointer could >be NULL at this scenario. > >On 01/23/2017 02:34 PM, Bart Van Assche wrote: >> @@ -1624,7 +1627,8 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int r

Re: [PATCH 00/15] qla2xxx: Bug Fixes and updates for target.

2017-02-03 Thread Madhani, Himanshu
Hi Bart, On 2/3/17, 8:26 AM, "Bart Van Assche" wrote: >On Thu, 2017-02-02 at 11:42 -0800, Himanshu Madhani wrote: >> Please consider this series for inclusion in target-pending. > >Hello Himanshu, > >What tree have these patches been generated against? Not all patches can be >applied on top o

Re: [PATCH v2 00/14] qla2xxx: Bug Fixes and updates for target.

2017-02-08 Thread Madhani, Himanshu
Hi Bart, On 2/8/17, 7:02 AM, "Bart Van Assche" wrote: >On Fri, 2017-02-03 at 14:40 -0800, Himanshu Madhani wrote: >> Please consider this series for inclusion in target-pending. > >Hello Himanshu, > >I gave this patch series a try on a system equipped with two QLogic FC HBAs >where an FC cabl

Re: [PATCH v2 03/14] qla2xxx: Allow vref count to timeout on vport delete.

2017-02-08 Thread Madhani, Himanshu
On 2/8/17, 5:03 AM, "Christoph Hellwig" wrote: >On Fri, Feb 03, 2017 at 02:40:44PM -0800, Himanshu Madhani wrote: >> -spin_lock_irqsave(&ha->vport_slock, flags); >> -while (atomic_read(&vha->vref_count)) { >> -spin_unlock_irqrestore(&ha->vport_slock, flags); >> - >> +whil

Re: [PATCH v2 06/14] qla2xxx: Improve T10-DIF/PI handling in driver.

2017-02-08 Thread Madhani, Himanshu
Hi Bart, On 2/8/17, 10:57 AM, "Bart Van Assche" wrote: >On Fri, 2017-02-03 at 14:40 -0800, Himanshu Madhani wrote: >> +/* Response code and sense key */ >> +((uint32_t *)ctio->u.status1.sense_data)[0] = >> +cpu_to_le32((0x70 << 24) | (sense_key << 8)); >> +/* Additional se

Re: [PATCH v2 06/14] qla2xxx: Improve T10-DIF/PI handling in driver.

2017-02-08 Thread Madhani, Himanshu
Hi Nic, On 2/7/17, 8:13 PM, "Nicholas A. Bellinger" wrote: >On Fri, 2017-02-03 at 14:40 -0800, Himanshu Madhani wrote: >> From: Quinn Tran >> >> Add routines to support T10 DIF tag. >> >> Signed-off-by: Quinn Tran >> Signed-off-by: Anil Gurumurthy >> Signed-off-by: Himanshu Madhani >> --

Re: [PATCH v2 02/14] qla2xxx: Allow relogin to proceed if remote login did not finish

2017-02-08 Thread Madhani, Himanshu
On 2/8/17, 10:42 AM, "Bart Van Assche" wrote: >The above code occurs two times in this patch. We try to avoid duplicating >code in the Linux kernel, especially code that contains hardcoded constants. >Have you considered to change the name of plogi_nack_done_jiff into e.g. >plogi_done_deadline

Re: [PATCH v2 04/14] qla2xxx: Use IOCB interface to submit non-critical MBX.

2017-02-08 Thread Madhani, Himanshu
On 2/8/17, 10:48 AM, "Bart Van Assche" wrote: >On Fri, 2017-02-03 at 14:40 -0800, Himanshu Madhani wrote: >> diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c >> index db6bd92..4225256 100644 >> --- a/drivers/scsi/qla2xxx/qla_mbx.c >> +++ b/drivers/scsi/qla2xxx/qla_mbx

Re: [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver.

2017-02-21 Thread Madhani, Himanshu
Hi Martin, On 2/20/17, 7:16 PM, "Martin K. Petersen" wrote: > "Himanshu" == Himanshu Madhani writes: Hi Himanshu, Himanshu> This series contains small cleanup + fix for regression that Himanshu> was introduced by pci_alloc_irq_vectors_affinity() call in Himanshu> driver. Himanshu> Please

RE: [PATCH] qla2xxx: fix spelling mistake: "seperator" -> "separator"

2017-02-23 Thread Madhani, Himanshu
> -Original Message- > From: Colin King [mailto:colin.k...@canonical.com] > Sent: Thursday, February 23, 2017 2:57 AM > To: qla2xxx-upstr...@qlogic.com; James E . J . Bottomley > ; Martin K . Petersen > ; linux-scsi@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > Subject: [PATCH] qla

RE: [PATCH v3 00/14] qla2xxx: Bug Fixes and updates for target.

2017-02-28 Thread Madhani, Himanshu
> n...@linux-iscsi.org > Cc: Malavali, Giridhar ; linux- > s...@vger.kernel.org; Madhani, Himanshu > > Subject: [PATCH v3 00/14] qla2xxx: Bug Fixes and updates for target. > > Hi Nic, > > Please consider this series for inclusion in target-pending. > > This series c

RE: [PATCH v3 00/14] qla2xxx: Bug Fixes and updates for target.

2017-02-28 Thread Madhani, Himanshu
> -Original Message- > From: Bart Van Assche [mailto:bart.vanass...@sandisk.com] > Sent: Tuesday, February 28, 2017 2:10 PM > To: Madhani, Himanshu ; target- > de...@vger.kernel.org; n...@linux-iscsi.org > Cc: linux-scsi@vger.kernel.org; Malavali, Giridhar > > S

RE: [PATCH] qla2xxx: Fix ql_dump_buffer

2017-03-03 Thread Madhani, Himanshu
> -Original Message- > From: Joe Perches [mailto:j...@perches.com] > Sent: Thursday, March 2, 2017 5:15 PM > To: qla2xxx-upstr...@qlogic.com > Cc: James E.J. Bottomley ; Martin K. Petersen > ; linux-scsi@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: [PATCH] qla2xxx: Fix ql_d

RE: [PATCH v3 00/14] qla2xxx: Bug Fixes and updates for target.

2017-03-05 Thread Madhani, Himanshu
> -Original Message- > From: Bart Van Assche [mailto:bart.vanass...@sandisk.com] > Sent: Sunday, March 5, 2017 4:43 PM > To: Madhani, Himanshu ; target- > de...@vger.kernel.org; n...@linux-iscsi.org > Cc: linux-scsi@vger.kernel.org; Malavali, Giridhar > > Subj

Re: [PATCH 01/43] qla2xxx: Fix stale memory access for name pointer

2017-12-20 Thread Madhani, Himanshu
Hi Bart, > On Dec 20, 2017, at 10:25 AM, Bart Van Assche wrote: > > On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: >> Name pointer for sp describing each command is assigned with stack >> frame's memory. The stack frame could eventually be re-use, where >> name pointer access can ge

Re: [PATCH 02/43] qla2xxx: Fix NULL pointer access for fcport structure

2017-12-20 Thread Madhani, Himanshu
> On Dec 20, 2017, at 10:26 AM, Bart Van Assche wrote: > > On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: >> From: Quinn Tran >> >> when preocessing iocb in a timeout case, driver was trying to log messages > ^^^ > processing? > > Bart. Will fix in v2 of the s

Re: [PATCH 03/43] qla2xxx: Use IOCB path to submit Control VP MBX command

2017-12-20 Thread Madhani, Himanshu
> On Dec 20, 2017, at 10:29 AM, Bart Van Assche wrote: > > On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: >> @@ -536,7 +541,7 @@ struct sp_name { >> #define SRB_NVME_CMD 19 >> #define SRB_NVME_LS 20 >> #define SRB_PRLI_CMD 21 >> - >> +#define SRB_CTRL_VP 22 >> enum { > > Please kee

Re: [PATCH 06/43] qla2xxx: Fix stale mem access for IRQ name

2017-12-20 Thread Madhani, Himanshu
> On Dec 20, 2017, at 10:39 AM, Bart Van Assche wrote: > > On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: >> From: Quinn Tran >> >> IRQ name pointer for INTx/MSI was pointing at stale stack frame. >> cat /proc/interrupts will trigger stale mem access. Fix it by >> creating dedicate

Re: [PATCH 07/43] qla2xxx: Add ability to track IOCB resource for FW

2017-12-20 Thread Madhani, Himanshu
> On Dec 20, 2017, at 10:51 AM, Bart Van Assche wrote: > > On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: >> +#define QLA_ENA_FW_RES_TRACKING(_ha) { \ >> +int i; \ >> +_ha->base_qpair->fw_res_tracking = 1; \ >> +for (i = 0; i < _ha->max_qpairs; i++) { \ >> +i

Re: [PATCH 14/43] qla2xxx: Add option for use reserve exch for ELS

2017-12-20 Thread Madhani, Himanshu
Hi Bart, > On Dec 20, 2017, at 10:53 AM, Bart Van Assche wrote: > > On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: >> +int qla2xuseresexchforels; >> +module_param(qla2xuseresexchforels, int, 0444); >> +MODULE_PARM_DESC(qla2xuseresexchforels, >> + "Reserve 1/2 of emergenc

Re: [PATCH 21/43] qla2xxx: Remove calling cancel_work_sync()

2017-12-20 Thread Madhani, Himanshu
> On Dec 20, 2017, at 10:56 AM, Bart Van Assche wrote: > > On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: >> @@ -1234,8 +1234,6 @@ void qlt_schedule_sess_for_deletion(struct fc_port >> *sess, >> ql_dbg(ql_dbg_tgt, sess->vha, 0xe001, >> "Scheduling sess %p for deletion\

Re: [PATCH 22/43] qla2xxx: Add switch command to simplify fabric discovery

2017-12-20 Thread Madhani, Himanshu
Hi Ewan, > On Dec 20, 2017, at 12:09 PM, Ewan D. Milne wrote: > > On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: >> @@ -4915,12 +4941,32 @@ static int qlt_24xx_handle_els(struct scsi_qla_host >> *vha, >> } >> >> if (sess != NULL) { >> +

Re: [PATCH 2/9] scsi: qla2xxx: Use zeroing allocator rather than allocator/memset

2018-01-02 Thread Madhani, Himanshu
> On Dec 30, 2017, at 7:28 AM, Himanshu Jha wrote: > > Use dma_zalloc_coherent and vzalloc instead of dma_alloc_coherent and > vmalloc respectively, followed by memset 0. > > Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci > > Suggested-by: Luis R. Rodriguez > Signed-off-by: H

Re: [PATCH v2 00/37] qla2xxx: driver updates

2018-01-03 Thread Madhani, Himanshu
Hi Martin, > On Jan 3, 2018, at 9:59 PM, Martin K. Petersen > wrote: > > > Hi Himanshu! > >> This series contains number of improvments in handling of switch >> registration commands in the driver. Switch commands are now submitted >> via IOCB patch asynchronously instead of mailbox interfac

Re: [linux-next][qla2xxx][85caa95]kernel BUG at lib/list_debug.c:31!

2018-01-09 Thread Madhani, Himanshu
Hello Abdul, > On Jan 9, 2018, at 7:54 AM, Bart Van Assche wrote: > > On Tue, 2018-01-09 at 14:44 +0530, Abdul Haleem wrote: >> Greeting's, >> >> Linux next kernel panics on powerpc when module qla2xxx is load/unload. >> >> Machine Type: Power 8 PowerVM LPAR >> Kernel : 4.15.0-rc2-next-20171

Re: [linux-next][qla2xxx][85caa95]kernel BUG at lib/list_debug.c:31!

2018-01-11 Thread Madhani, Himanshu
> On Jan 10, 2018, at 9:38 PM, Abdul Haleem wrote: > > On Tue, 2018-01-09 at 18:09 +, Madhani, Himanshu wrote: >> Hello Abdul, >> >>> On Jan 9, 2018, at 7:54 AM, Bart Van Assche wrote: >>> >>> On Tue, 2018-01-09 at 14:44 +0530, Abdul Halee

Re: A qla2xxx commit cause Linux no response, has not fixed in lastest version 4.15-rc6

2018-01-15 Thread Madhani, Himanshu
Hi Nic, Chang, > On Jan 12, 2018, at 9:28 PM, Nicholas A. Bellinger > wrote: > > Hi Chang & Co, > > (Adding list + Himanshu CC') > > On Sun, 2018-01-07 at 10:21 +, Changlimin wrote: >> Hi, >> It seems the qla2xxx commit cause Linux no response, has not fixed in >> lastest version 4.15-rc

Re: [PATCH] drivers/scsi/qla2xxx: fix double free bug after firmware timeout

2018-01-15 Thread Madhani, Himanshu
Hi Max, > On Jan 15, 2018, at 9:26 AM, Max Kellermann wrote: > > When the qla2xxx firmware is unavailable, eventually > qla2x00_sp_timeout() is reached, which calls the timeout function and > frees the srb_t instance. > > The timeout function always resolves to qla2x00_async_iocb_timeout(), >

Re: [PATCH] drivers/scsi/qla2xxx: fix double free bug after firmware timeout

2018-01-15 Thread Madhani, Himanshu
Hi Max, > On Jan 15, 2018, at 12:37 PM, Max Kellermann wrote: > > On 2018/01/15 20:58, "Madhani, Himanshu" wrote: >> We have patch to prevent this double free in 4.16/scsi-queue >> already. > > No, let me repeat: this is a different bug! > > Your b

Re: A qla2xxx commit cause Linux no response, has not fixed in lastest version 4.15-rc6

2018-01-15 Thread Madhani, Himanshu
was introduced in commit: 726b85487067d7f5b23495bc33c484b8517c4074 > qla2xxx: Add framework for async fabric discovery. > The previous commit is good: 5d964837c6a743193c63c8912f98834c7457ba5c > qla2xxx: Track I-T nexus as single fc_port struct . > > Regards > Chang Limin > > -Original Message-

Re: A qla2xxx commit cause Linux no response, has not fixed in lastest version 4.15-rc6

2018-01-17 Thread Madhani, Himanshu
nel has this issue: > > https://launchpad.net/ubuntu/+archive/primary/+files/linux-image-4.13.0-25-generic_4.13.0-25.29_amd64.deb > > https://launchpad.net/ubuntu/+archive/primary/+files/linux-image-extra-4.13.0-25-generic_4.13.0-25.29_amd64.deb > > Regards > Chang Limin >

Re: [PATCH] drivers/scsi/qla2xxx: fix double free bug after firmware timeout

2018-01-17 Thread Madhani, Himanshu
Max, > On Jan 15, 2018, at 12:37 PM, Max Kellermann wrote: > > On 2018/01/15 20:58, "Madhani, Himanshu" wrote: >> We have patch to prevent this double free in 4.16/scsi-queue >> already. > > No, let me repeat: this is a different bug! > > Your b

Re: [LSF/MM TOPIC] Improving Asynchronous SCSI Disk Probing

2018-01-21 Thread Madhani, Himanshu
Hi Bart, > On Jan 17, 2018, at 3:24 PM, Bart Van Assche wrote: > > When the SCSI scanning code discovers a SCSI device it calls the driver core > function device_add() to associate a SCSI ULD with the device. The driver > core invokes the probing function for the matching SCSI ULP, e.g. sd_prob

FC-NVMe fixes for qla2xxx

2018-01-22 Thread Madhani, Himanshu
Hi Christoph, I had submitted series for FC-NVME fixes in qla2xxx driver on Jan 19, 2018. http://lists.infradead.org/pipermail/linux-nvme/2018-January/015073.html The series was cut against Martin’s 4.16/scsi-queue tree and I would like his series to be merged via Martin’s tree. Please revi

Re: qla2xxx UBSAN warning in 4.14-rc1

2018-01-24 Thread Madhani, Himanshu
Hi Meelis, > On Jan 24, 2018, at 2:18 PM, Meelis Roos wrote: > >>> Hello, I decided to widen the coverage of my kernel testbed and put some >>> FC cards into servers. This one is a PCI-X QLA2340 in HP Proliant DL 380 >>> G4 (first 64-bit generation of Proliants). I got a UBSAN warning from >

Re: [PATCH] qla2xxx: Avoid triggering undefined behavior in qla2x00_mbx_completion()

2018-01-26 Thread Madhani, Himanshu
> On Jan 25, 2018, at 8:24 AM, Bart Van Assche wrote: > > A left shift must shift less than the bit width of the left argument. > Avoid triggering undefined behavior if ha->mbx_count == 32. > > This patch avoids that UBSAN reports the following complaint: > > UBSAN: Undefined behaviour in driv

Re: A qla2xxx commit cause Linux no response, has not fixed in lastest version 4.15-rc6

2018-01-29 Thread Madhani, Himanshu
d like to see how is your system setup and see if i can replicate in our lab here. > Regards > Chang Limin > > -Original Message- > From: Madhani, Himanshu [mailto:himanshu.madh...@cavium.com] > Sent: Thursday, January 18, 2018 2:26 AM > To: changlimin (Cloud) > Cc

Re: [PATCH 0/6] Six qla2xxx and qla4xxx patches

2018-01-30 Thread Madhani, Himanshu
Hi Martin, > On Jan 30, 2018, at 7:04 PM, Martin K. Petersen > wrote: > > > Bart, > >> The patches in this series are what I came up with after having analyzed >> the source code of the qla[24]xxx drivers with several source code analysis >> tools (scripts/kernel-doc, gcc, sparse and smatch)

Re: [PATCH] qla2xxx: Fix NULL pointer crash due to active timer for ABTS

2018-02-13 Thread Madhani, Himanshu
Hi Johannes, > On Feb 13, 2018, at 2:38 AM, Johannes Thumshirn wrote: > > Thanks Himanshu, > Reviewed-by: Johannes Thumshirn > > Do you happen to know which commit it actually fixes? > Thanks for asking (I did not add fixes commit ID because it was pre 4.x kernel) Here’s commit id 4440e46

Re: [PATCH] qla2xxx: Fix NULL pointer crash due to active timer for ABTS

2018-02-13 Thread Madhani, Himanshu
Hi John, > On Feb 13, 2018, at 2:54 AM, John Garry wrote: > > On 12/02/2018 18:28, Himanshu Madhani wrote: >> This patch fixes NULL pointer crash due to active timer running >> for abort IOCB. >> >>> From crash dump analysis it was discoverd that get_next_timer_interrupt() >> encountered a cor

Re: [PATCH] qla2xxx: Fix NULL pointer crash due to active timer for ABTS

2018-02-14 Thread Madhani, Himanshu
Hi John, > On Feb 13, 2018, at 2:54 AM, John Garry wrote: > > On 12/02/2018 18:28, Himanshu Madhani wrote: >> This patch fixes NULL pointer crash due to active timer running >> for abort IOCB. >> >>> From crash dump analysis it was discoverd that get_next_timer_interrupt() >> encountered a corr

Re: [PATCH] qla2xxx: Fix NULL pointer crash due to active timer for ABTS

2018-02-22 Thread Madhani, Himanshu
Hi Martin, > On Feb 14, 2018, at 11:58 AM, Madhani, Himanshu > wrote: > > Hi John, > >> On Feb 13, 2018, at 2:54 AM, John Garry wrote: >> >> On 12/02/2018 18:28, Himanshu Madhani wrote: >>> This patch fixes NULL pointer crash due to active timer

Re: [PATCH V2] scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure

2018-03-05 Thread Madhani, Himanshu
Hi Bill, > On Mar 4, 2018, at 9:02 PM, Bill Kuzeja wrote: > > Because of the shifting around of code in qla2x00_probe_one recently, > failures during adapter initialization can lead to problems, i.e. NULL > pointer crashes and doubly freed data structures which cause eventual > panics. > > Thi

Re: [PATCH 1/3] qla2xxx: fix error message on

2018-03-19 Thread Madhani, Himanshu
> On Mar 8, 2018, at 5:44 AM, Meelis Roos wrote: > > This patch fixes IO traps caught by hardware when mailbox command fails on > qla2200. The error handler assumes newer firmware that is available on 2400 > and > newer HBA-s. > > This causes ugly crashes on sparc64. > > Fix it with separate

Re: [PATCH 2/3] qla2xxx: fx00 copypaste typo

2018-03-19 Thread Madhani, Himanshu
> On Mar 8, 2018, at 5:44 AM, Meelis Roos wrote: > > Fix an obvious copy-paste error in freeing QLAFX00 response queue - the code > checked for rsp->ring but freed rsp->ring_fx00. > > Signed-off-by: Meelis Roos > > --- > drivers/scsi/qla2xxx/qla_os.c | 2 +- > 1 file changed, 1 insertion(+), 1

  1   2   3   >