Now I am changing normal linux ethernet driver of powerpc board to rtnet based
real time ethernet driver .My linux driver is basically based on This driver is
based on the driver code originally developed for the Intel IOC80314(ForestLake)
Gigabit Ethernet by scott.w...@timesys.com.
transmission part of the driver is working properly but the receiver part is not
ok. When the receiver interrupt occurs the system will hang.
My driver’s Rx section includes certain functions like
netif_rx_schedule_prep(dev), __netif_rx_schedule((struct net_device *) dev);

what are the alternate methods to change these function to compatible with rtnet
format?Readme says netif_ functions to rtnetif_ but this option is not
applicable for netif_rx_schedule_prep(dev), __netif_rx_schedule((struct
net_device *) functions

Is there any alternate method to change or modify these functions?can any one
help me?
I will put the part of the rx_int function here……………
static void tsi109_rx_int(rtnet_device *dev)
{
        tsi109_prv_data *data = dev->priv;//    tsi109_prv_data *data = (struct
tsi109_prv_data *)(dev);
// Naishab
rtdm_lockctx_t context;

        // A race could cause dev to already be scheduled, so it's not an
        // error if that happens (and interrupts shouldn't be re-masked,
        // because that can cause harmful races, if poll has already
        // unmasked them but not cleared LINK_STATE_SCHED).  
        //
        // This can happen if this code races with tsi109_poll(), which masks
        // the interrupts after tsi109_irq_one() read the mask, but before
        // netif_rx_schedule is called.  It could also happen due to calls
        // from tsi109_check_rxring().
//      struct napi_struct temp_napi;
//      if (netif_rx_schedule_prep(dev, &temp_napi)) {
        if (netif_rx_schedule_prep((struct net_device *) dev)) {
                // Mask, rather than ack, the receive interrupts.  The ack
                // will happen in tsi109_poll().

//Naishab       spin_lock_irq(&data->intmasklock);
                rtdm_lock_get_irqsave(&data->intmasklock, context);
                data->regs[TSI109_EC_INTMASK] |= TSI109_INT_RXQUEUE0 | 
TSI109_INT_RXTHRESH |
                                             TSI109_INT_RXOVERRUN | 
TSI109_INT_RXERROR |
                                             TSI109_INT_RXWAIT;
                mb();
//Naishab       spin_unlock_irq(&data->intmasklock);
                rtdm_lock_put_irqrestore(&data->intmasklock, context);
                __netif_rx_schedule((struct net_device *) dev);
//              __netif_rx_schedule(dev, &temp_napi);
        } else {
                if (!rtnetif_running(dev)) {
                        
                        
//Naishab               spin_lock_irq(&data->intmasklock);
                        rtdm_lock_get_irqsave(&data->intmasklock, context);
                        data->regs[TSI109_EC_INTMASK] |= TSI109_INT_RXQUEUE0 | 
TSI109_INT_RXTHRESH |
                                                     TSI109_INT_RXOVERRUN | 
TSI109_INT_RXERROR |
                                                     TSI109_INT_RXWAIT;
                        mb();
//Naishab               spin_unlock_irq(&data->intmasklock);
                        rtdm_lock_put_irqrestore(&data->intmasklock, context);
                }
        }
}


Can any one help me???????????Thanks in advance…………………
                                                  anju




------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to