From owner-cvs-src-old@FreeBSD.ORG Fri Jul 29 20:35:41 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63599106566C for ; Fri, 29 Jul 2011 20:35:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 51D748FC16 for ; Fri, 29 Jul 2011 20:35:41 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p6TKZf5V091631 for ; Fri, 29 Jul 2011 20:35:41 GMT (envelope-from mav@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p6TKZflp091630 for cvs-src-old@freebsd.org; Fri, 29 Jul 2011 20:35:41 GMT (envelope-from mav@repoman.freebsd.org) Message-Id: <201107292035.p6TKZflp091630@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to mav@repoman.freebsd.org using -f From: Alexander Motin Date: Fri, 29 Jul 2011 20:35:23 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/ahci ahci.c ahci.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2011 20:35:41 -0000 mav 2011-07-29 20:35:23 UTC FreeBSD src repository Modified files: sys/dev/ahci ahci.c ahci.h Log: SVN rev 224498 on 2011-07-29 20:35:23Z by mav In some cases, at least on Marvell 88SE912x controllers, Current Command Slot field of the PxCMD register may point to an empty command slot. That breaks command timeout detection logic, making impossible to find what command actually caused timeout, and leading to infinite wait. Workaround that by checking whether pointed command slot is really used and can timeout in its time. And if not, fallback to the dumb algorithm used with FBS -- let all commands to time out and then fail all of them. Approved by: re (kib) MFC after: 1 week Revision Changes Path 1.72 +14 -6 src/sys/dev/ahci/ahci.c 1.19 +1 -0 src/sys/dev/ahci/ahci.h