From owner-freebsd-stable@FreeBSD.ORG Tue Jan 19 16:12:59 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 950D61065692; Tue, 19 Jan 2010 16:12:59 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f218.google.com (mail-fx0-f218.google.com [209.85.220.218]) by mx1.freebsd.org (Postfix) with ESMTP id CE3848FC19; Tue, 19 Jan 2010 16:12:58 +0000 (UTC) Received: by fxm10 with SMTP id 10so877465fxm.14 for ; Tue, 19 Jan 2010 08:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=/XHocK1ofq9DAD5JeBrI99DGHRuJIV+P/uZBNZX+i2o=; b=P1jeLhwD/fUM8znN/9CMDzIMZz4TGQYR8C/4nncSZWrQsQ4cF85/DZtJ/czMlqBPgo 5bYXtci7QBsigk0B0yDCNijR3thZrLNelyQIsokpJqoSuKetvxI6QyKS065XLOpB9m5G 83KlEtEtyqu8EDRDSevszdbciNimJptN0kRIc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=JGBL5rHYs/SEzwZtSCOBonerveCTjFGm2SJMWqcuZT4m9iUPrM/PojnYyLGYzvIlpG C2cR7mfRMImk23z/IuouUEmLZFEN7oY+gELU8UoumndXxh6Wk3CfPs9bo1cg5IpH197z wPoHf+9gNiCSL3GfOOl/rl4Vt6zdwZEQ7cDt4= Received: by 10.223.76.77 with SMTP id b13mr4657539fak.74.1263917577637; Tue, 19 Jan 2010 08:12:57 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 16sm2598706fxm.4.2010.01.19.08.12.56 (version=SSLv3 cipher=RC4-MD5); Tue, 19 Jan 2010 08:12:56 -0800 (PST) Sender: Alexander Motin Message-ID: <4B55D9D4.1000008@FreeBSD.org> Date: Tue, 19 Jan 2010 18:12:04 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: FreeBSD-Current , FreeBSD Stable X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Subject: 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 16:12:59 -0000 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). - To allow synchronization between different CAM levels, concept of requests priorities was extended. Priorities now split between several "run levels". Device can be freezed at specified level, allowing higher priority requests to pass. For example, no payload requests allowed, until PMP driver enable port. ATA XPT negotiate transfer parameters, periph driver configure caching and so on. - Frozen requests are no more counted by request allocation scheduler. It fixes deadlocks, when frozen low priority payload requests occupying slots, required by higher levels to manage theit execution. - Two last changes were holding proper ATA reinitialization and error recovery implementation. Now it is done: SATA controllers and Port Multipliers now implement automatic hot-plug and should correctly recover from timeouts and bus resets. Patch can be found here: http://people.freebsd.org/~mav/cam-ata.20100119.patch Feedback as always welcome. -- Alexander Motin