From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 8 12:08:43 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DD78106566B; Sun, 8 Nov 2009 12:08:43 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B96C8FC08; Sun, 8 Nov 2009 12:08:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA8C8hPu085057; Sun, 8 Nov 2009 12:08:43 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA8C8hEO085055; Sun, 8 Nov 2009 12:08:43 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911081208.nA8C8hEO085055@svn.freebsd.org> From: Christian Brueffer Date: Sun, 8 Nov 2009 12:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199045 - stable/8/usr.sbin/usbconfig X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 12:08:43 -0000 Author: brueffer Date: Sun Nov 8 12:08:42 2009 New Revision: 199045 URL: http://svn.freebsd.org/changeset/base/199045 Log: MFC: r198750 Expand DESCRIPTION and add a basic EXAMPLES section. Modified: stable/8/usr.sbin/usbconfig/usbconfig.8 Directory Properties: stable/8/usr.sbin/usbconfig/ (props changed) Modified: stable/8/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- stable/8/usr.sbin/usbconfig/usbconfig.8 Sun Nov 8 11:55:03 2009 (r199044) +++ stable/8/usr.sbin/usbconfig/usbconfig.8 Sun Nov 8 12:08:42 2009 (r199045) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Sep 28, 2008 +.Dd November 1, 2009 .Dt USBCONFIG 8 .Os .Sh NAME @@ -49,5 +49,13 @@ Should only be used in conjunction with .It Fl h Show help and available commands. .El +.Pp +When called without options, +.Nm +prints a list of all available USB devices. +.Sh EXAMPLES +Show information about the device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_info .Sh SEE ALSO .Xr usb 4 From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 8 14:06:15 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B414D1065679; Sun, 8 Nov 2009 14:06:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1BC78FC1D; Sun, 8 Nov 2009 14:06:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA8E6FZU087935; Sun, 8 Nov 2009 14:06:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA8E6Fh0087932; Sun, 8 Nov 2009 14:06:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911081406.nA8E6Fh0087932@svn.freebsd.org> From: Alexander Motin Date: Sun, 8 Nov 2009 14:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199047 - in stable/8/sys/dev/ata: . chipsets X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 14:06:15 -0000 Author: mav Date: Sun Nov 8 14:06:15 2009 New Revision: 199047 URL: http://svn.freebsd.org/changeset/base/199047 Log: MFC r198818: Add IDs for nVidia MCP65/77/79/89 SATA conntrollers. Modified: stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-nvidia.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Sun Nov 8 14:02:54 2009 (r199046) +++ stable/8/sys/dev/ata/ata-pci.h Sun Nov 8 14:06:15 2009 (r199047) @@ -260,6 +260,15 @@ struct ata_pci_controller { #define ATA_NFORCE_MCP61_S2 0x03f610de #define ATA_NFORCE_MCP61_S3 0x03f710de #define ATA_NFORCE_MCP65 0x044810de +#define ATA_NFORCE_MCP65_A0 0x044c10de +#define ATA_NFORCE_MCP65_A1 0x044d10de +#define ATA_NFORCE_MCP65_A2 0x044e10de +#define ATA_NFORCE_MCP65_A3 0x044f10de +#define ATA_NFORCE_MCP65_A4 0x045c10de +#define ATA_NFORCE_MCP65_A5 0x045d10de +#define ATA_NFORCE_MCP65_A6 0x045e10de +#define ATA_NFORCE_MCP65_A7 0x045f10de +#define ATA_NFORCE_MCP67 0x056010de #define ATA_NFORCE_MCP67_A0 0x055010de #define ATA_NFORCE_MCP67_A1 0x055110de #define ATA_NFORCE_MCP67_A2 0x055210de @@ -273,7 +282,6 @@ struct ata_pci_controller { #define ATA_NFORCE_MCP67_AA 0x055A10de #define ATA_NFORCE_MCP67_AB 0x055B10de #define ATA_NFORCE_MCP67_AC 0x058410de -#define ATA_NFORCE_MCP67 0x056010de #define ATA_NFORCE_MCP73 0x056c10de #define ATA_NFORCE_MCP73_A0 0x07f010de #define ATA_NFORCE_MCP73_A1 0x07f110de @@ -288,6 +296,42 @@ struct ata_pci_controller { #define ATA_NFORCE_MCP73_AA 0x07fa10de #define ATA_NFORCE_MCP73_AB 0x07fb10de #define ATA_NFORCE_MCP77 0x075910de +#define ATA_NFORCE_MCP77_A0 0x0ad010de +#define ATA_NFORCE_MCP77_A1 0x0ad110de +#define ATA_NFORCE_MCP77_A2 0x0ad210de +#define ATA_NFORCE_MCP77_A3 0x0ad310de +#define ATA_NFORCE_MCP77_A4 0x0ad410de +#define ATA_NFORCE_MCP77_A5 0x0ad510de +#define ATA_NFORCE_MCP77_A6 0x0ad610de +#define ATA_NFORCE_MCP77_A7 0x0ad710de +#define ATA_NFORCE_MCP77_A8 0x0ad810de +#define ATA_NFORCE_MCP77_A9 0x0ad910de +#define ATA_NFORCE_MCP77_AA 0x0ada10de +#define ATA_NFORCE_MCP77_AB 0x0adb10de +#define ATA_NFORCE_MCP79_A0 0x0ab410de +#define ATA_NFORCE_MCP79_A1 0x0ab510de +#define ATA_NFORCE_MCP79_A2 0x0ab610de +#define ATA_NFORCE_MCP79_A3 0x0ab710de +#define ATA_NFORCE_MCP79_A4 0x0ab810de +#define ATA_NFORCE_MCP79_A5 0x0ab910de +#define ATA_NFORCE_MCP79_A6 0x0aba10de +#define ATA_NFORCE_MCP79_A7 0x0abb10de +#define ATA_NFORCE_MCP79_A8 0x0abc10de +#define ATA_NFORCE_MCP79_A9 0x0abd10de +#define ATA_NFORCE_MCP79_AA 0x0abe10de +#define ATA_NFORCE_MCP79_AB 0x0abf10de +#define ATA_NFORCE_MCP89_A0 0x0d8410de +#define ATA_NFORCE_MCP89_A1 0x0d8510de +#define ATA_NFORCE_MCP89_A2 0x0d8610de +#define ATA_NFORCE_MCP89_A3 0x0d8710de +#define ATA_NFORCE_MCP89_A4 0x0d8810de +#define ATA_NFORCE_MCP89_A5 0x0d8910de +#define ATA_NFORCE_MCP89_A6 0x0d8a10de +#define ATA_NFORCE_MCP89_A7 0x0d8b10de +#define ATA_NFORCE_MCP89_A8 0x0d8c10de +#define ATA_NFORCE_MCP89_A9 0x0d8d10de +#define ATA_NFORCE_MCP89_AA 0x0d8e10de +#define ATA_NFORCE_MCP89_AB 0x0d8f10de #define ATA_PROMISE_ID 0x105a #define ATA_PDC20246 0x4d33105a Modified: stable/8/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-nvidia.c Sun Nov 8 14:02:54 2009 (r199046) +++ stable/8/sys/dev/ata/chipsets/ata-nvidia.c Sun Nov 8 14:06:15 2009 (r199047) @@ -97,6 +97,14 @@ ata_nvidia_probe(device_t dev) { ATA_NFORCE_MCP61_S2, 0, NV4|NVQ, 0, ATA_SA300, "nForce MCP61" }, { ATA_NFORCE_MCP61_S3, 0, NV4|NVQ, 0, ATA_SA300, "nForce MCP61" }, { ATA_NFORCE_MCP65, 0, 0, 0, ATA_UDMA6, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A2, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A3, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A4, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A5, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A6, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, + { ATA_NFORCE_MCP65_A7, 0, NVAHCI, 0, ATA_SA300, "nForce MCP65" }, { ATA_NFORCE_MCP67, 0, 0, 0, ATA_UDMA6, "nForce MCP67" }, { ATA_NFORCE_MCP67_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP67" }, { ATA_NFORCE_MCP67_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP67" }, @@ -125,6 +133,42 @@ ata_nvidia_probe(device_t dev) { ATA_NFORCE_MCP73_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP73" }, { ATA_NFORCE_MCP73_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP73" }, { ATA_NFORCE_MCP77, 0, 0, 0, ATA_UDMA6, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A2, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A3, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A4, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A5, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A6, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A7, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A8, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_A9, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP77_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP77" }, + { ATA_NFORCE_MCP79_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A2, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A3, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A4, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A5, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A6, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A7, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A8, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_A9, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP79_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP79" }, + { ATA_NFORCE_MCP89_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A2, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A3, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A4, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A5, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A6, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A7, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A8, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_A9, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, + { ATA_NFORCE_MCP89_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP89" }, { 0, 0, 0, 0, 0, 0}} ; if (pci_get_vendor(dev) != ATA_NVIDIA_ID) From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 8 14:07:58 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A561106566C; Sun, 8 Nov 2009 14:07:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88D6C8FC12; Sun, 8 Nov 2009 14:07:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA8E7wan088011; Sun, 8 Nov 2009 14:07:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA8E7wdG088009; Sun, 8 Nov 2009 14:07:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911081407.nA8E7wdG088009@svn.freebsd.org> From: Alexander Motin Date: Sun, 8 Nov 2009 14:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199048 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 14:07:58 -0000 Author: mav Date: Sun Nov 8 14:07:58 2009 New Revision: 199048 URL: http://svn.freebsd.org/changeset/base/199048 Log: MFC r198983: Document support for more chips. Modified: stable/8/share/man/man4/ata.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ata.4 ============================================================================== --- stable/8/share/man/man4/ata.4 Sun Nov 8 14:06:15 2009 (r199047) +++ stable/8/share/man/man4/ata.4 Sun Nov 8 14:07:58 2009 (r199048) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2009 +.Dd November 6, 2009 .Dt ATA 4 .Os .Sh NAME @@ -129,7 +129,7 @@ M5229, M5281, M5287, M5288, M5289. .It AMD: AMD756, AMD766, AMD768, AMD8111, CS5536. .It ATI: -IXP200, IXP300, IXP400. +IXP200, IXP300, IXP400, IXP600, IXP700, IXP800. .It CMD: CMD646, CMD646U2, CMD648, CMD649. .It Cypress: @@ -145,13 +145,15 @@ IT8211F, IT8212F, IT8213F. .It JMicron: JMB360, JMB361, JMB363, JMB365, JMB366, JMB368. .It Marvell -88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6081, 88SX6101, 88SX6141. +88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SX6101, +88SX6141, 88SX7042. .It National: SC1100. .It NetCell: NC3000, NC5000. .It nVidia: -nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4. +nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4, +MCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89. .It Promise: PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270, PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375, PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580, PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519, PDC40718, PDC40719. .It ServerWorks: From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 8 14:28:24 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68FD21065697; Sun, 8 Nov 2009 14:28:24 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC3EA8FC0C; Sun, 8 Nov 2009 14:28:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA8ESNiA088612; Sun, 8 Nov 2009 14:28:23 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA8ESNDo088610; Sun, 8 Nov 2009 14:28:23 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200911081428.nA8ESNDo088610@svn.freebsd.org> From: Rong-En Fan Date: Sun, 8 Nov 2009 14:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199049 - stable/8/share/misc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 14:28:24 -0000 Author: rafan Date: Sun Nov 8 14:28:23 2009 New Revision: 199049 URL: http://svn.freebsd.org/changeset/base/199049 Log: MFC r198948 from HEAD: Revert the spelling of Taiwan to be politically neutral in accordance with the policy published at http://www.freebsd.org/internal/i18n.html. Requested by: core (murray) Modified: stable/8/share/misc/iso3166 Directory Properties: stable/8/share/misc/ (props changed) Modified: stable/8/share/misc/iso3166 ============================================================================== --- stable/8/share/misc/iso3166 Sun Nov 8 14:07:58 2009 (r199048) +++ stable/8/share/misc/iso3166 Sun Nov 8 14:28:23 2009 (r199049) @@ -1,5 +1,8 @@ # $FreeBSD$ # +# Please consult with http://www.FreeBSD.org/internal/i18n.html before +# making changes to this file. +# # ISO 3166 country codes # This includes many places that are not legally independent countries, # but which is it convenient to refer to separately from their @@ -230,7 +233,7 @@ SZ SWZ 748 Swaziland SE SWE 752 Sweden CH CHE 756 Switzerland SY SYR 760 Syrian Arab Republic -TW TWN 158 Taiwan, Province of China +TW TWN 158 Taiwan TJ TJK 762 Tajikistan TZ TZA 834 Tanzania, United Republic of TH THA 764 Thailand From owner-svn-src-stable-8@FreeBSD.ORG Sun Nov 8 17:59:55 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24CD106566C; Sun, 8 Nov 2009 17:59:55 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90FEB8FC0A; Sun, 8 Nov 2009 17:59:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA8HxtBD093404; Sun, 8 Nov 2009 17:59:55 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA8HxtmM093401; Sun, 8 Nov 2009 17:59:55 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200911081759.nA8HxtmM093401@svn.freebsd.org> From: Ulf Lilleengen Date: Sun, 8 Nov 2009 17:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199052 - stable/8/sys/dev/msk X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 17:59:55 -0000 Author: lulf Date: Sun Nov 8 17:59:55 2009 New Revision: 199052 URL: http://svn.freebsd.org/changeset/base/199052 Log: MFC r198475: - Add support for Marvell Yukon 88E8042 device. Submitted by: Mario Lobo Modified: stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/msk/if_mskreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Sun Nov 8 16:01:48 2009 (r199051) +++ stable/8/sys/dev/msk/if_msk.c Sun Nov 8 17:59:55 2009 (r199052) @@ -201,6 +201,8 @@ static struct msk_product { "Marvell Yukon 88E8040 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8040T, "Marvell Yukon 88E8040T Fast Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_8042, + "Marvell Yukon 88E8042 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8048, "Marvell Yukon 88E8048 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4361, Modified: stable/8/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/8/sys/dev/msk/if_mskreg.h Sun Nov 8 16:01:48 2009 (r199051) +++ stable/8/sys/dev/msk/if_mskreg.h Sun Nov 8 17:59:55 2009 (r199052) @@ -133,6 +133,7 @@ #define DEVICEID_MRVL_8039 0x4353 #define DEVICEID_MRVL_8040 0x4354 #define DEVICEID_MRVL_8040T 0x4355 +#define DEVICEID_MRVL_8042 0x4357 #define DEVICEID_MRVL_8048 0x435A #define DEVICEID_MRVL_4360 0x4360 #define DEVICEID_MRVL_4361 0x4361 From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 9 10:13:25 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3316E10656AB; Mon, 9 Nov 2009 10:13:25 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 218088FC14; Mon, 9 Nov 2009 10:13:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9ADPP8016053; Mon, 9 Nov 2009 10:13:25 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9ADP9f016051; Mon, 9 Nov 2009 10:13:25 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <200911091013.nA9ADP9f016051@svn.freebsd.org> From: Oleg Bulyzhin Date: Mon, 9 Nov 2009 10:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199075 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 10:13:25 -0000 Author: oleg Date: Mon Nov 9 10:13:24 2009 New Revision: 199075 URL: http://svn.freebsd.org/changeset/base/199075 Log: MFC r198845: Fix two issues that can lead to exceeding configured pipe bandwidth: - do not expire queues which are not ready to be expired. - properly calculate available burst size. MFC r199073: style(9): add missing parentheses Modified: stable/8/sys/netinet/ipfw/ip_dummynet.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dummynet.c Mon Nov 9 09:27:09 2009 (r199074) +++ stable/8/sys/netinet/ipfw/ip_dummynet.c Mon Nov 9 10:13:24 2009 (r199075) @@ -244,6 +244,17 @@ void dummynet_drain(void); static int dummynet_io(struct mbuf **, int , struct ip_fw_args *); /* + * Flow queue is idle if: + * 1) it's empty for at least 1 tick + * 2) it has invalid timestamp (WF2Q case) + * 3) parent pipe has no 'exhausted' burst. + */ +#define QUEUE_IS_IDLE(q) ((q)->head == NULL && (q)->S == (q)->F + 1 && \ + curr_time > (q)->idle_time + 1 && \ + ((q)->numbytes + (curr_time - (q)->idle_time - 1) * \ + (q)->fs->pipe->bandwidth >= (q)->fs->pipe->burst)) + +/* * Heap management functions. * * In the heap, first node is element 0. Children of i are 2i+1 and 2i+2. @@ -1004,7 +1015,7 @@ expire_queues(struct dn_flow_set *fs) fs->last_expired = time_uptime ; for (i = 0 ; i <= fs->rq_size ; i++) /* last one is overflow */ for (prev=NULL, q = fs->rq[i] ; q != NULL ; ) - if (q->head != NULL || q->S != q->F+1) { + if (!QUEUE_IS_IDLE(q)) { prev = q ; q = q->next ; } else { /* entry is idle, expire it */ @@ -1134,7 +1145,7 @@ find_queue(struct dn_flow_set *fs, struc break ; /* found */ /* No match. Check if we can expire the entry */ - if (pipe_expire && q->head == NULL && q->S == q->F+1 ) { + if (pipe_expire && QUEUE_IS_IDLE(q)) { /* entry is idle and not in any heap, expire it */ struct dn_flow_queue *old_q = q ; @@ -1408,7 +1419,7 @@ dummynet_io(struct mbuf **m0, int dir, s if (q->idle_time < curr_time) { /* Calculate available burst size. */ q->numbytes += - (curr_time - q->idle_time) * pipe->bandwidth; + (curr_time - q->idle_time - 1) * pipe->bandwidth; if (q->numbytes > pipe->burst) q->numbytes = pipe->burst; if (io_fast) @@ -1418,8 +1429,8 @@ dummynet_io(struct mbuf **m0, int dir, s if (pipe->idle_time < curr_time) { /* Calculate available burst size. */ pipe->numbytes += - (curr_time - pipe->idle_time) * pipe->bandwidth; - if (pipe->numbytes > pipe->burst) + (curr_time - pipe->idle_time - 1) * pipe->bandwidth; + if (pipe->numbytes > 0 && pipe->numbytes > pipe->burst) pipe->numbytes = pipe->burst; if (io_fast) pipe->numbytes += pipe->bandwidth; From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 9 11:32:18 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE8A5106566C; Mon, 9 Nov 2009 11:32:18 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8356F8FC1C; Mon, 9 Nov 2009 11:32:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9BWItA019648; Mon, 9 Nov 2009 11:32:18 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9BWIiT019645; Mon, 9 Nov 2009 11:32:18 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911091132.nA9BWIiT019645@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 9 Nov 2009 11:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199077 - stable/8/usr.sbin/zic X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 11:32:18 -0000 Author: edwin Date: Mon Nov 9 11:32:18 2009 New Revision: 199077 URL: http://svn.freebsd.org/changeset/base/199077 Log: MFC of 198831, tzcode2009q - Cleanup unnecessary local variables in zdump. - Fix man-page Modified: stable/8/usr.sbin/zic/zdump.c stable/8/usr.sbin/zic/zic.8 Directory Properties: stable/8/usr.sbin/zic/ (props changed) Modified: stable/8/usr.sbin/zic/zdump.c ============================================================================== --- stable/8/usr.sbin/zic/zdump.c Mon Nov 9 11:23:37 2009 (r199076) +++ stable/8/usr.sbin/zic/zdump.c Mon Nov 9 11:32:18 2009 (r199077) @@ -6,7 +6,7 @@ #ifndef lint static const char rcsid[] = "$FreeBSD$"; -static char elsieid[] = "@(#)zdump.c 8.9"; +static char elsieid[] = "@(#)zdump.c 8.10"; #endif /* not lint */ /* @@ -152,7 +152,7 @@ static size_t longest; static char * progname; static int warned; -static void usage(const char *progname, FILE *stream, int status); +static void usage(FILE *stream, int status); static char * abbr(struct tm * tmp); static void abbrok(const char * abbrp, const char * zone); static long delta(struct tm * newp, struct tm * oldp); @@ -273,7 +273,7 @@ char * argv[]; if (strcmp(argv[i], "--version") == 0) { errx(EXIT_SUCCESS, "%s", elsieid); } else if (strcmp(argv[i], "--help") == 0) { - usage(progname, stdout, EXIT_SUCCESS); + usage(stdout, EXIT_SUCCESS); } vflag = 0; cutarg = NULL; @@ -283,7 +283,7 @@ char * argv[]; else cutarg = optarg; if ((c != -1) || (optind == argc - 1 && strcmp(argv[optind], "=") == 0)) { - usage(progname, stderr, EXIT_FAILURE); + usage(stderr, EXIT_FAILURE); } if (vflag) { if (cutarg != NULL) { @@ -468,7 +468,7 @@ const long y; } static void -usage(const char *progname, FILE *stream, int status) +usage(FILE *stream, int status) { fprintf(stream, _("usage: %s [--version] [-v] [--help] [-c [loyear,]hiyear] zonename ...\n\ Modified: stable/8/usr.sbin/zic/zic.8 ============================================================================== --- stable/8/usr.sbin/zic/zic.8 Mon Nov 9 11:23:37 2009 (r199076) +++ stable/8/usr.sbin/zic/zic.8 Mon Nov 9 11:32:18 2009 (r199077) @@ -260,7 +260,7 @@ the variable part is null. .El .Pp A zone line has the form: -.Dl "Zone NAME GMTOFF RULES/SAVE FORMAT [UNTILYEAR [MONTH [DAY [TIME]]]] +.Dl "Zone NAME GMTOFF RULES/SAVE FORMAT [UNTILYEAR [MONTH [DAY [TIME]]]]" For example: .Dl "Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00 The fields that make up a zone line are: From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 9 15:11:37 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A0B61065679; Mon, 9 Nov 2009 15:11:37 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 681DE8FC2A; Mon, 9 Nov 2009 15:11:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9FBbcB024992; Mon, 9 Nov 2009 15:11:37 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9FBbvg024990; Mon, 9 Nov 2009 15:11:37 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911091511.nA9FBbvg024990@svn.freebsd.org> From: Hajimu UMEMOTO Date: Mon, 9 Nov 2009 15:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199085 - stable/8/sys/netinet6 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 15:11:37 -0000 Author: ume Date: Mon Nov 9 15:11:37 2009 New Revision: 199085 URL: http://svn.freebsd.org/changeset/base/199085 Log: MFC r198976, r198993: - Don't call LLE_FREE() after nd6_free(). - Make nd6_llinfo_timer() does its job, again. ln->la_expire was greater than time_second, in most cases. Modified: stable/8/sys/netinet6/nd6.c (contents, props changed) Modified: stable/8/sys/netinet6/nd6.c ============================================================================== --- stable/8/sys/netinet6/nd6.c Mon Nov 9 14:26:23 2009 (r199084) +++ stable/8/sys/netinet6/nd6.c Mon Nov 9 15:11:37 2009 (r199085) @@ -502,12 +502,13 @@ nd6_llinfo_timer(void *arg) ndi = ND_IFINFO(ifp); dst = &L3_ADDR_SIN6(ln)->sin6_addr; - if ((ln->la_flags & LLE_STATIC) || (ln->la_expire > time_second)) { + if (ln->la_flags & LLE_STATIC) { goto done; } if (ln->la_flags & LLE_DELETED) { (void)nd6_free(ln, 0); + ln = NULL; goto done; } From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 9 16:32:48 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E003106566B; Mon, 9 Nov 2009 16:32:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72E5A8FC19; Mon, 9 Nov 2009 16:32:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9GWmk9026944; Mon, 9 Nov 2009 16:32:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9GWmZc026943; Mon, 9 Nov 2009 16:32:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911091632.nA9GWmZc026943@svn.freebsd.org> From: John Baldwin Date: Mon, 9 Nov 2009 16:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199088 - stable/8/sys/netinet6 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 16:32:48 -0000 Author: jhb Date: Mon Nov 9 16:32:48 2009 New Revision: 199088 URL: http://svn.freebsd.org/changeset/base/199088 Log: Hoist some mergeinfo up to sys/. Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet6/nd6.c (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 9 18:09:11 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 013DF1065676; Mon, 9 Nov 2009 18:09:10 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBC3D8FC22; Mon, 9 Nov 2009 18:09:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9I9AHm029404; Mon, 9 Nov 2009 18:09:10 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9I9AAs029402; Mon, 9 Nov 2009 18:09:10 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200911091809.nA9I9AAs029402@svn.freebsd.org> From: Ken Smith Date: Mon, 9 Nov 2009 18:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199095 - stable/8/sys/dev/sym X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 18:09:11 -0000 Author: kensmith Date: Mon Nov 9 18:09:10 2009 New Revision: 199095 URL: http://svn.freebsd.org/changeset/base/199095 Log: MFC r198719: > While certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010) > do support 64bit addresses, the current SCRIPTS code supports only 32bit > addresses causing data corruption for buffer addresses >4GB. This problem > affects 64bit machines with more than 4GB RAM or amd64 with 4GB and > memory hole remapping. > Work-around this problem with a bus_dma tag that requests bounce-buffers > for addresses >4GB. This causes some overhead, but given the maximum SCSI > bus speed of 160MB/s compared, the effect should hardly be noticeable. > The problem was reported by Mike Watters (mike at mwatters net) who also > verified that this fix cures the problem. > > Since this change is a NOOP on systems with less than 4GB RAM and fixes > data corruption (in RAM and on disk) on systems with more than 4GB, I hope > that this change is accepted for 8.0. Requested by: Stefan Esser (se at freebsd dot org)[1] Reviewed by: jhb, scottl [1] Stefan requested this be part of 8.0 but has been unavailable to do the MFC since submitting the request. We want to get 8.0-RC3 started so I'm doing the merges with re@ hat on. Modified: stable/8/sys/dev/sym/sym_hipd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/8/sys/dev/sym/sym_hipd.c Mon Nov 9 18:06:37 2009 (r199094) +++ stable/8/sys/dev/sym/sym_hipd.c Mon Nov 9 18:09:10 2009 (r199095) @@ -8582,7 +8582,7 @@ sym_pci_attach(device_t dev) * Allocate a tag for the DMA of user data. */ if (bus_dma_tag_create(np->bus_dmat, 1, (1<<24), - BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, SYM_CONF_MAX_SG, (1<<24), 0, busdma_lock_mutex, &np->mtx, From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 9 18:56:47 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0F711065694; Mon, 9 Nov 2009 18:56:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF9B88FC14; Mon, 9 Nov 2009 18:56:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9IulZg030737; Mon, 9 Nov 2009 18:56:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9IulRf030736; Mon, 9 Nov 2009 18:56:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911091856.nA9IulRf030736@svn.freebsd.org> From: John Baldwin Date: Mon, 9 Nov 2009 18:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199097 - in stable/8/lib/libc: stdio string X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 18:56:47 -0000 Author: jhb Date: Mon Nov 9 18:56:47 2009 New Revision: 199097 URL: http://svn.freebsd.org/changeset/base/199097 Log: Cleanup mergeinfo for libc. Part of the damage was caused by a merge from a partial checkout of libc in a user branch up to head. Don't do merges from sparse trees! Modified: Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/gen/ (props changed) stable/8/lib/libc/stdio/asprintf.c (props changed) stable/8/lib/libc/stdlib/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/string/ffsll.c (props changed) stable/8/lib/libc/string/flsll.c (props changed) stable/8/lib/libc/string/wcpcpy.c (props changed) stable/8/lib/libc/string/wcpncpy.c (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 9 21:30:45 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7696E1065670; Mon, 9 Nov 2009 21:30:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64A878FC14; Mon, 9 Nov 2009 21:30:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9LUjAl034978; Mon, 9 Nov 2009 21:30:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9LUjHC034976; Mon, 9 Nov 2009 21:30:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200911092130.nA9LUjHC034976@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 9 Nov 2009 21:30:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199110 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 21:30:45 -0000 Author: nwhitehorn Date: Mon Nov 9 21:30:45 2009 New Revision: 199110 URL: http://svn.freebsd.org/changeset/base/199110 Log: Insta-MFC of r199084,199108: Increase the size of the OFW translations buffer to handle G5 systems that use many translation regions in firmware, and add bounds checking to prevent buffer overflows in case even the new value is exceeded. Short MFC requested by re since the problem this fixes breaks CD boot on most G5 systems, making them uninstallable. Reported by: Jacob Lambert Approved by: re (kensmith,kib) Requested by: re Modified: stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Mon Nov 9 21:28:07 2009 (r199109) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Mon Nov 9 21:30:45 2009 (r199110) @@ -270,7 +270,7 @@ static struct mem_region *pregions; extern u_int phys_avail_count; extern int regions_sz, pregions_sz; extern int ofw_real_mode; -static struct ofw_map translations[64]; +static struct ofw_map translations[96]; extern struct pmap ofw_pmap; @@ -896,6 +896,9 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o panic("moea64_bootstrap: can't get mmu package"); if ((sz = OF_getproplen(mmu, "translations")) == -1) panic("moea64_bootstrap: can't get ofw translation count"); + if (sz > sizeof(translations)) + panic("moea64_bootstrap: too many ofw translations (%d)", + sz/sizeof(*translations)); bzero(translations, sz); if (OF_getprop(mmu, "translations", translations, sz) == -1) From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 9 21:39:42 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EDD61065672; Mon, 9 Nov 2009 21:39:42 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C2948FC12; Mon, 9 Nov 2009 21:39:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9LdgT1035695; Mon, 9 Nov 2009 21:39:42 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9LdglS035689; Mon, 9 Nov 2009 21:39:42 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200911092139.nA9LdglS035689@svn.freebsd.org> From: Ken Smith Date: Mon, 9 Nov 2009 21:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199112 - in stable/8/sys: amd64/conf i386/conf ia64/conf powerpc/conf sparc64/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 21:39:42 -0000 Author: kensmith Date: Mon Nov 9 21:39:42 2009 New Revision: 199112 URL: http://svn.freebsd.org/changeset/base/199112 Log: Comment out the sbp(4) entry for GENERIC config files that contain it. There are known issues with this driver that are beyond what can be fixed for 8.0-RELEASE and the bugs can cause boot failure on some systems. It's not clear if it impacts all systems and there is interest in getting the problem fixed so for now just comment it out instead of remove it. Commit straight to stable/8, this is an 8.0-RELEASE issue. Head was left alone so work on it can continue there. Reviewed by: Primary misc. architecture maintainers (marcel, marius) Modified: stable/8/sys/amd64/conf/GENERIC stable/8/sys/i386/conf/GENERIC stable/8/sys/ia64/conf/GENERIC stable/8/sys/powerpc/conf/GENERIC stable/8/sys/sparc64/conf/GENERIC Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Mon Nov 9 21:31:50 2009 (r199111) +++ stable/8/sys/amd64/conf/GENERIC Mon Nov 9 21:39:42 2009 (r199112) @@ -313,7 +313,7 @@ device udav # Davicom DM9601E USB # FireWire support device firewire # FireWire bus code -device sbp # SCSI over FireWire (Requires scbus and da) +#device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) device dcons # Dumb console driver Modified: stable/8/sys/i386/conf/GENERIC ============================================================================== --- stable/8/sys/i386/conf/GENERIC Mon Nov 9 21:31:50 2009 (r199111) +++ stable/8/sys/i386/conf/GENERIC Mon Nov 9 21:39:42 2009 (r199112) @@ -327,7 +327,7 @@ device udav # Davicom DM9601E USB # FireWire support device firewire # FireWire bus code -device sbp # SCSI over FireWire (Requires scbus and da) +#device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) device dcons # Dumb console driver Modified: stable/8/sys/ia64/conf/GENERIC ============================================================================== --- stable/8/sys/ia64/conf/GENERIC Mon Nov 9 21:31:50 2009 (r199111) +++ stable/8/sys/ia64/conf/GENERIC Mon Nov 9 21:39:42 2009 (r199112) @@ -139,7 +139,7 @@ device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet # FireWire support -device sbp # SCSI over FireWire (need scbus & da) +#device sbp # SCSI over FireWire (need scbus & da) # Various (pseudo) devices device ether # Ethernet support Modified: stable/8/sys/powerpc/conf/GENERIC ============================================================================== --- stable/8/sys/powerpc/conf/GENERIC Mon Nov 9 21:31:50 2009 (r199111) +++ stable/8/sys/powerpc/conf/GENERIC Mon Nov 9 21:39:42 2009 (r199112) @@ -157,7 +157,7 @@ device kue # Kawasaki LSI USB Ethernet # FireWire support device firewire # FireWire bus code -device sbp # SCSI over FireWire (Requires scbus and da) +#device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) # Misc Modified: stable/8/sys/sparc64/conf/GENERIC ============================================================================== --- stable/8/sys/sparc64/conf/GENERIC Mon Nov 9 21:31:50 2009 (r199111) +++ stable/8/sys/sparc64/conf/GENERIC Mon Nov 9 21:39:42 2009 (r199112) @@ -255,7 +255,7 @@ device udav # Davicom DM9601E USB # FireWire support device firewire # FireWire bus code -device sbp # SCSI over FireWire (Requires scbus and da) +#device sbp # SCSI over FireWire (Requires scbus and da) device fwe # Ethernet over FireWire (non-standard!) device fwip # IP over FireWire (RFC 2734,3146) device dcons # Dumb console driver From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 10 00:34:26 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D6A61065692; Tue, 10 Nov 2009 00:34:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11C1A8FC15; Tue, 10 Nov 2009 00:34:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAA0YP1D039956; Tue, 10 Nov 2009 00:34:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAA0YPxY039953; Tue, 10 Nov 2009 00:34:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200911100034.nAA0YPxY039953@svn.freebsd.org> From: Xin LI Date: Tue, 10 Nov 2009 00:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199120 - stable/8/sys/dev/arcmsr X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 00:34:26 -0000 Author: delphij Date: Tue Nov 10 00:34:25 2009 New Revision: 199120 URL: http://svn.freebsd.org/changeset/base/199120 Log: MFC revision 199069: Initialize the whole message unit's DMA buffer to zero, this fixes a panic during boot when ARC1200 is being used with certain motherboard models. This commit brings the driver to the same state of vendor's 1.20.00.16 release. Many thanks to Areca for their continued support to FreeBSD. This instant MFC was requested by re@ (kensmith) in preparation for 8.0-RC3. Reported by: Jirka Mikulas Submitted by: Erich Chen (Areca) Modified: stable/8/sys/dev/arcmsr/arcmsr.c stable/8/sys/dev/arcmsr/arcmsr.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/8/sys/dev/arcmsr/arcmsr.c Mon Nov 9 23:57:40 2009 (r199119) +++ stable/8/sys/dev/arcmsr/arcmsr.c Tue Nov 10 00:34:25 2009 (r199120) @@ -55,6 +55,8 @@ ** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report ** and cause g_vfs_done() read write error ** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x +** 1.20.00.16 10/10/2009 Erich Chen Bug fix for RAID adapter type ARC120x +** bus_dmamem_alloc() with BUS_DMA_ZERO ****************************************************************************************** * $FreeBSD$ */ @@ -2903,7 +2905,7 @@ static u_int32_t arcmsr_initialize(devic } /* Allocation for our srbs */ if(bus_dmamem_alloc(acb->srb_dmat, (void **)&acb->uncacheptr - , BUS_DMA_WAITOK | BUS_DMA_COHERENT, &acb->srb_dmamap) != 0) { + , BUS_DMA_WAITOK | BUS_DMA_COHERENT | BUS_DMA_ZERO, &acb->srb_dmamap) != 0) { bus_dma_tag_destroy(acb->srb_dmat); bus_dma_tag_destroy(acb->dm_segs_dmat); bus_dma_tag_destroy(acb->parent_dmat); Modified: stable/8/sys/dev/arcmsr/arcmsr.h ============================================================================== --- stable/8/sys/dev/arcmsr/arcmsr.h Mon Nov 9 23:57:40 2009 (r199119) +++ stable/8/sys/dev/arcmsr/arcmsr.h Tue Nov 10 00:34:25 2009 (r199120) @@ -37,7 +37,7 @@ ************************************************************************** * $FreeBSD$ */ -#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.15 2007-10-07" +#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.16 2009-10-10" #define ARCMSR_SCSI_INITIATOR_ID 255 #define ARCMSR_DEV_SECTOR_SIZE 512 #define ARCMSR_MAX_XFER_SECTORS 4096 From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 10 00:41:22 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBF0C106566B; Tue, 10 Nov 2009 00:41:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C88578FC0A; Tue, 10 Nov 2009 00:41:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAA0fMBL040152; Tue, 10 Nov 2009 00:41:22 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAA0fMWg040150; Tue, 10 Nov 2009 00:41:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200911100041.nAA0fMWg040150@svn.freebsd.org> From: Xin LI Date: Tue, 10 Nov 2009 00:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199121 - stable/8/usr.sbin/crashinfo X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 00:41:23 -0000 Author: delphij Date: Tue Nov 10 00:41:22 2009 New Revision: 199121 URL: http://svn.freebsd.org/changeset/base/199121 Log: MFC r198846: Set umask to 0x077 instead of the default. This prevents non-root user from reading crashinfo output, which could contain some sensitive information. Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/8/usr.sbin/crashinfo/ (props changed) Modified: stable/8/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/8/usr.sbin/crashinfo/crashinfo.sh Tue Nov 10 00:34:25 2009 (r199120) +++ stable/8/usr.sbin/crashinfo/crashinfo.sh Tue Nov 10 00:41:22 2009 (r199121) @@ -147,6 +147,8 @@ fi echo "Writing crash summary to $FILE." +umask 077 + # Simulate uname ostype=$(echo -e printf '"%s", ostype' | gdb -x /dev/stdin -batch $KERNEL) osrelease=$(echo -e printf '"%s", osrelease' | gdb -x /dev/stdin -batch $KERNEL) From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 10 22:37:44 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD5BA1065670; Tue, 10 Nov 2009 22:37:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBE5D8FC16; Tue, 10 Nov 2009 22:37:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAAMbiuL073927; Tue, 10 Nov 2009 22:37:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAAMbiOC073919; Tue, 10 Nov 2009 22:37:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911102237.nAAMbiOC073919@svn.freebsd.org> From: Alexander Motin Date: Tue, 10 Nov 2009 22:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199158 - in stable/8/sys: conf dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 22:37:44 -0000 Author: mav Date: Tue Nov 10 22:37:44 2009 New Revision: 199158 URL: http://svn.freebsd.org/changeset/base/199158 Log: MFC r198486, r199050: Increase ATA command timeouts. Introduce define and kernel option ATA_REQUEST_TIMEOUT to control it. PR: kern/111023 Modified: stable/8/sys/conf/NOTES stable/8/sys/conf/options stable/8/sys/dev/ata/ata-all.h stable/8/sys/dev/ata/ata-disk.c stable/8/sys/dev/ata/ata-queue.c stable/8/sys/dev/ata/ata-raid.c stable/8/sys/dev/ata/atapi-cd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Tue Nov 10 22:27:33 2009 (r199157) +++ stable/8/sys/conf/NOTES Tue Nov 10 22:37:44 2009 (r199158) @@ -1716,8 +1716,11 @@ hint.ata.1.irq="15" # # ATA_STATIC_ID: controller numbering is static ie depends on location # else the device numbers are dynamically allocated. +# ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request +# before timing out. options ATA_STATIC_ID +#options ATA_REQUEST_TIMEOUT=10 # # Standard floppy disk controllers and floppy tapes, supports Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Tue Nov 10 22:27:33 2009 (r199157) +++ stable/8/sys/conf/options Tue Nov 10 22:37:44 2009 (r199158) @@ -350,6 +350,7 @@ ISCSI_INITIATOR_DEBUG opt_iscsi_initiato # Options used in the 'ata' ATA/ATAPI driver ATA_STATIC_ID opt_ata.h ATA_NOPCI opt_ata.h +ATA_REQUEST_TIMEOUT opt_ata.h # Net stuff. ACCEPT_FILTER_DATA Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Tue Nov 10 22:27:33 2009 (r199157) +++ stable/8/sys/dev/ata/ata-all.h Tue Nov 10 22:37:44 2009 (r199158) @@ -336,6 +336,10 @@ struct ata_ahci_cmd_list { #define ATA_OP_FINISHED 1 #define ATA_MAX_28BIT_LBA 268435455UL +#ifndef ATA_REQUEST_TIMEOUT +#define ATA_REQUEST_TIMEOUT 10 +#endif + /* structure used for composite atomic operations */ #define MAX_COMPOSITES 32 /* u_int32_t bits */ struct ata_composite { Modified: stable/8/sys/dev/ata/ata-disk.c ============================================================================== --- stable/8/sys/dev/ata/ata-disk.c Tue Nov 10 22:27:33 2009 (r199157) +++ stable/8/sys/dev/ata/ata-disk.c Tue Nov 10 22:37:44 2009 (r199158) @@ -230,7 +230,7 @@ ad_spindown(void *priv) } request->dev = dev; request->flags = ATA_R_CONTROL; - request->timeout = 5; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 1; request->callback = ad_power_callback; request->u.ata.command = ATA_STANDBY_IMMEDIATE; @@ -262,10 +262,10 @@ ad_strategy(struct bio *bp) if (atadev->spindown_state) { device_printf(dev, "request while spun down, starting.\n"); atadev->spindown_state = 0; - request->timeout = 31; + request->timeout = MAX(ATA_REQUEST_TIMEOUT, 31); } else { - request->timeout = 5; + request->timeout = ATA_REQUEST_TIMEOUT; } request->retries = 2; request->data = bp->bio_data; @@ -468,7 +468,7 @@ ad_set_geometry(device_t dev) request->u.ata.count = 0; request->u.ata.feature = 0; request->flags = ATA_R_CONTROL | ATA_R_QUIET; - request->timeout = 5; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 0; ata_queue_request(request); if (request->status & ATA_S_ERROR) @@ -487,7 +487,7 @@ ad_set_geometry(device_t dev) request->u.ata.count = 1; request->u.ata.feature = 0; request->flags = ATA_R_CONTROL; - request->timeout = 5; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 0; ata_queue_request(request); if (request->status & ATA_S_ERROR) Modified: stable/8/sys/dev/ata/ata-queue.c ============================================================================== --- stable/8/sys/dev/ata/ata-queue.c Tue Nov 10 22:27:33 2009 (r199157) +++ stable/8/sys/dev/ata/ata-queue.c Tue Nov 10 22:37:44 2009 (r199158) @@ -133,9 +133,9 @@ ata_controlcmd(device_t dev, u_int8_t co if (atadev->spindown_state) { device_printf(dev, "request while spun down, starting.\n"); atadev->spindown_state = 0; - request->timeout = 31; + request->timeout = MAX(ATA_REQUEST_TIMEOUT, 31); } else { - request->timeout = 5; + request->timeout = ATA_REQUEST_TIMEOUT; } request->retries = 0; ata_queue_request(request); @@ -389,7 +389,7 @@ ata_completed(void *context, int dummy) request->bytecount = sizeof(struct atapi_sense); request->donecount = 0; request->transfersize = sizeof(struct atapi_sense); - request->timeout = 5; + request->timeout = ATA_REQUEST_TIMEOUT; request->flags &= (ATA_R_ATAPI | ATA_R_QUIET | ATA_R_DEBUG); request->flags |= (ATA_R_READ | ATA_R_AT_HEAD | ATA_R_REQUEUE); ATA_DEBUG_RQ(request, "autoissue request sense"); Modified: stable/8/sys/dev/ata/ata-raid.c ============================================================================== --- stable/8/sys/dev/ata/ata-raid.c Tue Nov 10 22:27:33 2009 (r199157) +++ stable/8/sys/dev/ata/ata-raid.c Tue Nov 10 22:37:44 2009 (r199158) @@ -273,7 +273,7 @@ ata_raid_flush(struct bio *bp) request->u.ata.lba = 0; request->u.ata.count = 0; request->u.ata.feature = 0; - request->timeout = 1; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 0; request->flags |= ATA_R_ORDERED | ATA_R_DIRECT; ata_queue_request(request); @@ -4371,7 +4371,7 @@ ata_raid_init_request(device_t dev, stru return NULL; } request->dev = dev; - request->timeout = 5; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 2; request->callback = ata_raid_done; request->driver = rdp; @@ -4445,7 +4445,7 @@ ata_raid_rw(device_t dev, u_int64_t lba, /* setup request */ request->dev = dev; - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 0; request->data = data; request->bytecount = bcount; Modified: stable/8/sys/dev/ata/atapi-cd.c ============================================================================== --- stable/8/sys/dev/ata/atapi-cd.c Tue Nov 10 22:27:33 2009 (r199157) +++ stable/8/sys/dev/ata/atapi-cd.c Tue Nov 10 22:37:44 2009 (r199158) @@ -700,7 +700,7 @@ acd_geom_access(struct g_provider *pp, i request->dev = dev; bcopy(ccb, request->u.atapi.ccb, 16); request->flags = ATA_R_ATAPI; - request->timeout = 5; + request->timeout = ATA_REQUEST_TIMEOUT; ata_queue_request(request); if (!request->error && (request->u.atapi.sense.key == 2 || From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 11 01:27:59 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C6B5106566B; Wed, 11 Nov 2009 01:27:59 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19B1C8FC1B; Wed, 11 Nov 2009 01:27:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAB1RwrA078209; Wed, 11 Nov 2009 01:27:58 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAB1Rwar078201; Wed, 11 Nov 2009 01:27:58 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911110127.nAB1Rwar078201@svn.freebsd.org> From: Andrew Thompson Date: Wed, 11 Nov 2009 01:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199165 - stable/8/lib/libusb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 01:27:59 -0000 Author: thompsa Date: Wed Nov 11 01:27:58 2009 New Revision: 199165 URL: http://svn.freebsd.org/changeset/base/199165 Log: MFC r199055 - fix refcounting error during data transfer - fix a memory leak on the USB backend - fix invalid pointer computations (in one case memory outside the allocated area was written in LibUSB v1.0) - make sure memory is always initialised, also in failing cases - add missing functions from v1.0.4 PR: usb/140325 Modified: stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10.c stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb10_io.c stable/8/lib/libusb/libusb20.c stable/8/lib/libusb/libusb20_desc.c stable/8/lib/libusb/libusb20_ugen20.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Wed Nov 11 01:11:08 2009 (r199164) +++ stable/8/lib/libusb/libusb.h Wed Nov 11 01:27:58 2009 (r199165) @@ -271,9 +271,11 @@ typedef struct libusb_control_setup { uint16_t wLength; } libusb_control_setup; +#define LIBUSB_CONTROL_SETUP_SIZE 8 /* bytes */ + typedef struct libusb_iso_packet_descriptor { - unsigned int length; - unsigned int actual_length; + uint32_t length; + uint32_t actual_length; enum libusb_transfer_status status; } libusb_iso_packet_descriptor __aligned(sizeof(void *)); @@ -282,9 +284,9 @@ typedef void (*libusb_transfer_cb_fn) (s typedef struct libusb_transfer { libusb_device_handle *dev_handle; uint8_t flags; - unsigned int endpoint; + uint32_t endpoint; uint8_t type; - unsigned int timeout; + uint32_t timeout; enum libusb_transfer_status status; int length; int actual_length; @@ -320,7 +322,7 @@ int libusb_get_configuration(libusb_devi int libusb_set_configuration(libusb_device_handle * devh, int configuration); int libusb_claim_interface(libusb_device_handle * devh, int interface_number); int libusb_release_interface(libusb_device_handle * devh, int interface_number); -int libusb_reset_device(libusb_device_handle * dev); +int libusb_reset_device(libusb_device_handle * devh); int libusb_kernel_driver_active(libusb_device_handle * devh, int interface); int libusb_detach_kernel_driver(libusb_device_handle * devh, int interface); int libusb_attach_kernel_driver(libusb_device_handle * devh, int interface); @@ -333,7 +335,8 @@ int libusb_get_active_config_descriptor( int libusb_get_config_descriptor(libusb_device * dev, uint8_t config_index, struct libusb_config_descriptor **config); int libusb_get_config_descriptor_by_value(libusb_device * dev, uint8_t bConfigurationValue, struct libusb_config_descriptor **config); void libusb_free_config_descriptor(struct libusb_config_descriptor *config); -int libusb_get_string_descriptor_ascii(libusb_device_handle * dev, uint8_t desc_index, uint8_t *data, int length); +int libusb_get_string_descriptor_ascii(libusb_device_handle * devh, uint8_t desc_index, uint8_t *data, int length); +int libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type, uint8_t desc_index, uint8_t *data, int length); /* Asynchronous device I/O */ @@ -341,7 +344,16 @@ struct libusb_transfer *libusb_alloc_tra void libusb_free_transfer(struct libusb_transfer *transfer); int libusb_submit_transfer(struct libusb_transfer *transfer); int libusb_cancel_transfer(struct libusb_transfer *transfer); -uint8_t *libusb_get_iso_packet_buffer_simple(struct libusb_transfer *transfer, unsigned int packet); +uint8_t *libusb_get_iso_packet_buffer(struct libusb_transfer *transfer, uint32_t index); +uint8_t *libusb_get_iso_packet_buffer_simple(struct libusb_transfer *transfer, uint32_t index); +void libusb_set_iso_packet_lengths(struct libusb_transfer *transfer, uint32_t length); +uint8_t *libusb_control_transfer_get_data(struct libusb_transfer *transfer); +struct libusb_control_setup *libusb_control_transfer_get_setup(struct libusb_transfer *transfer); +void libusb_fill_control_setup(uint8_t *buf, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength); +void libusb_fill_control_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t *buf, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout); +void libusb_fill_bulk_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout); +void libusb_fill_interrupt_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout); +void libusb_fill_iso_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, int length, int npacket, libusb_transfer_cb_fn callback, void *user_data, uint32_t timeout); /* Polling and timing */ @@ -362,9 +374,14 @@ struct libusb_pollfd **libusb_get_pollfd /* Synchronous device I/O */ -int libusb_control_transfer(libusb_device_handle * devh, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint8_t *data, uint16_t wLength, unsigned int timeout); -int libusb_bulk_transfer(libusb_device_handle *devh, uint8_t endpoint, uint8_t *data, int length, int *transferred, unsigned int timeout); -int libusb_interrupt_transfer(libusb_device_handle *devh, uint8_t endpoint, uint8_t *data, int length, int *transferred, unsigned int timeout); +int libusb_control_transfer(libusb_device_handle * devh, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint8_t *data, uint16_t wLength, uint32_t timeout); +int libusb_bulk_transfer(libusb_device_handle * devh, uint8_t endpoint, uint8_t *data, int length, int *transferred, uint32_t timeout); +int libusb_interrupt_transfer(libusb_device_handle * devh, uint8_t endpoint, uint8_t *data, int length, int *transferred, uint32_t timeout); + +/* Byte-order */ + +uint16_t libusb_cpu_to_le16(uint16_t x); +uint16_t libusb_le16_to_cpu(uint16_t x); #if 0 { /* indent fix */ Modified: stable/8/lib/libusb/libusb10.c ============================================================================== --- stable/8/lib/libusb/libusb10.c Wed Nov 11 01:11:08 2009 (r199164) +++ stable/8/lib/libusb/libusb10.c Wed Nov 11 01:27:58 2009 (r199165) @@ -35,6 +35,7 @@ #include #include #include +#include #include "libusb20.h" #include "libusb20_desc.h" @@ -185,8 +186,6 @@ libusb_get_device_list(libusb_context *c /* create libusb v1.0 compliant devices */ i = 0; while ((pdev = libusb20_be_device_foreach(usb_backend, NULL))) { - /* get device into libUSB v1.0 list */ - libusb20_be_dequeue_device(usb_backend, pdev); dev = malloc(sizeof(*dev)); if (dev == NULL) { @@ -199,6 +198,10 @@ libusb_get_device_list(libusb_context *c libusb20_be_free(usb_backend); return (LIBUSB_ERROR_NO_MEM); } + + /* get device into libUSB v1.0 list */ + libusb20_be_dequeue_device(usb_backend, pdev); + memset(dev, 0, sizeof(*dev)); /* init transfer queues */ @@ -416,6 +419,8 @@ libusb_close(struct libusb20_device *pde libusb10_remove_pollfd(ctx, &dev->dev_poll); libusb20_dev_close(pdev); + + /* unref will free the "pdev" when the refcount reaches zero */ libusb_unref_device(dev); /* make sure our event loop detects the closed device */ @@ -1195,7 +1200,7 @@ libusb_submit_transfer(struct libusb_tra struct libusb20_transfer *pxfer1; struct libusb_super_transfer *sxfer; struct libusb_device *dev; - unsigned int endpoint; + uint32_t endpoint; int err; if (uxfer == NULL) @@ -1252,7 +1257,7 @@ libusb_cancel_transfer(struct libusb_tra struct libusb20_transfer *pxfer1; struct libusb_super_transfer *sxfer; struct libusb_device *dev; - unsigned int endpoint; + uint32_t endpoint; if (uxfer == NULL) return (LIBUSB_ERROR_INVALID_PARAM); @@ -1312,3 +1317,16 @@ libusb10_cancel_all_transfer(libusb_devi { /* TODO */ } + +uint16_t +libusb_cpu_to_le16(uint16_t x) +{ + return (htole16(x)); +} + +uint16_t +libusb_le16_to_cpu(uint16_t x) +{ + return (le16toh(x)); +} + Modified: stable/8/lib/libusb/libusb10_desc.c ============================================================================== --- stable/8/lib/libusb/libusb10_desc.c Wed Nov 11 01:11:08 2009 (r199164) +++ stable/8/lib/libusb/libusb10_desc.c Wed Nov 11 01:27:58 2009 (r199165) @@ -35,6 +35,8 @@ #include "libusb.h" #include "libusb10.h" +#define N_ALIGN(n) (-((-(n)) & (-8UL))) + /* USB descriptors */ int @@ -114,17 +116,17 @@ libusb_get_config_descriptor(libusb_devi nalt = nif = pconf->num_interface; nep = 0; - nextra = pconf->extra.len; + nextra = N_ALIGN(pconf->extra.len); for (i = 0; i < nif; i++) { pinf = pconf->interface + i; - nextra += pinf->extra.len; + nextra += N_ALIGN(pinf->extra.len); nep += pinf->num_endpoints; k = pinf->num_endpoints; pend = pinf->endpoints; while (k--) { - nextra += pend->extra.len; + nextra += N_ALIGN(pend->extra.len); pend++; } @@ -132,12 +134,12 @@ libusb_get_config_descriptor(libusb_devi nalt += pinf->num_altsetting; pinf = pinf->altsetting; while (j--) { - nextra += pinf->extra.len; + nextra += N_ALIGN(pinf->extra.len); nep += pinf->num_endpoints; k = pinf->num_endpoints; pend = pinf->endpoints; while (k--) { - nextra += pend->extra.len; + nextra += N_ALIGN(pend->extra.len); pend++; } pinf++; @@ -150,17 +152,18 @@ libusb_get_config_descriptor(libusb_devi (nalt * sizeof(libusb_interface_descriptor)) + (nep * sizeof(libusb_endpoint_descriptor)); + nextra = N_ALIGN(nextra); + pconfd = malloc(nextra); if (pconfd == NULL) { free(pconf); return (LIBUSB_ERROR_NO_MEM); } - /* make sure memory is clean */ + /* make sure memory is initialised */ memset(pconfd, 0, nextra); - pconfd->interface = (libusb_interface *) (pconfd + - sizeof(libusb_config_descriptor)); + pconfd->interface = (libusb_interface *) (pconfd + 1); ifd = (libusb_interface_descriptor *) (pconfd->interface + nif); endd = (libusb_endpoint_descriptor *) (ifd + nalt); @@ -181,7 +184,7 @@ libusb_get_config_descriptor(libusb_devi pconfd->extra_length = pconf->extra.len; pconfd->extra = pextra; memcpy(pextra, pconf->extra.ptr, pconfd->extra_length); - pextra += pconfd->extra_length; + pextra += N_ALIGN(pconfd->extra_length); } /* setup all interface and endpoint pointers */ @@ -221,7 +224,7 @@ libusb_get_config_descriptor(libusb_devi ifd->extra_length = pinf->extra.len; ifd->extra = pextra; memcpy(pextra, pinf->extra.ptr, pinf->extra.len); - pextra += pinf->extra.len; + pextra += N_ALIGN(pinf->extra.len); } for (k = 0; k < pinf->num_endpoints; k++) { pend = &pinf->endpoints[k]; @@ -238,7 +241,7 @@ libusb_get_config_descriptor(libusb_devi endd->extra_length = pend->extra.len; endd->extra = pextra; memcpy(pextra, pend->extra.ptr, pend->extra.len); - pextra += pend->extra.len; + pextra += N_ALIGN(pend->extra.len); } } } @@ -304,3 +307,12 @@ libusb_get_string_descriptor_ascii(libus return (LIBUSB_ERROR_OTHER); } + +int +libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type, + uint8_t desc_index, uint8_t *data, int length) +{ + return (libusb_control_transfer(devh, LIBUSB_ENDPOINT_IN, + LIBUSB_REQUEST_GET_DESCRIPTOR, (desc_type << 8) | desc_index, 0, data, + length, 1000)); +} Modified: stable/8/lib/libusb/libusb10_io.c ============================================================================== --- stable/8/lib/libusb/libusb10_io.c Wed Nov 11 01:11:08 2009 (r199164) +++ stable/8/lib/libusb/libusb10_io.c Wed Nov 11 01:27:58 2009 (r199165) @@ -32,6 +32,7 @@ #include #include #include +#include #include "libusb20.h" #include "libusb20_desc.h" @@ -148,19 +149,19 @@ libusb10_handle_events_sub(struct libusb goto do_done; } for (i = 0; i != nfds; i++) { - if (fds[i].revents == 0) - continue; if (ppdev[i] != NULL) { dev = libusb_get_device(ppdev[i]); - err = libusb20_dev_process(ppdev[i]); + if (fds[i].revents == 0) + err = 0; /* nothing to do */ + else + err = libusb20_dev_process(ppdev[i]); + if (err) { /* cancel all transfers - device is gone */ libusb10_cancel_all_transfer(dev); - /* - * make sure we don't go into an infinite - * loop - */ + + /* remove USB device from polling loop */ libusb10_remove_pollfd(dev->ctx, &dev->dev_poll); } CTX_UNLOCK(ctx); @@ -573,3 +574,160 @@ libusb_interrupt_transfer(libusb_device_ DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_interrupt_transfer leave"); return (ret); } + +uint8_t * +libusb_get_iso_packet_buffer(struct libusb_transfer *transfer, uint32_t index) +{ + uint8_t *ptr; + uint32_t n; + + if (transfer->num_iso_packets < 0) + return (NULL); + + if (index >= (uint32_t)transfer->num_iso_packets) + return (NULL); + + ptr = transfer->buffer; + if (ptr == NULL) + return (NULL); + + for (n = 0; n != index; n++) { + ptr += transfer->iso_packet_desc[n].length; + } + return (ptr); +} + +uint8_t * +libusb_get_iso_packet_buffer_simple(struct libusb_transfer *transfer, uint32_t index) +{ + uint8_t *ptr; + + if (transfer->num_iso_packets < 0) + return (NULL); + + if (index >= (uint32_t)transfer->num_iso_packets) + return (NULL); + + ptr = transfer->buffer; + if (ptr == NULL) + return (NULL); + + ptr += transfer->iso_packet_desc[0].length * index; + + return (ptr); +} + +void +libusb_set_iso_packet_lengths(struct libusb_transfer *transfer, uint32_t length) +{ + int n; + + if (transfer->num_iso_packets < 0) + return; + + for (n = 0; n != transfer->num_iso_packets; n++) + transfer->iso_packet_desc[n].length = length; +} + +uint8_t * +libusb_control_transfer_get_data(struct libusb_transfer *transfer) +{ + if (transfer->buffer == NULL) + return (NULL); + + return (transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE); +} + +struct libusb_control_setup * +libusb_control_transfer_get_setup(struct libusb_transfer *transfer) +{ + return ((struct libusb_control_setup *)transfer->buffer); +} + +void +libusb_fill_control_setup(uint8_t *buf, uint8_t bmRequestType, + uint8_t bRequest, uint16_t wValue, + uint16_t wIndex, uint16_t wLength) +{ + struct libusb_control_setup *req = (struct libusb_control_setup *)buf; + + /* The alignment is OK for all fields below. */ + req->bmRequestType = bmRequestType; + req->bRequest = bRequest; + req->wValue = htole16(wValue); + req->wIndex = htole16(wIndex); + req->wLength = htole16(wLength); +} + +void +libusb_fill_control_transfer(struct libusb_transfer *transfer, + libusb_device_handle *devh, uint8_t *buf, + libusb_transfer_cb_fn callback, void *user_data, + uint32_t timeout) +{ + struct libusb_control_setup *setup = (struct libusb_control_setup *)buf; + + transfer->dev_handle = devh; + transfer->endpoint = 0; + transfer->type = LIBUSB_TRANSFER_TYPE_CONTROL; + transfer->timeout = timeout; + transfer->buffer = buf; + if (setup != NULL) + transfer->length = LIBUSB_CONTROL_SETUP_SIZE + + le16toh(setup->wLength); + else + transfer->length = 0; + transfer->user_data = user_data; + transfer->callback = callback; + +} + +void +libusb_fill_bulk_transfer(struct libusb_transfer *transfer, + libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, + int length, libusb_transfer_cb_fn callback, void *user_data, + uint32_t timeout) +{ + transfer->dev_handle = devh; + transfer->endpoint = endpoint; + transfer->type = LIBUSB_TRANSFER_TYPE_BULK; + transfer->timeout = timeout; + transfer->buffer = buf; + transfer->length = length; + transfer->user_data = user_data; + transfer->callback = callback; +} + +void +libusb_fill_interrupt_transfer(struct libusb_transfer *transfer, + libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, + int length, libusb_transfer_cb_fn callback, void *user_data, + uint32_t timeout) +{ + transfer->dev_handle = devh; + transfer->endpoint = endpoint; + transfer->type = LIBUSB_TRANSFER_TYPE_INTERRUPT; + transfer->timeout = timeout; + transfer->buffer = buf; + transfer->length = length; + transfer->user_data = user_data; + transfer->callback = callback; +} + +void +libusb_fill_iso_transfer(struct libusb_transfer *transfer, + libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, + int length, int npacket, libusb_transfer_cb_fn callback, + void *user_data, uint32_t timeout) +{ + transfer->dev_handle = devh; + transfer->endpoint = endpoint; + transfer->type = LIBUSB_TRANSFER_TYPE_ISOCHRONOUS; + transfer->timeout = timeout; + transfer->buffer = buf; + transfer->length = length; + transfer->num_iso_packets = npacket; + transfer->user_data = user_data; + transfer->callback = callback; +} + Modified: stable/8/lib/libusb/libusb20.c ============================================================================== --- stable/8/lib/libusb/libusb20.c Wed Nov 11 01:11:08 2009 (r199164) +++ stable/8/lib/libusb/libusb20.c Wed Nov 11 01:27:58 2009 (r199165) @@ -630,6 +630,9 @@ libusb20_dev_req_string_sync(struct libu struct LIBUSB20_CONTROL_SETUP_DECODED req; int error; + /* make sure memory is initialised */ + memset(ptr, 0, len); + if (len < 4) { /* invalid length */ return (LIBUSB20_ERROR_INVALID_PARAM); @@ -1093,7 +1096,8 @@ libusb20_be_free(struct libusb20_backend if (pbe->methods->exit_backend) { pbe->methods->exit_backend(pbe); } - return; + /* free backend */ + free(pbe); } void @@ -1101,7 +1105,6 @@ libusb20_be_enqueue_device(struct libusb { pdev->beMethods = pbe->methods; /* copy backend methods */ TAILQ_INSERT_TAIL(&(pbe->usb_devs), pdev, dev_entry); - return; } void @@ -1109,5 +1112,4 @@ libusb20_be_dequeue_device(struct libusb struct libusb20_device *pdev) { TAILQ_REMOVE(&(pbe->usb_devs), pdev, dev_entry); - return; } Modified: stable/8/lib/libusb/libusb20_desc.c ============================================================================== --- stable/8/lib/libusb/libusb20_desc.c Wed Nov 11 01:11:08 2009 (r199164) +++ stable/8/lib/libusb/libusb20_desc.c Wed Nov 11 01:27:58 2009 (r199165) @@ -118,6 +118,9 @@ libusb20_parse_config_desc(const void *c if (lub_config == NULL) { return (NULL); /* out of memory */ } + /* make sure memory is initialised */ + memset(lub_config, 0, size); + lub_interface = (void *)(lub_config + 1); lub_alt_interface = (void *)(lub_interface + niface_no_alt); lub_endpoint = (void *)(lub_interface + niface); Modified: stable/8/lib/libusb/libusb20_ugen20.c ============================================================================== --- stable/8/lib/libusb/libusb20_ugen20.c Wed Nov 11 01:11:08 2009 (r199164) +++ stable/8/lib/libusb/libusb20_ugen20.c Wed Nov 11 01:27:58 2009 (r199165) @@ -449,6 +449,8 @@ ugen20_get_config_desc_full(struct libus uint16_t len; int error; + /* make sure memory is initialised */ + memset(&cdesc, 0, sizeof(cdesc)); memset(&gen_desc, 0, sizeof(gen_desc)); gen_desc.ugd_data = &cdesc; @@ -468,6 +470,10 @@ ugen20_get_config_desc_full(struct libus if (!ptr) { return (LIBUSB20_ERROR_NO_MEM); } + + /* make sure memory is initialised */ + memset(ptr, 0, len); + gen_desc.ugd_data = ptr; gen_desc.ugd_maxlen = len; From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 11 01:33:06 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93ADE1065694; Wed, 11 Nov 2009 01:33:06 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 816CE8FC0C; Wed, 11 Nov 2009 01:33:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAB1X6j8078396; Wed, 11 Nov 2009 01:33:06 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAB1X6fq078392; Wed, 11 Nov 2009 01:33:06 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911110133.nAB1X6fq078392@svn.freebsd.org> From: Andrew Thompson Date: Wed, 11 Nov 2009 01:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199166 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 01:33:06 -0000 Author: thompsa Date: Wed Nov 11 01:33:06 2009 New Revision: 199166 URL: http://svn.freebsd.org/changeset/base/199166 Log: MFC r199058 Integrate lost interrupts patch from the old USB stack. Some EHCI chips from VIA / ATI seem to trigger interrupts before writing back the qTD status, or miss signalling occasionally under heavy load. If the host machine is too fast, we can miss transaction completion - when we scan the active list the transaction still seems to be active. This generally exhibits itself as a umass stall that never recovers. We work around this behaviour by setting up this callback after any softintr that completes with transactions still pending, giving us another chance to check for completion after the writeback has taken place Submitted by: Alexander Nedotsuko Modified: stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/ehci.h stable/8/sys/dev/usb/controller/ehci_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Wed Nov 11 01:27:58 2009 (r199165) +++ stable/8/sys/dev/usb/controller/ehci.c Wed Nov 11 01:33:06 2009 (r199166) @@ -113,10 +113,12 @@ extern struct usb_pipe_methods ehci_devi extern struct usb_pipe_methods ehci_device_isoc_fs_methods; extern struct usb_pipe_methods ehci_device_isoc_hs_methods; -static void ehci_do_poll(struct usb_bus *bus); -static void ehci_device_done(struct usb_xfer *xfer, usb_error_t error); -static uint8_t ehci_check_transfer(struct usb_xfer *xfer); -static void ehci_timeout(void *arg); +static void ehci_do_poll(struct usb_bus *); +static void ehci_device_done(struct usb_xfer *, usb_error_t); +static uint8_t ehci_check_transfer(struct usb_xfer *); +static void ehci_timeout(void *); +static void ehci_poll_timeout(void *); + static void ehci_root_intr(ehci_softc_t *sc); struct ehci_std_temp { @@ -243,6 +245,7 @@ ehci_init(ehci_softc_t *sc) DPRINTF("start\n"); usb_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, 0); + usb_callout_init_mtx(&sc->sc_tmo_poll, &sc->sc_bus.bus_mtx, 0); #if USB_DEBUG if (ehcidebug > 2) { @@ -520,6 +523,7 @@ ehci_detach(ehci_softc_t *sc) USB_BUS_LOCK(&sc->sc_bus); usb_callout_stop(&sc->sc_tmo_pcd); + usb_callout_stop(&sc->sc_tmo_poll); EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); USB_BUS_UNLOCK(&sc->sc_bus); @@ -532,6 +536,7 @@ ehci_detach(ehci_softc_t *sc) usb_pause_mtx(NULL, hz / 20); usb_callout_drain(&sc->sc_tmo_pcd); + usb_callout_drain(&sc->sc_tmo_poll); } void @@ -1472,6 +1477,28 @@ repeat: } } +/* + * Some EHCI chips from VIA / ATI seem to trigger interrupts before + * writing back the qTD status, or miss signalling occasionally under + * heavy load. If the host machine is too fast, we can miss + * transaction completion - when we scan the active list the + * transaction still seems to be active. This generally exhibits + * itself as a umass stall that never recovers. + * + * We work around this behaviour by setting up this callback after any + * softintr that completes with transactions still pending, giving us + * another chance to check for completion after the writeback has + * taken place. + */ +static void +ehci_poll_timeout(void *arg) +{ + ehci_softc_t *sc = arg; + + DPRINTFN(3, "\n"); + ehci_interrupt_poll(sc); +} + /*------------------------------------------------------------------------* * ehci_interrupt - EHCI interrupt handler * @@ -1539,6 +1566,11 @@ ehci_interrupt(ehci_softc_t *sc) /* poll all the USB transfers */ ehci_interrupt_poll(sc); + if (sc->sc_flags & EHCI_SCFLG_LOSTINTRBUG) { + usb_callout_reset(&sc->sc_tmo_poll, hz / 128, + (void *)&ehci_poll_timeout, sc); + } + done: USB_BUS_UNLOCK(&sc->sc_bus); } Modified: stable/8/sys/dev/usb/controller/ehci.h ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.h Wed Nov 11 01:27:58 2009 (r199165) +++ stable/8/sys/dev/usb/controller/ehci.h Wed Nov 11 01:33:06 2009 (r199166) @@ -321,6 +321,7 @@ typedef struct ehci_softc { struct ehci_hw_softc sc_hw; struct usb_bus sc_bus; /* base device */ struct usb_callout sc_tmo_pcd; + struct usb_callout sc_tmo_poll; union ehci_hub_desc sc_hub_desc; struct usb_device *sc_devices[EHCI_MAX_DEVICES]; @@ -348,6 +349,7 @@ typedef struct ehci_softc { #define EHCI_SCFLG_BIGEDESC 0x0008 /* big-endian byte order descriptors */ #define EHCI_SCFLG_BIGEMMIO 0x0010 /* big-endian byte order MMIO */ #define EHCI_SCFLG_TT 0x0020 /* transaction translator present */ +#define EHCI_SCFLG_LOSTINTRBUG 0x0040 /* workaround for VIA / ATI chipsets */ uint8_t sc_offs; /* offset to operational registers */ uint8_t sc_doorbell_disable; /* set on doorbell failure */ Modified: stable/8/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci_pci.c Wed Nov 11 01:27:58 2009 (r199165) +++ stable/8/sys/dev/usb/controller/ehci_pci.c Wed Nov 11 01:33:06 2009 (r199166) @@ -441,6 +441,19 @@ ehci_pci_attach(device_t self) break; } + /* Dropped interrupts workaround */ + switch (pci_get_vendor(self)) { + case PCI_EHCI_VENDORID_ATI: + case PCI_EHCI_VENDORID_VIA: + sc->sc_flags |= EHCI_SCFLG_LOSTINTRBUG; + if (bootverbose) + device_printf(self, + "Dropped interrupts workaround enabled\n"); + break; + default: + break; + } + err = ehci_init(sc); if (!err) { err = device_probe_and_attach(sc->sc_bus.bdev); From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 11 02:07:01 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC0D51065693; Wed, 11 Nov 2009 02:07:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA8878FC14; Wed, 11 Nov 2009 02:07:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAB271IO079122; Wed, 11 Nov 2009 02:07:01 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAB2716I079120; Wed, 11 Nov 2009 02:07:01 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200911110207.nAB2716I079120@svn.freebsd.org> From: Andrew Thompson Date: Wed, 11 Nov 2009 02:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199167 - stable/8 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 02:07:01 -0000 Author: thompsa Date: Wed Nov 11 02:07:01 2009 New Revision: 199167 URL: http://svn.freebsd.org/changeset/base/199167 Log: MFC r198859 Belatedly add an UPDATING message for the usb ethernet ifnet naming in r188412. Modified: stable/8/UPDATING (contents, props changed) Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Wed Nov 11 01:33:06 2009 (r199166) +++ stable/8/UPDATING Wed Nov 11 02:07:01 2009 (r199167) @@ -471,6 +471,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. # Map old usb library to new one for usb2 stack libusb-0.1.so.8 libusb20.so.1 +20090209: + All USB ethernet devices now attach as interfaces under the name ueN + (eg. ue0). This is to provide a predictable name as vendors often + change usb chipsets in a product without notice. + 20090203: The ichsmb(4) driver has been changed to require SMBus slave addresses be left-justified (xxxxxxx0b) rather than right-justified. From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 11 14:38:46 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22516106568B; Wed, 11 Nov 2009 14:38:46 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 110D38FC15; Wed, 11 Nov 2009 14:38:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nABEcjhF097558; Wed, 11 Nov 2009 14:38:45 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nABEcjec097556; Wed, 11 Nov 2009 14:38:45 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200911111438.nABEcjec097556@svn.freebsd.org> From: Ken Smith Date: Wed, 11 Nov 2009 14:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199185 - stable/8/sys/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 14:38:46 -0000 Author: kensmith Date: Wed Nov 11 14:38:45 2009 New Revision: 199185 URL: http://svn.freebsd.org/changeset/base/199185 Log: Shift what stable/8 calls itself to the thing that people who tend to complain about such things find, on average, the least objectionable. Modified: stable/8/sys/conf/newvers.sh Modified: stable/8/sys/conf/newvers.sh ============================================================================== --- stable/8/sys/conf/newvers.sh Wed Nov 11 14:21:31 2009 (r199184) +++ stable/8/sys/conf/newvers.sh Wed Nov 11 14:38:45 2009 (r199185) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.0" -BRANCH="RC2" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 11 19:50:52 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 886231065670; Wed, 11 Nov 2009 19:50:52 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76B188FC23; Wed, 11 Nov 2009 19:50:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nABJoqlH005118; Wed, 11 Nov 2009 19:50:52 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nABJoqo0005116; Wed, 11 Nov 2009 19:50:52 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <200911111950.nABJoqo0005116@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 11 Nov 2009 19:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199194 - stable/8/usr.sbin/cdcontrol X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 19:50:52 -0000 Author: jh Date: Wed Nov 11 19:50:52 2009 New Revision: 199194 URL: http://svn.freebsd.org/changeset/base/199194 Log: MFC r197833: When run() returns an error, print the error message also in non-interactive mode. Previously error messages were printed only in interactive mode. PR: bin/124517 Approved by: trasz (mentor) Modified: stable/8/usr.sbin/cdcontrol/cdcontrol.c Directory Properties: stable/8/usr.sbin/cdcontrol/ (props changed) Modified: stable/8/usr.sbin/cdcontrol/cdcontrol.c ============================================================================== --- stable/8/usr.sbin/cdcontrol/cdcontrol.c Wed Nov 11 19:39:45 2009 (r199193) +++ stable/8/usr.sbin/cdcontrol/cdcontrol.c Wed Nov 11 19:50:52 2009 (r199194) @@ -241,7 +241,7 @@ int main (int argc, char **argv) if (argc > 0) { char buf[80], *p; - int len; + int len, rc; for (p=buf; argc-->0; ++argv) { len = strlen (*argv); @@ -257,7 +257,11 @@ int main (int argc, char **argv) } *p = 0; arg = parse (buf, &cmd); - return (run (cmd, arg)); + rc = run (cmd, arg); + if (rc < 0 && verbose) + warn(NULL); + + return (rc); } if (verbose == 1) From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 11 22:31:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AD39106568B; Wed, 11 Nov 2009 22:31:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4818FC18; Wed, 11 Nov 2009 22:31:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nABMV3Vn009299; Wed, 11 Nov 2009 22:31:03 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nABMV3jx009297; Wed, 11 Nov 2009 22:31:03 GMT (envelope-from np@svn.freebsd.org) Message-Id: <200911112231.nABMV3jx009297@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 11 Nov 2009 22:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199202 - stable/8/sys/dev/cxgb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 22:31:03 -0000 Author: np Date: Wed Nov 11 22:31:02 2009 New Revision: 199202 URL: http://svn.freebsd.org/changeset/base/199202 Log: MFC r197043 Modified: stable/8/sys/dev/cxgb/cxgb_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_sge.c Wed Nov 11 21:30:58 2009 (r199201) +++ stable/8/sys/dev/cxgb/cxgb_sge.c Wed Nov 11 22:31:02 2009 (r199202) @@ -1942,7 +1942,6 @@ again: reclaim_completed_tx_imm(q); if (__predict_false(ret)) { if (ret == 1) { TXQ_UNLOCK(qs); - log(LOG_ERR, "no desc available\n"); return (ENOSPC); } goto again; @@ -1955,6 +1954,7 @@ again: reclaim_completed_tx_imm(q); q->gen ^= 1; } TXQ_UNLOCK(qs); + wmb(); t3_write_reg(adap, A_SG_KDOORBELL, F_SELEGRCNTX | V_EGRCNTX(q->cntxt_id)); return (0); @@ -1975,8 +1975,6 @@ restart_ctrlq(void *data, int npending) struct sge_txq *q = &qs->txq[TXQ_CTRL]; adapter_t *adap = qs->port->adapter; - log(LOG_WARNING, "Restart_ctrlq in_use=%d\n", q->in_use); - TXQ_LOCK(qs); again: reclaim_completed_tx_imm(q); @@ -2928,9 +2926,9 @@ handle_rsp_cntrl_info(struct sge_qset *q credits = G_RSPD_TXQ0_CR(flags); if (credits) qs->txq[TXQ_ETH].processed += credits; - + credits = G_RSPD_TXQ2_CR(flags); - if (credits) + if (credits) qs->txq[TXQ_CTRL].processed += credits; # if USE_GTS @@ -3133,12 +3131,9 @@ process_responses(adapter_t *adap, struc check_ring_db(adap, qs, sleeping); mb(); /* commit Tx queue processed updates */ - if (__predict_false(qs->txq_stopped > 1)) { - printf("restarting tx on %p\n", qs); - + if (__predict_false(qs->txq_stopped > 1)) restart_tx(qs); - } - + __refill_fl_lt(adap, &qs->fl[0], 512); __refill_fl_lt(adap, &qs->fl[1], 512); budget -= budget_left; From owner-svn-src-stable-8@FreeBSD.ORG Wed Nov 11 23:07:22 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D109C106566C for ; Wed, 11 Nov 2009 23:07:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 421598FC0A for ; Wed, 11 Nov 2009 23:07:21 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id nABMYbbe099412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Nov 2009 00:34:37 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id nABMYbUK074134; Thu, 12 Nov 2009 00:34:37 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id nABMYbKk074133; Thu, 12 Nov 2009 00:34:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 12 Nov 2009 00:34:37 +0200 From: Kostik Belousov To: Navdeep Parhar Message-ID: <20091111223437.GG2331@deviant.kiev.zoral.com.ua> References: <200911112231.nABMV3jx009297@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="e9fJn+fjquYGkO6l" Content-Disposition: inline In-Reply-To: <200911112231.nABMV3jx009297@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199202 - stable/8/sys/dev/cxgb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 23:07:22 -0000 --e9fJn+fjquYGkO6l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 11, 2009 at 10:31:03PM +0000, Navdeep Parhar wrote: > Author: np > Date: Wed Nov 11 22:31:02 2009 > New Revision: 199202 > URL: http://svn.freebsd.org/changeset/base/199202 >=20 > Log: > MFC r197043 Please include a summary of the merged change in addition to the reference to the original revision number. --e9fJn+fjquYGkO6l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkr7O/wACgkQC3+MBN1Mb4jbrgCfVa3ii6lPmkiyZHY5qva4zyOk LTQAnjWA/YUYyiSH8QZfVUFSP01YOxnm =Lwep -----END PGP SIGNATURE----- --e9fJn+fjquYGkO6l-- From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 12 00:20:31 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1B0B106566C; Thu, 12 Nov 2009 00:20:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E37F8FC1C; Thu, 12 Nov 2009 00:20:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAC0KVpI012065; Thu, 12 Nov 2009 00:20:31 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAC0KVQe012061; Thu, 12 Nov 2009 00:20:31 GMT (envelope-from np@svn.freebsd.org) Message-Id: <200911120020.nAC0KVQe012061@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 12 Nov 2009 00:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199206 - in stable/8/sys: conf dev/cxgb dev/cxgb/common modules/cxgb/cxgb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 00:20:31 -0000 Author: np Date: Thu Nov 12 00:20:31 2009 New Revision: 199206 URL: http://svn.freebsd.org/changeset/base/199206 Log: MFC r197791 cxgb(4) updates, including: - support for the new Gen-2, BT, and LP-CR cards. - T3 firmware 7.7.0 - shared "common code" updates. Added: stable/8/sys/dev/cxgb/common/cxgb_aq100x.c - copied unchanged from r197791, head/sys/dev/cxgb/common/cxgb_aq100x.c Modified: stable/8/sys/conf/files stable/8/sys/dev/cxgb/common/cxgb_ael1002.c stable/8/sys/dev/cxgb/common/cxgb_common.h stable/8/sys/dev/cxgb/common/cxgb_mv88e1xxx.c stable/8/sys/dev/cxgb/common/cxgb_regs.h stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c stable/8/sys/dev/cxgb/common/cxgb_tn1010.c stable/8/sys/dev/cxgb/common/cxgb_vsc8211.c stable/8/sys/dev/cxgb/common/cxgb_xgmac.c stable/8/sys/dev/cxgb/cxgb_adapter.h stable/8/sys/dev/cxgb/cxgb_main.c stable/8/sys/dev/cxgb/cxgb_osdep.h stable/8/sys/dev/cxgb/cxgb_t3fw.h stable/8/sys/modules/cxgb/cxgb/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Wed Nov 11 23:13:24 2009 (r199205) +++ stable/8/sys/conf/files Thu Nov 12 00:20:31 2009 (r199206) @@ -772,6 +772,8 @@ dev/cxgb/common/cxgb_vsc8211.c optional compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_ael1002.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" +dev/cxgb/common/cxgb_aq100x.c optional cxgb pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mv88e1xxx.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_xgmac.c optional cxgb pci \ Modified: stable/8/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_ael1002.c Wed Nov 11 23:13:24 2009 (r199205) +++ stable/8/sys/dev/cxgb/common/cxgb_ael1002.c Thu Nov 12 00:20:31 2009 (r199206) @@ -45,16 +45,30 @@ enum { enum { AEL100X_TX_DISABLE = 9, AEL100X_TX_CONFIG1 = 0xc002, + AEL1002_PWR_DOWN_HI = 0xc011, AEL1002_PWR_DOWN_LO = 0xc012, AEL1002_XFI_EQL = 0xc015, AEL1002_LB_EN = 0xc017, + AEL_OPT_SETTINGS = 0xc017, AEL_I2C_CTRL = 0xc30a, AEL_I2C_DATA = 0xc30b, AEL_I2C_STAT = 0xc30c, + AEL2005_GPIO_CTRL = 0xc214, AEL2005_GPIO_STAT = 0xc215, + + AEL2020_GPIO_INTR = 0xc103, + AEL2020_GPIO_CTRL = 0xc108, + AEL2020_GPIO_STAT = 0xc10c, + AEL2020_GPIO_CFG = 0xc110, + + AEL2020_GPIO_SDA = 0, + AEL2020_GPIO_MODDET = 1, + AEL2020_GPIO_0 = 3, + AEL2020_GPIO_1 = 2, + AEL2020_GPIO_LSTAT = AEL2020_GPIO_1, }; enum { edc_none, edc_sr, edc_twinax }; @@ -81,7 +95,7 @@ struct reg_val { unsigned short set_bits; }; -static int get_module_type(struct cphy *phy); +static int ael2xxx_get_module_type(struct cphy *phy, int delay_ms); static int set_phy_regs(struct cphy *phy, const struct reg_val *rv) { @@ -108,6 +122,9 @@ static void ael100x_txon(struct cphy *ph msleep(30); } +/* + * Read an 8-bit word from a device attached to the PHY's i2c bus. + */ static int ael_i2c_rd(struct cphy *phy, int dev_addr, int word_addr) { int i, err; @@ -131,11 +148,14 @@ static int ael_i2c_rd(struct cphy *phy, return data >> 8; } } - CH_WARN(phy->adapter, "PHY %u I2C read of addr %u timed out\n", - phy->addr, word_addr); + CH_WARN(phy->adapter, "PHY %u i2c read of dev.addr %x.%x timed out\n", + phy->addr, dev_addr, word_addr); return -ETIMEDOUT; } +/* + * Write an 8-bit word to a device attached to the PHY's i2c bus. + */ static int ael_i2c_wr(struct cphy *phy, int dev_addr, int word_addr, int data) { int i, err; @@ -158,8 +178,8 @@ static int ael_i2c_wr(struct cphy *phy, if ((stat & 3) == 1) return 0; } - CH_WARN(phy->adapter, "PHY %u I2C Write of addr %u timed out\n", - phy->addr, word_addr); + CH_WARN(phy->adapter, "PHY %u i2c Write of dev.addr %x.%x = %#x timed out\n", + phy->addr, dev_addr, word_addr, data); return -ETIMEDOUT; } @@ -230,9 +250,9 @@ static int ael1002_get_module_type(struc if (delay_ms) msleep(delay_ms); - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0); + v = ael2xxx_get_module_type(phy, delay_ms); - return v == -ETIMEDOUT ? phy_modtype_none : get_module_type(phy); + return (v == -ETIMEDOUT ? phy_modtype_none : v); } static int ael1002_reset(struct cphy *phy, int wait) @@ -312,12 +332,13 @@ static struct cphy_ops ael1002_ops = { }; #endif -int t3_ael1002_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, +int t3_ael1002_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) { int err; + struct cphy *phy = &pinfo->phy; - cphy_init(phy, adapter, phy_addr, &ael1002_ops, mdio_ops, + cphy_init(phy, pinfo->adapter, pinfo, phy_addr, &ael1002_ops, mdio_ops, SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE, "10GBASE-R"); ael100x_txon(phy); @@ -366,12 +387,6 @@ static int ael1006_reset(struct cphy *ph } -static int ael1006_power_down(struct cphy *phy, int enable) -{ - return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, - BMCR_PDOWN, enable ? BMCR_PDOWN : 0); -} - #ifdef C99_NOT_SUPPORTED static struct cphy_ops ael1006_ops = { ael1006_reset, @@ -385,7 +400,7 @@ static struct cphy_ops ael1006_ops = { NULL, NULL, get_link_status_r, - ael1006_power_down, + ael1002_power_down, }; #else static struct cphy_ops ael1006_ops = { @@ -395,20 +410,97 @@ static struct cphy_ops ael1006_ops = { .intr_clear = t3_phy_lasi_intr_clear, .intr_handler = t3_phy_lasi_intr_handler, .get_link_status = get_link_status_r, - .power_down = ael1006_power_down, + .power_down = ael1002_power_down, }; #endif -int t3_ael1006_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, +int t3_ael1006_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) { - cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops, + struct cphy *phy = &pinfo->phy; + + cphy_init(phy, pinfo->adapter, pinfo, phy_addr, &ael1006_ops, mdio_ops, SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE, "10GBASE-SR"); + phy->modtype = phy_modtype_sr; ael100x_txon(phy); return 0; } +/* + * Decode our module type. + */ +static int ael2xxx_get_module_type(struct cphy *phy, int delay_ms) +{ + int v; + + if (delay_ms) + msleep(delay_ms); + + v = get_phytrans_type(phy); + if (v == phy_transtype_sfp) { + /* SFP: see SFF-8472 for below */ + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 3); + if (v < 0) + return v; + + if (v == 0x1) + return phy_modtype_twinax; + if (v == 0x10) + return phy_modtype_sr; + if (v == 0x20) + return phy_modtype_lr; + if (v == 0x40) + return phy_modtype_lrm; + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 6); + if (v < 0) + return v; + if (v != 4) + return phy_modtype_unknown; + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 10); + if (v < 0) + return v; + + if (v & 0x80) { + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0x12); + if (v < 0) + return v; + return v > 10 ? phy_modtype_twinax_long : + phy_modtype_twinax; + } + } else if (v == phy_transtype_xfp) { + /* XFP: See INF-8077i for details. */ + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 127); + if (v < 0) + return v; + + if (v != 1) { + /* XXX: set page select to table 1 yourself */ + return phy_modtype_unknown; + } + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 131); + if (v < 0) + return v; + v &= 0xf0; + if (v == 0x10) + return phy_modtype_lrm; + if (v == 0x40) + return phy_modtype_lr; + if (v == 0x80) + return phy_modtype_sr; + } + + return phy_modtype_unknown; +} + +/* + * Code to support the Aeluros/NetLogic 2005 10Gb PHY. + */ static int ael2005_setup_sr_edc(struct cphy *phy) { static struct reg_val regs[] = { @@ -1103,72 +1195,21 @@ static int ael2005_setup_twinax_edc(stru return err; } -static int get_module_type(struct cphy *phy) +static int ael2005_get_module_type(struct cphy *phy, int delay_ms) { int v; + unsigned int stat; - v = get_phytrans_type(phy); - if (v == phy_transtype_sfp) { - /* SFP: see SFF-8472 for below */ - - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 3); - if (v < 0) - return v; - - if (v == 0x1) - return phy_modtype_twinax; - if (v == 0x10) - return phy_modtype_sr; - if (v == 0x20) - return phy_modtype_lr; - if (v == 0x40) - return phy_modtype_lrm; - - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 6); - if (v < 0) - return v; - if (v != 4) - return phy_modtype_unknown; - - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 10); - if (v < 0) - return v; - - if (v & 0x80) { - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0x12); - if (v < 0) - return v; - return v > 10 ? phy_modtype_twinax_long : - phy_modtype_twinax; - } - } else if (v == phy_transtype_xfp) { - /* XFP: See INF-8077i for details. */ - - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 127); - if (v < 0) - return v; - - if (v != 1) { - /* XXX: set page select to table 1 yourself */ - return phy_modtype_unknown; - } + v = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, &stat); + if (v) + return v; - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 131); - if (v < 0) - return v; - v &= 0xf0; - if (v == 0x10) - return phy_modtype_lrm; - if (v == 0x40) - return phy_modtype_lr; - if (v == 0x80) - return phy_modtype_sr; - } + if (stat & (1 << 8)) /* module absent */ + return phy_modtype_none; - return phy_modtype_unknown; + return ael2xxx_get_module_type(phy, delay_ms); } - static int ael2005_intr_enable(struct cphy *phy) { int err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, 0x200); @@ -1187,24 +1228,6 @@ static int ael2005_intr_clear(struct cph return err ? err : t3_phy_lasi_intr_clear(phy); } -static int ael2005_get_module_type(struct cphy *phy, int delay_ms) -{ - int v; - unsigned int stat; - - v = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, &stat); - if (v) - return v; - - if (stat & (1 << 8)) /* module absent */ - return phy_modtype_none; - - if (delay_ms) - msleep(delay_ms); - - return get_module_type(phy); -} - static int ael2005_reset(struct cphy *phy, int wait) { static struct reg_val regs0[] = { @@ -1223,7 +1246,8 @@ static int ael2005_reset(struct cphy *ph { 0, 0, 0, 0 } }; - int err, lasi_ctrl; + int err; + unsigned int lasi_ctrl; err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, &lasi_ctrl); if (err) @@ -1311,8 +1335,8 @@ static int ael2005_intr_handler(struct c return ret; } -#ifdef C99_NOT_SUPPORTED static struct cphy_ops ael2005_ops = { +#ifdef C99_NOT_SUPPORTED ael2005_reset, ael2005_intr_enable, ael2005_intr_disable, @@ -1325,9 +1349,7 @@ static struct cphy_ops ael2005_ops = { NULL, get_link_status_r, ael1002_power_down, -}; #else -static struct cphy_ops ael2005_ops = { .reset = ael2005_reset, .intr_enable = ael2005_intr_enable, .intr_disable = ael2005_intr_disable, @@ -1335,14 +1357,16 @@ static struct cphy_ops ael2005_ops = { .intr_handler = ael2005_intr_handler, .get_link_status = get_link_status_r, .power_down = ael1002_power_down, -}; #endif +}; -int t3_ael2005_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, +int t3_ael2005_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) { int err; - cphy_init(phy, adapter, phy_addr, &ael2005_ops, mdio_ops, + struct cphy *phy = &pinfo->phy; + + cphy_init(phy, pinfo->adapter, pinfo, phy_addr, &ael2005_ops, mdio_ops, SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE | SUPPORTED_IRQ, "10GBASE-R"); msleep(125); @@ -1357,6 +1381,713 @@ int t3_ael2005_phy_prep(struct cphy *phy } /* + * Setup EDC and other parameters for operation with an optical module. + */ +static int ael2020_setup_sr_edc(struct cphy *phy) +{ + static struct reg_val regs[] = { + { MDIO_DEV_PMA_PMD, 0xcc01, 0xffff, 0x488a }, + + { MDIO_DEV_PMA_PMD, 0xcb1b, 0xffff, 0x0200 }, + { MDIO_DEV_PMA_PMD, 0xcb1c, 0xffff, 0x00f0 }, + { MDIO_DEV_PMA_PMD, 0xcc06, 0xffff, 0x00e0 }, + + /* end */ + { 0, 0, 0, 0 } + }; + int err; + + err = set_phy_regs(phy, regs); + msleep(50); + if (err) + return err; + + phy->priv = edc_sr; + return 0; +} + +/* + * Setup EDC and other parameters for operation with an TWINAX module. + */ +static int ael2020_setup_twinax_edc(struct cphy *phy, int modtype) +{ + static struct reg_val uCclock40MHz[] = { + { MDIO_DEV_PMA_PMD, 0xff28, 0xffff, 0x4001 }, + { MDIO_DEV_PMA_PMD, 0xff2a, 0xffff, 0x0002 }, + { 0, 0, 0, 0 } + }; + + static struct reg_val uCclockActivate[] = { + { MDIO_DEV_PMA_PMD, 0xd000, 0xffff, 0x5200 }, + { 0, 0, 0, 0 } + }; + + static struct reg_val uCactivate[] = { + { MDIO_DEV_PMA_PMD, 0xd080, 0xffff, 0x0100 }, + { MDIO_DEV_PMA_PMD, 0xd092, 0xffff, 0x0000 }, + { 0, 0, 0, 0 } + }; + + static u16 twinax_edc[] = { + 0xd800, 0x4009, + 0xd801, 0x2fff, + 0xd802, 0x300f, + 0xd803, 0x40aa, + 0xd804, 0x401c, + 0xd805, 0x401e, + 0xd806, 0x2ff4, + 0xd807, 0x3dc4, + 0xd808, 0x2035, + 0xd809, 0x3035, + 0xd80a, 0x6524, + 0xd80b, 0x2cb2, + 0xd80c, 0x3012, + 0xd80d, 0x1002, + 0xd80e, 0x26e2, + 0xd80f, 0x3022, + 0xd810, 0x1002, + 0xd811, 0x27d2, + 0xd812, 0x3022, + 0xd813, 0x1002, + 0xd814, 0x2822, + 0xd815, 0x3012, + 0xd816, 0x1002, + 0xd817, 0x2492, + 0xd818, 0x3022, + 0xd819, 0x1002, + 0xd81a, 0x2772, + 0xd81b, 0x3012, + 0xd81c, 0x1002, + 0xd81d, 0x23d2, + 0xd81e, 0x3022, + 0xd81f, 0x1002, + 0xd820, 0x22cd, + 0xd821, 0x301d, + 0xd822, 0x27f2, + 0xd823, 0x3022, + 0xd824, 0x1002, + 0xd825, 0x5553, + 0xd826, 0x0307, + 0xd827, 0x2522, + 0xd828, 0x3022, + 0xd829, 0x1002, + 0xd82a, 0x2142, + 0xd82b, 0x3012, + 0xd82c, 0x1002, + 0xd82d, 0x4016, + 0xd82e, 0x5e63, + 0xd82f, 0x0344, + 0xd830, 0x2142, + 0xd831, 0x3012, + 0xd832, 0x1002, + 0xd833, 0x400e, + 0xd834, 0x2522, + 0xd835, 0x3022, + 0xd836, 0x1002, + 0xd837, 0x2b52, + 0xd838, 0x3012, + 0xd839, 0x1002, + 0xd83a, 0x2742, + 0xd83b, 0x3022, + 0xd83c, 0x1002, + 0xd83d, 0x25e2, + 0xd83e, 0x3022, + 0xd83f, 0x1002, + 0xd840, 0x2fa4, + 0xd841, 0x3dc4, + 0xd842, 0x6624, + 0xd843, 0x414b, + 0xd844, 0x56b3, + 0xd845, 0x03c6, + 0xd846, 0x866b, + 0xd847, 0x400c, + 0xd848, 0x2712, + 0xd849, 0x3012, + 0xd84a, 0x1002, + 0xd84b, 0x2c4b, + 0xd84c, 0x309b, + 0xd84d, 0x56b3, + 0xd84e, 0x03c3, + 0xd84f, 0x866b, + 0xd850, 0x400c, + 0xd851, 0x2272, + 0xd852, 0x3022, + 0xd853, 0x1002, + 0xd854, 0x2742, + 0xd855, 0x3022, + 0xd856, 0x1002, + 0xd857, 0x25e2, + 0xd858, 0x3022, + 0xd859, 0x1002, + 0xd85a, 0x2fb4, + 0xd85b, 0x3dc4, + 0xd85c, 0x6624, + 0xd85d, 0x56b3, + 0xd85e, 0x03c3, + 0xd85f, 0x866b, + 0xd860, 0x401c, + 0xd861, 0x2c45, + 0xd862, 0x3095, + 0xd863, 0x5b53, + 0xd864, 0x2372, + 0xd865, 0x3012, + 0xd866, 0x13c2, + 0xd867, 0x5cc3, + 0xd868, 0x2712, + 0xd869, 0x3012, + 0xd86a, 0x1312, + 0xd86b, 0x2b52, + 0xd86c, 0x3012, + 0xd86d, 0x1002, + 0xd86e, 0x2742, + 0xd86f, 0x3022, + 0xd870, 0x1002, + 0xd871, 0x2582, + 0xd872, 0x3022, + 0xd873, 0x1002, + 0xd874, 0x2142, + 0xd875, 0x3012, + 0xd876, 0x1002, + 0xd877, 0x628f, + 0xd878, 0x2985, + 0xd879, 0x33a5, + 0xd87a, 0x25e2, + 0xd87b, 0x3022, + 0xd87c, 0x1002, + 0xd87d, 0x5653, + 0xd87e, 0x03d2, + 0xd87f, 0x401e, + 0xd880, 0x6f72, + 0xd881, 0x1002, + 0xd882, 0x628f, + 0xd883, 0x2304, + 0xd884, 0x3c84, + 0xd885, 0x6436, + 0xd886, 0xdff4, + 0xd887, 0x6436, + 0xd888, 0x2ff5, + 0xd889, 0x3005, + 0xd88a, 0x8656, + 0xd88b, 0xdfba, + 0xd88c, 0x56a3, + 0xd88d, 0xd05a, + 0xd88e, 0x2972, + 0xd88f, 0x3012, + 0xd890, 0x1392, + 0xd891, 0xd05a, + 0xd892, 0x56a3, + 0xd893, 0xdfba, + 0xd894, 0x0383, + 0xd895, 0x6f72, + 0xd896, 0x1002, + 0xd897, 0x2b45, + 0xd898, 0x3005, + 0xd899, 0x4178, + 0xd89a, 0x5653, + 0xd89b, 0x0384, + 0xd89c, 0x2a62, + 0xd89d, 0x3012, + 0xd89e, 0x1002, + 0xd89f, 0x2f05, + 0xd8a0, 0x3005, + 0xd8a1, 0x41c8, + 0xd8a2, 0x5653, + 0xd8a3, 0x0382, + 0xd8a4, 0x0002, + 0xd8a5, 0x4218, + 0xd8a6, 0x2474, + 0xd8a7, 0x3c84, + 0xd8a8, 0x6437, + 0xd8a9, 0xdff4, + 0xd8aa, 0x6437, + 0xd8ab, 0x2ff5, + 0xd8ac, 0x3c05, + 0xd8ad, 0x8757, + 0xd8ae, 0xb888, + 0xd8af, 0x9787, + 0xd8b0, 0xdff4, + 0xd8b1, 0x6724, + 0xd8b2, 0x866a, + 0xd8b3, 0x6f72, + 0xd8b4, 0x1002, + 0xd8b5, 0x2641, + 0xd8b6, 0x3021, + 0xd8b7, 0x1001, + 0xd8b8, 0xc620, + 0xd8b9, 0x0000, + 0xd8ba, 0xc621, + 0xd8bb, 0x0000, + 0xd8bc, 0xc622, + 0xd8bd, 0x00ce, + 0xd8be, 0xc623, + 0xd8bf, 0x007f, + 0xd8c0, 0xc624, + 0xd8c1, 0x0032, + 0xd8c2, 0xc625, + 0xd8c3, 0x0000, + 0xd8c4, 0xc627, + 0xd8c5, 0x0000, + 0xd8c6, 0xc628, + 0xd8c7, 0x0000, + 0xd8c8, 0xc62c, + 0xd8c9, 0x0000, + 0xd8ca, 0x0000, + 0xd8cb, 0x2641, + 0xd8cc, 0x3021, + 0xd8cd, 0x1001, + 0xd8ce, 0xc502, + 0xd8cf, 0x53ac, + 0xd8d0, 0xc503, + 0xd8d1, 0x2cd3, + 0xd8d2, 0xc600, + 0xd8d3, 0x2a6e, + 0xd8d4, 0xc601, + 0xd8d5, 0x2a2c, + 0xd8d6, 0xc605, + 0xd8d7, 0x5557, + 0xd8d8, 0xc60c, + 0xd8d9, 0x5400, + 0xd8da, 0xc710, + 0xd8db, 0x0700, + 0xd8dc, 0xc711, + 0xd8dd, 0x0f06, + 0xd8de, 0xc718, + 0xd8df, 0x0700, + 0xd8e0, 0xc719, + 0xd8e1, 0x0f06, + 0xd8e2, 0xc720, + 0xd8e3, 0x4700, + 0xd8e4, 0xc721, + 0xd8e5, 0x0f06, + 0xd8e6, 0xc728, + 0xd8e7, 0x0700, + 0xd8e8, 0xc729, + 0xd8e9, 0x1207, + 0xd8ea, 0xc801, + 0xd8eb, 0x7f50, + 0xd8ec, 0xc802, + 0xd8ed, 0x7760, + 0xd8ee, 0xc803, + 0xd8ef, 0x7fce, + 0xd8f0, 0xc804, + 0xd8f1, 0x520e, + 0xd8f2, 0xc805, + 0xd8f3, 0x5c11, + 0xd8f4, 0xc806, + 0xd8f5, 0x3c51, + 0xd8f6, 0xc807, + 0xd8f7, 0x4061, + 0xd8f8, 0xc808, + 0xd8f9, 0x49c1, + 0xd8fa, 0xc809, + 0xd8fb, 0x3840, + 0xd8fc, 0xc80a, + 0xd8fd, 0x0000, + 0xd8fe, 0xc821, + 0xd8ff, 0x0002, + 0xd900, 0xc822, + 0xd901, 0x0046, + 0xd902, 0xc844, + 0xd903, 0x182f, + 0xd904, 0xc013, + 0xd905, 0xf341, + 0xd906, 0xc084, + 0xd907, 0x0030, + 0xd908, 0xc904, + 0xd909, 0x1401, + 0xd90a, 0xcb0c, + 0xd90b, 0x0004, + 0xd90c, 0xcb0e, + 0xd90d, 0xa00a, + 0xd90e, 0xcb0f, + 0xd90f, 0xc0c0, + 0xd910, 0xcb10, + 0xd911, 0xc0c0, + 0xd912, 0xcb11, + 0xd913, 0x00a0, + 0xd914, 0xcb12, + 0xd915, 0x0007, + 0xd916, 0xc241, + 0xd917, 0xa000, + 0xd918, 0xc243, + 0xd919, 0x7fe0, + 0xd91a, 0xc604, + 0xd91b, 0x000e, + 0xd91c, 0xc609, + 0xd91d, 0x00f5, + 0xd91e, 0xc611, + 0xd91f, 0x000e, + 0xd920, 0xc660, + 0xd921, 0x9600, + 0xd922, 0xc687, + 0xd923, 0x0004, + 0xd924, 0xc60a, + 0xd925, 0x04f5, + 0xd926, 0x0000, + 0xd927, 0x2641, + 0xd928, 0x3021, + 0xd929, 0x1001, + 0xd92a, 0xc620, + 0xd92b, 0x14e5, + 0xd92c, 0xc621, + 0xd92d, 0xc53d, + 0xd92e, 0xc622, + 0xd92f, 0x3cbe, + 0xd930, 0xc623, + 0xd931, 0x4452, + 0xd932, 0xc624, + 0xd933, 0xc5c5, + 0xd934, 0xc625, + 0xd935, 0xe01e, + 0xd936, 0xc627, + 0xd937, 0x0000, + 0xd938, 0xc628, + 0xd939, 0x0000, + 0xd93a, 0xc62c, + 0xd93b, 0x0000, + 0xd93c, 0x0000, + 0xd93d, 0x2b84, + 0xd93e, 0x3c74, + 0xd93f, 0x6435, + 0xd940, 0xdff4, + 0xd941, 0x6435, + 0xd942, 0x2806, + 0xd943, 0x3006, + 0xd944, 0x8565, + 0xd945, 0x2b24, + 0xd946, 0x3c24, + 0xd947, 0x6436, + 0xd948, 0x1002, + 0xd949, 0x2b24, + 0xd94a, 0x3c24, + 0xd94b, 0x6436, + 0xd94c, 0x4045, + 0xd94d, 0x8656, + 0xd94e, 0x5663, + 0xd94f, 0x0302, + 0xd950, 0x401e, + 0xd951, 0x1002, + 0xd952, 0x2807, + 0xd953, 0x31a7, + 0xd954, 0x20c4, + 0xd955, 0x3c24, + 0xd956, 0x6724, + 0xd957, 0x1002, + 0xd958, 0x2807, + 0xd959, 0x3187, + 0xd95a, 0x20c4, + 0xd95b, 0x3c24, + 0xd95c, 0x6724, + 0xd95d, 0x1002, + 0xd95e, 0x24f4, + 0xd95f, 0x3c64, + 0xd960, 0x6436, + 0xd961, 0xdff4, + 0xd962, 0x6436, + 0xd963, 0x1002, + 0xd964, 0x2006, + 0xd965, 0x3d76, + 0xd966, 0xc161, + 0xd967, 0x6134, + 0xd968, 0x6135, + 0xd969, 0x5443, + 0xd96a, 0x0303, + 0xd96b, 0x6524, + 0xd96c, 0x00fb, + 0xd96d, 0x1002, + 0xd96e, 0x20d4, + 0xd96f, 0x3c24, + 0xd970, 0x2025, + 0xd971, 0x3005, + 0xd972, 0x6524, + 0xd973, 0x1002, + 0xd974, 0xd019, + 0xd975, 0x2104, + 0xd976, 0x3c24, + 0xd977, 0x2105, + 0xd978, 0x3805, + 0xd979, 0x6524, + 0xd97a, 0xdff4, + 0xd97b, 0x4005, + 0xd97c, 0x6524, + 0xd97d, 0x2e8d, + 0xd97e, 0x303d, + 0xd97f, 0x2408, + 0xd980, 0x35d8, + 0xd981, 0x5dd3, + 0xd982, 0x0307, + 0xd983, 0x8887, + 0xd984, 0x63a7, + 0xd985, 0x8887, + 0xd986, 0x63a7, + 0xd987, 0xdffd, + 0xd988, 0x00f9, + 0xd989, 0x1002, + 0xd98a, 0x0000, + }; + int i, err; + + /* set uC clock and activate it */ + err = set_phy_regs(phy, uCclock40MHz); + msleep(500); + if (err) + return err; + err = set_phy_regs(phy, uCclockActivate); + msleep(500); + if (err) + return err; + + for (i = 0; i < ARRAY_SIZE(twinax_edc) && !err; i += 2) + err = mdio_write(phy, MDIO_DEV_PMA_PMD, twinax_edc[i], + twinax_edc[i + 1]); + /* activate uC */ + err = set_phy_regs(phy, uCactivate); + if (!err) + phy->priv = edc_twinax; + return err; +} + +/* + * Return Module Type. + */ +static int ael2020_get_module_type(struct cphy *phy, int delay_ms) +{ + int v; + unsigned int stat; + + v = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2020_GPIO_STAT, &stat); + if (v) + return v; + + if (stat & (0x1 << (AEL2020_GPIO_MODDET*4))) { + /* module absent */ + return phy_modtype_none; + } + + return ael2xxx_get_module_type(phy, delay_ms); +} + +/* + * Enable PHY interrupts. We enable "Module Detection" interrupts (on any + * state transition) and then generic Link Alarm Status Interrupt (LASI). + */ +static int ael2020_intr_enable(struct cphy *phy) +{ + struct reg_val regs[] = { + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CFG+AEL2020_GPIO_LSTAT, + 0xffff, 0x4 }, + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CTRL, + 0xffff, 0x8 << (AEL2020_GPIO_LSTAT*4) }, + + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CTRL, + 0xffff, 0x2 << (AEL2020_GPIO_MODDET*4) }, + + /* end */ + { 0, 0, 0, 0 } + }; + int err; + + err = set_phy_regs(phy, regs); + if (err) + return err; + + phy->caps |= POLL_LINK_1ST_TIME; + + /* enable standard Link Alarm Status Interrupts */ + err = t3_phy_lasi_intr_enable(phy); + if (err) + return err; + + return 0; +} + +/* + * Disable PHY interrupts. The mirror of the above ... + */ +static int ael2020_intr_disable(struct cphy *phy) +{ + struct reg_val regs[] = { + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CTRL, + 0xffff, 0xb << (AEL2020_GPIO_LSTAT*4) }, + + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CTRL, + 0xffff, 0x1 << (AEL2020_GPIO_MODDET*4) }, + + /* end */ + { 0, 0, 0, 0 } + }; + int err; + + err = set_phy_regs(phy, regs); + if (err) + return err; + + /* disable standard Link Alarm Status Interrupts */ + return t3_phy_lasi_intr_disable(phy); +} + +/* + * Clear PHY interrupt state. + */ +static int ael2020_intr_clear(struct cphy *phy) +{ + unsigned int stat; + int err = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2020_GPIO_INTR, &stat); + return err ? err : t3_phy_lasi_intr_clear(phy); +} + +/* + * Common register settings for the AEL2020 when it comes out of reset. + */ +static struct reg_val ael2020_reset_regs[] = { + { MDIO_DEV_PMA_PMD, 0xc003, 0xffff, 0x3101 }, + + { MDIO_DEV_PMA_PMD, 0xcd40, 0xffff, 0x0001 }, + + { MDIO_DEV_PMA_PMD, 0xff02, 0xffff, 0x0023 }, + { MDIO_DEV_PMA_PMD, 0xff03, 0xffff, 0x0000 }, + { MDIO_DEV_PMA_PMD, 0xff04, 0xffff, 0x0000 }, + + /* end */ + { 0, 0, 0, 0 } +}; + +/* + * Reset the PHY and put it into a canonical operating state. + */ +static int ael2020_reset(struct cphy *phy, int wait) +{ + int err; + unsigned int lasi_ctrl; + + /* grab current interrupt state */ + err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, &lasi_ctrl); + if (err) + return err; + + err = t3_phy_reset(phy, MDIO_DEV_PMA_PMD, 125); + if (err) + return err; + msleep(100); + + /* basic initialization for all module types */ + phy->priv = edc_none; + err = set_phy_regs(phy, ael2020_reset_regs); + if (err) + return err; + + /* determine module type and perform appropriate initialization */ + err = ael2020_get_module_type(phy, 0); + if (err < 0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 12 03:17:45 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 062E91065670; Thu, 12 Nov 2009 03:17:45 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from tomjudge.vm.bytemark.co.uk (tomjudge.vm.bytemark.co.uk [80.68.91.100]) by mx1.freebsd.org (Postfix) with ESMTP id B7D438FC14; Thu, 12 Nov 2009 03:17:44 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 0D82848AC9; Thu, 12 Nov 2009 03:01:47 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at tomjudge.vm.bytemark.co.uk Received: from tomjudge.vm.bytemark.co.uk ([127.0.0.1]) by localhost (tomjudge.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ytr3MC4Tr7BN; Thu, 12 Nov 2009 03:01:44 +0000 (GMT) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 14B9148AAA; Thu, 12 Nov 2009 03:01:42 +0000 (GMT) Message-ID: <4AFB7A54.70302@tomjudge.com> Date: Thu, 12 Nov 2009 03:00:36 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Navdeep Parhar References: <200911112231.nABMV3jx009297@svn.freebsd.org> In-Reply-To: <200911112231.nABMV3jx009297@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199202 - stable/8/sys/dev/cxgb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 03:17:45 -0000 Navdeep Parhar wrote: > Author: np > Date: Wed Nov 11 22:31:02 2009 > New Revision: 199202 > URL: http://svn.freebsd.org/changeset/base/199202 > > Log: > MFC r197043 > > Modified: > stable/8/sys/dev/cxgb/cxgb_sge.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/xen/xenpci/ (props changed) Hi Navdeep, What are the details of this change? I seem to remember that someone requested that original commit messages where copied to all MFC's during the release processes. Do I remember correctly? Tom From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 12 03:26:29 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1205) id A327D1065676; Thu, 12 Nov 2009 03:26:29 +0000 (UTC) Date: Thu, 12 Nov 2009 03:26:29 +0000 From: Navdeep Parhar To: Tom Judge Message-ID: <20091112032629.GA18607@hub.freebsd.org> Mail-Followup-To: Tom Judge , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org References: <200911112231.nABMV3jx009297@svn.freebsd.org> <4AFB7A54.70302@tomjudge.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AFB7A54.70302@tomjudge.com> User-Agent: Mutt/1.4.2.1i Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r199202 - stable/8/sys/dev/cxgb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 03:26:29 -0000 On Thu, Nov 12, 2009 at 03:00:36AM +0000, Tom Judge wrote: > Navdeep Parhar wrote: > >Author: np > >Date: Wed Nov 11 22:31:02 2009 > >New Revision: 199202 > >URL: http://svn.freebsd.org/changeset/base/199202 > > > >Log: > > MFC r197043 > > > >Modified: > > stable/8/sys/dev/cxgb/cxgb_sge.c > >Directory Properties: > > stable/8/sys/ (props changed) > > stable/8/sys/amd64/include/xen/ (props changed) > > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > > stable/8/sys/contrib/dev/acpica/ (props changed) > > stable/8/sys/contrib/pf/ (props changed) > > stable/8/sys/dev/xen/xenpci/ (props changed) > > Hi Navdeep, > > What are the details of this change? > >From r197043's commit message: There is no need to log anything for a ctrlq stall or restart. These are normal events. > I seem to remember that someone requested that original commit messages > where copied to all MFC's during the release processes. Do I remember > correctly? I'm not certain but you're probably correct. I checked the logs and all recent MFCs to stable/8 seem to have this information. Regards, Navdeep From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 12 10:44:29 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A71A31065692; Thu, 12 Nov 2009 10:44:29 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BCB08FC15; Thu, 12 Nov 2009 10:44:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nACAiTmr028121; Thu, 12 Nov 2009 10:44:29 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nACAiTv6028119; Thu, 12 Nov 2009 10:44:29 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200911121044.nACAiTv6028119@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 12 Nov 2009 10:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199218 - stable/8/share/zoneinfo X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 10:44:29 -0000 Author: edwin Date: Thu Nov 12 10:44:29 2009 New Revision: 199218 URL: http://svn.freebsd.org/changeset/base/199218 Log: MFC of r199107, tzdata2009r: - Three Australian stations in Antarctica have changed their time zone: Casey moved from UTC+8 to UTC+11 Davis moved from UTC+7 to UTC+5 Mawson moved from UTC+6 to UTC+5 The changes occurred on 2009-10-18 at 02:00 (local times). Modified: stable/8/share/zoneinfo/antarctica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/antarctica ============================================================================== --- stable/8/share/zoneinfo/antarctica Thu Nov 12 10:44:25 2009 (r199217) +++ stable/8/share/zoneinfo/antarctica Thu Nov 12 10:44:29 2009 (r199218) @@ -1,5 +1,5 @@ #
-# @(#)antarctica	8.5
+# @(#)antarctica	8.6
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -80,15 +80,38 @@ Rule	ChileAQ	2000	max	-	Mar	Sun>=9	3:00u
 # Davis, Vestfold Hills, -6835+07759, since 1957-01-13
 #	(except 1964-11 - 1969-02)
 # Mawson, Holme Bay, -6736+06253, since 1954-02-13
