rtsx: Do not display pci_read_config() errors during rtsx_init()

Differential Revision:	https://reviews.freebsd.org/D32154
This commit is contained in:
Henri Hennebert 2022-02-03 18:22:24 -05:00 committed by Jung-uk Kim
parent ec1f122b56
commit 1e800a5934

View file

@ -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)