From owner-svn-src-all@FreeBSD.ORG Fri Dec 5 04:46:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7AC5106564A; Fri, 5 Dec 2008 04:46:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A66078FC14; Fri, 5 Dec 2008 04:46:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB54kQlA043402; Fri, 5 Dec 2008 04:46:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB54kQb0043401; Fri, 5 Dec 2008 04:46:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812050446.mB54kQb0043401@svn.freebsd.org> From: Warner Losh Date: Fri, 5 Dec 2008 04:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185623 - head/sys/dev/pccbb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2008 04:46:26 -0000 Author: imp Date: Fri Dec 5 04:46:26 2008 New Revision: 185623 URL: http://svn.freebsd.org/changeset/base/185623 Log: Augment comments, and move things around a smidge. Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Fri Dec 5 04:43:25 2008 (r185622) +++ head/sys/dev/pccbb/pccbb.c Fri Dec 5 04:46:26 2008 (r185623) @@ -946,32 +946,32 @@ cbb_cardbus_reset(device_t brdev, device /* * Asserting reset for 20ms is necessary for most bridges. For some - * reason, the Ricoh RF5C47x bridges need it asserted for 400ms. + * reason, the Ricoh RF5C47x bridges need it asserted for 400ms. The + * root cause of this is unknown, and NetBSD does the same thing. */ delay = sc->chipset == CB_RF5C47X ? 400 : 20; PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL, |CBBM_BRIDGECTRL_RESET, 2); pause("cbbP3", hz * delay / 1000); /* - * If a card exists and we're turning it on, take it out of reset. + * If a card exists and we're turning it on, take it out of reset. + * After clearing reset, wait up to 1.1s for the first configuration + * register (vendor/product) configuration register of device 0.0 to + * become != 0xffffffff. The PCMCIA PC Card Host System Specification + * says that when powering up the card, the PCI Spec v2.1 must be + * followed. In PCI spec v2.2 Table 4-6, Trhfa (Reset High to first + * Config Access) is at most 2^25 clocks, or just over 1s. Section + * 2.2.1 states any card not ready to participate in bus transactions + * must tristate its outputs. Therefore, any access to its + * configuration registers must be ignored. In that state, the config + * reg will read 0xffffffff. Section 6.2.1 states a vendor id of + * 0xffff is invalid, so this can never match a real card. Print a + * warning if it never returns a real id. The PCMCIA PC Card + * Electrical Spec Section 5.2.7.1 implies only device 0 is present on + * a cardbus bus, so that's the only register we check here. */ if (on && CBB_CARD_PRESENT(cbb_get(sc, CBB_SOCKET_STATE))) { /* - * After clearing reset, wait up to 1.1s for the first - * configuration register (vendor/product) configuration - * register of device 0.0 to become != 0xffffffff. The PCMCIA - * PC Card Host System Specification says that when powering - * up the card, the PCI Spec v2.1 must be followed. In PCI - * spec v2.2 Table 4-6, Trhfa (Reset High to first Config - * Access) is at most 2^25 clocks, or just over 1s. Section - * 2.2.1 states any card not ready to participate in bus - * transactions must tristate its outputs. Therefore, any - * access to its configuration registers must be ignored. In - * that state, the config reg will read 0xffffffff. Section - * 6.2.1 states a vendor id of 0xffff is invalid, so this can - * never match a real card. Print a warning if it never - * returns a real id. The PCMCIA PC Card Electrical Spec - * Section 5.2.7.1 implies only device 0. */ PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL, &~CBBM_BRIDGECTRL_RESET, 2);