+
+# From Steffen Thorsen (2009-03-11):
+# Three Australian stations in Antarctica have changed their time zone:
+# Casey moved from UTC+8 to UTC+11
+# Davis moved from UTC+7 to UTC+5
+# Mawson moved from UTC+6 to UTC+5
+# The changes occurred on 2009-10-18 at 02:00 (local times).
+#
+# Government source: (Australian Antarctic Division)
+# 
+# http://www.aad.gov.au/default.asp?casid=37079
+# 
+#
+# We have more background information here:
+# 
+# http://www.timeanddate.com/news/time/antarctica-new-times.html
+# 
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Casey	0	-	zzz	1969
-			8:00	-	WST	# Western (Aus) Standard Time
+			8:00	-	WST	2009 Oct 18 2:00
+						# Western (Aus) Standard Time
+			11:00	-	CAST	# Casey Time
 Zone Antarctica/Davis	0	-	zzz	1957 Jan 13
 			7:00	-	DAVT	1964 Nov # Davis Time
 			0	-	zzz	1969 Feb
-			7:00	-	DAVT
+			7:00	-	DAVT	2009 Oct 18 2:0
+			5:00	-	DAVT
 Zone Antarctica/Mawson	0	-	zzz	1954 Feb 13
-			6:00	-	MAWT	# Mawson Time
+			6:00	-	MAWT	2009 Oct 18 2:00
+						# Mawson Time
+			5:00	-	MAWT
 # References:
 # 
 # Casey Weather (1998-02-26)

