diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2019-07-21 06:22:28 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2019-07-21 06:22:28 +0000 |
commit | e497f24f87f7294d9e6207fcc5476cc617b253ed (patch) | |
tree | 84aebba3b2556fd2b56cc97b735cac64a352cad5 /sys | |
parent | 244289f2dc68e97ac98cbf4c8d7c7f6cdce80fff (diff) |
apply backpressure when ifiq says the stack is getting busy
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_ixl.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c index 0f59930ce22..cc003442b39 100644 --- a/sys/dev/pci/if_ixl.c +++ b/sys/dev/pci/if_ixl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ixl.c,v 1.39 2019/07/04 06:31:03 jmatthew Exp $ */ +/* $OpenBSD: if_ixl.c,v 1.40 2019/07/21 06:22:27 dlg Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -1192,8 +1192,10 @@ static void ixl_hmc_pack(void *, const void *, static int ixl_get_sffpage(struct ixl_softc *, struct if_sffpage *); static int ixl_sff_get_byte(struct ixl_softc *, uint8_t, uint32_t, uint8_t *); +#if 0 static int ixl_sff_set_byte(struct ixl_softc *, uint8_t, uint32_t, uint8_t); +#endif static int ixl_match(struct device *, void *, void *); static void ixl_attach(struct device *, struct device *, void *); @@ -3481,10 +3483,11 @@ ixl_get_link_status(struct ixl_softc *sc) static int ixl_get_sffpage(struct ixl_softc *sc, struct if_sffpage *sff) { - uint8_t page; + uint8_t page = sff->sff_page; size_t i; int error; +#if 0 if (sff->sff_addr == IFSFF_ADDR_EEPROM) { error = ixl_sff_get_byte(sc, IFSFF_ADDR_EEPROM, 127, &page); if (error != 0) @@ -3496,14 +3499,16 @@ ixl_get_sffpage(struct ixl_softc *sc, struct if_sffpage *sff) return (error); } } +#endif for (i = 0; i < sizeof(sff->sff_data); i++) { - error = ixl_sff_get_byte(sc, sff->sff_addr, i, + error = ixl_sff_get_byte(sc, page, i, &sff->sff_data[i]); if (error != 0) return (error); } +#if 0 if (sff->sff_addr == IFSFF_ADDR_EEPROM) { if (page != sff->sff_page) { error = ixl_sff_set_byte(sc, IFSFF_ADDR_EEPROM, 127, @@ -3512,6 +3517,7 @@ ixl_get_sffpage(struct ixl_softc *sc, struct if_sffpage *sff) return (error); } } +#endif return (0); } @@ -3533,6 +3539,12 @@ ixl_sff_get_byte(struct ixl_softc *sc, uint8_t dev, uint32_t reg, uint8_t *p) ixl_atq_exec(sc, &iatq, "ixlsffget"); + if (ISSET(sc->sc_ac.ac_if.if_flags, IFF_DEBUG)) { + printf("%s: %s(dev 0x%02x, reg 0x%02x) -> %04x\n", + DEVNAME(sc), __func__, + dev, reg, lemtoh16(&iaq->iaq_retval)); + } + switch (iaq->iaq_retval) { case htole16(IXL_AQ_RC_OK): break; @@ -3551,7 +3563,7 @@ ixl_sff_get_byte(struct ixl_softc *sc, uint8_t dev, uint32_t reg, uint8_t *p) return (0); } - +#if 0 static int ixl_sff_set_byte(struct ixl_softc *sc, uint8_t dev, uint32_t reg, uint8_t v) { @@ -3570,6 +3582,12 @@ ixl_sff_set_byte(struct ixl_softc *sc, uint8_t dev, uint32_t reg, uint8_t v) ixl_atq_exec(sc, &iatq, "ixlsffset"); + if (ISSET(sc->sc_ac.ac_if.if_flags, IFF_DEBUG)) { + printf("%s: %s(dev 0x%02x, reg 0x%02x, val 0x%02x) -> %04x\n", + DEVNAME(sc), __func__, + dev, reg, v, lemtoh16(&iaq->iaq_retval)); + } + switch (iaq->iaq_retval) { case htole16(IXL_AQ_RC_OK): break; @@ -3585,6 +3603,7 @@ ixl_sff_set_byte(struct ixl_softc *sc, uint8_t dev, uint32_t reg, uint8_t v) return (0); } +#endif static int ixl_get_vsi(struct ixl_softc *sc) |