Changeset 2f11e6c9 in mainline
- Timestamp:
- 2014-08-11T20:42:56Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2ff9876
- Parents:
- a41b691
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8169/driver.c
ra41b691 r2f11e6c9 27 27 */ 28 28 29 #define _DDF_DATA_IMPLANT30 31 29 #include <assert.h> 32 30 #include <errno.h> … … 439 437 nic_set_ddf_fun(nic_data, fun); 440 438 ddf_fun_set_ops(fun, &rtl8169_dev_ops); 441 // ddf_fun_data_implant(fun, nic_data);442 439 443 440 rc = ddf_fun_bind(fun); … … 739 736 pio_write_16(rtl8169->regs + RMS, BUFFER_SIZE); 740 737 741 ddf_msg(LVL_NOTE, "RCR: 0x%08x", pio_read_32(rtl8169->regs + RCR));742 743 744 738 pio_write_16(rtl8169->regs + IMR, 0xffff); 745 739 irc_enable_interrupt(rtl8169->irq); … … 816 810 rtl8169_t *rtl8169 = nic_get_specific(nic_data); 817 811 rtl8169_descr_t *descr; 818 819 ddf_msg(LVL_NOTE, "rtl8169_transmit_done()"); 812 int sent = 0; 813 814 ddf_msg(LVL_DEBUG, "rtl8169_transmit_done()"); 820 815 821 816 fibril_mutex_lock(&rtl8169->tx_lock); … … 828 823 descr->control &= (~CONTROL_OWN); 829 824 write_barrier(); 830 ddf_msg(LVL_ NOTE, "TX status for descr %d: 0x%08x", tail, descr->control);825 ddf_msg(LVL_DEBUG, "TX status for descr %d: 0x%08x", tail, descr->control); 831 826 832 827 tail = (tail + 1) % TX_BUFFERS_COUNT; 833 } 828 sent++; 829 } 830 831 if (sent != 0) 832 nic_set_tx_busy(nic_data, 0); 834 833 835 834 rtl8169->tx_tail = tail; … … 849 848 int frame_size; 850 849 851 ddf_msg(LVL_ NOTE, "rtl8169_receive_done()");850 ddf_msg(LVL_DEBUG, "rtl8169_receive_done()"); 852 851 853 852 fibril_mutex_lock(&rtl8169->rx_lock); … … 862 861 863 862 if (descr->control & RXSTATUS_RES) { 864 ddf_msg(LVL_ NOTE, "error at slot %d: 0x%08x\n", tail, descr->control);863 ddf_msg(LVL_WARN, "error at slot %d: 0x%08x\n", tail, descr->control); 865 864 tail = (tail + 1) % RX_BUFFERS_COUNT; 866 865 continue; … … 871 870 872 871 if (descr->control & CONTROL_LS) { 873 874 ddf_msg(LVL_NOTE, "received message at slot %d, control 0x%08x", tail, descr->control); 872 ddf_msg(LVL_DEBUG, "received message at slot %d, control 0x%08x", tail, descr->control); 875 873 876 874 if (fsidx != tail) … … 907 905 rtl8169_t *rtl8169 = nic_get_specific(nic_data); 908 906 909 ddf_msg(LVL_ NOTE, "rtl8169_irq_handler(): isr=0x%04x", isr);907 ddf_msg(LVL_DEBUG, "rtl8169_irq_handler(): isr=0x%04x", isr); 910 908 pio_write_16(rtl8169->regs + IMR, 0xffff); 911 909 … … 963 961 fibril_mutex_lock(&rtl8169->tx_lock); 964 962 965 ddf_msg(LVL_ NOTE, "send_frame: size: %zu, tx_head=%d tx_tail=%d",963 ddf_msg(LVL_DEBUG, "send_frame: size: %zu, tx_head=%d tx_tail=%d", 966 964 size, rtl8169->tx_head, rtl8169->tx_tail); 967 965 … … 986 984 prev = &rtl8169->tx_ring[(head - 1) % TX_BUFFERS_COUNT]; 987 985 988 ddf_msg(LVL_ NOTE, "current_descr=%p, prev_descr=%p", descr, prev);986 ddf_msg(LVL_DEBUG, "current_descr=%p, prev_descr=%p", descr, prev); 989 987 990 988 descr->control = CONTROL_OWN | CONTROL_FS | CONTROL_LS;
Note:
See TracChangeset
for help on using the changeset viewer.