Changeset abe95c9 in mainline for uspace/srv/hw/netif/dp8390/ne2000.c


Ignore:
Timestamp:
2011-01-10T22:49:14Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
43b4314
Parents:
6643a19
Message:

avoid multiple overlapped interrupt request handling by handling interrupts one at a time
(using the Interrupt Mask Register)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/netif/dp8390/ne2000.c

    r6643a19 rabe95c9  
    7676static irq_cmd_t ne2k_cmds[] = {
    7777        {
     78                /* Read Interrupt Status Register */
    7879                .cmd = CMD_PIO_READ_8,
    7980                .addr = NULL,
     
    8182        },
    8283        {
     84                /* Mask supported interrupt causes */
    8385                .cmd = CMD_BTEST,
    84                 .value = 0x7f,
     86                .value = (ISR_PRX | ISR_PTX | ISR_RXE | ISR_TXE | ISR_OVW |
     87                    ISR_CNT | ISR_RDC),
    8588                .srcarg = 2,
    8689                .dstarg = 3,
    8790        },
    8891        {
     92                /* Predicate for accepting the interrupt */
    8993                .cmd = CMD_PREDICATE,
    90                 .value = 2,
     94                .value = 3,
    9195                .srcarg = 3
    9296        },
    9397        {
     98                /*
     99                 * Mask future interrupts via
     100                 * Interrupt Mask Register
     101                 */
     102                .cmd = CMD_PIO_WRITE_8,
     103                .addr = NULL,
     104                .value = 0
     105        },
     106        {
     107                /* Acknowledge the current interrupt */
    94108                .cmd = CMD_PIO_WRITE_A_8,
    95109                .addr = NULL,
     
    265279               
    266280                ne2k_cmds[0].addr = ne2k->port + DP_ISR;
    267                 ne2k_cmds[3].addr = ne2k_cmds[0].addr;
     281                ne2k_cmds[3].addr = ne2k->port + DP_IMR;
     282                ne2k_cmds[4].addr = ne2k_cmds[0].addr;
    268283               
    269284                int rc = ipc_register_irq(ne2k->irq, device->device_id,
Note: See TracChangeset for help on using the changeset viewer.