Pack of CAM improvements
scottl at samsco.org
Tue Jan 19 22:07:17 UTC 2010
On Jan 19, 2010, at 9:12 AM, Alexander Motin wrote:
> I've made a patch, that should solve set of problems of CAM ATA and
> generally. I would like to ask for testing and feedback.
> What patch does:
> - It unifies bus reset/probe sequence. Whenever bus attached at boot
> 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
> 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
- 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.
More information about the freebsd-stable