lkml.org 
[lkml]   [1998]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectsetserial-2.14 patch for xmit_fifo_size, Documentation/Changes

Hello. Long time no speak.

I have a NEC Versa 2780MT laptop with an internal plug and play
modem. In older kernels, I had to use isapnp and then

setserial /dev/ttyS1 uart 16550

to get the modem to work. When I installed kernel 2.1.105, any
setserial command to this port gave "invalid argument". A quick check
at the serial driver sources and a run of setserial through the
debugger indicated that this was happening because the xmit_fifo_size
was set to zero. Apparently, this field was not used in older
kernels. In any case, I made a patch to setserial that allows me to
set this value and enables setserial to give its value when run with
the -a flag. Without this patch, I am unable to use my modem, but
with the patch, everything works fine.

Please let me know whether this or an equivalent patch will be
included in a new version of setserial. If so, then the
Documentation/Changes file distributed with the kernel should indicate
that this version of setserial is required with newer kernels.

Thanks!

--
E. Jay Berkenbilt (ejb@ql.org) | http://www.ql.org/q/

===========================================================================

--- setserial.c.qdist Tue Jun 9 09:35:11 1998
+++ setserial.c Fri Sep 18 09:02:23 1998
@@ -66,6 +66,7 @@
#define CMD_CONFIG 10
#define CMD_GETMULTI 11
#define CMD_SETMULTI 12
+#define CMD_XMIT_FIFO 13

#define FLAG_CAN_INVERT 0x0001
#define FLAG_NEED_ARG 0x0002
@@ -111,6 +112,7 @@
CMD_CONFIG, "autoconfig", 0, 0, 0, 0,
CMD_GETMULTI, "get_multiport",0, 0, 0, 0,
CMD_SETMULTI, "set_multiport",0, 0, 0, 0,
+ CMD_XMIT_FIFO, "xmit_fifo", 0, 0, 0, FLAG_NEED_ARG,
0, 0, 0, 0, 0, 0,
};

@@ -330,6 +332,8 @@
printf("\tBaud_base: %d, close_delay: %d, divisor: %d\n",
serinfo.baud_base, serinfo.close_delay,
serinfo.custom_divisor);
+ printf("\tTransmit fifo size: %d\n",
+ serinfo.xmit_fifo_size);
#ifdef ASYNC_CLOSING_WAIT_NONE
if (serinfo.closing_wait == ASYNC_CLOSING_WAIT_INF)
strcpy(buf1, "infinte");
@@ -485,6 +489,9 @@
set_multiport(device, fd, &arg);
break;

+ case CMD_XMIT_FIFO:
+ new_serinfo.xmit_fifo_size = atonum(*arg++);
+ break;
default:
fprintf(stderr, "Internal error: unhandled cmd #%d\n", p->cmd);
exit(1);
@@ -586,6 +593,7 @@
fprintf(stderr, "\t spd_cust\tuse the custom divisor to set the speed at 38.4kb\n");
fprintf(stderr, "\t\t\t\t(baud rate = baud_base / custom_divisor)\n");
fprintf(stderr, "\t spd_normal\tuse 38.4kb when a buad rate of 38.4kb is selected\n");
+ fprintf(stderr, "\t xmit_fifo\tset the transmit fifo size\n");
fprintf(stderr, "\n");
fprintf(stderr, "Use a leading '0x' for hex numbers.\n");
fprintf(stderr, "CAUTION: Using an invalid port can lock up your machine!\n");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.029 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site