Subject: Re: kern/34045: ath0 not working on Lenovo T60 laptop under -current: pci_mem_find problems
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Brian de Alwis <bsd@cs.ubc.ca>
List: netbsd-bugs
Date: 07/22/2006 00:30:02
The following reply was made to PR kern/34045; it has been noted by GNATS.

From: Brian de Alwis <bsd@cs.ubc.ca>
To: gnats-bugs@NetBSD.org
Cc: Martin Husemann <martin@duskware.de>, kern-bug-people@NetBSD.org,
	gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/34045: ath0 not working on Lenovo T60 laptop under -current: pci_mem_find problems
Date: Fri, 21 Jul 2006 17:25:10 -0700

 On 2006.07.22 00:40:07 +0200, Martin Husemann wrote:
 > Can you try to replace PCI_MAPREG_TYPE_MEM with PCI_MAPREG_MEM_TYPE_64BIT
 > in sys/dev/pci/if_ath_pci.c and see if that works?
 
 This solution works: I'm posting this right now through the ath0 link.
 Many thanks, Martin.
 
     ppb2 at pci0 dev 28 function 1: Intel 82801GB/GR PCI Express Port #2 (rev. 0x02)
     pci3 at ppb2 bus 3
     pci3: i/o space, memory space enabled, rd/line, wr/inv ok
     ath0 at pci3 dev 0 function 0
     ath0: interrupting at ioapic0 pin 17 (irq 11)
     ath0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
     ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
     ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps
 54Mbps
     ath0: mac 10.3 phy 6.1 radio 10.2
 
 As a simple patch:
 
 Index: src/sys/dev/pci/if_ath_pci.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/if_ath_pci.c,v
 retrieving revision 1.14
 diff -w -b -u -r1.14 if_ath_pci.c
 --- src/sys/dev/pci/if_ath_pci.c        20 Jun 2006 14:38:34 -0000      1.14
 +++ src/sys/dev/pci/if_ath_pci.c        22 Jul 2006 00:18:23 -0000
 @@ -182,7 +182,8 @@
         /*
          * Setup memory-mapping of PCI registers.
          */
 -       if (pci_mapreg_map(pa, BS_BAR, PCI_MAPREG_TYPE_MEM, 0, &psc->sc_iot,
 +       /* kern/34045: formerly used PCI_MAPREG_TYPE_MEM */
 +       if (pci_mapreg_map(pa, BS_BAR, PCI_MAPREG_MEM_TYPE_64BIT, 0, &psc->sc_iot,
                 &psc->sc_ioh, NULL, NULL)) {
                 aprint_error("cannot map register space\n");
                 goto bad;
 
 
 -- 
   Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
       "Amusement to an observing mind is study." - Benjamin Disraeli