summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ar/if_ar.c10
-rw-r--r--sys/dev/ar/if_ar_isa.c10
-rw-r--r--sys/dev/lmc/if_lmc.c9
-rw-r--r--sys/dev/sr/if_sr.c8
-rw-r--r--sys/dev/sr/if_sr_isa.c8
-rw-r--r--sys/dev/usb/udbp.c8
6 files changed, 36 insertions, 17 deletions
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index 9acc402ab6f4..ad5aac9f3ecd 100644
--- a/sys/dev/ar/if_ar.c
+++ b/sys/dev/ar/if_ar.c
@@ -285,7 +285,6 @@ static struct ng_type typestruct = {
NULL,
ngar_connect,
ngar_rcvdata,
- ngar_rcvdata,
ngar_disconnect,
NULL
};
@@ -1732,6 +1731,9 @@ ar_get_packets(struct ar_softc *sc)
int i;
int len;
u_char rxstat;
+#ifdef NETGRAPH
+ int error;
+#endif
while(ar_packet_avail(sc, &len, &rxstat)) {
TRC(printf("apa: len %d, rxstat %x\n", len, rxstat));
@@ -1765,7 +1767,7 @@ ar_get_packets(struct ar_softc *sc)
sppp_input(&sc->ifsppp.pp_if, m);
sc->ifsppp.pp_if.if_ipackets++;
#else /* NETGRAPH */
- ng_queue_data(sc->hook, m, NULL);
+ NG_SEND_DATA_ONLY(error, sc->hook, m);
sc->ipackets++;
#endif /* NETGRAPH */
@@ -2283,7 +2285,7 @@ ngar_rcvmsg(node_p node, struct ng_mesg *msg,
*/
static int
ngar_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
- struct mbuf **ret_m, meta_p *ret_meta)
+ struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
{
int s;
int error = 0;
@@ -2350,6 +2352,8 @@ ngar_rmnode(node_p node)
static int
ngar_connect(hook_p hook)
{
+ /* probably not at splnet, force outward queueing */
+ hook->peer->flags |= HK_QUEUE;
/* be really amiable and just say "YUP that's OK by me! " */
return (0);
}
diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c
index 9acc402ab6f4..ad5aac9f3ecd 100644
--- a/sys/dev/ar/if_ar_isa.c
+++ b/sys/dev/ar/if_ar_isa.c
@@ -285,7 +285,6 @@ static struct ng_type typestruct = {
NULL,
ngar_connect,
ngar_rcvdata,
- ngar_rcvdata,
ngar_disconnect,
NULL
};
@@ -1732,6 +1731,9 @@ ar_get_packets(struct ar_softc *sc)
int i;
int len;
u_char rxstat;
+#ifdef NETGRAPH
+ int error;
+#endif
while(ar_packet_avail(sc, &len, &rxstat)) {
TRC(printf("apa: len %d, rxstat %x\n", len, rxstat));
@@ -1765,7 +1767,7 @@ ar_get_packets(struct ar_softc *sc)
sppp_input(&sc->ifsppp.pp_if, m);
sc->ifsppp.pp_if.if_ipackets++;
#else /* NETGRAPH */
- ng_queue_data(sc->hook, m, NULL);
+ NG_SEND_DATA_ONLY(error, sc->hook, m);
sc->ipackets++;
#endif /* NETGRAPH */
@@ -2283,7 +2285,7 @@ ngar_rcvmsg(node_p node, struct ng_mesg *msg,
*/
static int
ngar_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
- struct mbuf **ret_m, meta_p *ret_meta)
+ struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
{
int s;
int error = 0;
@@ -2350,6 +2352,8 @@ ngar_rmnode(node_p node)
static int
ngar_connect(hook_p hook)
{
+ /* probably not at splnet, force outward queueing */
+ hook->peer->flags |= HK_QUEUE;
/* be really amiable and just say "YUP that's OK by me! " */
return (0);
}
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c
index cf220f7b5615..3bec1fa8fa6e 100644
--- a/sys/dev/lmc/if_lmc.c
+++ b/sys/dev/lmc/if_lmc.c
@@ -184,7 +184,6 @@ static struct ng_type typestruct = {
NULL,
ng_lmc_connect,
ng_lmc_rcvdata,
- ng_lmc_rcvdata,
ng_lmc_disconnect,
ng_lmc_cmdlist
};
@@ -623,9 +622,11 @@ lmc_rx_intr(lmc_softc_t * const sc)
}
}
if (accept) {
+ int error;
+
ms->m_pkthdr.len = total_len;
ms->m_pkthdr.rcvif = NULL;
- ng_queue_data(sc->lmc_hook, ms, NULL);
+ NG_SEND_DATA_ONLY(error, sc->lmc_hook, ms);
}
ms = m0;
}
@@ -1396,7 +1397,7 @@ ng_lmc_rcvmsg(node_p node, struct ng_mesg *msg,
*/
static int
ng_lmc_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
- struct mbuf **ret_m, meta_p *ret_meta)
+ struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
{
int s;
int error = 0;
@@ -1462,6 +1463,8 @@ ng_lmc_rmnode(node_p node)
static int
ng_lmc_connect(hook_p hook)
{
+ /* We are probably not at splnet.. force outward queueing */
+ hook->peer->flags |= HK_QUEUE;
/* be really amiable and just say "YUP that's OK by me! " */
return (0);
}
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index b27d2f57740d..86efdb732a39 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -2408,6 +2408,8 @@ sr_get_packets(struct sr_softc *sc)
sca_descriptor *rxdesc; /* descriptor in memory */
#ifndef NETGRAPH
struct ifnet *ifp; /* network intf ctl table */
+#else
+ int error;
#endif /* NETGRAPH */
struct mbuf *m = NULL; /* message buffer */
@@ -2533,7 +2535,7 @@ sr_get_packets(struct sr_softc *sc)
bp[9], bp[10], bp[11]);
}
#endif
- ng_queue_data(sc->hook, m, NULL);
+ NG_SEND_DATA_ONLY(error, sc->hook, m);
sc->ipackets++;
#endif /* NETGRAPH */
/*
@@ -3239,7 +3241,7 @@ ngsr_rcvmsg(node_p node, struct ng_mesg *msg, const char *retaddr,
*/
static int
ngsr_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
- struct mbuf **ret_m, meta_p *ret_meta)
+ struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
{
int s;
int error = 0;
@@ -3306,6 +3308,8 @@ ngsr_rmnode(node_p node)
static int
ngsr_connect(hook_p hook)
{
+ /* probably not at splnet, force outward queueing */
+ hook->peer->flags |= HK_QUEUE;
/* be really amiable and just say "YUP that's OK by me! " */
return (0);
}
diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c
index b27d2f57740d..86efdb732a39 100644
--- a/sys/dev/sr/if_sr_isa.c
+++ b/sys/dev/sr/if_sr_isa.c
@@ -2408,6 +2408,8 @@ sr_get_packets(struct sr_softc *sc)
sca_descriptor *rxdesc; /* descriptor in memory */
#ifndef NETGRAPH
struct ifnet *ifp; /* network intf ctl table */
+#else
+ int error;
#endif /* NETGRAPH */
struct mbuf *m = NULL; /* message buffer */
@@ -2533,7 +2535,7 @@ sr_get_packets(struct sr_softc *sc)
bp[9], bp[10], bp[11]);
}
#endif
- ng_queue_data(sc->hook, m, NULL);
+ NG_SEND_DATA_ONLY(error, sc->hook, m);
sc->ipackets++;
#endif /* NETGRAPH */
/*
@@ -3239,7 +3241,7 @@ ngsr_rcvmsg(node_p node, struct ng_mesg *msg, const char *retaddr,
*/
static int
ngsr_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
- struct mbuf **ret_m, meta_p *ret_meta)
+ struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
{
int s;
int error = 0;
@@ -3306,6 +3308,8 @@ ngsr_rmnode(node_p node)
static int
ngsr_connect(hook_p hook)
{
+ /* probably not at splnet, force outward queueing */
+ hook->peer->flags |= HK_QUEUE;
/* be really amiable and just say "YUP that's OK by me! " */
return (0);
}
diff --git a/sys/dev/usb/udbp.c b/sys/dev/usb/udbp.c
index d75e1f245bc2..2cfbf0bf230a 100644
--- a/sys/dev/usb/udbp.c
+++ b/sys/dev/usb/udbp.c
@@ -195,7 +195,6 @@ Static struct ng_type ng_udbp_typestruct = {
NULL,
ng_udbp_connect,
ng_udbp_rcvdata,
- ng_udbp_rcvdata,
ng_udbp_disconnect,
ng_udbp_cmdlist
};
@@ -485,7 +484,6 @@ udbp_in_transfer_cb(usbd_xfer_handle xfer, usbd_private_handle priv,
udbp_p sc = priv; /* XXX see priv above */
int s;
int len;
- meta_p meta = NULL;
struct mbuf *m;
if (err) {
@@ -506,7 +504,7 @@ udbp_in_transfer_cb(usbd_xfer_handle xfer, usbd_private_handle priv,
if (sc->hook) {
/* get packet from device and send on */
m = m_devget(sc->sc_bulkin_buffer, len, 0, NULL, NULL);
- NG_SEND_DATAQ(err, sc->hook, m, meta);
+ NG_SEND_DATA_ONLY(err, sc->hook, m);
}
splx(s);
@@ -723,7 +721,7 @@ ng_udbp_rcvmsg(node_p node,
*/
Static int
ng_udbp_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
- struct mbuf **ret_m, meta_p *ret_meta)
+ struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
{
const udbp_p sc = hook->node->private;
int error;
@@ -793,6 +791,8 @@ ng_udbp_rmnode(node_p node)
Static int
ng_udbp_connect(hook_p hook)
{
+ /* probably not at splnet, force outward queueing */
+ hook->peer->flags |= HK_QUEUE;
/* be really amiable and just say "YUP that's OK by me! " */
return (0);
}