git: 1e800a593445 - main - rtsx: Do not display pci_read_config() errors during rtsx_init()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 03 Feb 2022 23:43:55 UTC
The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=1e800a593445b83e010e3d2985ca66e56107dd76 commit 1e800a593445b83e010e3d2985ca66e56107dd76 Author: Henri Hennebert <hlh@restart.be> AuthorDate: 2022-02-03 23:22:24 +0000 Commit: Jung-uk Kim <jkim@FreeBSD.org> CommitDate: 2022-02-03 23:43:13 +0000 rtsx: Do not display pci_read_config() errors during rtsx_init() Differential Revision: https://reviews.freebsd.org/D32154 --- sys/dev/rtsx/rtsx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/rtsx/rtsx.c b/sys/dev/rtsx/rtsx.c index 5146ca54141c..7c0c8b21d815 100644 --- a/sys/dev/rtsx/rtsx.c +++ b/sys/dev/rtsx/rtsx.c @@ -781,7 +781,7 @@ rtsx_init(struct rtsx_softc *sc) if (!(reg & 0x80)) { sc->rtsx_card_drive_sel = (reg >> 8) & 0x3F; sc->rtsx_sd30_drive_sel_3v3 = reg & 0x07; - } else { + } else if (bootverbose || rtsx_init_debug) { device_printf(sc->rtsx_dev, "pci_read_config() error - reg: 0x%08x\n", reg); } if (bootverbose || rtsx_init_debug) @@ -799,7 +799,7 @@ rtsx_init(struct rtsx_softc *sc) sc->rtsx_sd30_drive_sel_3v3 = (reg >> 5) & 0x03; if (reg & 0x4000) sc->rtsx_flags |= RTSX_F_REVERSE_SOCKET; - } else { + } else if (bootverbose || rtsx_init_debug) { device_printf(sc->rtsx_dev, "pci_read_config() error - reg: 0x%08x\n", reg); } if (bootverbose || rtsx_init_debug) @@ -816,7 +816,7 @@ rtsx_init(struct rtsx_softc *sc) sc->rtsx_card_drive_sel |= ((reg >> 25) & 0x01) << 6; reg = pci_read_config(sc->rtsx_dev, RTSX_PCR_SETTING_REG2, 4); sc->rtsx_sd30_drive_sel_3v3 = rtsx_map_sd_drive((reg >> 5) & 0x03); - } else { + } else if (bootverbose || rtsx_init_debug) { device_printf(sc->rtsx_dev, "pci_read_config() error - reg: 0x%08x\n", reg); } if (bootverbose || rtsx_init_debug) @@ -834,7 +834,7 @@ rtsx_init(struct rtsx_softc *sc) sc->rtsx_sd30_drive_sel_3v3 = (reg >> 5) & 0x03; if (reg & 0x4000) sc->rtsx_flags |= RTSX_F_REVERSE_SOCKET; - } else { + } else if (bootverbose || rtsx_init_debug) { device_printf(sc->rtsx_dev, "pci_read_config() error - reg: 0x%08x\n", reg); } if (bootverbose || rtsx_init_debug) @@ -853,7 +853,7 @@ rtsx_init(struct rtsx_softc *sc) sc->rtsx_card_drive_sel |= ((reg1 >> 25) & 0x01) << 6; reg3 = pci_read_config(sc->rtsx_dev, RTSX_PCR_SETTING_REG3, 1); sc->rtsx_sd30_drive_sel_3v3 = (reg3 >> 5) & 0x07; - } else { + } else if (bootverbose || rtsx_init_debug) { device_printf(sc->rtsx_dev, "pci_read_config() error - reg1: 0x%08x\n", reg1); } if (bootverbose || rtsx_init_debug) @@ -867,7 +867,7 @@ rtsx_init(struct rtsx_softc *sc) reg = pci_read_config(sc->rtsx_dev, RTSX_PCR_SETTING_REG1, 4); if (!(reg & 0x1000000)) { sc->rtsx_sd30_drive_sel_3v3 = rtsx_map_sd_drive(reg & 0x03); - } else { + } else if (bootverbose || rtsx_init_debug) { device_printf(sc->rtsx_dev, "pci_read_config() error - reg: 0x%08x\n", reg); } if (bootverbose || rtsx_init_debug)