From owner-svn-src-stable-8@FreeBSD.ORG  Thu Nov 12 13:09:36 2009
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D731E1065670;
	Thu, 12 Nov 2009 13:09:36 +0000 (UTC)
	(envelope-from netchild@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C52CB8FC12;
	Thu, 12 Nov 2009 13:09:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nACD9alu031214;
	Thu, 12 Nov 2009 13:09:36 GMT
	(envelope-from netchild@svn.freebsd.org)
Received: (from netchild@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nACD9a42031212;
	Thu, 12 Nov 2009 13:09:36 GMT
	(envelope-from netchild@svn.freebsd.org)
Message-Id: <200911121309.nACD9a42031212@svn.freebsd.org>
From: Alexander Leidinger 
Date: Thu, 12 Nov 2009 13:09:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199222 - stable/8/sys/compat/linux
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 12 Nov 2009 13:09:37 -0000

Author: netchild
Date: Thu Nov 12 13:09:36 2009
New Revision: 199222
URL: http://svn.freebsd.org/changeset/base/199222

Log:
  MFC r198945:
    Fix typo in kernel message. The fix is based upon the patch in the PR.
  
    PR:		kern/140279
    Submitted by:	Alexander Best 

Modified:
  stable/8/sys/compat/linux/linux_ipc.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/compat/linux/linux_ipc.c
==============================================================================
--- stable/8/sys/compat/linux/linux_ipc.c	Thu Nov 12 11:54:12 2009	(r199221)
+++ stable/8/sys/compat/linux/linux_ipc.c	Thu Nov 12 13:09:36 2009	(r199222)
@@ -872,7 +872,7 @@ linux_shmctl(struct thread *td, struct l
     case LINUX_SHM_LOCK:
     case LINUX_SHM_UNLOCK:
     default:
-	linux_msg(td, "ipc typ=%d not implemented", args->cmd & ~LINUX_IPC_64);
+	linux_msg(td, "ipc type %d not implemented", args->cmd & ~LINUX_IPC_64);
 	return EINVAL;
     }
 }

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Nov 14 04:46:25 2009
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B10431065670;
	Sat, 14 Nov 2009 04:46:25 +0000 (UTC) (envelope-from ume@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9FA198FC0C;
	Sat, 14 Nov 2009 04:46:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAE4kPrK087389;
	Sat, 14 Nov 2009 04:46:25 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAE4kPKx087388;
	Sat, 14 Nov 2009 04:46:25 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <200911140446.nAE4kPKx087388@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Sat, 14 Nov 2009 04:46:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199261 - stable/8/sys/netinet6
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 14 Nov 2009 04:46:25 -0000

Author: ume
Date: Sat Nov 14 04:46:24 2009
New Revision: 199261
URL: http://svn.freebsd.org/changeset/base/199261

Log:
  MFC r199173: CURVNET_RESTORE() was not called in certain cases.

Modified:
  stable/8/sys/netinet6/nd6.c
Directory Properties:
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/netinet6/nd6.c
==============================================================================
--- stable/8/sys/netinet6/nd6.c	Fri Nov 13 22:57:20 2009	(r199260)
+++ stable/8/sys/netinet6/nd6.c	Sat Nov 14 04:46:24 2009	(r199261)
@@ -577,10 +577,10 @@ nd6_llinfo_timer(void *arg)
 		}
 		break;
 	}
