All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Matthew Wilcox <matthew@wil.cx>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	Amit Arora <aarora@in.ibm.com>,
	linux-scsi@vger.kernel.org, patmans@us.ibm.com
Subject: Re: [PATCH] scsi: Return -EINVAL when "id == max_id" in scsi_scan_host_selected()
Date: Tue, 23 May 2006 09:47:53 +0200	[thread overview]
Message-ID: <4472BE29.4020106@suse.de> (raw)
In-Reply-To: <20060523011619.GG4093@parisc-linux.org>

Matthew Wilcox wrote:
> On Mon, May 22, 2006 at 07:54:35PM -0500, James Bottomley wrote:
>> Actually, we've got another cockup here with drivers: some have set this
>> to 8 or 16 and others to 7 or 15.  If we apply this without auditing
>> them, for those who set it to 7 or 15, the last target will end up
>> inaccessible.
> 
> So as scsi maintainer, what's your preference for the 'right way' to fix
> this?  Clearly a whole-scale driver audit is needed, so my preference is
> to rename the variable (how about id_limit?) and then do a sweep
> checking that everybody's using it correctly.
> 
Ah. I see a pattern emerging.

ncr53c7xx.c has this:

#ifdef LINUX_1_2
	|| cmd->device->id > 7
#else
	|| cmd->device->id > host->max_id
#endif

So appearently in the good old days max_id was indeed defined as the
highest available target number. Whereas most 'modern' drivers define
this c-style-wise as the first non-available number.

So I would go for the latter approach and audit the drivers.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke			hare@suse.de
SuSE Linux Products GmbH		S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2006-05-23  7:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19 23:14 [PATCH] scsi: Return -EINVAL when "id == max_id" in scsi_scan_host_selected() Amit Arora
2006-05-20  4:21 ` Matthew Wilcox
2006-05-20 19:41   ` Amit Arora
2006-05-21  3:34     ` Luben Tuikov
2006-05-21  4:05       ` Matthew Wilcox
2006-05-22 19:01       ` Amit Arora
2006-05-23  0:54     ` James Bottomley
2006-05-23  1:16       ` Matthew Wilcox
2006-05-23  7:47         ` Hannes Reinecke [this message]
2006-05-23  8:29           ` Hannes Reinecke
2006-05-26 23:50         ` Luben Tuikov

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=4472BE29.4020106@suse.de \
    --to=hare@suse.de \
    --cc=James.Bottomley@SteelEye.com \
    --cc=aarora@in.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=patmans@us.ibm.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.