From owner-svn-src-head@FreeBSD.ORG Sat Jul 27 17:20:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 96AF33E0; Sat, 27 Jul 2013 17:20:44 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F7192D6C; Sat, 27 Jul 2013 17:20:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6RHKicB062084; Sat, 27 Jul 2013 17:20:44 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6RHKix6062083; Sat, 27 Jul 2013 17:20:44 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201307271720.r6RHKix6062083@svn.freebsd.org> From: Sean Bruno Date: Sat, 27 Jul 2013 17:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253712 - head/sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jul 2013 17:20:44 -0000 Author: sbruno Date: Sat Jul 27 17:20:43 2013 New Revision: 253712 URL: http://svnweb.freebsd.org/changeset/base/253712 Log: update ciss debugger command to iterate over multiple raid controllers up to max controllers supported PR: kern/179932 Reviewed by: Markus Gebert MFC after: 2 weeks Sponsored by: Yahoo! Inc. Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Sat Jul 27 17:16:59 2013 (r253711) +++ head/sys/dev/ciss/ciss.c Sat Jul 27 17:20:43 2013 (r253712) @@ -4378,11 +4378,17 @@ ciss_print_adapter(struct ciss_softc *sc DB_COMMAND(ciss_prt, db_ciss_prt) { struct ciss_softc *sc; + devclass_t dc; + int maxciss, i; - sc = devclass_get_softc(devclass_find("ciss"), 0); - if (sc == NULL) { - printf("no ciss controllers\n"); - } else { + dc = devclass_find("ciss"); + if ( dc == NULL ) { + printf("%s: can't find devclass!\n", __func__); + return; + } + maxciss = devclass_get_maxunit(dc); + for (i = 0; i < maxciss; i++) { + sc = devclass_get_softc(dc, i); ciss_print_adapter(sc); } }