Author: avg
Date: Mon May 21 20:58:06 2018
New Revision: 333998
URL: https://svnweb.freebsd.org/changeset/base/333998

Log:
  uchcom: add DPRINTF-s to aid debugging of the driver
  
  Reviewed by:  hselasky
  MFC after:    2 weeks

Modified:
  head/sys/dev/usb/serial/uchcom.c

Modified: head/sys/dev/usb/serial/uchcom.c
==============================================================================
--- head/sys/dev/usb/serial/uchcom.c    Mon May 21 20:57:14 2018        
(r333997)
+++ head/sys/dev/usb/serial/uchcom.c    Mon May 21 20:58:06 2018        
(r333998)
@@ -416,6 +416,8 @@ uchcom_ctrl_write(struct uchcom_softc *sc, uint8_t req
        USETW(req.wIndex, index);
        USETW(req.wLength, 0);
 
+       DPRINTF("WR REQ 0x%02X VAL 0x%04X IDX 0x%04X\n",
+           reqno, value, index);
        ucom_cfg_do_request(sc->sc_udev,
            &sc->sc_ucom, &req, NULL, 0, 1000);
 }
@@ -432,6 +434,8 @@ uchcom_ctrl_read(struct uchcom_softc *sc, uint8_t reqn
        USETW(req.wIndex, index);
        USETW(req.wLength, buflen);
 
+       DPRINTF("RD REQ 0x%02X VAL 0x%04X IDX 0x%04X LEN %d\n",
+           reqno, value, index, buflen);
        ucom_cfg_do_request(sc->sc_udev,
            &sc->sc_ucom, &req, buf, USB_SHORT_XFER_OK, 1000);
 }
@@ -506,6 +510,7 @@ static void
 uchcom_update_version(struct uchcom_softc *sc)
 {
        uchcom_get_version(sc, &sc->sc_version);
+       DPRINTF("Chip version: 0x%02x\n", sc->sc_version);
 }
 
 static void
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to