-	CURVNET_RESTORE();
 done:
 	if (ln != NULL)
 		LLE_FREE(ln);
+	CURVNET_RESTORE();
 }
 
 

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Nov 14 11:59:59 2009
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BDAAB1065697;
	Sat, 14 Nov 2009 11:59:59 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A946C8FC12;
	Sat, 14 Nov 2009 11:59:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAEBxxj6097524;
	Sat, 14 Nov 2009 11:59:59 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAEBxxiQ097518;
	Sat, 14 Nov 2009 11:59:59 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <200911141159.nAEBxxiQ097518@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Sat, 14 Nov 2009 11:59:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199266 - in stable/8/sys/cddl: compat/opensolaris/sys
	contrib/opensolaris/uts/common/fs/zfs
	contrib/opensolaris/uts/common/sys
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 14 Nov 2009 11:59:59 -0000

Author: pjd
Date: Sat Nov 14 11:59:59 2009
New Revision: 199266
URL: http://svn.freebsd.org/changeset/base/199266

Log:
  MFC r198703,r199156,r199157:
  
  r198703:
  
  - zfs_zaccess() can handle VAPPEND too, so map V_APPEND to VAPPEND and call
    zfs_access() instead of vaccess() in this case as well.
  - If VADMIN is specified with another V* flag (unlikely) call both
    zfs_access() and vaccess() after spliting V* flags.
  
  This fixes "dirtying snapshot!" panic.
  
  PR:	kern/139806
  Reported by:	Carl Chave 
  In co-operation with:	jh
  
  r199156:
  
  Avoid passing invalid mountpoint to getnewvnode().
  
  Reported by:	rwatson
  Tested by:	rwatson
  
  r199157:
  
  Be careful which vattr fields are set during setattr replay.
  Without this fix strange things can appear after unclean shutdown like
  files with mode set to 07777.
  
  Reported by:	des

