Changeset c01bb5f9 in mainline for uspace/drv/nic/rtl8139/driver.c


Ignore:
Timestamp:
2012-02-16T21:21:39Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
39aa8ce, 856a36b, f943dd3
Parents:
edd7c63c (diff), 21063c2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/mm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8139/driver.c

    redd7c63c rc01bb5f9  
    661661
    662662
     663irq_pio_range_t rtl8139_irq_pio_ranges[] = {
     664        {
     665                .base = 0,
     666                .size = RTL8139_IO_SIZE
     667        }
     668};
    663669
    664670/** Commands to deal with interrupt
     
    670676 */
    671677irq_cmd_t rtl8139_irq_commands[] = {
    672                 {
    673                                 /* Get the interrupt status */
    674                                 .cmd = CMD_PIO_READ_16,
    675                                 .addr = NULL,
    676                                 .dstarg = 2
    677                 },
    678                 {
    679                                 .cmd = CMD_PREDICATE,
    680                                 .value = 3,
    681                                 .srcarg = 2
    682                 },
    683                 {
    684                                 /* Mark interrupts as solved */
    685                                 .cmd = CMD_PIO_WRITE_16,
    686                                 .addr = NULL,
    687                                 .value = 0xFFFF
    688                 },
    689                 {
    690                                 /* Disable interrupts until interrupt routine is finished */
    691                                 .cmd = CMD_PIO_WRITE_16,
    692                                 .addr = NULL,
    693                                 .value = 0x0000
    694                 },
    695                 {
    696                                 .cmd = CMD_ACCEPT
    697                 }
     678        {
     679                /* Get the interrupt status */
     680                .cmd = CMD_PIO_READ_16,
     681                .addr = NULL,
     682                .dstarg = 2
     683        },
     684        {
     685                .cmd = CMD_PREDICATE,
     686                .value = 3,
     687                .srcarg = 2
     688        },
     689        {
     690                /* Mark interrupts as solved */
     691                .cmd = CMD_PIO_WRITE_16,
     692                .addr = NULL,
     693                .value = 0xFFFF
     694        },
     695        {
     696                /* Disable interrupts until interrupt routine is finished */
     697                .cmd = CMD_PIO_WRITE_16,
     698                .addr = NULL,
     699                .value = 0x0000
     700        },
     701        {
     702                .cmd = CMD_ACCEPT
     703        }
    698704};
    699705
    700706/** Interrupt code definition */
    701707irq_code_t rtl8139_irq_code = {
    702         .cmdcount = sizeof(rtl8139_irq_commands)/sizeof(irq_cmd_t),
     708        .rangecount = sizeof(rtl8139_irq_pio_ranges) / sizeof(irq_pio_range_t),
     709        .ranges = rtl8139_irq_pio_ranges,
     710        .cmdcount = sizeof(rtl8139_irq_commands) / sizeof(irq_cmd_t),
    703711        .cmds = rtl8139_irq_commands
    704712};
     
    890898        RTL8139_IRQ_STRUCT_LOCK();
    891899
    892         rtl8139_irq_code.cmds[0].addr = rtl8139->io_port + ISR;
    893         rtl8139_irq_code.cmds[2].addr = rtl8139->io_port + ISR;
    894         rtl8139_irq_code.cmds[3].addr = rtl8139->io_port + IMR;
     900        rtl8139_irq_code.ranges[0].base = (uintptr_t) rtl8139->io_addr;
     901        rtl8139_irq_code.cmds[0].addr = rtl8139->io_addr + ISR;
     902        rtl8139_irq_code.cmds[2].addr = rtl8139->io_addr + ISR;
     903        rtl8139_irq_code.cmds[3].addr = rtl8139->io_addr + IMR;
    895904        int rc = register_interrupt_handler(nic_get_ddf_dev(nic_data),
    896                 rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code);
     905            rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code);
    897906
    898907        RTL8139_IRQ_STRUCT_UNLOCK();
Note: See TracChangeset for help on using the changeset viewer.