NetBSD-Bugs archive

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

Re: kern/38269: Hangs at "agp0 on pchb1" on ASRock 939DUAL-SATA2



On Sun, Apr 13, 2008 at 10:40:02AM +0000, Martin Emrich wrote:
> The following reply was made to PR kern/38269; it has been noted by GNATS.
> 
> From: Martin Emrich <emme%emmes-world.de@localhost>
> To: gnats-bugs%NetBSD.org@localhost
> Cc: 
> Subject: Re: kern/38269: Hangs at "agp0 on pchb1" on ASRock 939DUAL-SATA2
> Date: Sun, 13 Apr 2008 12:39:42 +0200
> 
>  Hi!
>  
>  David Holland schrieb:
>  
>  > The following reply was made to PR kern/38269; it has been noted by GNATS.
>  
>  > From: David Holland <dholland-bugs%netbsd.org@localhost>
>  
>  >  Is this maybe the same as 35416?
>  
>  Yes, this is very likely, as the Board has an ULi M1965 chipset.

Can you try this patch, which hopefully will solve the problem you are
seeing ...

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.
Index: sys/dev/pci/agp_ali.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/agp_ali.c,v
retrieving revision 1.13
diff -u -p -r1.13 agp_ali.c
--- sys/dev/pci/agp_ali.c       4 Jan 2008 21:18:00 -0000       1.13
+++ sys/dev/pci/agp_ali.c       13 Apr 2008 10:46:18 -0000
@@ -168,14 +168,14 @@ static const u_int32_t agp_ali_table[] =
        0,                      /* 0 - invalid */
        1,                      /* 1 - invalid */
        2,                      /* 2 - invalid */
-       4*M,                    /* 3 - invalid */
-       8*M,                    /* 4 - invalid */
-       0,                      /* 5 - invalid */
-       16*M,                   /* 6 - invalid */
-       32*M,                   /* 7 - invalid */
-       64*M,                   /* 8 - invalid */
-       128*M,                  /* 9 - invalid */
-       256*M,                  /* 10 - invalid */
+       4*M,                    /* 3 */
+       8*M,                    /* 4 */
+       0,                      /* 5 - Reserved */
+       16*M,                   /* 6 */
+       32*M,                   /* 7 */
+       64*M,                   /* 8 */
+       128*M,                  /* 9 */
+       256*M,                  /* 10 */
 };
 #define agp_ali_table_size (sizeof(agp_ali_table) / sizeof(agp_ali_table[0]))
 
@@ -200,6 +200,9 @@ agp_ali_set_aperture(struct agp_softc *s
        int i;
        pcireg_t reg;
 
+       if (aperture & (aperture - 1) || aperture < 1*M)
+               return EINVAL;
+
        for (i = 0; i < agp_ali_table_size; i++)
                if (agp_ali_table[i] == aperture)
                        break;


Home | Main Index | Thread Index | Old Index