patch-2.2.16 linux/drivers/video/atyfb.c

Next file: linux/drivers/video/mdacon.c
Previous file: linux/drivers/sound/ymf_sb.c
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/drivers/video/atyfb.c linux/drivers/video/atyfb.c
@@ -1,4 +1,4 @@
-/*  $Id: atyfb.c,v 1.106.2.7 1999/11/19 00:12:29 davem Exp $
+/*  $Id: atyfb.c,v 1.106.2.8 2000/04/28 04:40:09 davem Exp $
  *  linux/drivers/video/atyfb.c -- Frame buffer device for ATI Mach64
  *
  *	Copyright (C) 1997-1998  Geert Uytterhoeven
@@ -2875,8 +2875,13 @@
 		pci_read_config_dword(pdev, breg, &size);
 		pci_write_config_dword(pdev, breg, pbase);
 
-		if (io)
-			size &= ~1;
+		if (io) {
+			size &= PCI_BASE_ADDRESS_IO_MASK;
+			base &= PCI_BASE_ADDRESS_IO_MASK;
+		} else {
+			size &= PCI_BASE_ADDRESS_MEM_MASK;
+			base &= PCI_BASE_ADDRESS_MEM_MASK;
+		}
 		size = ~(size) + 1;
 
 		/*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)