From: FUJITA Tomonori <tomof@acm.org>
To: jeff@garzik.org
Cc: tomof@acm.org, linux-scsi@vger.kernel.org,
James.Bottomley@SteelEye.com, fujita.tomonori@lab.ntt.co.jp
Subject: Re: [PATCH] set supported_mode for lots of llds
Date: Sun, 16 Sep 2007 13:05:57 +0900 [thread overview]
Message-ID: <20070915073326R.tomof@acm.org> (raw)
In-Reply-To: <46EC9DDE.2090102@garzik.org>
On Sat, 15 Sep 2007 23:07:10 -0400
Jeff Garzik <jeff@garzik.org> wrote:
> FUJITA Tomonori wrote:
> > The majority of llds don't set supported_mode in scsi_host_template so
> > we get:
> >
> > luce:/sys/class/scsi_host/host0$ cat supported_mode
> > unknown
> >
> > It's harmless but it would be better to get:
> >
> > luce:/sys/class/scsi_host/host0$ cat supported_mode
> > Initiator
>
> Given that this is the /vast/ majority, just set it once as a default
> value, and let target drivers change the mode if different.
I thought that it's a bit hacky but it should work.
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [PATCH] set supported_mode to MODE_INITIATOR by default
This sets supported_mode to MODE_INITIATOR if a lld doesn't set
supported_mode in scsi_host_template.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/scsi/hosts.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index adc9559..694015d 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -342,6 +342,10 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
shost->unchecked_isa_dma = sht->unchecked_isa_dma;
shost->use_clustering = sht->use_clustering;
shost->ordered_tag = sht->ordered_tag;
+
+ if (!sht->supported_mode)
+ sht->supported_mode = MODE_INITIATOR;
+
shost->active_mode = sht->supported_mode;
if (sht->max_host_blocked)
--
1.5.2.4
prev parent reply other threads:[~2007-09-16 4:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-16 3:05 [PATCH] set supported_mode for lots of llds FUJITA Tomonori
2007-09-16 3:07 ` Jeff Garzik
2007-09-16 4:05 ` FUJITA Tomonori [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=20070915073326R.tomof@acm.org \
--to=tomof@acm.org \
--cc=James.Bottomley@SteelEye.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jeff@garzik.org \
--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.