Re: Locking and interrupt handlers

2009-09-17 Thread Leonidas .
On Thu, Sep 17, 2009 at 11:45 PM, Pei Lin wrote: > 2009/9/18 Leonidas . : > > > > > > On Thu, Sep 17, 2009 at 9:43 PM, Michael Blizek > > wrote: > >> > >> Hi! > >> > >> On 17:20 Thu 17 Sep , Leonidas . wrote: > >> > Hi List, > >> > > >> > I am aware of the fact that in interrupt context one

Re: Locking and interrupt handlers

2009-09-17 Thread Leonidas .
On Thu, Sep 17, 2009 at 11:22 PM, Michael Blizek < mic...@michaelblizek.twilightparadox.com> wrote: > Hi! > > On 11:08 Fri 18 Sep , Leonidas . wrote: > > On Thu, Sep 17, 2009 at 9:43 PM, Michael Blizek < > > mic...@michaelblizek.twilightparadox.com> wrote: > > > > > Hi! > > > > > > On 17:20 Th

Re: Ioctls for data transfer

2009-09-17 Thread Pei Lin
2009/9/18 Leonidas . : > > > On Fri, Sep 18, 2009 at 7:32 AM, Pei Lin wrote: >> >> 2009/9/17 Leonidas . : >> > >> > >> > Hi list, >> > >> > I know that introducing/using new ioctls is frawned upon by the >> > community. >> > They might still be needed for controlling various hw parameters, Just >>

Re: Locking and interrupt handlers

2009-09-17 Thread Pei Lin
2009/9/18 Leonidas . : > > > On Thu, Sep 17, 2009 at 9:43 PM, Michael Blizek > wrote: >> >> Hi! >> >> On 17:20 Thu 17 Sep , Leonidas . wrote: >> > Hi List, >> > >> > I am aware of the fact that in interrupt context one should not use >> > mutexes/semaphore >> > and should stick to spinlocks. >

Re: Locking and interrupt handlers

2009-09-17 Thread Michael Blizek
Hi! On 11:08 Fri 18 Sep , Leonidas . wrote: > On Thu, Sep 17, 2009 at 9:43 PM, Michael Blizek < > mic...@michaelblizek.twilightparadox.com> wrote: > > > Hi! > > > > On 17:20 Thu 17 Sep , Leonidas . wrote: > > > Hi List, > > > > > > I am aware of the fact that in interrupt context one shou

Re: Ioctls for data transfer

2009-09-17 Thread Leonidas .
On Fri, Sep 18, 2009 at 7:32 AM, Pei Lin wrote: > 2009/9/17 Leonidas . : > > > > > > Hi list, > > > > I know that introducing/using new ioctls is frawned upon by the > community. > > They might still be needed for controlling various hw parameters, Just > > wanted > > to understand the data trans

Re: Locking and interrupt handlers

2009-09-17 Thread Leonidas .
On Thu, Sep 17, 2009 at 9:43 PM, Michael Blizek < mic...@michaelblizek.twilightparadox.com> wrote: > Hi! > > On 17:20 Thu 17 Sep , Leonidas . wrote: > > Hi List, > > > > I am aware of the fact that in interrupt context one should not use > > mutexes/semaphore > > and should stick to spinlocks.

how to implement malloc without glibc, uclibc and kernel support

2009-09-17 Thread loody
Dear all: I try to cross-compile a program which runs standalone, no operating system, on mips machine. But the program is fulfilled with "malloc", which need c lib and kernel support. I know the implementation of malloc is quite complex and I want to know does anyone have the same problem before o

Re: Basic USB doubt

2009-09-17 Thread Niamathullah sharief
yes thank a lot. This tutorial will be very usefull for me... I will send you if i have any doubt regarding this... On Fri, Sep 18, 2009 at 6:03 AM, Peter Teoh wrote: > alternatively there is udev to consider. > > http://www.dreamincode.net/forums/showtopic20020.htm > http://reactivated.net/writ

Re: Missing main function

2009-09-17 Thread Niamathullah sharief
yes you are right. I am lack of basic concepts. But i know this. I forget to remember this. Anyway thank you... On Fri, Sep 18, 2009 at 6:36 AM, Pei Lin wrote: > module_init(gspca_init); > module_exit(gspca_exit); > > I think u are lack of some basic concepts about kernel and kernel > module. u

Re: Ioctls for data transfer

2009-09-17 Thread Pei Lin
2009/9/17 Leonidas . : > > > Hi list, > > I know that introducing/using new ioctls is frawned upon by the community. > They might still be needed for controlling various hw parameters, Just > wanted > to understand the data transfer side of ioctls with a use case. > > E.g. My kernel module needs to

Re: Missing main function

2009-09-17 Thread Pei Lin
module_init(gspca_init); module_exit(gspca_exit); I think u are lack of some basic concepts about kernel and kernel module. u need read more Document about that. 2009/9/16 Niamathullah sharief : > No actually i disabled the entire "gspca" in kernel config before compiling > the kernel. The folder

