mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: R.E.Wolff@BitWizard.nl (Rogier Wolff)
To: alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: SX driver patch.
Date: Thu, 8 Mar 2001 12:36:32 +0100 (MET)	[thread overview]
Message-ID: <200103081136.MAA19995@cave.bitwizard.nl> (raw)

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]


Hi Alan,

A client noted that we forgot to implement breaks in the SX
driver. Turns out to be easy. Moreover... I actually tested this
patch!  (Somehow the Makefile entry for SX got stomped on, that's
fixed here too.)

				Roger. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots. 
* There are also old, bald pilots. 

[-- Attachment #2: /usr/src/sx-2.2.19-pre16.diff --]
[-- Type: text/plain, Size: 1661 bytes --]

diff -ur linux-2.2.19-pre16.clean/drivers/char/Makefile linux-2.2.19-pre16.sx/drivers/char/Makefile
--- linux-2.2.19-pre16.clean/drivers/char/Makefile	Thu Mar  8 12:30:33 2001
+++ linux-2.2.19-pre16.sx/drivers/char/Makefile	Thu Mar  8 12:31:22 2001
@@ -200,7 +200,13 @@
   endif
 endif
 
-obj-$(CONFIG_SX) += sx.o generic_serial.o
+ifeq ($(CONFIG_SX),y)
+O_OBJS += sx.o generic_serial.o
+else
+  ifeq ($(CONFIG_SX),m)
+  M_OBJS += sx.o generic_serial.o
+  endif
+endif
 
 ifeq ($(CONFIG_RIO),y)
 O_OBJS += rio/rio.o generic_serial.o
diff -ur linux-2.2.19-pre16.clean/drivers/char/sx.c linux-2.2.19-pre16.sx/drivers/char/sx.c
--- linux-2.2.19-pre16.clean/drivers/char/sx.c	Thu Jan  4 16:27:07 2001
+++ linux-2.2.19-pre16.sx/drivers/char/sx.c	Thu Mar  8 12:31:22 2001
@@ -1799,6 +1799,20 @@
 }
 
 
+static void sx_break (struct tty_struct * tty, int flag)
+{
+	struct sx_port *port = tty->driver_data;
+	int rv;
+
+	if (flag) 
+		rv = sx_send_command (port, HS_START, -1, HS_IDLE_BREAK);
+	else 
+		rv = sx_send_command (port, HS_STOP, -1, HS_IDLE_OPEN);
+	if (rv != 1) printk (KERN_ERR "sx: couldn't send break (%x).\n",
+			read_sx_byte (port->board, CHAN_OFFSET (port, hi_hstat)));
+}
+
+
 static int sx_ioctl (struct tty_struct * tty, struct file * filp, 
                      unsigned int cmd, unsigned long arg)
 {
@@ -1867,7 +1881,6 @@
 			sx_reconfigure_port(port);
 		}
 		break;
-
 	default:
 		rc = -ENOIOCTLCMD;
 		break;
@@ -2247,6 +2260,7 @@
 	sx_driver.table = sx_table;
 	sx_driver.termios = sx_termios;
 	sx_driver.termios_locked = sx_termios_locked;
+	sx_driver.break_ctl = sx_break;
 
 	sx_driver.open	= sx_open;
 	sx_driver.close = gs_close;

                 reply	other threads:[~2001-03-08 11:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200103081136.MAA19995@cave.bitwizard.nl \
    --to=r.e.wolff@bitwizard.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®