freebsd compat. layer: now both receiving and sending work with PCNET.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21048 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -447,17 +447,25 @@ am79900_intr(void *arg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
isr = (*sc->sc_rdcsr)(sc, LE_CSR0);
|
isr = (*sc->sc_rdcsr)(sc, LE_CSR0);
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
cpu_status status;
|
||||||
|
HAIKU_INTR_REGISTER_ENTER(status);
|
||||||
|
isr = sc->sc_lastisr;
|
||||||
|
sc->sc_lastisr = 0;
|
||||||
|
HAIKU_INTR_REGISTER_LEAVE(status);
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(LEDEBUG) && LEDEBUG > 1
|
#if defined(LEDEBUG) && LEDEBUG > 1
|
||||||
if (sc->sc_flags & LE_DEBUG)
|
if (sc->sc_flags & LE_DEBUG)
|
||||||
if_printf(ifp, "%s: entering with isr=%04x\n", __func__, isr);
|
if_printf(ifp, "%s: entering with isr=%04x\n", __func__, isr);
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
|
||||||
if ((isr & LE_C0_INTR) == 0) {
|
if ((isr & LE_C0_INTR) == 0) {
|
||||||
LE_UNLOCK(sc);
|
LE_UNLOCK(sc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clear interrupt source flags and turn off interrupts. If we
|
* Clear interrupt source flags and turn off interrupts. If we
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ int HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev) {
|
|||||||
BUS_SPACE_BARRIER_WRITE);
|
BUS_SPACE_BARRIER_WRITE);
|
||||||
bus_space_write_2(lesc->sc_regt, lesc->sc_regh, PCNET_PCI_RDP,
|
bus_space_write_2(lesc->sc_regt, lesc->sc_regh, PCNET_PCI_RDP,
|
||||||
value & ~LE_C0_INEA);
|
value & ~LE_C0_INEA);
|
||||||
|
lesc->sc_am79900.lsc.sc_lastisr |= value;
|
||||||
}
|
}
|
||||||
|
|
||||||
HAIKU_INTR_REGISTER_LEAVE(status);
|
HAIKU_INTR_REGISTER_LEAVE(status);
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ struct lance_softc {
|
|||||||
#define LE_CARRIER (1 << 2)
|
#define LE_CARRIER (1 << 2)
|
||||||
#define LE_DEBUG (1 << 3)
|
#define LE_DEBUG (1 << 3)
|
||||||
#define LE_PROMISC (1 << 4)
|
#define LE_PROMISC (1 << 4)
|
||||||
|
|
||||||
|
uint16_t sc_lastisr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define LE_LOCK_INIT(_sc, _name) \
|
#define LE_LOCK_INIT(_sc, _name) \
|
||||||
|
|||||||
@@ -198,11 +198,13 @@ compat_read(void *cookie, off_t position, void *buf, size_t *numBytes)
|
|||||||
|
|
||||||
len = min_c(max_c((size_t)mb->m_len, 0), *numBytes);
|
len = min_c(max_c((size_t)mb->m_len, 0), *numBytes);
|
||||||
|
|
||||||
|
#if 0
|
||||||
mb = m_defrag(mb, 0);
|
mb = m_defrag(mb, 0);
|
||||||
if (mb == NULL) {
|
if (mb == NULL) {
|
||||||
*numBytes = 0;
|
*numBytes = 0;
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
memcpy(buf, mtod(mb, const void *), len);
|
memcpy(buf, mtod(mb, const void *), len);
|
||||||
*numBytes = len;
|
*numBytes = len;
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
|
|||||||
static void
|
static void
|
||||||
ether_input(struct ifnet *ifp, struct mbuf *m)
|
ether_input(struct ifnet *ifp, struct mbuf *m)
|
||||||
{
|
{
|
||||||
device_t dev = NULL; /* XXX */
|
device_t dev = ifp->if_dev;
|
||||||
|
|
||||||
IF_ENQUEUE(&dev->receive_queue, m);
|
IF_ENQUEUE(&dev->receive_queue, m);
|
||||||
release_sem_etc(dev->receive_sem, 1, B_DO_NOT_RESCHEDULE);
|
release_sem_etc(dev->receive_sem, 1, B_DO_NOT_RESCHEDULE);
|
||||||
|
|||||||
Reference in New Issue
Block a user