diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2018-09-18 07:21:50 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2018-09-18 07:21:50 +0000 |
commit | 077351d43c731a49cdf561b7cb1f6d30f810aafb (patch) | |
tree | a9d9437a15a1d7fe3b9960d30e70b80486726870 /sys/dev/pci | |
parent | 0f99f3cc0a3d1cd53a91ed693352de30b523adcd (diff) |
cast HWRM_NA_SIGNATURE when shortening it to keep gcc happy, prodded by jsg@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_bnxt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c index dace2f60d9e..c9f9db65438 100644 --- a/sys/dev/pci/if_bnxt.c +++ b/sys/dev/pci/if_bnxt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnxt.c,v 1.15 2018/09/10 04:59:32 jmatthew Exp $ */ +/* $OpenBSD: if_bnxt.c,v 1.16 2018/09/18 07:21:49 jmatthew Exp $ */ /*- * Broadcom NetXtreme-C/E network driver. * @@ -538,7 +538,7 @@ bnxt_attach(struct device *parent, struct device *self, void *aux) } sc->sc_cp_ring.stats_ctx_id = HWRM_NA_SIGNATURE; - sc->sc_cp_ring.ring.phys_id = HWRM_NA_SIGNATURE; + sc->sc_cp_ring.ring.phys_id = (uint16_t)HWRM_NA_SIGNATURE; sc->sc_cp_ring.softc = sc; sc->sc_cp_ring.ring.id = 0; sc->sc_cp_ring.ring.doorbell = sc->sc_cp_ring.ring.id * 0x80; @@ -680,7 +680,7 @@ bnxt_up(struct bnxt_softc *sc) goto free_mc; } - sc->sc_tx_ring.phys_id = HWRM_NA_SIGNATURE; + sc->sc_tx_ring.phys_id = (uint16_t)HWRM_NA_SIGNATURE; sc->sc_tx_ring.id = BNXT_TX_RING_ID; sc->sc_tx_ring.doorbell = sc->sc_tx_ring.id * 0x80; sc->sc_tx_ring.ring_size = PAGE_SIZE / sizeof(struct tx_bd_short); @@ -695,7 +695,7 @@ bnxt_up(struct bnxt_softc *sc) } bnxt_write_tx_doorbell(sc, &sc->sc_tx_ring, 0); - sc->sc_rx_ring.phys_id = HWRM_NA_SIGNATURE; + sc->sc_rx_ring.phys_id = (uint16_t)HWRM_NA_SIGNATURE; sc->sc_rx_ring.id = BNXT_RX_RING_ID; sc->sc_rx_ring.doorbell = sc->sc_rx_ring.id * 0x80; sc->sc_rx_ring.ring_size = PAGE_SIZE / sizeof(struct rx_prod_pkt_bd); @@ -710,7 +710,7 @@ bnxt_up(struct bnxt_softc *sc) } bnxt_write_rx_doorbell(sc, &sc->sc_rx_ring, 0); - sc->sc_rx_ag_ring.phys_id = HWRM_NA_SIGNATURE; + sc->sc_rx_ag_ring.phys_id = (uint16_t)HWRM_NA_SIGNATURE; sc->sc_rx_ag_ring.id = BNXT_AG_RING_ID; sc->sc_rx_ag_ring.doorbell = sc->sc_rx_ag_ring.id * 0x80; sc->sc_rx_ag_ring.ring_size = PAGE_SIZE / sizeof(struct rx_prod_pkt_bd); @@ -736,14 +736,14 @@ bnxt_up(struct bnxt_softc *sc) goto dealloc_ag; } - sc->sc_vnic.rss_id = HWRM_NA_SIGNATURE; + sc->sc_vnic.rss_id = (uint16_t)HWRM_NA_SIGNATURE; if (bnxt_hwrm_vnic_ctx_alloc(sc, &sc->sc_vnic.rss_id) != 0) { printf("%s: failed to allocate vnic rss context\n", DEVNAME(sc)); goto dealloc_ring_group; } - sc->sc_vnic.id = HWRM_NA_SIGNATURE; + sc->sc_vnic.id = (uint16_t)HWRM_NA_SIGNATURE; sc->sc_vnic.def_ring_grp = sc->sc_ring_group.grp_id; sc->sc_vnic.mru = BNXT_MAX_MTU; sc->sc_vnic.cos_rule = (uint16_t)HWRM_NA_SIGNATURE; |