Hello,
         I am a beginner in rtnet programming.I am now modifying the normal
Linux ethernet driver into rtnet ethernet driver ,modifications are made
comparing the drivers given in the rtnet-0.9.11 driver folder and following
the steps given in the README.drvporting.Made modification to the driver
mainly based on the drivers rt_pcnet32.c,rt_natsemi.c,rt_8139too.c &
rt_via-rhine.c ect.

But my driver includes some more functions that are not defined in the
drivers above mentioned.How can i modify these function to suit the rtnet
format?
some of the functions are:
*1.netif_rx_schedule_prep(dev),
2.skb_shinfo(skb),
3.rtnl_unlock (),rtnl_lock (),rtnl_lock_interruptible () etc..*
I have some more queries -*poll() fuction is used in rtnet programming?
How can i expand the rtskb pool size?
Is data_len is used in rtnet?*
In my case the problem is with the receiving section..it is not workiing
properly..
can any one help me..
*I will post the changes in form of a patch against rtnet.git*
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)) {
            // This can happen if an interrupt occurs while the
            // interface is being brought down, as the START
            // bit is cleared before the stop function is called.
            //
            // In this case, the interrupts must be masked, or
            // they will continue indefinitely.
            //
            // There's a race here if the interface is brought down
            // and then up in rapid succession, as the device could
            // be made running after the above check and before
            // the masking below.  This will only happen if the IRQ
            // thread has a lower priority than the task brining
            // up the interface.  Fixing this race would likely
            // require changes in generic code.

//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 anyone help me????????? thanks in
advance..please reply to my mail id...
                                         anju amry joseph
------------------------------------------------------------------------------
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