From: Jeff Garzik <jeff@garzik.org>
To: Christoph Hellwig <hch@lst.de>
Cc: leubner@adaptec.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 7/7] gdth: switch to modern scsi host registration
Date: Sat, 21 Jul 2007 16:23:25 -0400 [thread overview]
Message-ID: <46A26B3D.5070508@garzik.org> (raw)
In-Reply-To: <20070721170216.GH4150@lst.de>
in general, is sane. three problems...
Christoph Hellwig wrote:
> + /* As default we do not probe for EISA or ISA controllers */
> + if (probe_eisa_isa) {
> + /* scanning for controllers, at first: ISA controller */
> +#ifdef CONFIG_ISA
> + for (isa_bios = 0xc8000UL; isa_bios <= 0xd8000UL;
> + isa_bios += 0x8000UL) {
> + if (gdth_ctr_count >= MAXHA)
> + break;
> + gdth_isa_probe_one(isa_bios);
> + }
> +#endif
> +#ifdef CONFIG_EISA
> + for (eisa_slot = 0x1000; eisa_slot <= 0x8000; eisa_slot += 0x1000) {
> + if (gdth_ctr_count >= MAXHA)
> + break;
> + gdth_eisa_probe_one(eisa_slot);
> + }
> + }
> +#endif
1) endif should be above the brace
> +static void __exit gdth_exit(void)
> +{
> + gdth_ha_str *ha;
> +
> + list_for_each_entry(ha, &gdth_instances, list)
> + gdth_remove_one(ha);
2) I think it's nicer to have two loops: scsi_remove_host() for all
ha-attached devices, and then the cleanup. More pragmatic: gives
hardware more time to "settle" before turning off DMA engines. A safer
approach, and one that scsi_module.c follows.
3) This introduces a modicum of confusion between the gdth_ctr_tab[]
stuff and the gdth_instances list. While not strictly broken, this
separation creates a foundation where the two can easily get out of sync.
Jeff
prev parent reply other threads:[~2007-07-21 20:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-21 17:02 [PATCH 7/7] gdth: switch to modern scsi host registration Christoph Hellwig
2007-07-21 20:23 ` Jeff Garzik [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=46A26B3D.5070508@garzik.org \
--to=jeff@garzik.org \
--cc=hch@lst.de \
--cc=leubner@adaptec.com \
--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.