lkml.org 
[lkml]   [2010]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Gigabit Ethernet driver of Topcliff PCH

    > +/**
    > + * pch_gbe_mac_init_rx_addrs - Initialize receive address's
    > + * @hw: Pointer to the HW structure
    > + * @mar_count: Receive address registers
    > + */
    > +void pch_gbe_mac_init_rx_addrs(struct pch_gbe_hw *hw, u16 mar_count)
    > +{
    > + u32 i;
    > + PCH_GBE_DEBUG("pch_gbe_mac_init_rx_addrs\n");
    > +
    > + /* Setup the receive address */
    > + pch_gbe_mac_mar_set(hw, hw->mac.addr, 0);
    > +
    > + /* Zero out the other receive addresses */
    > + for (i = 1; i < mar_count; i++) {
    > + iowrite32(0, &hw->reg->mac_adr[i].high);
    > + iowrite32(0, &hw->reg->mac_adr[i].low);
    > + }
    > + iowrite32(0xFFFE, &hw->reg->ADDR_MASK);
    > + /* wait busy */
    > + while ((ioread32(&hw->reg->ADDR_MASK) & PCH_GBE_BUSY))
    > + ;
    > +}

    Use cpu_relax here to allow other hyper-thread to run.
    /* wait busy */
    while ((ioread32(&hw->reg->ADDR_MASK) & PCH_GBE_BUSY))
    cpu_relax();


    \
     
     \ /
      Last update: 2010-08-26 17:49    [W:4.088 / U:0.220 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site