From owner-cvs-src-old@FreeBSD.ORG Fri Dec 10 21:39:52 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FA08106564A for ; Fri, 10 Dec 2010 21:39:52 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4CC8F8FC14 for ; Fri, 10 Dec 2010 21:39:52 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oBALdqYV054199 for ; Fri, 10 Dec 2010 21:39:52 GMT (envelope-from ken@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oBALdqHF054198 for cvs-src-old@freebsd.org; Fri, 10 Dec 2010 21:39:52 GMT (envelope-from ken@repoman.freebsd.org) Message-Id: <201012102139.oBALdqHF054198@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ken@repoman.freebsd.org using -f From: "Kenneth D. Merry" Date: Fri, 10 Dec 2010 21:38:51 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/camcontrol camcontrol.c src/sys/cam cam_periph.c src/sys/cam/scsi scsi_pass.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2010 21:39:52 -0000 ken 2010-12-10 21:38:51 UTC FreeBSD src repository Modified files: sbin/camcontrol camcontrol.c sys/cam cam_periph.c sys/cam/scsi scsi_pass.c Log: SVN rev 216361 on 2010-12-10 21:38:51Z by ken Fix a few issues related to the XPT_GDEV_ADVINFO CCB. camcontrol.c: In buildbusdevlist(), don't attempt to get call getdevid() for an unconfigured device, even when the verbose flag is set. The cam_open_btl() call will almost certainly fail. Probe for the buffer size when issuing the XPT_GDEV_ADVINFO CCB. Probing for the buffer size first helps us avoid allocating the maximum buffer size when it really may not be necessary. This also helps avoid errors from cam_periph_mapmem() if we attempt to map more than MAXPHYS. cam_periph.c: In cam_periph_mapmem(), if the XPT_GDEV_ADVINFO CCB shows a bufsiz of 0, we don't have anything to map, so just return. Also, set the maximum mapping size to MAXPHYS instead of DFLTPHYS for XPT_GDEV_ADVINFO CCBs, since they don't actually go down to the hardware. scsi_pass.c: Don't bother mapping the buffer in XPT_GDEV_ADVINFO CCBs if bufsiz is 0. Revision Changes Path 1.84 +34 -12 src/sbin/camcontrol/camcontrol.c 1.92 +9 -0 src/sys/cam/cam_periph.c 1.58 +5 -4 src/sys/cam/scsi/scsi_pass.c