Re: Basic USB doubt

2009-09-17 Thread Peter Teoh
alternatively there is udev to consider. http://www.dreamincode.net/forums/showtopic20020.htm http://reactivated.net/writing_udev_rules.html this will automatically detect the device and mount it as one entry in /dev FS, then u need to write an application to uses the appropriate interface to tal

Re: Ioctls for data transfer

2009-09-17 Thread Peter Teoh
sorrythe API is usb_read() etc - essentially these are from libusb.so: usb_bulk_read usb_bulk_write usb_busses usb_claim_interface usb_clear_halt usb_close usb_control_msg usb_device usb_find_busses usb_find_devices usb_get_busses usb_get_descriptor usb_get_descriptor_by_endpoint usb_get_stri

Re: Ioctls for data transfer

2009-09-17 Thread Peter Teoh
what kind of device is that? USB/PCI etc based? for many USB devices, u just need userspace tools. For eg: 1. libusb-devel (or libusb-devdepending on the distros), or libpci etcfor writing userspace application to talk to the device. 2. add udev rules. (for eg, this url: http:

Re: Missing main function

2009-09-17 Thread Niamathullah sharief
No actually i disabled the entire "gspca" in kernel config before compiling the kernel. The folder contains * conex.c** * *etoms.c* *finepix.c* *gspca.c* *gspca.h* *jpeg.h* *Kconfig* *Makefile* *mars.c* *mr97310a.c* *ov519.c* *ov534.c* *pac207.c* *pac3711.c* *pac_common.h* *sonixb.c* *sonixj.c* *s

Re: Basic USB doubt

2009-09-17 Thread loody
Hi: 2009/9/15 Niamathullah sharief : > i searched. I didnt get the answer for my question. I might be not knowing > to search properly. But i didnt get the answer. If you know please post the > link please. Dont mistake me >> “To learn is to change. Education is a process that changes the learner.

Re: Basic USB doubt

2009-09-17 Thread Niamathullah sharief
OK sure i will it. I will send you if i have any doubt. Thank you On Wed, Sep 16, 2009 at 9:06 PM, Pei Lin wrote: > Read the USB specification firstly and Read the Document under the > kernel package,there is a folder where many documents input in about > hotplug ,ohci, ehci etc. > http://lxr.l

Re: About Webcam module

2009-09-17 Thread Pei Lin
When you get a module unrelated to the kernel distribution you should place it in one of the version-independent directories under /lib/modules. And do u place them in the right place ? 2009/9/17 Niamathullah sharief : > Yes thank you...Its working fine...but i am having some doubt > > Insmod is

Ioctls for data transfer

2009-09-17 Thread Leonidas .
Hi list, I know that introducing/using new ioctls is frawned upon by the community. They might still be needed for controlling various hw parameters, Just wanted to understand the data transfer side of ioctls with a use case. E.g. My kernel module needs to pass a buffer of 1-2Mb to userspace when

Re: Basic USB doubt

2009-09-17 Thread Pei Lin
Read the USB specification firstly and Read the Document under the kernel package,there is a folder where many documents input in about hotplug ,ohci, ehci etc. http://lxr.linux.no/linux+v2.6.31/Documentation/usb/ 2009/9/15 Niamathullah sharief : > i searched. I didnt get the answer for my questio

Re: Locking and interrupt handlers

2009-09-17 Thread Michael Blizek
Hi! On 17:20 Thu 17 Sep , Leonidas . wrote: > Hi List, > > I am aware of the fact that in interrupt context one should not use > mutexes/semaphore > and should stick to spinlocks. Yes, exactly. > I am developing a module which exposes interfaces which could be called from > any/all > contex

Re: About Webcam module

2009-09-17 Thread Pei Lin
2009/9/15 Niamathullah sharief : > > Yes thank you..Now i am not getting my modules exactly. I compiled all the > required modules...ie gspca_main, gspca_zc3xx, v4l1-compat. But i am not > getting this "videodev" module..I dont know why... > My Makefile >> >> obj-m += gspca_main.o >> >> obj-m += gs

Locking and interrupt handlers

2009-09-17 Thread Leonidas .
Hi List, I am aware of the fact that in interrupt context one should not use mutexes/semaphore and should stick to spinlocks. I am developing a module which exposes interfaces which could be called from any/all contexts. And I manipulate complex data structures in my functions. Being on safer sid

Re: Copying kernel module error messages to userspace

2009-09-17 Thread Leonidas .
On Tue, Sep 15, 2009 at 2:23 AM, raz ben yehuda wrote: > i would i have used netconsole. > > On Tue, 2009-09-15 at 11:45 +0530, Leonidas . wrote: > > > > > > On Mon, Sep 14, 2009 at 7:00 PM, Pei Lin wrote: > > 2009/9/14 Leonidas . : > > > > > > > > > > > > > On Mo