All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@ubuntu.com>
To: AlanWEvans@gmail.com, linux-ide@vger.kernel.org
Subject: Re: ahci: host/target numbers change with detection order
Date: Wed, 21 May 2014 11:16:42 -0400	[thread overview]
Message-ID: <537CC35A.6060505@ubuntu.com> (raw)
In-Reply-To: <CAMFVOoU=nbVSzZPU0eJ6Gy=yFNdWQfctANjfQyVjAp0hJFzDrA@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5/19/2014 4:46 PM, Alan Evans wrote:
> I have a host that is used to process the data on removable
> drives. It is essential to be able to indicate to an operator which
> drives are done and can be removed.
> 
> When we were using a HighPoint card that uses sata_mv.ko we could 
> count on the results of 'udevadm info -q path -n <dev>'
> representing a single physical port on the card.
> 
> I have been testing a new card based on a Marvell 88SE9230
> (ahci.ko) and I find that the scsi host number and corresponding
> target are changing depending on the order drives are attached to
> the system, not based on the port number.

These numbers are assigned on a first come first serve basis, so if
another device initializes first, then it jumps in front.  If you want
to know the port number, look in the port_no file of the ata_port.

> Further for some reason in /sys/class/scsi_host I am seeing 8
> hosts created per card where I would expect 4.

Apparently the controller supports 8 ports.

> Does anyone have any thoughts on why the behaviour differs between 
> ahci.ko and sata_mv.ko?  Is it the chip?  The module?

It looks like sata_mv does not support parallel scanning of all ports,
but ahci does.  In other words, sata_mv scanned one port at a time, in
order, so they always registered in order, but ahci scans them all at
the same time, so the order they finish in varies.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTfMNaAAoJEI5FoCIzSKrwG0UH/Rrkh25BSA+3vqj6aQUDW0Ox
Fyeklgj+inohLzed5ZmGur2vfr8GA5Xrs1vO6Sk6hvDVadRhcyt45qkxAlVT09YS
vwXAQQQoIXzbiqetX7TJYJwo5TzCc3mIjUJjHrpfPrbUc43gs89yuqKpGubXurQp
N+QUPI4X1U6HRORsbFO9WfzZT3hvj99Nv0KmoDQUaSkhOS7lOqEPep1v42HflJLF
DlHmJmsuQmAy7fn4i2MpllnJx99EdpeFgPi2GdsPWi8gOBviuPMz0AWclUwY4K/q
SD0mHDrj+w/kE9wqJNUs2etkCNYMZwyfin1jxLyVaioiK8OFXkcoYyObGI79TzI=
=758u
-----END PGP SIGNATURE-----

  reply	other threads:[~2014-05-21 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 20:46 ahci: host/target numbers change with detection order Alan Evans
2014-05-21 15:16 ` Phillip Susi [this message]
2014-05-22 19:14   ` Alan Evans

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=537CC35A.6060505@ubuntu.com \
    --to=psusi@ubuntu.com \
    --cc=AlanWEvans@gmail.com \
    --cc=linux-ide@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.