Modified:
  stable/8/sys/cddl/compat/opensolaris/sys/vnode.h
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/cddl/compat/opensolaris/sys/vnode.h
==============================================================================
--- stable/8/sys/cddl/compat/opensolaris/sys/vnode.h	Sat Nov 14 09:33:51 2009	(r199265)
+++ stable/8/sys/cddl/compat/opensolaris/sys/vnode.h	Sat Nov 14 11:59:59 2009	(r199266)
@@ -57,6 +57,8 @@ typedef	struct vop_vector	vnodeops_t;
 
 #define	v_count	v_usecount
 
+#define	V_APPEND	VAPPEND
+
 static __inline int
 vn_is_readonly(vnode_t *vp)
 {

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c	Sat Nov 14 09:33:51 2009	(r199265)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c	Sat Nov 14 11:59:59 2009	(r199266)
@@ -60,10 +60,14 @@ zfs_init_vattr(vattr_t *vap, uint64_t ma
 {
 	VATTR_NULL(vap);
 	vap->va_mask = (uint_t)mask;
-	vap->va_type = IFTOVT(mode);
-	vap->va_mode = mode & MODEMASK;
-	vap->va_uid = (uid_t)(IS_EPHEMERAL(uid)) ? -1 : uid;
-	vap->va_gid = (gid_t)(IS_EPHEMERAL(gid)) ? -1 : gid;
+	if (mask & AT_TYPE)
+		vap->va_type = IFTOVT(mode);
+	if (mask & AT_MODE)
+		vap->va_mode = mode & MODEMASK;
+	if (mask & AT_UID)
+		vap->va_uid = (uid_t)(IS_EPHEMERAL(uid)) ? -1 : uid;
+	if (mask & AT_GID)
+		vap->va_gid = (gid_t)(IS_EPHEMERAL(gid)) ? -1 : gid;
 	vap->va_rdev = zfs_cmpldev(rdev);
 	vap->va_nodeid = nodeid;
 }

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Sat Nov 14 09:33:51 2009	(r199265)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Sat Nov 14 11:59:59 2009	(r199266)
@@ -3981,21 +3981,33 @@ zfs_freebsd_access(ap)
 		struct thread *a_td;
 	} */ *ap;
 {
+	accmode_t accmode;
+	int error = 0;
 
 	/*
-	 * ZFS itself only knowns about VREAD, VWRITE and VEXEC, the rest
-	 * we have to handle by calling vaccess().
+	 * ZFS itself only knowns about VREAD, VWRITE, VEXEC and VAPPEND,
 	 */
-	if ((ap->a_accmode & ~(VREAD|VWRITE|VEXEC)) != 0) {
-		vnode_t *vp = ap->a_vp;
-		znode_t *zp = VTOZ(vp);
-		znode_phys_t *zphys = zp->z_phys;
+	accmode = ap->a_accmode & (VREAD|VWRITE|VEXEC|VAPPEND);
+	if (accmode != 0)
+		error = zfs_access(ap->a_vp, accmode, 0, ap->a_cred, NULL);
 
-		return (vaccess(vp->v_type, zphys->zp_mode, zphys->zp_uid,
-		    zphys->zp_gid, ap->a_accmode, ap->a_cred, NULL));
+	/*
+	 * VADMIN has to be handled by vaccess().
+	 */
+	if (error == 0) {
+		accmode = ap->a_accmode & ~(VREAD|VWRITE|VEXEC|VAPPEND);
+		if (accmode != 0) {
+			vnode_t *vp = ap->a_vp;
+			znode_t *zp = VTOZ(vp);
+			znode_phys_t *zphys = zp->z_phys;
+
+			error = vaccess(vp->v_type, zphys->zp_mode,
+			    zphys->zp_uid, zphys->zp_gid, accmode, ap->a_cred,
+			    NULL);
+		}
 	}
 
-	return (zfs_access(ap->a_vp, ap->a_accmode, 0, ap->a_cred, NULL));
+	return (error);
 }
 
 static int

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Sat Nov 14 09:33:51 2009	(r199265)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Sat Nov 14 11:59:59 2009	(r199266)
@@ -143,16 +143,19 @@ zfs_znode_cache_constructor(void *buf, v
 
 	POINTER_INVALIDATE(&zp->z_zfsvfs);
 	ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs));
-	ASSERT(vfsp != NULL);
 
-	error = getnewvnode("zfs", vfsp, &zfs_vnodeops, &vp);
-	if (error != 0 && (kmflags & KM_NOSLEEP))
-		return (-1);
-	ASSERT(error == 0);
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-	zp->z_vnode = vp;
-	vp->v_data = (caddr_t)zp;
-	VN_LOCK_AREC(vp);
+	if (vfsp != NULL) {
+		error = getnewvnode("zfs", vfsp, &zfs_vnodeops, &vp);
+		if (error != 0 && (kmflags & KM_NOSLEEP))
+			return (-1);
+		ASSERT(error == 0);
+		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+		zp->z_vnode = vp;
+		vp->v_data = (caddr_t)zp;
+		VN_LOCK_AREC(vp);
+	} else {
+		zp->z_vnode = NULL;
+	}
 
 	list_link_init(&zp->z_link_node);
 
@@ -1435,7 +1438,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
 	nvpair_t	*elem;
 	int		error;
 	znode_t		*rootzp = NULL;
-	vnode_t		*vp;
+	vnode_t		vnode;
 	vattr_t		vattr;
 	znode_t		*zp;
 
@@ -1504,13 +1507,13 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
 	vattr.va_gid = crgetgid(cr);
 
 	rootzp = kmem_cache_alloc(znode_cache, KM_SLEEP);
-	zfs_znode_cache_constructor(rootzp, &zfsvfs, 0);
+	zfs_znode_cache_constructor(rootzp, NULL, 0);
 	rootzp->z_unlinked = 0;
 	rootzp->z_atime_dirty = 0;
 
-	vp = ZTOV(rootzp);
-	vp->v_type = VDIR;
-	VN_LOCK_ASHARE(vp);
+	vnode.v_type = VDIR;
+	vnode.v_data = rootzp;
+	rootzp->z_vnode = &vnode;
 
 	bzero(&zfsvfs, sizeof (zfsvfs_t));
 
@@ -1539,16 +1542,10 @@ zfs_create_fs(objset_t *os, cred_t *cr, 
 	ASSERT(error == 0);
 	POINTER_INVALIDATE(&rootzp->z_zfsvfs);
 
-	VI_LOCK(vp);
-	ZTOV(rootzp)->v_data = NULL;
-	ZTOV(rootzp)->v_count = 0;
-	ZTOV(rootzp)->v_holdcnt = 0;
-	rootzp->z_vnode = NULL;
-	VOP_UNLOCK(vp, 0);
-	vdestroy(vp);
 	dmu_buf_rele(rootzp->z_dbuf, NULL);
 	rootzp->z_dbuf = NULL;
 	mutex_destroy(&zfsvfs.z_znodes_lock);
+	rootzp->z_vnode = NULL;
 	kmem_cache_free(znode_cache, rootzp);
 }
 

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h	Sat Nov 14 09:33:51 2009	(r199265)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h	Sat Nov 14 11:59:59 2009	(r199266)
@@ -304,7 +304,6 @@ typedef struct xvattr {
  * VOP_ACCESS flags
  */
 #define	V_ACE_MASK	0x1	/* mask represents  NFSv4 ACE permissions */
-#define	V_APPEND	0x2	/* want to do append only check */
 
 /*
  * Flags for vnode operations.

From owner-svn-src-stable-8@FreeBSD.ORG  Sat Nov 14 16:14:51 2009
Return-Path: 
Delivered-To: svn-src-stable-8@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A34E01065670;
	Sat, 14 Nov 2009 16:14:51 +0000 (UTC)
	(envelope-from rnoland@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 916AE8FC19;
	Sat, 14 Nov 2009 16:14:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAEGEpph003624;
	Sat, 14 Nov 2009 16:14:51 GMT (envelope-from rnoland@svn.freebsd.org)
Received: (from rnoland@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAEGEpH5003622;
	Sat, 14 Nov 2009 16:14:51 GMT (envelope-from rnoland@svn.freebsd.org)
Message-Id: <200911141614.nAEGEpH5003622@svn.freebsd.org>
From: Robert Noland 
Date: Sat, 14 Nov 2009 16:14:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r199272 - stable/8/sys/cddl/boot/zfs
X-BeenThere: svn-src-stable-8@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 8-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 14 Nov 2009 16:14:51 -0000

Author: rnoland
Date: Sat Nov 14 16:14:51 2009
New Revision: 199272
URL: http://svn.freebsd.org/changeset/base/199272

Log:
  MFC r199241
  
  This patch addresses an overflow in the the zfs boot code and allows
  users to boot from zfs raidz volumes.  This has been tested by a number
  of users and does not impact those which are not booting from zfs raidz
  volumes.
  
  Submitted by:	Matt Reimer 

Modified:
  stable/8/sys/cddl/boot/zfs/zfssubr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/cddl/boot/zfs/zfssubr.c
==============================================================================
--- stable/8/sys/cddl/boot/zfs/zfssubr.c	Sat Nov 14 15:56:23 2009	(r199271)
+++ stable/8/sys/cddl/boot/zfs/zfssubr.c	Sat Nov 14 16:14:51 2009	(r199272)
@@ -550,7 +550,8 @@ vdev_raidz_read(vdev_t *vdev, const blkp
 	uint64_t s = psize >> unit_shift;
 	uint64_t f = b % dcols;
 	uint64_t o = (b / dcols) << unit_shift;
-	int q, r, c, c1, bc, col, acols, coff, devidx, asize, n;
+	uint64_t q, r, coff;
+	int c, c1, bc, col, acols, devidx, asize, n;
 	static raidz_col_t cols[16];
 	raidz_col_t *rc, *rc1;