NFS - client ip address

2012-07-03 Thread Ran Shalit
Hello, I would like to ask your advise concerning modifying ip address: I need to modify ip address and ethernet address according to some hardware input in application. This change can be done in u-boot or linux. When I consider where is the best place to set the ip/mac address ( u-boot or

NFS - changing IP address after startup

2012-07-06 Thread Ran Shalit
Hello, Is it legal to change ip address mac address when working with NFS, and after linux finished startup ? It seems that in such case, NFS can get stuck, right? Thank you, Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

Re: External devices

2014-09-06 Thread Ran Shalit
Hi, Thanks very much for the detailed answer. If I may ask one more on this issue please... I am required to put some external device (led brightness) into minimal brightness when the system gets to idle. The control on led brightness value is done as part of dedicated character device which was

wakeup source - power management

2014-09-06 Thread Ran Shalit
Hello What does it mean device without wakeup source in terms of runtime PM ? Thanks, Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: wakeup source - power management

2014-09-07 Thread Ran Shalit
On Sun, Sep 7, 2014 at 11:36 PM, AYAN KUMAR HALDER ayankum...@gmail.com wrote: On Mon, Sep 8, 2014 at 1:50 AM, Ran Shalit ransha...@gmail.com wrote: On Sun, Sep 7, 2014 at 11:14 PM, AYAN KUMAR HALDER ayankum...@gmail.com wrote: On Sat, Sep 6, 2014 at 9:56 PM, Ran Shalit ransha...@gmail.com

Any char device example for runtime PM ?

2014-09-07 Thread Ran Shalit
Hello, Is there any character device example using runtime PM available ? It is most helpful, Thanks, Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: wakeup source - power management

2014-09-09 Thread Ran Shalit
On Mon, Sep 8, 2014 at 9:43 PM, AYAN KUMAR HALDER ayankum...@gmail.com wrote: How should a wakeup source for a device be configured in code. I could not find it documented anywhere. Check out drivers/input/keyboard/samsung-keypad.c. It is configured as a wakeup source:- 1.

Re: External devices

2014-09-09 Thread Ran Shalit
On Tue, Sep 9, 2014 at 8:44 PM, AYAN KUMAR HALDER ayankum...@gmail.com wrote: Now, the thing I don't yet understand is what the wakeup source means in this configuration. Wakeup only for a specific device driver ? Wakeup source has its relevance mostly for system suspend/resume where in a

Re: wakeup source - power management

2014-09-09 Thread Ran Shalit
On Tue, Sep 9, 2014 at 8:48 PM, AYAN KUMAR HALDER ayankum...@gmail.com wrote: Is the wakeup source relevant only for suspend/resume , or also for runtime PM ? for example, is the keybaord example , which you linked, relevant for runtime PM too ? Refer to my reply in the other thread. If yes

suspend/resume PM criterion for application

2014-09-10 Thread Ran Shalit
Hello, What is usually the criterion for PM (power management) suspending that application shall use ? Is it according to minimum threshold for cpu load (as indication for no process) ? How usually it is performed, i.e. is it some periodic process, which wakes up periodically to check criterion

Re: suspend/resume PM criterion for application

2014-09-10 Thread Ran Shalit
On Wed, Sep 10, 2014 at 8:59 PM, valdis.kletni...@vt.edu wrote: On Wed, 10 Sep 2014 20:26:48 +0300, Ran Shalit said: What is usually the criterion for PM (power management) suspending that application shall use ? Is it according to minimum threshold for cpu load (as indication for no process

Re: suspend/resume PM criterion for application

2014-09-10 Thread Ran Shalit
On Wed, Sep 10, 2014 at 9:39 PM, valdis.kletni...@vt.edu wrote: On Wed, 10 Sep 2014 21:23:28 +0300, Ran Shalit said: As far as I understand, suspend/respond PM is not per device, but for all system, and wakeup source will resume again the whole system. I think you mean runtime suspend

Re: suspend/resume PM criterion for application

2014-09-10 Thread Ran Shalit
On Wed, Sep 10, 2014 at 10:25 PM, valdis.kletni...@vt.edu wrote: On Wed, 10 Sep 2014 21:58:48 +0300, Ran Shalit said: 1. How can I make a process to notice this inactivity ? Do you think it can be implemented by some periodic process who check if there is activity ? It returns

Re: suspend/resume PM criterion for application

2014-09-14 Thread Ran Shalit
On Thu, Sep 11, 2014 at 12:24 PM, Ran Shalit ransha...@gmail.com wrote: On Thu, Sep 11, 2014 at 8:32 AM, AYAN KUMAR HALDER ayankum...@gmail.com wrote: On Thu, Sep 11, 2014 at 12:55 AM, valdis.kletni...@vt.edu wrote: On Wed, 10 Sep 2014 21:58:48 +0300, Ran Shalit said: 1. How can I make

Re: Any char device example for runtime PM ?

2014-09-14 Thread Ran Shalit
On Sun, Sep 14, 2014 at 7:45 PM, Peter Teoh htmldevelo...@gmail.com wrote: On Sat, Sep 13, 2014 at 3:50 PM, Ran Shalit ransha...@gmail.com wrote: On Sat, Sep 13, 2014 at 4:14 AM, Peter Teoh htmldevelo...@gmail.com wrote: please elaborate your requirements. char dev is for I/O to hardware

cpuidle - rate

2014-10-08 Thread Ran Shalit
Hello, What should be the approximate rate of entering and exit retention mode in cpuide ? Thanks Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

cpuidle - minimum time for sleep

2014-10-09 Thread Ran Shalit
Hello, Does anybody know what is the minimum expected time for sleep period with the cpuidle ? I intend t use the menu governer, and I try to estimate the sleep time. Thanks, Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

understanding cpuidle

2014-10-16 Thread Ran Shalit
Hello, I try to understand the cpuidle main concept but have some difficulties. I could not find any documentation to explain the cpuidle. what does it mean that it enters idle when no thread to run ?if I have only one process which does only while(1) { printf(C); mdelay(1000); } Can I expect

mmap - post/pre actions

2015-09-15 Thread Ran Shalit
Hello, I need to implement mmap for non-volatile memory chip (NVRAM). I already did something simple, but now I understand that it is not complete: The nvram need to be unlock and locked after finishing the memory task of read/write. Does mmap can handle such post/pre actions or not ( I guess

Must we close serial telnet connection for kgdb to work ?

2015-10-01 Thread Ran Shalit
Hello, I've successfuly managed to work with kgdb on linux: 3.14.25 But it seems that I must close the serial connection (which uses also for stdout print), in order for the kgdb to manage its communication ? I can use telnet instead, but still I thought that kgdb can handle both the kgdb

Re: wipe framebuffer with dd command

2015-12-05 Thread Ran Shalit
On Sat, Dec 5, 2015 at 8:03 AM, Ran Shalit <ransha...@gmail.com> wrote: > Hello, > > I would like to ask what is the effect of wiping frame buffer (dd > if=/dev/zero of=/dev/fb0) ? > I have some issue with framebuffer timing on LCD 240x320. > I could not find a timing wi

wipe framebuffer with dd command

2015-12-04 Thread Ran Shalit
Hello, I would like to ask what is the effect of wiping frame buffer (dd if=/dev/zero of=/dev/fb0) ? I have some issue with framebuffer timing on LCD 240x320. I could not find a timing with width=240, height=320 which result in stable picture, but the following timing gave me stable ppicture with

Re: dma_alloc_coherent

2016-02-06 Thread Ran Shalit
On Fri, Feb 5, 2016 at 11:15 AM, Denis Kirjanov <kirja...@gmail.com> wrote: > On 2/5/16, Ran Shalit <ransha...@gmail.com> wrote: >> Hello, >> >> I read the readme about dma API, but still don't understand how it >> should be used >> It is said that dma

dma_alloc_coherent

2016-02-05 Thread Ran Shalit
Hello, I read the readme about dma API, but still don't understand how it should be used It is said that dma_alloc_coherent is responsible for allocating the buffer. 1. But how to trigger the dma transaction to start ? 2. Is there a callback when it is finished ? Thank you, Ran

Re: user rsyslog/syslog

2016-02-24 Thread Ran Shalit
On Wed, Feb 24, 2016 at 10:17 AM, <valdis.kletni...@vt.edu> wrote: > On Wed, 24 Feb 2016 09:36:54 +0200, Ran Shalit said: > >> I am trying to write to rsyslog from application. >> With openlog(..., LOG_USER), it works fine and I find the log in >> /var/log/u

user rsyslog/syslog

2016-02-23 Thread Ran Shalit
Hello, I am trying to write to rsyslog from application. With openlog(..., LOG_USER), it works fine and I find the log in /var/log/user.log (it is defines in /etc/rsyslog.d/50-defaults.conf ) But we need to enable different applications to have each its own log file. I tried to use LOG_LOCAL0

where is disk block access in kernel ?

2016-03-02 Thread Ran Shalit
Hello, I would like to monitor the write access to disk blocks (so that I can monitor the block index in some bitmap) I think this must be done in kernel (userspace have no such information) I have tried to search in kernel but did not found where is the API to access disk blocks. There is

Re: kmalloc/malloc for dma ?

2016-03-09 Thread Ran Shalit
On Wed, Mar 9, 2016 at 11:16 AM, Ran Shalit <ransha...@gmail.com> wrote: > Hello, > > I have some sample code which uses 2 test application: > 1. test application in kernel , which allocates buffer using kmalloc > (GFP_KERNEL) > 2. test application in userspace which alloc

kmalloc/malloc for dma ?

2016-03-09 Thread Ran Shalit
Hello, I have some sample code which uses 2 test application: 1. test application in kernel , which allocates buffer using kmalloc (GFP_KERNEL) 2. test application in userspace which allocates buffer using malloc In both cases the buffers are DMA through PCI. I don't understand how is it that

network driver & phy framework

2016-04-24 Thread Ran Shalit
Hello, I write a network driver, and I try to understand how to communicate with phy. I see several methods, but did not found documentation on the differences, and when to use each of these methods: 1. using generic phy - a. I think we use it when we don't know the exaxt phy (?), though I'm

Is there a way to force probe to be called (etherned driver) ?

2016-07-24 Thread Ran Shalit
Hello, I write ethernet driver (mac controller is implemented in fpga connected to cpu) I see that the probe is not called on doing insmod. Is there a way to force the probe to be called on doing insmod ? I could not find in the board file (omap dart, kernel 3.4.0) any reference to ethernet.

Re: Ethernet driver - without DMA ?

2016-07-29 Thread Ran Shalit
On Fri, Jul 29, 2016 at 10:03 PM, Greg KH <g...@kroah.com> wrote: > On Fri, Jul 29, 2016 at 09:47:40PM +0300, Ran Shalit wrote: >> Hello, >> >> Can we write Ethernet driver without using dma ? > > Sure, we have USB network drivers that don't use DMA. > >&

How to debug ethernet driver ?

2016-08-01 Thread Ran Shalit
Hello, I am writing ethernet network driver. I would like to ask if there are any steps which can help when debugging ethernet driver, or is it that the first test should already involve transmit/recieve packets to/from ip stack ? Any tips for debugging and testing a new ethernet driver will be

Ethernet driver - without DMA ?

2016-07-29 Thread Ran Shalit
Hello, Can we write Ethernet driver without using dma ? But still using sk_buff APIs like done in most drivers ? Thanks, Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

spi - real protocols

2017-01-30 Thread Ran Shalit
Hello, As I understand word length in spi, defines the cs active time. It therefore seems that linux driver suits when dealing with simple spi protocols which keeps word size constant. How can we deal with spi protocols which use different spi size as part of protocol. for example cs need to be

wake_up & wait_event are counting events ?

2017-01-19 Thread Ran Shalit
Hello, I am trying to correctly register interrupt in kernel for user interface: irq handler = static irqreturn_t irq_handler(int irq, void *dev_id) { struct elbit_irq_dev *elbit_irq = _irq_devices[0]; printk("irq in\n"); << clear interrupt in fpga here or after the call

show image of current buffer in frame buffer (/dev/fbX)

2016-08-19 Thread Ran Shalit
Hello, Is it possible to display in some way the current content of frame buffer ? I have some issue that on rendering to /dev/fb2 with one application (psplash), it goes to the correct output, but using another application (qt) it always goes to /dev/fb2 (even if I static link /dev/fb0 to

DMA mem<>mem vs device<>mem

2016-08-21 Thread Ran Shalit
Hello, I am not sure I understand the difference between dma mam<>mem to mem<>device. I am writing ethernet driver which use dma between ipstack buffer to fpga buffer (the fpga implements in hw the the ethernet mac). When moving buffers from one address (ipstack) to another (fpga) isn;t it just

dma - when can we use memory-to-memory ?

2016-08-22 Thread Ran Shalit
Hello, I have fpga connected to cpu. In fpga we implement fifo which the cpu need to write into or read from. The fpga is used for mac implementation. So we actually need to copy to/from ip stack buffer to the fifo buffers in fpga. As far as I understand this is memory-to-memory dma. But I am

Q: dma requires copying into dma buffer - so what's the benefit ?

2016-09-06 Thread Ran Shalit
Hello, There is something I don't understand about dma, when doing memory to memory dma, it requires to cllocate dma buffer (for example with dma_alloc_coherent), than for each transfer we need to copy the buffer to the allocated memory and than trigger dma transaction. So, if it requires

Re: Q: what is the need for console write callback if there is serial tx (start_tx) ?

2016-09-16 Thread Ran Shalit
On Thu, Sep 15, 2016 at 11:50 PM, <valdis.kletni...@vt.edu> wrote: > On Thu, 15 Sep 2016 23:19:51 +0300, Ran Shalit said: > >> Isn't writing to console, the same as outputing chars to serial ? > > No. For instance, consider any laptop where "console" is a

Q: what is the need for console write callback if there is serial tx (start_tx) ?

2016-09-15 Thread Ran Shalit
Hello, I am writing a driver with serial tx/rx. I am not sure what is the need console routines, when there is serial/uart tx/rx. Isn't writing to console, the same as outputing chars to serial ? I've tried to find information on this, but found none. Thank you, Ran

Re: How to use spi device from another kernel module?

2016-12-07 Thread Ran Shalit
On Wed, Dec 7, 2016 at 7:26 PM, Ran Shalit <ransha...@gmail.com> wrote: > On Wed, Dec 7, 2016 at 6:58 PM, Joel Fernandes <agnel.j...@gmail.com> wrote: >> On Tue, Dec 6, 2016 at 11:02 PM, Greg KH <g...@kroah.com> wrote: >>> On Tue, Dec 06, 2016 at 09:12:24PM -080

Re: How to use spi device from another kernel module?

2016-12-07 Thread Ran Shalit
On Wed, Dec 7, 2016 at 6:58 PM, Joel Fernandes <agnel.j...@gmail.com> wrote: > On Tue, Dec 6, 2016 at 11:02 PM, Greg KH <g...@kroah.com> wrote: >> On Tue, Dec 06, 2016 at 09:12:24PM -0800, Joel Fernandes wrote: >>> On Tue, Dec 6, 2016 at 11:42 AM, Ran Shal

Re: How to use spi device from another kernel module?

2016-12-08 Thread Ran Shalit
On Wed, Dec 7, 2016 at 8:21 PM, Ran Shalit <ransha...@gmail.com> wrote: > On Wed, Dec 7, 2016 at 7:26 PM, Ran Shalit <ransha...@gmail.com> wrote: >> On Wed, Dec 7, 2016 at 6:58 PM, Joel Fernandes <agnel.j...@gmail.com> wrote: >>> On Tue, Dec 6, 2016 at 11:0

Re: How to use spi device from another kernel module?

2016-12-07 Thread Ran Shalit
On Wed, Dec 7, 2016 at 9:02 AM, Greg KH <g...@kroah.com> wrote: > On Tue, Dec 06, 2016 at 09:12:24PM -0800, Joel Fernandes wrote: >> On Tue, Dec 6, 2016 at 11:42 AM, Ran Shalit <ransha...@gmail.com> wrote: >> > Hello, >> > >> > I have spi device w

How to use spi device from another kernel module?

2016-12-06 Thread Ran Shalit
Hello, I have spi device which is registered using spi_register_board_info(), and I would like to get a pointer to this device in some other kernel module. Is there a simple way to get a pointer to pointer to a device , so that we can use it from other module ? (something like i2c_get_adapter

Is it illegal to have kernel virtual address == 0 ?

2017-01-15 Thread Ran Shalit
Hello, I've seen some modules where it is tested if virtual address is 0, and if yes, it is acted as if it is an error. But can't virtual address be zero too ? For example, in the following module: https://github.com/khilman/omap-test-dmatest/blob/master/main.c it is checked the returned value

Re: disable input event device

2016-12-03 Thread Ran Shalit
On Sat, Dec 3, 2016 at 3:15 PM, Greg KH <g...@kroah.com> wrote: > On Sat, Dec 03, 2016 at 02:43:30PM +0200, Ran Shalit wrote: > > Hello, > > > > Is there some way to disable input event device ? > > Maybe a way to disable its irq usage ? > > > > I

Re: disable input event device

2016-12-03 Thread Ran Shalit
On Sat, Dec 3, 2016 at 8:58 PM, Daniel. <danielhi...@gmail.com> wrote: > Is xinput avaible? I know that it can be use to disable input devices, > but IFAIK android use custom GUI, that is not X... > > > No, it's not available in Android. > 2016-12-03 16:04 GMT-

Re: disable input event device

2016-12-03 Thread Ran Shalit
On Sat, Dec 3, 2016 at 7:59 PM, Ran Shalit <ransha...@gmail.com> wrote: > > > On Sat, Dec 3, 2016 at 7:48 PM, Daniel. <danielhi...@gmail.com> wrote: > >> Is blacklisting it an option?? >> >> > I think not, because blacklist is only for loaded mod

disable input event device

2016-12-03 Thread Ran Shalit
Hello, Is there some way to disable input event device ? Maybe a way to disable its irq usage ? I actually rather do that from shell, not from kernel, because the kernel source is not available, and I thought that issue is also relevant in the forum. Thank you, Ranchu

Re: How to control power of a device from sysfs ?

2016-12-05 Thread Ran Shalit
On Mon, Dec 5, 2016 at 10:24 AM, Umair Khan <omerj...@gmail.com> wrote: > On Mon, Dec 5, 2016 at 12:56 PM, Ran Shalit <ransha...@gmail.com> wrote: > > Hello, > > > > I am trying to turn off screen using sysfs entries, > > but I'm having some difficulties wi

Driver with hard RT requiremnets

2016-12-05 Thread Ran Shalit
Hello, We need to support serial driver with real time requirements (towards specific device with RT demands): Every 5.3msec receive 100 bytes and 1.3msec afterwards send 100 bytes. 1. Does kernel support real-time of such hard requirements ? 2. Is it matter if we do the exact bytes send/receive

Re: Driver with hard RT requiremnets

2016-12-05 Thread Ran Shalit
On Mon, Dec 5, 2016 at 4:35 PM, Greg KH <g...@kroah.com> wrote: > On Mon, Dec 05, 2016 at 04:24:05PM +0200, Ran Shalit wrote: > > Hello, > > > > We need to support serial driver with real time requirements (towards > specific > > device with RT demands):

Re: Driver to allow DMA from user space

2016-12-30 Thread Ran Shalit
On Sun, Dec 25, 2016 at 2:37 PM, Greg KH <g...@kroah.com> wrote: > On Sat, Dec 24, 2016 at 05:47:19PM +0200, Ran Shalit wrote: >> >> >> On Tue, Dec 20, 2016 at 12:26 PM, Greg KH <g...@kroah.com> wrote: >> >> On Tue, Dec 20, 2016 at 12:15:22PM +0200

dma direction

2017-01-07 Thread Ran Shalit
Hello, I read the DMA-API-HOWTO https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt Which mainly talks about dma mapping APIs. But I don't understand what's the meaning of DMA direction in context of mapping. As I understand this documentation talks about mapping of dma buffers - NOT

kernel thread priority over user thread

2016-12-19 Thread Ran Shalit
Hello, I am trying to understand if kernel thread are always higher priority then user thread. Say, a kernel thread (created with kthread_create with SCHED_FIFO and given priority x), and user thread (created with pthread_create was created with SCHED_FIFO and given priority y), and priority of

Driver to allow DMA from user space

2016-12-19 Thread Ran Shalit
Hello, I want to use DMA from userspace. I already use dma in kernel, and now I want can create a character device which will be responsible for this. The only problem is that I want to use the same memory which was allocated in kernel with dma_alloc_coherent. Is it correct to use mmap in

Does poll handler is in interrupt context ?

2016-12-18 Thread Ran Shalit
Hello, This is something I'm not too sure about, so I rather ask it here: When the context return to userspace on calling poll, is it done in interrupt context ? ... ret = poll(fds, 2, TIMEOUT * 1000); if (ret == -1) { perror ("poll"); return 1; } if (!ret) { return 0; } if (fds[0].revents &

Re: Driver to allow DMA from user space

2016-12-20 Thread Ran Shalit
On Tue, Dec 20, 2016 at 11:38 AM, Greg KH <g...@kroah.com> wrote: > On Mon, Dec 19, 2016 at 06:08:47PM +0200, Ran Shalit wrote: >> Hello, >> >> I want to use DMA from userspace. > > Why? Hi Greg, We want that a userspace layer (a library) will do some HW relate

Re: Driver to allow DMA from user space

2016-12-24 Thread Ran Shalit
On Tue, Dec 20, 2016 at 12:26 PM, Greg KH <g...@kroah.com> wrote: > On Tue, Dec 20, 2016 at 12:15:22PM +0200, Ran Shalit wrote: > > On Tue, Dec 20, 2016 at 11:38 AM, Greg KH <g...@kroah.com> wrote: > > > On Mon, Dec 19, 2016 at 06:08:47PM +0200, Ran Shalit wrote:

Re: disable input event device

2016-12-27 Thread Ran Shalit
On Sun, Dec 4, 2016 at 12:33 PM, Greg KH <g...@kroah.com> wrote: > On Sat, Dec 03, 2016 at 07:18:50PM +0200, Ran Shalit wrote: >> >> >> On Sat, Dec 3, 2016 at 3:15 PM, Greg KH <g...@kroah.com> wrote: >> >> On Sat, Dec 03, 2016 at 02:43

RapidIO (SRIO) support in Linux - generic driver or device dependent ?

2017-03-13 Thread Ran Shalit
Hello, I find in documentation mention of rapidIO: https://www.kernel.org/doc/Documentation/rapidio/rapidio.txt Yet, in source code it seems that only few devices are supported with rapidIO: http://lxr.free-electrons.com/source/drivers/rapidio/

Does uio_pci_generic does not use DMA ?

2018-02-05 Thread Ran Shalit
Hello, I don't find in uio_pci_generic.c any usage of DMA. Is it that the driver does not use DMA in transactions between device and host ? Regards, Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

PCI & DMA

2018-02-05 Thread Ran Shalit
Hello, In PCI documentation https://www.mjmwired.net/kernel/Documentation/PCI/pci.txt there is a lot of reference to "DMA". Is it DMA on cpu side or device side ? Best Regards, Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

map DMA buffer with dma engine in another device ?

2018-02-07 Thread Ran Shalit
Hello, On viewing PCI driver, I see that dma buffer are allocated even while the dma engine is actually in the EP device. Is there any sense in doing this ? Thanks, Ran ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org