Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/imcsmb Identify the device that wsa just attached. ...
details: https://anonhg.NetBSD.org/src/rev/7b54d5325366
branches: trunk
changeset: 359816:7b54d5325366
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Feb 26 05:04:51 2018 +0000
description:
Identify the device that wsa just attached. Avoids getting strange
message sequence similar to
imcsmb0 at imc0iic at imcsmb0 not configured
Also, while here, revert to the original FreeBSD wait-for-device-to-
settle code by waiting for 4 intervals of 10ms each, rather than 40
intervals of 1ms.
diffstat:
sys/dev/imcsmb/imcsmb.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 9d39efe10f2f -r 7b54d5325366 sys/dev/imcsmb/imcsmb.c
--- a/sys/dev/imcsmb/imcsmb.c Mon Feb 26 05:01:21 2018 +0000
+++ b/sys/dev/imcsmb/imcsmb.c Mon Feb 26 05:04:51 2018 +0000
@@ -115,6 +115,8 @@
struct imcsmb_softc *sc = device_private(self);
struct imc_attach_args *imca = aux;
+ aprint_normal_dev(self, ": SMBus controller\n");
+
/* Initialize private state */
sc->sc_dev = self;
sc->sc_regs = imca->ia_regs;
@@ -344,13 +346,13 @@
* is idle before issuing a command. We can safely timeout after 35 ms,
* as this is the maximum time the SMBus spec allows for a transaction.
*/
- for (i = 40; i != 0; i--) {
+ for (i = 4; i != 0; i--) {
stat_val = pci_conf_read(sc->sc_pci_chipset_tag,
sc->sc_pci_tag, sc->sc_regs->smb_stat);
if (! (stat_val & IMCSMB_STATUS_BUSY_BIT)) {
break;
}
- delay(1000); /* wait 1ms */
+ delay(100); /* wait 10ms */
}
if (i == 0) {
Home |
Main Index |
Thread Index |
Old Index