Re: Pack of CAM improvements

From: Scott Long <scottl_at_samsco.org>
Date: Tue, 19 Jan 2010 15:07:12 -0700
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
Received on Tue Jan 19 2010 - 21:07:16 UTC

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