Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Mar 2011 15:52:11 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: tying down adaX to physical interfaces
Message-ID:  <20110326135211.GB78089@deviant.kiev.zoral.com.ua>
In-Reply-To: <20110327000956.U1316@besplex.bde.org>
References:  <AFDA19F9-DC78-463D-862D-6E4F3CB2C2C3@deman.com> <20110326003818.GT78089@deviant.kiev.zoral.com.ua> <20110327000956.U1316@besplex.bde.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sun, Mar 27, 2011 at 12:24:03AM +1100, Bruce Evans wrote:
> On Sat, 26 Mar 2011, Kostik Belousov wrote:
> 
> >On Fri, Mar 25, 2011 at 05:21:50PM -0700, Michael DeMan wrote:
> >>Hi All,
> >>
> >>I seem to recall that there is a way to do this, but can no longer google 
> >>it.
> >>
> >>Basically, for NCQ support with SATA devices we are using the 'ada' 
> >>driver, which of course has SCSI like behavior.
> >>...
> >I use the following stanza in /boot/device.hints for machine with intel
> >on-board ahci and siis in pcie:
> >hint.scbus.0.at="ahcich0"
> >hint.ada.0.at="scbus0"
> >hint.scbus.1.at="ahcich1"
> >hint.ada.1.at="scbus1"
> >hint.scbus.2.at="ahcich2"
> >hint.ada.2.at="scbus2"
> >hint.scbus.3.at="ahcich3"
> >hint.ada.3.at="scbus3"
> >hint.scbus.4.at="ahcich4"
> >hint.ada.4.at="scbus4"
> >hint.scbus.5.at="siisch0"
> >hint.ada.5.at="scbus5"
> >hint.scbus.6.at="siisch1"
> >hint.ada.6.at="scbus6"
> 
> To hijack this thread a little, I'll ask how people handle removable media
> changing the addresses of non-removable media.  I use the following to
> prevent USB drives stealing da0 from my 1 real SCSI disk on 1 machine:
> 
>    hint.scbus.0.at="sym0"
>    hint.da.0.at="scbus0"
> 
> This works OK and is easy to manage with only 1 SCSI disk.  But 1 of my
> USB drives also steals cd0 from a not-so-real ATAPI drive under atapicam,
> depending on whether the USB drive is present at boot time:
> 
>    USB drive not present at boot time:
>      ad* (no SCSI disks on this machine)
>      cd0 = acd0 (but no further ATAPI drives on this machine)
>    insert USB drive:
>      da1 (da0 was reserved by above)
>      cd1 (phantom ATAPI drive on the USB drive.  Accessing this hangs
> 	  parts of the ata system but it doesn't get used since various
> 	  places only point cd0)
> 
>    USB drive present at boot time:
>      ad*
>      da1 on USB
>      cd0 phantom on USB
>      cd1 = acd[0 or 1] (normal cd0).  Accessing cd0 now hangs parts of the
> 	   ata system and this happens too easily since various places point
> 	   to cd0.
> 
> How do people defend agains random USB drives present or not at boot time?

Wouldn't it be cd0 on scbusX on ahciY, and cd1 on scbusZ on umass-simT ?
I believe similar hints would wire the cd0/cd1 in your case.
> 
> Bruce

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk2N74oACgkQC3+MBN1Mb4hi1QCgw/ObHcf5p7Xh8+m+gBWZx02x
Lh8AoPRvGEZ+L5QDNypkUCSVAyVLac0T
=O+Z3
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110326135211.GB78089>