If you are using OpenSUSE 11.3, you usually won't need to install any driver at all. Serial ports probably are located at /dev/ttyS4 and /dev/ttyS5. In order to access them, you should be member of group 'dialout'.
If you are using the kernel module mcs9865 version >= 1.0.0.6 from MosChip™ you won't need this patch. However, section Using the mcs9865 kernel module with SUSE Linux 11.1 might be of interest for you.
Some days ago, I bought a serial port device providing two additional serial ports (manufacturer MosChip™). Installation of the the Linux software, provided by MosChip™ on a CD, failed with two basic errors:
Error #1: error: ‘struct uart_info’ has no member named ‘tty’ (3 times)
Error #2: error: ‘SA_SHIRQ’ undeclared (first use in this function) (1 time)
A driver download from http://driver-downloads.com, document DL-0234903, as recommended in the manual, did not solve the problem (same driver version).
With Kernel version 2.6.27, the former member of struct uart_info, struct tty_struct *tty has moved to the new sub structure struct tty_port port in linux/serial_core.h:
Kernel patch snippet:
@@ -343,13 +341,15 @@ typedef unsigned int __bitwise__ uif_t;
* stuff here.
*/
struct uart_info {
- struct tty_struct *tty;
+ struct tty_port port;
struct circ_buf xmit;
uif_t flags;
/*
* Definitions for info->flags. These are _private_ to serial_core, and
* are specific to this structure. They may be queried by low level drivers.
+ *
+ * FIXME: use the ASY_ definitions
*/
#define UIF_CHECK_CD ((__force uif_t) (1 << 25))
#define UIF_CTS_FLOW ((__force uif_t) (1 << 26))
and, referencing
@@ -517,7 +513,7 @@ static inline void
uart_handle_cts_change(struct uart_port *port, unsigned int status)
{
struct uart_info *info = port->info;
- struct tty_struct *tty = info->tty;
+ struct tty_struct *tty = info->port.tty;
port->icount.cts++;
For full details please refer to http://www.linuxhq.com/kernel/v2.6/27/include/linux/serial_core.h .
Usage of info->tty had to be replaced with info->port.tty.
@@ -55,28 +55,6 @@
#define IRQF_NOBALANCING 0x00000800
#define IRQF_IRQPOLL 0x00001000
-/*
- * Migration helpers. Scheduled for removal in 9/2007
- * Do not use for new code !
- */
-static inline
-unsigned long __deprecated deprecated_irq_flag(unsigned long flag)
-{
- return flag;
-}
-
-#define SA_INTERRUPT deprecated_irq_flag(IRQF_DISABLED)
-#define SA_SAMPLE_RANDOM deprecated_irq_flag(IRQF_SAMPLE_RANDOM)
-#define SA_SHIRQ deprecated_irq_flag(IRQF_SHARED)
-#define SA_PROBEIRQ deprecated_irq_flag(IRQF_PROBE_SHARED)
-#define SA_PERCPU deprecated_irq_flag(IRQF_PERCPU)
-
-#define SA_TRIGGER_LOW deprecated_irq_flag(IRQF_TRIGGER_LOW)
-#define SA_TRIGGER_HIGH deprecated_irq_flag(IRQF_TRIGGER_HIGH)
-#define SA_TRIGGER_FALLING deprecated_irq_flag(IRQF_TRIGGER_FALLING)
-#define SA_TRIGGER_RISING deprecated_irq_flag(IRQF_TRIGGER_RISING)
-#define SA_TRIGGER_MASK deprecated_irq_flag(IRQF_TRIGGER_MASK)
-
typedef irqreturn_t (*irq_handler_t)(int, void *);
struct irqaction {
#if !defined(SA_SHIRQ)
if ((retval = request_irq(dev->irq, serial9865_interrupt,IRQF_SHARED,"mcs9865-serial",&serial9865_ports[retval])))
#else
if ((retval = request_irq(dev->irq, serial9865_interrupt,SA_SHIRQ,"mcs9865-serial",&serial9865_ports[retval])))
#endif
in order to ensure compatibility with earlier kernel versions.
In order to apply the patch,
patch mcs9865_old.c -i mcs9865.patch -o mcs9865.c".Patched file mcs9865.c (ver 1.0)