All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Hannes Reinecke <hare@suse.de>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	"Justin T. Gibbs" <gibbs@scsiguy.com>
Subject: Re: [PATCH] Correct order for device unregistration in aic7xxx
Date: Tue, 24 May 2005 11:44:46 +0100	[thread overview]
Message-ID: <20050524104446.GA11829@infradead.org> (raw)
In-Reply-To: <429300F7.6010106@suse.de>

On Tue, May 24, 2005 at 12:24:55PM +0200, Hannes Reinecke wrote:
> --- linux-2.6.12-rc4/drivers/scsi/aic7xxx/aic7xxx_osm.c.orig	2005-05-24 11:53:51.000000000 +0200
> +++ linux-2.6.12-rc4/drivers/scsi/aic7xxx/aic7xxx_osm.c	2005-05-24 11:55:30.000000000 +0200
> @@ -1748,12 +1748,6 @@ ahc_platform_free(struct ahc_softc *ahc)
>  	if (ahc->platform_data != NULL) {
>  		del_timer_sync(&ahc->platform_data->completeq_timer);
>  		tasklet_kill(&ahc->platform_data->runq_tasklet);
> -		if (ahc->platform_data->host != NULL) {
> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
> -			scsi_remove_host(ahc->platform_data->host);
> -#endif
> -			scsi_host_put(ahc->platform_data->host);
> -		}
>  
>  		/* destroy all of the device and target objects */
>  		for (i = 0; i < AHC_NUM_TARGETS; i++) {
> @@ -3623,6 +3617,20 @@ ahc_linux_init(void)
>  static void
>  ahc_linux_exit(void)
>  {
> +	struct ahd_softc *ahc;
> +
> +	/*
> +	 * Tear down midlayer first
> +	 */
> +	TAILQ_FOREACH(ahc, &ahd_tailq, links) {
> +		if (ahc->platform_data->host != NULL) {
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
> +			scsi_remove_host(ahc->platform_data->host);
> +#endif
> +			scsi_host_put(ahc->platform_data->host);
> +		}
> +	}
> +

Sorrym this is not acceptable at all.  Please leave the host unregistration
in ->remove (and while we're at it the scsi_host_put happens far too early
in there) and move tearing down the DV thread later in ->remove.

You're current patch completely breaks hot removal.  Also please look
at aic7xxx in current Linus' tree - it's using the SPI transport class
and doesn't have it's own dv mechanisms anymore, only aic79xx needs
fixes or preferably someone porting over the recent aic7xxx changes.


      reply	other threads:[~2005-05-24 10:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24 10:24 [PATCH] Correct order for device unregistration in aic7xxx Hannes Reinecke
2005-05-24 10:44 ` Christoph Hellwig [this message]

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=20050524104446.GA11829@infradead.org \
    --to=hch@infradead.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=gibbs@scsiguy.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.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 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.