From owner-svn-src-head@FreeBSD.ORG Sun Mar 22 04:19:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A7B1065670; Sun, 22 Mar 2009 04:19:36 +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 BFEF48FC0A; Sun, 22 Mar 2009 04:19:36 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2M4Ja20056396; Sun, 22 Mar 2009 04:19:36 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2M4JaZo056395; Sun, 22 Mar 2009 04:19:36 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200903220419.n2M4JaZo056395@svn.freebsd.org> From: Andrew Thompson Date: Sun, 22 Mar 2009 04:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190238 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 22 Mar 2009 04:19:37 -0000 Author: thompsa Date: Sun Mar 22 04:19:36 2009 New Revision: 190238 URL: http://svn.freebsd.org/changeset/base/190238 Log: Improve debugging output around ioctls. Modified: head/sys/dev/usb/usb_dev.c Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Sun Mar 22 02:33:48 2009 (r190237) +++ head/sys/dev/usb/usb_dev.c Sun Mar 22 04:19:36 2009 (r190238) @@ -821,7 +821,7 @@ usb2_open(struct cdev *dev, int fflags, struct usb2_cdev_privdata *cpd; int err, ep; - DPRINTFN(2, "fflags=0x%08x\n", fflags); + DPRINTFN(2, "%s fflags=0x%08x\n", dev->si_name, fflags); KASSERT(fflags & (FREAD|FWRITE), ("invalid open flags")); if (((fflags & FREAD) && !(pd->mode & FREAD)) || @@ -990,6 +990,7 @@ usb2_ioctl_f_sub(struct usb2_fifo *f, u_ default: return (ENOIOCTL); } + DPRINTFN(3, "cmd 0x%lx = %d\n", cmd, error); return (error); } @@ -1004,6 +1005,8 @@ usb2_ioctl(struct cdev *dev, u_long cmd, int fflags; int err; + DPRINTFN(2, "cmd=0x%lx\n", cmd); + err = devfs_get_cdevpriv((void **)&cpd); if (err != 0) return (err); @@ -1019,8 +1022,6 @@ usb2_ioctl(struct cdev *dev, u_long cmd, } fflags = cpd->fflags; - DPRINTFN(2, "fflags=%u, cmd=0x%lx\n", fflags, cmd); - f = NULL; /* set default value */ err = ENOIOCTL; /* set default value */ @@ -1035,12 +1036,14 @@ usb2_ioctl(struct cdev *dev, u_long cmd, KASSERT(f != NULL, ("fifo not found")); if (err == ENOIOCTL) { err = (f->methods->f_ioctl) (f, cmd, addr, fflags); + DPRINTFN(2, "f_ioctl cmd 0x%lx = %d\n", cmd, err); if (err == ENOIOCTL) { if (usb2_uref_location(cpd)) { err = ENXIO; goto done; } err = (f->methods->f_ioctl_post) (f, cmd, addr, fflags); + DPRINTFN(2, "f_ioctl_post cmd 0x%lx = %d\n", cmd, err); } } if (err == ENOIOCTL) {