Subject: autri0: can't map memory space
To: None <current-users@NetBSD.org>
From: Andreas Gustafsson <gson@gson.org>
List: current-users
Date: 12/18/2007 22:24:28
After upgrading the NetBSD kernel from 4.99.26 to 4.99.42 on my
Toshiba Libretto L2 laptop, the autri audio device will no longer
attach.  The dmesg says:

  autri0 at pci0 dev 6 function 0: Acer Labs M5451 AC-Link Controller Audio Device (rev. 0x01)
  autri0: can't map memory space

I tracked this down to a difference in the PCI configuration data for
the audio device.  If I run the command

  pcictl /dev/pci0 dump -d 6

with the 4.99.26 kernel, the the output contains:

  PCI configuration registers:
    Common header:
      0x00: 0x545110b9 0xc2900007 0x04010001 0x00004000

      Vendor Name: Acer Labs (0x10b9)
      Device Name: M5451 AC-Link Controller Audio Device (0x5451)
      Command register: 0x0007
	I/O space accesses: on
	Memory space accesses: on
	Bus mastering: on
	Special cycles: off
	MWI transactions: off
	Palette snooping: off
	Parity error checking: off
	Address/data stepping: off
	System error (SERR): off
	Fast back-to-back transactions: off
	Interrupt disable: off

With the 4.99.42 kernel, the output contains:

  PCI configuration registers:
    Common header:
      0x00: 0x545110b9 0xc2900000 0x04010001 0x00004000

      Vendor Name: Acer Labs (0x10b9)
      Device Name: M5451 AC-Link Controller Audio Device (0x5451)
      Command register: 0x0000
	I/O space accesses: off
	Memory space accesses: off
	Bus mastering: off
	Special cycles: off
	MWI transactions: off
	Palette snooping: off
	Parity error checking: off
	Address/data stepping: off
	System error (SERR): off
	Fast back-to-back transactions: off
	Interrupt disable: off

Note how the Command register is now 0x0000.  The "Memory space
accesses" bit being off appears to be what's causing the "can't map
memory space" error.

Any idea what could be causing this?
-- 
Andreas Gustafsson, gson@gson.org