* [PATCH 1/2] Char: mxser, add support for CP112UL
@ 2009-09-10 10:20 Jiri Slaby
2009-09-10 10:20 ` [PATCH 2/2] Char: mxser, use THRE for ASPP_OQUEUE ioctl Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2009-09-10 10:20 UTC (permalink / raw)
To: gregkh; +Cc: akpm, linux-kernel, Jiri Slaby
Add support for MOXA:0x1120 pci device. It's a 2-port device and differs
in no way from the others. So this turns out to be a trivial
pci_device_id change.
Increase also the version number.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/char/mxser.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 37058ff..e218ae2 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -48,7 +48,7 @@
#include "mxser.h"
-#define MXSER_VERSION "2.0.4" /* 1.12 */
+#define MXSER_VERSION "2.0.5" /* 1.14 */
#define MXSERMAJOR 174
#define MXSER_BOARDS 4 /* Max. boards */
@@ -69,6 +69,7 @@
#define PCI_DEVICE_ID_POS104UL 0x1044
#define PCI_DEVICE_ID_CB108 0x1080
#define PCI_DEVICE_ID_CP102UF 0x1023
+#define PCI_DEVICE_ID_CP112UL 0x1120
#define PCI_DEVICE_ID_CB114 0x1142
#define PCI_DEVICE_ID_CP114UL 0x1143
#define PCI_DEVICE_ID_CB134I 0x1341
@@ -139,7 +140,8 @@ static const struct mxser_cardinfo mxser_cards[] = {
{ "CP-138U series", 8, },
{ "POS-104UL series", 4, },
{ "CP-114UL series", 4, },
-/*30*/ { "CP-102UF series", 2, }
+/*30*/ { "CP-102UF series", 2, },
+ { "CP-112UL series", 2, },
};
/* driver_data correspond to the lines in the structure above
@@ -170,6 +172,7 @@ static struct pci_device_id mxser_pcibrds[] = {
{ PCI_VDEVICE(MOXA, PCI_DEVICE_ID_POS104UL), .driver_data = 28 },
{ PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP114UL), .driver_data = 29 },
{ PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP102UF), .driver_data = 30 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP112UL), .driver_data = 31 },
{ }
};
MODULE_DEVICE_TABLE(pci, mxser_pcibrds);
--
1.6.3.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] Char: mxser, use THRE for ASPP_OQUEUE ioctl
2009-09-10 10:20 [PATCH 1/2] Char: mxser, add support for CP112UL Jiri Slaby
@ 2009-09-10 10:20 ` Jiri Slaby
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2009-09-10 10:20 UTC (permalink / raw)
To: gregkh; +Cc: akpm, linux-kernel, Jiri Slaby
In moxa specific ASPP_OQUEUE ioctl command, they apparently want
only know whether there is space in transmitter hold register.
So switch UART_LSR_TEMT to UART_LSR_THRE in that specific case
according to the change in 1.14 moxa drivers.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/char/mxser.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index e218ae2..5e28d39 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1806,7 +1806,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
lock_kernel();
len = mxser_chars_in_buffer(tty);
- lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_TEMT;
+ lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE;
len += (lsr ? 0 : 1);
unlock_kernel();
--
1.6.3.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-10 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-10 10:20 [PATCH 1/2] Char: mxser, add support for CP112UL Jiri Slaby
2009-09-10 10:20 ` [PATCH 2/2] Char: mxser, use THRE for ASPP_OQUEUE ioctl Jiri Slaby
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®