From: "John Stoffel" <stoffel@lucent.com>
To: linux-kernel@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk, torvalds@transmeta.com, support@cyclades.com
Subject: PATCH: 2.5.70 - Cyclades - Cyclom-Y/ISA locking
Date: Tue, 3 Jun 2003 09:55:11 -0400 [thread overview]
Message-ID: <16092.43199.508405.13092@gargle.gargle.HOWL> (raw)
Hi,
I've patched the cyclades driver, version 2.3.2.8 as shipped with
Linux Kernel 2.5.70, to support my Cyclom-Y/ISA board. This is mostly
to just update the locking to support ISA probing properly, due to the
changes in the 2.5 tree. This was based on the instructions written
in Documentation/cli-sti-removal.txt.
I've compiled and used my serial board with this patch on both SMP and
UP, running 2.5.70-mm3.
I also patched the Kconfig entries as well to better reflect the
driver support and what it offers.
Thanks,
John
--------------------------patch here-----------------------------------
--- linux-2.5.70/drivers/char/cyclades.c Tue Jun 3 09:43:51 2003
+++ linux-2.5.70-mm3/drivers/char/cyclades.c Sun Jun 1 11:27:28 2003
@@ -1041,8 +1041,11 @@
int irq;
unsigned long irqs, flags;
int save_xir, save_car;
+ spinlock_t isa_card_lock;
int index = 0; /* IRQ probing is only for ISA */
+ spin_lock_init(&isa_card_lock);
+
/* forget possible initially masked and pending IRQ */
irq = probe_irq_off(probe_irq_on());
@@ -1055,14 +1058,14 @@
udelay(5000L);
/* Enable the Tx interrupts on the CD1400 */
- save_flags(flags); cli();
+ spin_lock_irqsave(&isa_card_lock,flags);
cy_writeb((u_long)address + (CyCAR<<index), 0);
cyy_issue_cmd(address, CyCHAN_CTL|CyENB_XMTR, index);
cy_writeb((u_long)address + (CyCAR<<index), 0);
cy_writeb((u_long)address + (CySRER<<index),
cy_readb(address + (CySRER<<index)) | CyTxRdy);
- restore_flags(flags);
+ spin_unlock_irqrestore(&isa_card_lock, flags);
/* Wait ... */
udelay(5000L);
@@ -4770,7 +4773,7 @@
#endif
nboard = 0;
-
+
#ifdef MODULE
/* Check for module parameters */
for(i = 0 ; i < NR_CARDS; i++) {
@@ -5695,13 +5698,13 @@
}
#endif /* CONFIG_CYZ_INTR */
- save_flags(flags); cli();
+ spin_lock_irqsave(&isa_card_lock, flags);
if ((e1 = tty_unregister_driver(&cy_serial_driver)))
printk("cyc: failed to unregister Cyclades serial driver(%d)\n",
e1);
- restore_flags(flags);
+ spin_unlock_irqrestore(&isa_card_lock, flags);
for (i = 0; i < NR_CARDS; i++) {
if (cy_card[i].base_addr != 0) {
--- linux-2.5.70/drivers/char/Kconfig Sun May 4 19:52:49 2003
+++ linux-2.5.70-mm3/drivers/char/Kconfig Sun Jun 1 10:24:27 2003
@@ -107,13 +107,14 @@
rocket.
config CYCLADES
- tristate "Cyclades async mux support"
+ tristate "Cyclades Multiport Serial Board support"
depends on SERIAL_NONSTANDARD
---help---
This is a driver for a card that gives you many serial ports. You
would need something like this to connect more than two modems to
your Linux box, for instance in order to become a dial-in server.
- For information about the Cyclades-Z card, read
+ This driver supports the Cyclom-Y (ISA/PCI) and Cyclades-Z (PCI).
+ For information about the Cyclades-Z card, read
<file:drivers/char/README.cycladesZ>.
As of 1.3.9x kernels, this driver's minor numbers start at 0 instead
------- end of forwarded message -------
reply other threads:[~2003-06-03 13:42 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=16092.43199.508405.13092@gargle.gargle.HOWL \
--to=stoffel@lucent.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=support@cyclades.com \
--cc=torvalds@transmeta.com \
/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®