Fixed a possible crashing bug with early interrupts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16747 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -758,7 +758,6 @@ em_intr(void *arg)
|
|||||||
|
|
||||||
ifp = &adapter->interface_data.ac_if;
|
ifp = &adapter->interface_data.ac_if;
|
||||||
|
|
||||||
|
|
||||||
reg_icr = E1000_READ_REG(&adapter->hw, ICR);
|
reg_icr = E1000_READ_REG(&adapter->hw, ICR);
|
||||||
if (!reg_icr) {
|
if (!reg_icr) {
|
||||||
return B_UNHANDLED_INTERRUPT;
|
return B_UNHANDLED_INTERRUPT;
|
||||||
@@ -770,7 +769,6 @@ em_intr(void *arg)
|
|||||||
release_event_sem = true;
|
release_event_sem = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while (loop_cnt > 0) {
|
while (loop_cnt > 0) {
|
||||||
if (ifp->if_flags & IFF_RUNNING) {
|
if (ifp->if_flags & IFF_RUNNING) {
|
||||||
em_process_receive_interrupts(adapter, -1);
|
em_process_receive_interrupts(adapter, -1);
|
||||||
@@ -1530,6 +1528,9 @@ em_allocate_pci_resources(struct adapter * adapter)
|
|||||||
adapter->unit);
|
adapter->unit);
|
||||||
return(ENXIO);
|
return(ENXIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
adapter->hw.back = &adapter->osdep;
|
||||||
|
|
||||||
if (bus_setup_intr(dev, adapter->res_interrupt, INTR_TYPE_NET,
|
if (bus_setup_intr(dev, adapter->res_interrupt, INTR_TYPE_NET,
|
||||||
em_intr, adapter,
|
em_intr, adapter,
|
||||||
&adapter->int_handler_tag)) {
|
&adapter->int_handler_tag)) {
|
||||||
@@ -1538,9 +1539,7 @@ em_allocate_pci_resources(struct adapter * adapter)
|
|||||||
return(ENXIO);
|
return(ENXIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
adapter->hw.back = &adapter->osdep;
|
return 0;
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user