Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: cang@codeaurora.org
Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org,
	rnayak@codeaurora.org, linux-scsi@vger.kernel.org,
	kernel-team@android.com, saravanak@google.com,
	salyzyn@google.com, Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	Pedro Sousa <pedrom.sousa@synopsys.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Stanley Chu <stanley.chu@mediatek.com>,
	Bean Huo <beanhuo@micron.com>,
	Venkat Gopalakrishnan <venkatg@codeaurora.org>,
	Tomas Winkler <tomas.winkler@intel.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] scsi: ufs: Put SCSI host after remove it
Date: Sun, 15 Dec 2019 13:55:41 -0800	[thread overview]
Message-ID: <2956b9c7-b019-e2b3-7a1b-7b796b724add@acm.org> (raw)
In-Reply-To: <5aa3a266e3db3403e663b36ddfdc4d60@codeaurora.org>

On 2019-12-14 14:24, cang@codeaurora.org wrote:
> How do you think if I replace my patch with below one?
> In this way, you can also move blk_cleanup_queue() behind
> cancel_work_sync(eh_work).
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index b5966fa..bd4ae75 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -8251,15 +8251,17 @@ void ufshcd_remove(struct ufs_hba *hba)
>         ufs_bsg_remove(hba);
>         ufs_sysfs_remove_nodes(hba->dev);
>         scsi_remove_host(hba->host);
> -       /* disable interrupts */
> -       ufshcd_disable_intr(hba, hba->intr_mask);
> -       ufshcd_hba_stop(hba, true);
> -
>         ufshcd_exit_clk_scaling(hba);
>         ufshcd_exit_clk_gating(hba);
>         if (ufshcd_is_clkscaling_supported(hba))
>                 device_remove_file(hba->dev,
> &hba->clk_scaling.enable_attr);
> +       cancel_work_sync(&hba->eeh_work);
> +       cancel_work_sync(&hba->eh_work);
> +       /* disable interrupts */
> +       ufshcd_disable_intr(hba, hba->intr_mask);
> +       ufshcd_hba_stop(hba, true);
>         ufshcd_hba_exit(hba);
> +       ufshcd_dealloc_host(hba);
>  }
>  EXPORT_SYMBOL_GPL(ufshcd_remove);

Hi Can,

To which kernel tree does the above patch apply? I'm asking this because
I don't see the recently added blk_cleanup_queue() calls in the above
patch. Please start from Martin's latest scsi-queue branch when
preparing SCSI patches.

Additionally, is it on purpose that there is no scsi_host_put() call in
the above code? I'd like to keep that call because without that call a
memory leak will occur when unloading the ufshcd-core kernel driver.

Thanks,

Bart.



  reply	other threads:[~2019-12-15 21:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14 13:03 [PATCH v3 0/2] Modularize ufs-bsg Can Guo
2019-12-14 13:03 ` [PATCH 1/2] scsi: ufs: Put SCSI host after remove it Can Guo
2019-12-14 18:32   ` Bart Van Assche
2019-12-14 22:24     ` cang
2019-12-15 21:55       ` Bart Van Assche [this message]
2019-12-16  1:34         ` cang
2019-12-16  2:39           ` Bart Van Assche
2019-12-16  3:12             ` cang
2019-12-16  5:46               ` cang
2019-12-16 17:44               ` Bart Van Assche
2019-12-16 14:31     ` cang
2019-12-16 17:39       ` Bart Van Assche
2019-12-17  0:46         ` cang
2019-12-17  1:15           ` Bart Van Assche
2019-12-17  1:31             ` cang
2019-12-16 18:05       ` Greg KH
2019-12-17  0:50         ` cang
2019-12-14 13:03 ` [PATCH 2/2] scsi: ufs: Modularize ufs-bsg Can Guo

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=2956b9c7-b019-e2b3-7a1b-7b796b724add@acm.org \
    --to=bvanassche@acm.org \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=cang@codeaurora.org \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nguyenb@codeaurora.org \
    --cc=pedrom.sousa@synopsys.com \
    --cc=rnayak@codeaurora.org \
    --cc=salyzyn@google.com \
    --cc=saravanak@google.com \
    --cc=stanley.chu@mediatek.com \
    --cc=tomas.winkler@intel.com \
    --cc=venkatg@codeaurora.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox