bug-hurd
[Top][All Lists]
Advanced

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

[address@hidden: Re: gnumach and gcc 4.0 (patch 1)]


From: Alfred M. Szmidt
Subject: [address@hidden: Re: gnumach and gcc 4.0 (patch 1)]
Date: Mon, 31 Oct 2005 01:29:29 +0100

Ping?

Roland, could I get free hands over gnumach-1-branch (I'll pipe any
`big' changes through the mailing list anyway, but obvious bug fixes
like this would be nice not to go through you)?

------- Start of forwarded message -------
Date: Mon, 26 Sep 2005 05:53:04 -0400
From: Thomas Schwinge <tschwinge@gnu.org>
To: bug-hurd@gnu.org
Subject: Re: gnumach and gcc 4.0 (patch 1)

On Sun, May 29, 2005 at 07:35:34PM -0400, Alfred M. Szmidt wrote:
> --- linux/src/drivers/net/ne2k-pci.c
> +++ linux/src/drivers/net/ne2k-pci.c
> @@ -542,7 +542,10 @@
>       if (count & 3) {
>               buf += count & ~3;
>               if (count & 2)
> -                     *((u16*)buf)++ = inw(NE_BASE + NE_DATAPORT);
> +                     {
> +                             *buf = *(u16 *) buf + 1;
> +                             *buf = inw(NE_BASE + NE_DATAPORT);
> +                     }
>               if (count & 1)
>                       *buf = inb(NE_BASE + NE_DATAPORT);
>       }
> @@ -605,7 +608,8 @@
>       if (count & 3) {
>               buf += count & ~3;
>               if (count & 2)
> -                     outw(*((u16*)buf)++, NE_BASE + NE_DATAPORT);
> +                     outw(*buf++, NE_BASE + NE_DATAPORT);
> +
>       }
>  #else
>       outsw(NE_BASE + NE_DATAPORT, buf, count>>1);

This patch is wrong imo.
A patch to correct this on gnumach-1-branch follows:

2005-09-26  Thomas Schwinge  <tschwinge@gnu.org>

        * linux/src/drivers/net/ne2k-pci.c (ne_block_input) and
        (ne_block_output): Fix previous patch.

- --- old-gnumach-1-branch.1.ne2k-pci-fixes/linux/src/drivers/net/ne2k-pci.c    
2005-09-26 11:48:05.433286440 +0200
+++ new-gnumach-1-branch.1.ne2k-pci-fixes/linux/src/drivers/net/ne2k-pci.c      
2005-09-26 11:48:05.439285528 +0200
@@ -541,11 +541,10 @@
        insl(NE_BASE + NE_DATAPORT, buf, count>>2);
        if (count & 3) {
                buf += count & ~3;
- -             if (count & 2)
- -                     {
- -                             *buf = *(u16 *) buf + 1;
- -                             *buf = inw(NE_BASE + NE_DATAPORT);
- -                     }
+               if (count & 2) {
+                       *((u16 *) buf) = inw(NE_BASE + NE_DATAPORT);
+                       buf = (char *) ((u16 *) buf + 1);
+               }
                if (count & 1)
                        *buf = inb(NE_BASE + NE_DATAPORT);
        }
@@ -607,8 +606,10 @@
        outsl(NE_BASE + NE_DATAPORT, buf, count>>2);
        if (count & 3) {
                buf += count & ~3;
- -             if (count & 2)
- -                     outw(*buf++, NE_BASE + NE_DATAPORT);
+               if (count & 2) {
+                       outw(*((u16 *) buf), NE_BASE + NE_DATAPORT);
+                       buf = (unsigned char *) ((u16 *) buf + 1);
+               }
 
        }
 #else


Regards,
 Thomas


_______________________________________________
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd
------- End of forwarded message -------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]