Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Aug 2009 02:51:34 -0700
From:      Sean Bruno <sean.bruno@dsl-only.net>
To:        Nick Hibma <n_hibma@FreeBSD.org>
Cc:        svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   Re: svn commit: r196170 - stable/7/sys/dev/firewire
Message-ID:  <1250157094.8589.11.camel@Lappy>
In-Reply-To: <200908130824.n7D8OwO9093632@svn.freebsd.org>
References:  <200908130824.n7D8OwO9093632@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Nick:

I like your ideas in this code, but this change removes
debugging output from the default output.  I'm afraid
that it's there for a reason, i.e. please revert this
changeset and let's chat about it in IRC or via email
to come up with something that makes sense.  :)

Sean

On Thu, 2009-08-13 at 08:24 +0000, Nick Hibma wrote:
> Author: n_hibma
> Date: Thu Aug 13 08:24:58 2009
> New Revision: 196170
> URL: http://svn.freebsd.org/changeset/base/196170
> 
> Log:
>   Compact some output. Move some behind bootverbose.
> 
> Modified:
>   stable/7/sys/dev/firewire/fwohci.c
> 
> Modified: stable/7/sys/dev/firewire/fwohci.c
> ==============================================================================
> --- stable/7/sys/dev/firewire/fwohci.c	Thu Aug 13 08:20:12 2009	(r196169)
> +++ stable/7/sys/dev/firewire/fwohci.c	Thu Aug 13 08:24:58 2009	(r196170)
> @@ -616,10 +616,9 @@ fwohci_init(struct fwohci_softc *sc, dev
>  /* OHCI version */
>  	reg = OREAD(sc, OHCI_VERSION);
>  	mver = (reg >> 16) & 0xff;
> -	device_printf(dev, "OHCI version %x.%x (ROM=%d)\n",
> -			mver, reg & 0xff, (reg>>24) & 1);
>  	if (mver < 1 || mver > 9) {
> -		device_printf(dev, "invalid OHCI version\n");
> +		device_printf(dev, "invalid OHCI version %d (reg=0x%08x)\n",
> +			      mver, reg);
>  		return (ENXIO);
>  	}
>  
> @@ -632,10 +631,15 @@ fwohci_init(struct fwohci_softc *sc, dev
>  	for (i = 0; i < 0x20; i++)
>  		if ((reg & (1 << i)) == 0)
>  			break;
> +	if (i == 0) {
> +		device_printf(dev, "0 isoc. channels");
> +		return ENXIO;
> +	}
>  	sc->fc.nisodma = i;
> -	device_printf(dev, "No. of Isochronous channels is %d.\n", i);
> -	if (i == 0)
> -		return (ENXIO);
> +
> +	device_printf(dev, "OHCI version %x.%x (ROM=%d), %d isoc. channels\n",
> +			mver, reg & 0xff, (reg>>24) & 1,
> +			sc->fc.nisodma);
>  
>  	sc->fc.arq = &sc->arrq.xferq;
>  	sc->fc.ars = &sc->arrs.xferq;
> @@ -1848,7 +1852,8 @@ fwohci_intr_core(struct fwohci_softc *sc
>  		/* Disable bus reset interrupt until sid recv. */
>  		OWRITE(sc, FWOHCI_INTMASKCLR,  OHCI_INT_PHY_BUS_R);
>  	
> -		device_printf(fc->dev, "BUS reset\n");
> +		if (bootverbose)
> +			device_printf(fc->dev, "BUS reset\n");
>  		OWRITE(sc, FWOHCI_INTMASKCLR,  OHCI_INT_CYC_LOST);
>  		OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC);
>  
> @@ -2464,7 +2469,8 @@ fwohci_ibr(struct firewire_comm *fc)
>  	struct fwohci_softc *sc;
>  	uint32_t fun;
>  
> -	device_printf(fc->dev, "Initiate bus reset\n");
> +	if (bootverbose)
> +		device_printf(fc->dev, "Initiate bus reset\n");
>  	sc = (struct fwohci_softc *)fc;
>  
>  	/*




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1250157094.8589.11.camel>