git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
drivers
/
char
/
hvsi.c
diff --git
a/drivers/char/hvsi.c
b/drivers/char/hvsi.c
index
017f755
..
a952218
100644
(file)
--- a/
drivers/char/hvsi.c
+++ b/
drivers/char/hvsi.c
@@
-311,8
+311,7
@@
static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet,
/* CD went away; no more connection */
pr_debug("hvsi%i: CD dropped\n", hp->index);
hp->mctrl &= TIOCM_CD;
/* CD went away; no more connection */
pr_debug("hvsi%i: CD dropped\n", hp->index);
hp->mctrl &= TIOCM_CD;
- /* If userland hasn't done an open(2) yet, hp->tty is NULL. */
- if (hp->tty && !(hp->tty->flags & CLOCAL))
+ if (!(hp->tty->flags & CLOCAL))
*to_hangup = hp->tty;
}
break;
*to_hangup = hp->tty;
}
break;
@@
-987,7
+986,10
@@
static void hvsi_write_worker(void *arg)
start_j = 0;
#endif /* DEBUG */
wake_up_all(&hp->emptyq);
start_j = 0;
#endif /* DEBUG */
wake_up_all(&hp->emptyq);
- tty_wakeup(hp->tty);
+ if (test_bit(TTY_DO_WRITE_WAKEUP, &hp->tty->flags)
+ && hp->tty->ldisc.write_wakeup)
+ hp->tty->ldisc.write_wakeup(hp->tty);
+ wake_up_interruptible(&hp->tty->write_wait);
}
out:
}
out:
@@
-1152,6
+1154,7
@@
static int __init hvsi_init(void)
return -ENOMEM;
hvsi_driver->owner = THIS_MODULE;
return -ENOMEM;
hvsi_driver->owner = THIS_MODULE;
+ hvsi_driver->devfs_name = "hvsi/";
hvsi_driver->driver_name = "hvsi";
hvsi_driver->name = "hvsi";
hvsi_driver->major = HVSI_MAJOR;
hvsi_driver->driver_name = "hvsi";
hvsi_driver->name = "hvsi";
hvsi_driver->major = HVSI_MAJOR;
@@
-1166,7
+1169,7
@@
static int __init hvsi_init(void)
struct hvsi_struct *hp = &hvsi_ports[i];
int ret = 1;
struct hvsi_struct *hp = &hvsi_ports[i];
int ret = 1;
- ret = request_irq(hp->virq, hvsi_interrupt,
IRQF_DISABLED
, "hvsi", hp);
+ ret = request_irq(hp->virq, hvsi_interrupt,
SA_INTERRUPT
, "hvsi", hp);
if (ret)
printk(KERN_ERR "HVSI: couldn't reserve irq 0x%x (error %i)\n",
hp->virq, ret);
if (ret)
printk(KERN_ERR "HVSI: couldn't reserve irq 0x%x (error %i)\n",
hp->virq, ret);
@@
-1176,7
+1179,7
@@
static int __init hvsi_init(void)
if (tty_register_driver(hvsi_driver))
panic("Couldn't register hvsi console driver\n");
if (tty_register_driver(hvsi_driver))
panic("Couldn't register hvsi console driver\n");
- printk(KERN_
DEBUG
"HVSI: registered %i devices\n", hvsi_count);
+ printk(KERN_
INFO
"HVSI: registered %i devices\n", hvsi_count);
return 0;
}
return 0;
}
@@
-1297,12
+1300,13
@@
static int __init hvsi_console_init(void)
hp->inbuf_end = hp->inbuf;
hp->state = HVSI_CLOSED;
hp->vtermno = *vtermno;
hp->inbuf_end = hp->inbuf;
hp->state = HVSI_CLOSED;
hp->vtermno = *vtermno;
- hp->virq =
irq_create_mapping(NULL,
irq[0]);
+ hp->virq =
virt_irq_create_mapping(
irq[0]);
if (hp->virq == NO_IRQ) {
printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n",
if (hp->virq == NO_IRQ) {
printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n",
- __FUNCTION__,
irq[0]
);
+ __FUNCTION__,
hp->virq
);
continue;
continue;
- }
+ } else
+ hp->virq = irq_offset_up(hp->virq);
hvsi_count++;
}
hvsi_count++;
}