IOCTL call in 2.6 / I/O port access in 2.6

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Hi all,

I have a problem in serial port loopback (internal) in 2.6 kernel in
linux from user space.

Actually I have to set the Bit 5 of UART Modem Control Register (MCR)
of 16550A .

There is an ioctl for doing so in 2.4 & 2.6 kernel.

int status;
ioctl (fd, TIOCMGET, &status);
status | =  TIOCM_LOOP;
ioctl (fd, TIOCMSET, &status);

This works fine in 2.4 kernels .But still I have some issues in 2.6

Even I tried directly setting the bit using

outb (0x10, (0x3f8+0x4))   ..... outb(value,address)

Where 0x3f8 is the base port for ttyS0 and 0x4 is the offset for MCR
Setting the Bit is done using 0x10 (5th bit)

But the same works well in 2.4 kernel and fails in 2.6 kernels..

Is there any specific thing im missing out..If so please suggest me.

Thanks and Regards
Sudhakar V

Site Timeline