All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: James.Smart@Emulex.Com
Cc: luben_tuikov@adaptec.com, hch@lst.de, jejb@steeleye.com,
	ltuikov@yahoo.com, Eric.Moore@lsil.com, andrew.patterson@hp.com,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] minimal SAS transport class
Date: Tue, 23 Aug 2005 08:42:32 -0700	[thread overview]
Message-ID: <20050823154232.GA3464@us.ibm.com> (raw)
In-Reply-To: <9BB4DECD4CFE6D43AA8EA8D768ED51C21D7A40@xbl3.ma.emulex.com>

On Sat, Aug 20, 2005 at 12:15:41AM -0400, James.Smart@Emulex.Com wrote:

> - the target id is logical for everything but SPI

> For FC, target ids are typically assigned to devices on a
> 1st-seen-1st-assigned basis. For several reasons, there can be
> changes in port discovery order after link events (cable pulls,
> etc). For 2.4 kernels, the driver typically maintained a mapping
> within the driver to ensure the same device showed up at the same
> target id, even if it disappeared for some amount of time. If FC
> was the boot device, wacky methods were used to ensure the mapping
> persisted boot-to-boot.

As others stated, id is already a tag/label. You should be able to pass
whatever id you want to scsi_scan_target, like the FC ID (port_id), and
then we also want an abstract iterator in fc transport for the id for
usage in scsi_scan.c:scsi_scan_channel. Then you can lose all the
fc_host->next_target_id code.

Printing of them won't be so nice, we should have used hex values in our
device's bus_id.

Hex would also make scsi class/bus_id shorter. 

We can in theory overflow it today: 

	(5 digits per short + 10 digits per int * 3 + 3 :'s) = 38

But BUS_ID_SIZE (KOBJ_NAME_LEN) is 20.

8 byte lun would add on another 10 bytes (if in decimal).

We generally don't have problems since channel is one digit (it should be
a char or bit), id is < 100, and host < 1000 ... lun I'm not sure about:

	(3 + 1 + 2 + 10) + 3 = 19.

i.e. use port_id as the id (8 digits?) and we are more likely to go above 20.

-- Patrick Mansfield

  parent reply	other threads:[~2005-08-23 15:46 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-20  4:15 [PATCH] minimal SAS transport class James.Smart
2005-08-20  4:57 ` Jeff Garzik
2005-08-20 17:23 ` Luben Tuikov
2005-08-21 17:03   ` Christoph Hellwig
2005-08-21 16:52 ` Christoph Hellwig
2005-08-21 18:23   ` Luben Tuikov
2005-08-22  4:55 ` Matt Domsch
2005-08-22 17:05   ` Luben Tuikov
2005-08-22 21:53     ` Mike Anderson
2005-08-23 23:55       ` Luben Tuikov
2005-08-24 17:12         ` Patrick Mansfield
2005-08-24 20:05           ` Luben Tuikov
2005-08-24 20:42             ` Patrick Mansfield
2005-08-24 21:48               ` Luben Tuikov
2005-08-23 11:10     ` Douglas Gilbert
2005-08-23  6:27 ` Hannes Reinecke
2005-08-23 15:42 ` Patrick Mansfield [this message]
2005-08-23 15:53   ` Matthew Wilcox
2005-08-24  0:13   ` Luben Tuikov
2005-08-25 19:32     ` Stefan Richter
2005-08-25 20:06       ` Jeff Garzik
2005-08-26 16:43         ` Luben Tuikov
2005-08-26 17:22           ` James Bottomley
2005-08-26 18:16             ` Luben Tuikov
2005-08-26 18:48               ` Jeff Garzik
2005-08-26 19:37                 ` Luben Tuikov
2005-08-27  1:39                   ` Jeff Garzik
2005-08-27  7:11                     ` Stefan Richter
2005-08-28 22:13                     ` Luben Tuikov
  -- strict thread matches above, loose matches on Subject: below --
2005-08-23 18:25 James.Smart
2005-08-23 16:16 James.Smart
2005-08-23 17:28 ` Stefan Richter
2005-08-24  0:02   ` Luben Tuikov
2005-08-24  9:12     ` Christoph Hellwig
2005-08-26 15:47       ` Luben Tuikov
2005-08-26 19:24         ` Jeff Garzik
2005-08-26 19:44           ` Luben Tuikov
2005-08-27  1:53             ` Jeff Garzik
2005-08-27  7:35               ` Stefan Richter
2005-08-28 22:27               ` Luben Tuikov
2005-08-29  5:16               ` Stefan Richter
2005-08-29 17:11           ` Christoph Hellwig
2005-08-29 17:20             ` Luben Tuikov
2005-08-29 17:25               ` Christoph Hellwig
2005-08-29 17:16         ` Christoph Hellwig
2005-08-29 17:31           ` Luben Tuikov
2005-08-29 18:34             ` Luben Tuikov
2005-08-29 18:09           ` James Bottomley
2005-08-23 17:57 ` Patrick Mansfield
2005-08-22 23:08 Moore, Eric Dean
2005-08-24  8:59 ` Christoph Hellwig
2005-08-18 18:48 James.Smart
2005-08-18 19:04 ` Jeff Garzik
2005-08-19 14:06   ` Christoph Hellwig
2005-08-19 17:51     ` Luben Tuikov
2005-08-19 17:54       ` Christoph Hellwig
2005-08-19 17:56         ` Luben Tuikov
2005-08-19 17:59           ` Christoph Hellwig
2005-08-19 18:07             ` Luben Tuikov
2005-08-19 19:59               ` James Bottomley
2005-08-19 20:32                 ` Luben Tuikov
2005-08-19 20:54                   ` Jeff Garzik
2005-08-20  9:18                   ` Christoph Hellwig
2005-08-20 17:34                     ` Luben Tuikov
2005-08-21  6:41                       ` Arjan van de Ven
2005-08-21 17:07                       ` Christoph Hellwig
2005-08-19 19:08             ` Luben Tuikov
2005-08-18 20:06 ` Luben Tuikov
2005-08-19 14:04 ` Christoph Hellwig
2005-08-18 14:43 James.Smart
2005-08-18 14:02 James.Smart
2005-08-18 17:56 ` Christoph Hellwig
2005-08-18 20:05   ` Luben Tuikov
2005-08-19 14:15     ` Christoph Hellwig
2005-08-18 11:57 James.Smart
2005-08-15 13:55 Christoph Hellwig
2005-08-15 14:19 ` Luben Tuikov
2005-08-15 14:35 ` Arjan van de Ven
2005-08-15 15:04   ` Luben Tuikov
2005-08-15 15:13 ` Luben Tuikov
2005-08-15 15:21   ` Christoph Hellwig
2005-08-15 15:33     ` 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=20050823154232.GA3464@us.ibm.com \
    --to=patmans@us.ibm.com \
    --cc=Eric.Moore@lsil.com \
    --cc=James.Smart@Emulex.Com \
    --cc=andrew.patterson@hp.com \
    --cc=hch@lst.de \
    --cc=jejb@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ltuikov@yahoo.com \
    --cc=luben_tuikov@adaptec.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.