Re: Fix for USB media not found at boot

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Thu, 14 Jan 2010 20:32:38 +0200
James R. Van Artsdalen wrote:
> Hans Petter Selasky wrote:
>> The changeset in question has not been committed to mainstream.
>>
>> Scott Long is working on an improved solution. Please coordinate with him.
> 
> Has anything happened with the general case?  A friend of mine reported
> to me a regression between 8.0-RELEASE and 8-STABLE that turns out to be
> this issue with SATA port multipliers.
> 
> I have the same problem, except that I need to further wait for GEOM to
> make visible a gmirror made of two slow devices (behind SATA port
> multiplier).

There is a set of several related problems I am aware of and working on:

1. There are problems with synchronization of different CAM parts. It
wasn't so important for SCSI, but it does for ATA, especially for error
recovery. Recently I have made patch in Perforce (one you are testing
now) to solve that.

2. Automatic device hot-plug is not very unified in CAM and just not
implemented yet for plain SATA (without PMP). It is related to the topic
by several questions like: what if controller detects device appearance
before CAM initially scanned, should we do it twice?

3. There are problems with late-coming SIMs, such as umass on USB, ATA
on PCCard/CardBus and so on. As they may arrive too late for system-wide
CAM bus scanning, each of them have to handle own scan by them selves.
Now I am going to rewrite scan process, to make every bus scanned
automatically on arrive, as soon as system will be able to do it. It
will remove some duplicate code from about ten different drivers and
should make process more unified.

4. Port Multiplier is a some kind of late-coming device. It has own
scanning routine, which may only start, when main scan is already
completing. There are two possible ways: either make main bus scan call
wait for some event from PMP driver before return, or ignore it there
and let system wait on root mounting, while all such scan processes will
be finished. I haven't decided yet, which way to go.

5. To make device ordering repeatable between reboots, CAM originally
used quite simple and dirty practice of not loading peripheral drivers,
until all buses complete scan. It was working fine in a simple world
without hot-plug. But it just not working any more for late-coming
devices. At this moment I don't see really good solution here, as there
is no moment when we can be sure that all possible devices are arrived.
It is possible to bind device numbers by hands, but it is
overcomplicated for the most cases.

Problems 4 and 5 result in common general question: What to do with late
devices? Either try in any possible way extend CAM bus scanning period
for them (which is even theoretically impossible, as some device will
always trying to get late there), or gave up there and put all chips on
delaying FS mounting stage. In last case we have to do something with
unstable device numbering.

-- 
Alexander Motin
Received on Thu Jan 14 2010 - 17:32:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:00 UTC