Changeset e777847 in mainline for uspace/drv/nic/rtl8139/driver.c
- Timestamp:
- 2012-02-12T22:55:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f2bbe8c
- Parents:
- 9571230
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8139/driver.c
r9571230 re777847 660 660 661 661 662 irq_pio_range_t rtl8139_irq_pio_ranges[] = { 663 { 664 .base = 0, 665 .size = RTL8139_IO_SIZE 666 } 667 }; 662 668 663 669 /** Commands to deal with interrupt … … 669 675 */ 670 676 irq_cmd_t rtl8139_irq_commands[] = { 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 677 { 678 /* Get the interrupt status */ 679 .cmd = CMD_PIO_READ_16, 680 .addr = NULL, 681 .dstarg = 2 682 }, 683 { 684 .cmd = CMD_PREDICATE, 685 .value = 3, 686 .srcarg = 2 687 }, 688 { 689 /* Mark interrupts as solved */ 690 .cmd = CMD_PIO_WRITE_16, 691 .addr = NULL, 692 .value = 0xFFFF 693 }, 694 { 695 /* Disable interrupts until interrupt routine is finished */ 696 .cmd = CMD_PIO_WRITE_16, 697 .addr = NULL, 698 .value = 0x0000 699 }, 700 { 701 .cmd = CMD_ACCEPT 702 } 697 703 }; 698 704 699 705 /** Interrupt code definition */ 700 706 irq_code_t rtl8139_irq_code = { 701 .cmdcount = sizeof(rtl8139_irq_commands)/sizeof(irq_cmd_t), 707 .rangecount = sizeof(rtl8139_irq_pio_ranges) / sizeof(irq_pio_range_t), 708 .ranges = rtl8139_irq_pio_ranges, 709 .cmdcount = sizeof(rtl8139_irq_commands) / sizeof(irq_cmd_t), 702 710 .cmds = rtl8139_irq_commands 703 711 }; … … 889 897 RTL8139_IRQ_STRUCT_LOCK(); 890 898 891 rtl8139_irq_code.cmds[0].addr = rtl8139->io_port + ISR; 892 rtl8139_irq_code.cmds[2].addr = rtl8139->io_port + ISR; 893 rtl8139_irq_code.cmds[3].addr = rtl8139->io_port + IMR; 899 rtl8139_irq_code.ranges[0].base = (uintptr_t) rtl8139->io_addr; 900 rtl8139_irq_code.cmds[0].addr = rtl8139->io_addr + ISR; 901 rtl8139_irq_code.cmds[2].addr = rtl8139->io_addr + ISR; 902 rtl8139_irq_code.cmds[3].addr = rtl8139->io_addr + IMR; 894 903 int rc = register_interrupt_handler(nic_get_ddf_dev(nic_data), 895 904 rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code); 896 905 897 906 RTL8139_IRQ_STRUCT_UNLOCK();
Note:
See TracChangeset
for help on using the changeset viewer.