Changeset ebb1489 in mainline for uspace/drv/nic/rtl8169/driver.c


Ignore:
Timestamp:
2024-10-13T08:23:40Z (8 weeks ago)
Author:
GitHub <noreply@…>
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)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

File:
1 edited

Legend:

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

    r2a0c827c rebb1489  
    7474static errno_t rtl8169_on_stopped(nic_t *nic_data);
    7575static 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);
     76static void rtl8169_irq_handler(ipc_call_t *icall, void *);
    7777static inline errno_t rtl8169_register_int_handler(nic_t *nic_data,
    7878    cap_irq_handle_t *handle);
     
    372372        rtl8169_irq_code.cmds[3].addr = rtl8169->regs + IMR;
    373373        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);
    375376
    376377        return rc;
     
    10341035}
    10351036
    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 */
     1042static void rtl8169_irq_handler(ipc_call_t *icall, void *arg)
     1043{
    10411044        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;
    10441046
    10451047        ddf_msg(LVL_DEBUG, "rtl8169_irq_handler(): isr=0x%04x", isr);
     
    10511053                /* Packet underrun or link change */
    10521054                if (isr & INT_PUN) {
    1053                         rtl8169_link_change(dev);
     1055                        rtl8169_link_change(rtl8169->dev);
    10541056                        pio_write_16(rtl8169->regs + ISR, INT_PUN);
    10551057                }
     
    10571059                /* Transmit notification */
    10581060                if (isr & (INT_TER | INT_TOK | INT_TDU)) {
    1059                         rtl8169_transmit_done(dev);
     1061                        rtl8169_transmit_done(rtl8169->dev);
    10601062                        pio_write_16(rtl8169->regs + ISR, (INT_TER | INT_TOK | INT_TDU));
    10611063                }
     
    10731075
    10741076                if (isr & (INT_RER | INT_ROK)) {
    1075                         rtl8169_receive_done(dev);
     1077                        rtl8169_receive_done(rtl8169->dev);
    10761078                        pio_write_16(rtl8169->regs + ISR, (INT_RER | INT_ROK));
    10771079                }
Note: See TracChangeset for help on using the changeset viewer.