SERIAL DRIVER PROB!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello people,

i had a small doubt regarding my serial
driver in a running kernel. I have made a
serial port driver (h/w layer) for the standard
COM(sorry for the WIN jargon...) ports. My
question is if i write a prog to open this port
using the open command - open("/dev/ttyS0") will
this call get directed to my driver's OPEN method
via the tty layer (i.e tty_io.c). someone told me
that when i register my driver via the call to
tty_register_driver the tty_driver sturct that i pass
to it gets attached at the head of the doubly-linked list.
so in tty_open when it calls get_tty_driver it returns
the first matching tty_driver for the given MAJOR/MINOR no.
combo.

i have a 2.4.18 kernel running on my PC on which i insmod-ed
my driver module, but the user space prog, which successfully
opened a /dev/ttyS0 device, did not call my driver's open method.

i then recompiled my kernel removing the in-built serial driver
support, and then it called mt driver's open method??

what is the correct way of doing it removing the in-built support
and then insmoding my driver OR without removing the support and
then trying to make it work???
btw i tried to run my driver on another linux box running 2.4.18-14
and it worked there without removing ne-thing!!!

ne suggestions are welcome

TIA
- mandeep
 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux