--- linux-2.0.29/drivers/char/mac_SCC.c.291197-1        Fri Dec  5 06:34:39 1997
+++ linux-2.0.29/drivers/char/mac_SCC.c Sat Dec  6 07:05:45 1997
@@ -356,7 +356,9 @@
               stat = read_zsreg(info->private->zs_channel, R1);
               ch = read_zsdata(info->private->zs_channel);

+#ifdef SCC_DEBUG
               printk("mac_SCC: receive_chars stat=%X char=%X \n", stat, ch);
+#endif

#if 0  /* KGDB not yet supported */
               /* Look for kgdb 'stop' character, consult the gdb documentation
@@ -491,8 +493,10 @@
        */
#define CHAN_IRQMASK (CHBRxIP | CHBTxIP | CHBEXT)

+#ifdef SCC_DEBUG
       printk("mac_SCC: interrupt; port: %lx channel: %lx \n",
               info->port, info->private->zs_channel);
+#endif

       if (info->private->zs_chan_a == info->private->zs_channel)
               shift = 3;      /* Channel A */
@@ -511,8 +515,10 @@

       for (;;) {
               zs_intreg = read_zsreg(info->private->zs_chan_a, 3);
+#ifdef SCC_DEBUG
               printk("mac_SCC: status %x shift %d shifted %x \n",
               zs_intreg, shift, zs_intreg >> shift);
+#endif
               zs_intreg = zs_intreg >> shift;
               if ((zs_intreg & CHAN_IRQMASK) == 0)
                       break;
@@ -654,8 +660,9 @@

       /* BUT: startup part needs to be done here! */

+#ifdef SCC_DEBUG
       printk("mac_SCC: init, info %lx, info->port %lx  \n", info, info->port);
-
+#endif
       /*
        * Clear the receive FIFO.
        */
@@ -705,8 +712,9 @@
{
       static int got_autovector = 0;

+#ifdef SCC_DEBUG
       printk("mac_SCC: init_port, info %x \n", info);
-
+#endif
       info->sw = &SCC_switch;
       info->private = &zs_soft_private[channel];
       info->private->zs_channel = &zs_channels[channel];
@@ -715,7 +723,7 @@
       info->private->zs_baud = get_zsbaud(info);
       info->port = (int) info->private->zs_channel->control;

-#if 1
+#if 0
       /*
        * Currently, only the autovector interrupt is used for SCC!
        * If another channel already requested the interrupt, we're fine...
@@ -734,22 +742,25 @@
        */

       /* done in arch/m68k/mac/macints.c for now */
-       if (!got_autovector)
+       if (!got_autovector) {
               if(request_irq(IRQ4, mac_SCC_handler, 0, "SCC master", info))
                       panic("macserial: can't get irq %d", IRQ4);
+               printk("mac_SCC: got SCC master interrupt %d, channel %d info %p\n",
+                       IRQ4, channel, info);
+       }

       if (info->private->zs_chan_a == info->private->zs_channel) {
               /* Channel A */
               if (request_irq(IRQ_SCCA, mac_SCC_interrupt, 0, "SCC A", info))
                       panic("mac_SCC: can't get irq %d", IRQ_SCCA);
-               printk("mac_SCC: got SCC A interrupt, channel %d info %p\n",
-                       channel, info);
+               printk("mac_SCC: got SCC A interrupt %d, channel %d info %p\n",
+                       IRQ_SCCA, channel, info);
       } else {
               /* Channel B */
               if (request_irq(IRQ_SCCB, mac_SCC_interrupt, 0, "SCC B", info))
                       panic("mac_SCC: can't get irq %d", IRQ_SCCB);
-               printk("mac_SCC: got SCC B interrupt, channel %d info %p\n",
-                       channel, info);
+               printk("mac_SCC: got SCC B interrupt %d, channel %d info %p\n",
+                       IRQ_SCCB, channel, info);
       }
#endif

@@ -858,6 +869,18 @@
       if (!(port = info->port))
               return;
       i = cflag & CBAUD;
+
+       if (i == 0 && !(info->flags & ASYNC_SPD_MASK)) {
+               /* speed == 0 -> drop DTR */
+               save_flags(flags);
+               cli();
+               info->private->curregs[5] &= ~DTR;
+               write_zsreg(info->private->zs_channel, 5, info->private->curregs[5]);
+               restore_flags(flags);
+               return;
+       }
+
+
       if (i & CBAUDEX) {
               /* XXX CBAUDEX is not obeyed.
                * It is impossible at a 32bits PPC.  XXX??
@@ -1291,6 +1314,10 @@
       /* last-ditch fixup for NetBSD booter case */
       if (boot_info.bi_mac.scc == 0)
               boot_info.bi_mac.scc = ZS_CONTROL;
+
+       /* testing: fix up broken 24 bit addresses */
+       if ((boot_info.bi_mac.scc & 0x00FFFFFF) == boot_info.bi_mac.scc)
+               boot_info.bi_mac.scc |= 0x50000000;

       for(n=0;n<2;n++)
       {
--- linux-2.0.29/mm/filemap.c.291197-1  Fri Dec  5 06:39:28 1997
+++ linux-2.0.29/mm/filemap.c   Fri Dec  5 06:39:28 1997
@@ -1168,7 +1168,11 @@
               /* share_page() can only guarantee proper page sharing if
                * the offsets are all page aligned. */
               if (vma->vm_offset & (PAGE_SIZE - 1))
+#if 0
                       return -EINVAL;
+#else
+                       vma->vm_offset &= PAGE_MASK;
+#endif
       } else {
               ops = &file_private_mmap;
               if (vma->vm_offset & (inode->i_sb->s_blocksize - 1))