From owner-freebsd-usb@FreeBSD.ORG Tue Nov 3 10:10:02 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 862C2106566C for ; Tue, 3 Nov 2009 10:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5C0398FC15 for ; Tue, 3 Nov 2009 10:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nA3AA2b8067712 for ; Tue, 3 Nov 2009 10:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nA3AA2Tx067711; Tue, 3 Nov 2009 10:10:02 GMT (envelope-from gnats) Date: Tue, 3 Nov 2009 10:10:02 GMT Message-Id: <200911031010.nA3AA2Tx067711@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/140242: dev/usb/controller/ehci_ix4xx.c shortcomings X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2009 10:10:02 -0000 The following reply was made to PR usb/140242; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: Sebastian Huber , freebsd-gnats-submit@freebsd.org Subject: Re: usb/140242: dev/usb/controller/ehci_ix4xx.c shortcomings Date: Tue, 3 Nov 2009 11:08:32 +0100 On Tuesday 03 November 2009 10:52:52 Sebastian Huber wrote: > >Number: 140242 > >Category: usb > >Synopsis: dev/usb/controller/ehci_ix4xx.c shortcomings > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Tue Nov 03 10:00:12 UTC 2009 > >Closed-Date: > >Last-Modified: > >Originator: Sebastian Huber > >Release: 9-current > >Organization: > > embedded brains GmbH > > >Environment: > >Description: > > In ehci_ixp_attach() setting of sc->sc_bus.usbrev is superfluous since this > is also set in ehci_init(). > > Calling ehci_reset() without a valid sc->sc_offs value makes no sense. > > >How-To-Repeat: > > > >Fix: > > Index: ehci_ixp4xx.c > =================================================================== > --- ehci_ixp4xx.c (revision 198848) > +++ ehci_ixp4xx.c (working copy) > @@ -157,8 +157,6 @@ > return (ENOMEM); > } > > - sc->sc_bus.usbrev = USB_REV_2_0; > - > /* NB: hints fix the memory location and irq */ > > rid = 0; > @@ -230,7 +228,6 @@ > > | EHCI_SCFLG_BIGEMMIO > | EHCI_SCFLG_NORESTERM > > ; > - (void) ehci_reset(sc); > > err = ehci_init(sc); > if (!err) { > > >Release-Note: > >Audit-Trail: > >Unformatted: Hi, Thanks for your patch. What is the correct "sc->sc_offs" value? The sc_offs field is used by more than reset, and should be set correctly. I.E. The right solution is not to remove the ehci_reset() call. --HPS