sync with OpenBSD -current

This commit is contained in:
purplerain 2024-01-10 07:22:32 +00:00
parent 77cffac7ea
commit 46994dfb53
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
76 changed files with 1061 additions and 927 deletions

View file

@ -783,7 +783,9 @@ void *__devm_drm_dev_alloc(struct device *parent,
{
void *container;
struct drm_device *drm;
#ifdef notyet
int ret;
#endif
container = kzalloc(size, GFP_KERNEL);
if (!container)

View file

@ -82,6 +82,4 @@ struct device_node *__matching_node(struct device_node *,
#define for_each_matching_node(a, b) \
for (a = __matching_node(NULL, b); a; a = __matching_node(a, b))
static const void *of_device_get_match_data(const struct device *);
#endif

View file

@ -29,19 +29,19 @@ extern struct bus_type platform_bus_type;
void __iomem *
devm_platform_ioremap_resource_byname(struct platform_device *, const char *);
inline void
static inline void
platform_set_drvdata(struct platform_device *pdev, void *data)
{
dev_set_drvdata(&pdev->dev, data);
}
inline void *
static inline void *
platform_get_drvdata(struct platform_device *pdev)
{
return dev_get_drvdata(&pdev->dev);
}
inline int
static inline int
platform_driver_register(struct platform_driver *platform_drv)
{
return 0;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_bnxt.c,v 1.40 2024/01/04 07:08:47 jmatthew Exp $ */
/* $OpenBSD: if_bnxt.c,v 1.43 2024/01/10 05:06:00 jmatthew Exp $ */
/*-
* Broadcom NetXtreme-C/E network driver.
*
@ -742,6 +742,8 @@ bnxt_free_slots(struct bnxt_softc *sc, struct bnxt_slot *slots, int allocated,
while (i-- > 0) {
bs = &slots[i];
bus_dmamap_destroy(sc->sc_dmat, bs->bs_map);
if (bs->bs_m != NULL)
m_freem(bs->bs_m);
}
free(slots, M_DEVBUF, total * sizeof(*bs));
}
@ -1001,8 +1003,6 @@ bnxt_queue_down(struct bnxt_softc *sc, struct bnxt_queue *bq)
struct bnxt_rx_queue *rx = &bq->q_rx;
struct bnxt_tx_queue *tx = &bq->q_tx;
/* empty rx ring first i guess */
bnxt_free_slots(sc, tx->tx_slots, tx->tx_ring.ring_size,
tx->tx_ring.ring_size);
tx->tx_slots = NULL;
@ -1073,7 +1073,7 @@ bnxt_up(struct bnxt_softc *sc)
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 down_queues;
goto down_all_queues;
}
sc->sc_vnic.id = (uint16_t)HWRM_NA_SIGNATURE;
@ -1139,8 +1139,11 @@ dealloc_vnic:
bnxt_hwrm_vnic_free(sc, &sc->sc_vnic);
dealloc_vnic_ctx:
bnxt_hwrm_vnic_ctx_free(sc, &sc->sc_vnic.rss_id);
down_all_queues:
i = sc->sc_nqueues;
down_queues:
for (i = 0; i < sc->sc_nqueues; i++)
while (i-- > 0)
bnxt_queue_down(sc, &sc->sc_queues[i]);
bnxt_dmamem_free(sc, sc->sc_rx_cfg);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_ixl.c,v 1.94 2023/12/30 17:52:27 bluhm Exp $ */
/* $OpenBSD: if_ixl.c,v 1.95 2024/01/07 21:01:45 bluhm Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@ -1881,6 +1881,7 @@ ixl_attach(struct device *parent, struct device *self, void *aux)
goto free_hmc;
}
mtx_init(&sc->sc_link_state_mtx, IPL_NET);
if (ixl_get_link_status(sc) != 0) {
/* error printed by ixl_get_link_status */
goto free_hmc;
@ -1987,7 +1988,6 @@ ixl_attach(struct device *parent, struct device *self, void *aux)
if_attach_queues(ifp, nqueues);
if_attach_iqueues(ifp, nqueues);
mtx_init(&sc->sc_link_state_mtx, IPL_NET);
task_set(&sc->sc_link_state_task, ixl_link_state_update, sc);
ixl_wr(sc, I40E_PFINT_ICR0_ENA,
I40E_PFINT_ICR0_ENA_LINK_STAT_CHANGE_MASK |