From owner-p4-projects@FreeBSD.ORG Sun Sep 3 13:12:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D0FF916A4E0; Sun, 3 Sep 2006 13:12:46 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F78A16A4DE for ; Sun, 3 Sep 2006 13:12:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EBEF43D46 for ; Sun, 3 Sep 2006 13:12:46 +0000 (GMT) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k83DCkZ6099612 for ; Sun, 3 Sep 2006 13:12:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k83DCkCc099609 for perforce@freebsd.org; Sun, 3 Sep 2006 13:12:46 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 3 Sep 2006 13:12:46 GMT Message-Id: <200609031312.k83DCkCc099609@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 105586 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Sep 2006 13:12:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=105586 Change 105586 by hselasky@hselasky_mini_itx on 2006/09/03 13:12:11 Improve ata-usb reset timeout recovery. Affected files ... .. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#4 edit Differences ... ==== //depot/projects/usb/src/sys/dev/ata/ata-usb.c#4 (text) ==== @@ -544,10 +544,6 @@ return; tr_setup: - if (sc->reset_count >= 16) { - device_printf(sc->dev, "timeout: giving up reset!\n"); - return; - } sc->reset_count ++; @@ -916,9 +912,20 @@ sc->last_xfer_no); } - /* start reset before any callback */ + if (sc->reset_count < 16) { + + /* start reset before any callback */ + + atausb_transfer_start(sc, ATAUSB_T_BBB_RESET1); + } else { + + /* suspend reset until next command */ + + sc->last_xfer_no = ATAUSB_T_BBB_RESET1; + sc->reset_count = 0; - atausb_transfer_start(sc, ATAUSB_T_BBB_RESET1); + device_printf(sc->dev, "timeout: giving up reset!\n"); + } } if (request) {