Date: Wed, 27 Feb 2002 08:31:01 +1100 (EST) From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/35356: Dead code uhci_reset() in /sys/dev/usb/uhci.c Message-ID: <200202262131.g1QLV1r27426@gsmx07.alcatel.com.au>
next in thread | raw e-mail | index | archive | help
>Number: 35356 >Category: kern >Synopsis: Dead code uhci_reset() in /sys/dev/usb/uhci.c >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 26 13:40:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 5.0-CURRENT i386 >Organization: Alcatel Australia Limited >Environment: System: FreeBSD gsmx07.alcatel.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Jan 3 05:48:39 EST 2002 root@gsmx07.alcatel.com.au:/usr/obj/3.0/cvs/src/sys/gsmx i386 >Description: /sys/dev/usb/uhci.c defines an unused static function uhci_reset(). >How-To-Repeat: Try to build GENERIC with sys/conf/kern.pre.mk 1.8 >Fix: Index: uhci.c =================================================================== RCS file: /home/CVSROOT/src/sys/dev/usb/uhci.c,v retrieving revision 1.82 diff -u -r1.82 uhci.c --- uhci.c 16 Feb 2002 00:51:26 -0000 1.82 +++ uhci.c 26 Feb 2002 21:24:37 -0000 @@ -161,7 +161,6 @@ Static LIST_HEAD(, uhci_intr_info) uhci_ii_free; Static void uhci_busreset(uhci_softc_t *); -Static void uhci_reset(uhci_softc_t *); Static usbd_status uhci_run(uhci_softc_t *, int run); Static uhci_soft_td_t *uhci_alloc_std(uhci_softc_t *); Static void uhci_free_std(uhci_softc_t *, uhci_soft_td_t *); @@ -280,8 +279,6 @@ #define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd) #define UHCISTS(sc) UREAD2(sc, UHCI_STS) -#define UHCI_RESET_TIMEOUT 100 /* ms, reset timeout */ - #define UHCI_CURFRAME(sc) (UREAD2(sc, UHCI_FRNUM) & UHCI_FRNUM_MASK) #define UHCI_INTR_ENDPT 1 @@ -1473,21 +1470,6 @@ if (UREAD2(sc, UHCI_STS) & UHCI_STS_USBINT) uhci_intr(sc); -} - -void -uhci_reset(uhci_softc_t *sc) -{ - int n; - - UHCICMD(sc, UHCI_CMD_HCRESET); - /* The reset bit goes low when the controller is done. */ - for (n = 0; n < UHCI_RESET_TIMEOUT && - (UREAD2(sc, UHCI_CMD) & UHCI_CMD_HCRESET); n++) - usb_delay_ms(&sc->sc_bus, 1); - if (n >= UHCI_RESET_TIMEOUT) - printf("%s: controller did not reset\n", - USBDEVNAME(sc->sc_bus.bdev)); } usbd_status >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202262131.g1QLV1r27426>