Fork us on GitHub Follow us on Facebook Follow us on Twitter

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


Ignore:
Timestamp:
2017-10-04T18:13:24Z (4 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master
Children:
0e3b402
Parents:
05b59393
Message:

Rename rtl8139_hw_int_enable() to rtl8139_hw_int_set(), since it's used both ways. Remove unused functions.

File:
1 edited

Legend:

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

    r05b59393 rc9e88da  
    125125
    126126
    127 /** Disable interrupts on controller
     127/** Set interrupts on controller
    128128 *
    129129 *  @param rtl8139  The card private structure
    130130 */
    131 inline static void rtl8139_hw_int_disable(rtl8139_t *rtl8139)
    132 {
    133         pio_write_16(rtl8139->io_port + IMR, 0x0);
    134 }
    135 /** Enable interrupts on controller
    136  *
    137  *  @param rtl8139  The card private structure
    138  */
    139 inline static void rtl8139_hw_int_enable(rtl8139_t *rtl8139)
     131inline static void rtl8139_hw_int_set(rtl8139_t *rtl8139)
    140132{
    141133        pio_write_16(rtl8139->io_port + IMR, rtl8139->int_mask);
     
    274266}
    275267
    276 /**  Provide OR in the 32bit register (set selected bits to 1)
    277  *
    278  *   @param rtl8139     The rtl8139 structure
    279  *   @param reg_offset  Register offset in the device IO space
    280  *   @param bits_add    The value to or
    281  */
    282 inline static void rtl8139_hw_reg_add_32(rtl8139_t * rtl8139, size_t reg_offset,
    283     uint32_t bits_add)
    284 {
    285         uint32_t value = pio_read_32(rtl8139->io_port + reg_offset);
    286         value |= bits_add;
    287         pio_write_32(rtl8139->io_port + reg_offset, value);
    288 }
    289 
    290268/**  Unset selected bits in 8bit register
    291269 *
     
    301279        pio_write_8(rtl8139->io_port + reg_offset, value);
    302280}
    303 
    304 /**  Unset selected bits in 32bit register
    305  *
    306  *   @param rtl8139     The rtl8139 structure
    307  *   @param reg_offset  Register offset in the device IO space
    308  *   @param bits_add    The mask of bits to remove
    309  */
    310 inline static void rtl8139_hw_reg_rem_32(rtl8139_t * rtl8139, size_t reg_offset,
    311     uint32_t bits_add)
    312 {
    313         uint32_t value = pio_read_32(rtl8139->io_port + reg_offset);
    314         value &= ~bits_add;
    315         pio_write_32(rtl8139->io_port + reg_offset, value);
    316 }
    317 
    318281
    319282static int rtl8139_set_addr(ddf_fun_t *fun, const nic_address_t *);
     
    871834
    872835        /* Turn the interrupts on again */
    873         rtl8139_hw_int_enable(rtl8139);
     836        rtl8139_hw_int_set(rtl8139);
    874837};
    875838
     
    955918
    956919        rtl8139->int_mask = RTL_DEFAULT_INTERRUPTS;
    957         rtl8139_hw_int_enable(rtl8139);
     920        rtl8139_hw_int_set(rtl8139);
    958921
    959922        int rc = irc_enable_interrupt(rtl8139->irq);
     
    21202083                /* Disable timer interrupts while working with timer-related data */
    21212084                rtl8139->int_mask = 0;
    2122                 rtl8139_hw_int_enable(rtl8139);
     2085                rtl8139_hw_int_set(rtl8139);
    21232086
    21242087                rtl8139->poll_timer = new_timer;
     
    21432106        }
    21442107
    2145         rtl8139_hw_int_enable(rtl8139);
     2108        rtl8139_hw_int_set(rtl8139);
    21462109
    21472110        fibril_mutex_unlock(&rtl8139->rx_lock);
Note: See TracChangeset for help on using the changeset viewer.