Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2010 15:07:12 -0700
From:      Scott Long <scottl@samsco.org>
To:        Alexander Motin <mav@freebsd.org>
Cc:        FreeBSD-Current <freebsd-current@freebsd.org>, FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Re: Pack of CAM improvements
Message-ID:  <823F6536-32A7-4BC6-9C6A-C84865A38458@samsco.org>
In-Reply-To: <4B55D9D4.1000008@FreeBSD.org>
References:  <4B55D9D4.1000008@FreeBSD.org>

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

On Jan 19, 2010, at 9:12 AM, Alexander Motin wrote:

> Hi.
>
> I've made a patch, that should solve set of problems of CAM ATA and  
> CAM
> generally. I would like to ask for testing and feedback.
>
> What patch does:
> - It unifies bus reset/probe sequence. Whenever bus attached at boot  
> or
> later, CAM will automatically reset and scan it. It allows to remove
> duplicate code from many drivers.
> - Any bus, attached before CAM completed it's boot-time  
> initialization,
> will equally join to the process, delaying boot if needed.
> - New kern.cam.boot_delay loader tunable should help controllers that
> are still unable to register their buses in time (such as slow USB/
> PCCard/ CardBus devices).

I've fought many times against delay values like this.  They never  
work well enough.  Drivers that have delayed scans should set up their  
own intrhook to delay the boot until their scan is done.  To help this  
out, CAM should move to its own hook that is guaranteed to run after  
the normal intrhooks.  However, this isn't required.

Here's my alternate proposal:

- move xpt_config() execution to a new config hook that runs after the  
normal intrhooks.
- For self identifying buses (i.e. anything where device presence is  
known to the controller), have the SIM notify CAM of each target  
device, instead of assuming that CAM will scan for it.
- Teach USB and whatnot to use a confighook to drive their discovery,  
instead of estimated timeouts.

I'm doing exactly this for the new MPT2SAS driver.

Scott




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?823F6536-32A7-4BC6-9C6A-C84865A38458>