Am 04.10.2010 22:13, Edward Hoffman wrote:
> I am attempting to port the Broadcom tg3 NetXtreme linux driver to
> rtnet.

Your port will be welcome!

> The Broadcom driver internally utilizes
> spin_lock_bh/spin_unlock_bh to disable/enable software interrupts.
> There is no rtdm lock equivalent.
> I believe that software interrupts are used by the driver for the
> following reasons:
> 1. To allow for simultaneous DMA read write operations
> 2. To use shared local variables in a critical section of the driver.
> 3. To receive changes to settings variables in realtime from the
> userpace Nextreme utilities.  (not sure about this one).
> 
> What RTDM lock functions should I use to substitute for
> spin_lock_bh/spin_unlock_bh?  Should I substitute
> rtdm_lock_get_irqsave/rtdm_lock_put_irqrestore?  Or does rtdm need to ne
> extended for softirqs used internally by the driver?
> 
> I looked through the other device drivers and could not detect the
> correct substitute.

As RTDM provides no abstraction of bottom-halves, there are also no
specific locking services to disable them. You have to use IRQ-disabling
services unless you are in IRQ context.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to