Changeset ebb1489 in mainline for uspace/drv/nic/rtl8169/driver.c
- Timestamp:
- 2024-10-13T08:23:40Z (8 weeks ago)
- Children:
- 0472cf17
- Parents:
- 2a0c827c (diff), b3b79981 (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. - git-author:
- boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
- git-committer:
- GitHub <noreply@…> (2024-10-13 08:23:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8169/driver.c
r2a0c827c rebb1489 74 74 static errno_t rtl8169_on_stopped(nic_t *nic_data); 75 75 static void rtl8169_send_frame(nic_t *nic_data, void *data, size_t size); 76 static void rtl8169_irq_handler(ipc_call_t *icall, ddf_dev_t *dev);76 static void rtl8169_irq_handler(ipc_call_t *icall, void *); 77 77 static inline errno_t rtl8169_register_int_handler(nic_t *nic_data, 78 78 cap_irq_handle_t *handle); … … 372 372 rtl8169_irq_code.cmds[3].addr = rtl8169->regs + IMR; 373 373 errno_t rc = register_interrupt_handler(nic_get_ddf_dev(nic_data), 374 rtl8169->irq, rtl8169_irq_handler, &rtl8169_irq_code, handle); 374 rtl8169->irq, rtl8169_irq_handler, (void *)rtl8169, 375 &rtl8169_irq_code, handle); 375 376 376 377 return rc; … … 1034 1035 } 1035 1036 1036 static void rtl8169_irq_handler(ipc_call_t *icall, ddf_dev_t *dev) 1037 { 1038 assert(dev); 1039 assert(icall); 1040 1037 /** RTL8169 IRQ handler. 1038 * 1039 * @param icall IRQ event notification 1040 * @param arg Argument (rtl8169_t *) 1041 */ 1042 static void rtl8169_irq_handler(ipc_call_t *icall, void *arg) 1043 { 1041 1044 uint16_t isr = (uint16_t) ipc_get_arg2(icall) & INT_KNOWN; 1042 nic_t *nic_data = nic_get_from_ddf_dev(dev); 1043 rtl8169_t *rtl8169 = nic_get_specific(nic_data); 1045 rtl8169_t *rtl8169 = (rtl8169_t *)arg; 1044 1046 1045 1047 ddf_msg(LVL_DEBUG, "rtl8169_irq_handler(): isr=0x%04x", isr); … … 1051 1053 /* Packet underrun or link change */ 1052 1054 if (isr & INT_PUN) { 1053 rtl8169_link_change( dev);1055 rtl8169_link_change(rtl8169->dev); 1054 1056 pio_write_16(rtl8169->regs + ISR, INT_PUN); 1055 1057 } … … 1057 1059 /* Transmit notification */ 1058 1060 if (isr & (INT_TER | INT_TOK | INT_TDU)) { 1059 rtl8169_transmit_done( dev);1061 rtl8169_transmit_done(rtl8169->dev); 1060 1062 pio_write_16(rtl8169->regs + ISR, (INT_TER | INT_TOK | INT_TDU)); 1061 1063 } … … 1073 1075 1074 1076 if (isr & (INT_RER | INT_ROK)) { 1075 rtl8169_receive_done( dev);1077 rtl8169_receive_done(rtl8169->dev); 1076 1078 pio_write_16(rtl8169->regs + ISR, (INT_RER | INT_ROK)); 1077 1079 }
Note:
See TracChangeset
for help on using the changeset viewer.