From owner-freebsd-stable@FreeBSD.ORG Tue Jan 19 22:07:17 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21FD4106566C; Tue, 19 Jan 2010 22:07:16 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id CC3068FC1B; Tue, 19 Jan 2010 22:07:15 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o0JM7C3f045321; Tue, 19 Jan 2010 15:07:12 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Scott Long In-Reply-To: <4B55D9D4.1000008@FreeBSD.org> Date: Tue, 19 Jan 2010 15:07:12 -0700 Content-Transfer-Encoding: 7bit Message-Id: <823F6536-32A7-4BC6-9C6A-C84865A38458@samsco.org> References: <4B55D9D4.1000008@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1076) X-Spam-Status: No, score=-7.4 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: FreeBSD-Current , FreeBSD Stable Subject: Re: Pack of CAM improvements X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 22:07:17 -0000 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