Cyclades Cyclom-Y ISA on 2.5.69

John Stoffel (stoffel@lucent.com)
Wed, 21 May 2003 16:00:45 -0400


Hi all,

Has anyone else run into a problem compiling the Cyclades serial board
driver under 2.5.x when you have ISA defined as well? I've done a
quick hack patch to make it compile. I've been running 2.4.21-rc*
lately, so it's time I started to actually test this patch below and
see how it works.

I read the file Documentation cli-sti-removal.txt and I think I've
done the right things here.

John
John Stoffel - Senior Unix Systems Administrator - Lucent Technologies
stoffel@lucent.com - http://www.lucent.com - 978-399-0479

*** drivers/char/cyclades.c.org Wed May 21 11:45:48 2003
--- drivers/char/cyclades.c Wed May 21 12:07:53 2003
***************
*** 872,877 ****
--- 872,878 ----
static int cyz_issue_cmd(struct cyclades_card *, uclong, ucchar,
uclong);
#ifdef CONFIG_ISA
static unsigned detect_isa_irq (volatile ucchar *);
+ spinlock_t isa_card_lock;
#endif /* CONFIG_ISA */

static int cyclades_get_proc_info(char *, char **, off_t , int , int
*, void *);
***************
*** 1056,1069 ****
udelay(5000L);

/* Enable the Tx interrupts on the CD1400 */
! save_flags(flags); cli();
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);

/* Wait ... */
udelay(5000L);
--- 1057,1070 ----
udelay(5000L);

/* Enable the Tx interrupts on the CD1400 */
! 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);
! spin_unlock_irqrestore(&isa_card_lock, flags);

/* Wait ... */
udelay(5000L);
***************
*** 5762,5768 ****
}
#endif /* CONFIG_CYZ_INTR */

! save_flags(flags); cli();

if ((e1 = tty_unregister_driver(&cy_serial_driver)))
printk("cyc: failed to unregister Cyclades serial
driver(%d)\n",
--- 5763,5769 ----
}
#endif /* CONFIG_CYZ_INTR */

! 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",
***************
*** 5771,5777 ****
printk("cyc: failed to unregister Cyclades callout
driver (%d)\n",
e2);

! restore_flags(flags);

for (i = 0; i < NR_CARDS; i++) {
if (cy_card[i].base_addr != 0) {
--- 5772,5778 ----
printk("cyc: failed to unregister Cyclades callout
driver (%d)\n",
e2);

! spin_unlock_irqrestore(&isa_card_lock, flags);

for (i = 0; i < NR_CARDS; i++) {
if (cy_card[i].base_addr != 0) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/