Re: [PATCH 1/1 -resend] Char: mxser, upgrade to 1.9.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 16 August 2006 08:45, Andrew Morton wrote:

> > > Perhaps we could create an mxser-new.c and offer that in config, plan
> > > to remove mxser.c N months hence?
> >
> > I can test the updated driver with  MOXA CP-168U series board if it will
> > compile on 2.6.12.6.
>
> Thanks.
>
> > Unfortunately I can't change kernel to latest one there.
> > Will testing on 2.6.12.6 be enough for you?
[...]
> Perhaps it'll work if you apply the patch to 2.6.18-rc4 then copy the
> patched files over to 2.6.12..

I've copied 2.6.18rc4+1.9.1 update applied to 2.6.12 + applied patch below, started minicom
and tried to write something... at that moment machine blew up - instantly rebooted.
Nothing on serial console unfortunately. 

mxser.c from 2.6.18rc4 without proposed 1.9.1 patch works fine (+ problem described
here http://lkml.org/lkml/2005/11/2/175 no longer happens).

--- mxser.c.new.org     2006-08-16 10:50:44.578413363 +0200
+++ mxser.c     2006-08-16 10:54:07.399361546 +0200
@@ -85,7 +85,7 @@
 #define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\
                                          IXON|IXOFF))

-#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED)
+#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)

 #define C168_ASIC_ID    1
 #define C104_ASIC_ID    2
@@ -1108,7 +1108,8 @@
                 */
                timeout = jiffies + HZ;
                while (!(inb(info->base + UART_LSR) & UART_LSR_TEMT)) {
-                       schedule_timeout_interruptible(5);
+                       set_current_state(TASK_INTERRUPTIBLE);
+                       schedule_timeout(5);
                        if (time_after(jiffies, timeout))
                                break;
                }
@@ -1129,8 +1130,10 @@
        info->event = 0;
        info->tty = NULL;
        if (info->blocked_open) {
-               if (info->close_delay)
-                       schedule_timeout_interruptible(info->close_delay);
+               if (info->close_delay) {
+                       set_current_state(TASK_INTERRUPTIBLE);
+                       schedule_timeout(info->close_delay);
+               }
                wake_up_interruptible(&info->open_wait);
        }

@@ -1870,7 +1873,8 @@
 #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
                printk("lsr = %d (jiff=%lu)...", lsr, jiffies);
 #endif
-               schedule_timeout_interruptible(char_time);
+               set_current_state(TASK_INTERRUPTIBLE);
+               schedule_timeout(char_time);
                if (signal_pending(current))
                        break;
                if (timeout && time_after(jiffies, orig_jiffies + timeout))
@@ -2054,7 +2058,7 @@

        spin_lock_irqsave(&info->slock, flags);

-       recv_room = tty->receive_room;
+       recv_room = tty->ldisc.receive_room(tty);
        if ((recv_room == 0) && (!info->ldisc_stop_rx)) {
                /* mxser_throttle(tty); */
                mxser_stoprx(tty);

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux