All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ewan D. Milne" <emilne@redhat.com>
To: himanshu.madhani@cavium.com
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	himanshu.madhani@qlogic.com
Subject: Re: [PATCH 2/4] qla2xxx: Fix mailbox command timeout due to starvation
Date: Mon, 07 Nov 2016 10:53:46 -0500	[thread overview]
Message-ID: <1478534026.32271.28.camel@localhost.localdomain> (raw)
In-Reply-To: <1478277213-3848-3-git-send-email-himanshu.madhani@cavium.com>

On Fri, 2016-11-04 at 09:33 -0700, himanshu.madhani@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 void qla2x00_destroy_mbx_wq(struct qla_hw_data *ha)
> +{
> +	struct workqueue_struct *wq = ha->mbx_wq;
> +
> +	if (wq) {
> +		ha->mbx_wq = NULL;
> +		flush_workqueue(wq);
> +		destroy_workqueue(wq);
> +	}
> +}
> +
>  /*
>   * PCI driver interface
>   */

There is already a function qla2x00_destroy_deferred_work() that
destroys 3 other workqueues.

...

> @@ -3059,6 +3079,8 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
>  
>  	qla2x00_free_fw_dump(ha);
>  
> +	qla2x00_destroy_mbx_wq(ha);
> +
>  	pci_disable_pcie_error_reporting(pdev);
>  	pci_disable_device(pdev);
>  }

This code path (pci_driver->shutdown) does not appear to destroy the
other workqueues created by the driver. ???

> @@ -5011,6 +5033,8 @@ void qla2x00_relogin(struct scsi_qla_host *vha)
>  	 */
>  	qla2x00_free_sysfs_attr(base_vha, false);
>  
> +	qla2x00_destroy_mbx_wq(ha);
> +
>  	fc_remove_host(base_vha->host);
>  
>  	scsi_remove_host(base_vha->host);

See above.

-Ewan



  reply	other threads:[~2016-11-07 15:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 16:33 [PATCH 0/4] qla2xxx: feature updates for driver himanshu.madhani
2016-11-04 16:33 ` [PATCH 1/4] qla2xxx: Only allow operational MBX to proceed during RESET himanshu.madhani
2016-11-04 16:33 ` [PATCH 2/4] qla2xxx: Fix mailbox command timeout due to starvation himanshu.madhani
2016-11-07 15:53   ` Ewan D. Milne [this message]
2016-11-08 17:40     ` Madhani, Himanshu
2016-11-04 16:33 ` [PATCH 3/4] qla2xxx: Add Block Multi Queue functionality himanshu.madhani
2016-11-04 23:00   ` Christoph Hellwig
2016-11-05  2:08     ` Madhani, Himanshu
2016-11-04 23:15   ` kbuild test robot
2016-11-07 16:43   ` Ewan D. Milne
2016-11-08 17:37     ` Madhani, Himanshu
2016-11-04 16:33 ` [PATCH 4/4] qla2xxx: Fix Target stack handling with Multi-queue changes himanshu.madhani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478534026.32271.28.camel@localhost.localdomain \
    --to=emilne@redhat.com \
    --cc=himanshu.madhani@cavium.com \
    --cc=himanshu.madhani@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.