Bug 101415

Summary: AcpiEnterSleepState(ACPI_STATE_S5) may hang system
Product: Base System Reporter: Eugene Grosbein <ports>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.1-STABLE   
Hardware: Any   
OS: Any   

Description Eugene Grosbein 2006-08-05 18:20:15 UTC
	My Intel D975XBX motherboad has Intel HDA onboard audio
	that is not supported by FreeBSD PCM audio device infrastructure
	currently. OSS driver (see Environment abobe for URL) suppors it.
	Its startup procedure loads oss_mod.ko kernel module.

	This is not possible to turn power off (shutdown -p)
	if this kernel module was loaded (unload does not help),
	AcpiEnterSleepState(ACPI_STATE_S5) hangs:

1. acpi_shutdown_final(src/sys/dev/acpica/acpi.c) calls
   AcpiEnterSleepState(ACPI_STATE_S5);

2. AcpiEnterSleepState(src/sys/contrib/dev/acpica/hwsleep.c)
   proceeds normally to writing of SLP_TYP + SLP_EN (the comment says so)
   and calls
   AcpiHwRegisterWrite(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1AControl);

3. AcpiHwRegisterWrite(src/sys/contrib/dev/acpica/hwregs.c)
   calls AcpiHwLowLevelWrite(16, Value, &AcpiGbl_FADT->XPm1aCntBlk)
   for case ACPI_REGISTER_PM1A_CONTROL;
	
4. AcpiHwLowLevelWrite(same file hwregs.c) calls
   AcpiOsWritePort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Address), Value, Width);

5. AcpiOsWritePort(sys/dev/acpica/Osd/OsdHardware.c) calls 
   bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value)
   that hangs.

Fix: 

Unknown. The only workaround is to not load OSS driver
   that gives no audio.


Eugene Grosbein
How-To-Repeat: 
   1. Install FreeBSD 6.1-RELEASE of 6.1-STABLE on D975XBX motherboard.
   2. Install and run
   http://www.4front-tech.com/release/oss3994b-freebsd-x86-v6.1-RELEASE.tar.gz
   3. Run shutdown -p now. The system hangs after
   'Powering system off using ACPI' message is written.
Comment 1 Eugene Grosbein 2007-06-12 12:39:41 UTC
Hi!

Now sound driver for Intel HDA is present in STABLE,
this PR should be closed.

Eugene Grosbein
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2007-06-12 13:31:25 UTC
State Changed
From-To: open->closed

Support for the proper card is now in -STABLE.