Skip to contentSkip to conversation

2.5.69-mm5: reverting i8259-shutdown.patch

DISCUSSION Felipe Alfaro Solana 5 participants 17 messages May 15, 2003 – May 18, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi again, Andrew,

Besides the "make_KOBJ_NAME-match_BUS_ID_SIZE.patch" causing "pccard" oopses, I've also found that, with 2.5.69-mm5 compiled with ACPI support, my laptop is unable to power off. The kernel invokes "acpi_power_off" and stays there forever.

I've found that reverting the "i8259-shutdown.patch" fixes the problem and my laptop is able to shutdown properly (init 0) when using ACPI.

A hardware bug? A kernel bug?

Thanks!

#1 lore raw
Quoted 8 lines · Felipe Alfaro Solana

Hi again, Andrew,

Besides the "make_KOBJ_NAME-match_BUS_ID_SIZE.patch" causing "pccard" oopses, I've also found that, with 2.5.69-mm5 compiled with ACPI support, my laptop is unable to power off. The kernel invokes "acpi_power_off" and stays there forever.

Quoted 4 lines

I've found that reverting the "i8259-shutdown.patch" fixes the problem and my laptop is able to shutdown properly (init 0) when using ACPI.

A hardware bug? A kernel bug?

And thanks again, again.

That's the below patch. It looks pretty innocuous. I'd be assuming that there's something in the shutdown sequence which needs 8259 functionality after the thing has been turned off.

This could well depend upon .config contents and linkage order.

Eric, maybe we need to turn it off by hand at the right time rather than relying on driver model shutdown ordering?

 arch/i386/kernel/i8259.c |   11 +++++++++++
 1 files changed, 11 insertions(+)
arch/i386/kernel/i8259.c renamed from arch/i386/kernel/i8259.c~i8259-shutdown +11 -0
diff -puN arch/i386/kernel/i8259.c~i8259-shutdown arch/i386/kernel/i8259.c
@@ -245,10 +245,21 @@ static int i8259A_resume(struct device *
 	return 0;
 }
 
+static void i8259A_shutdown(struct device *dev)
+{   
+	/* Put the i8259A into a quiescent state that
+	 * the kernel initialization code can get it
+	 * out of.
+	 */
+	outb(0xff, 0x21);	/* mask all of 8259A-1 */
+	outb(0xff, 0xA1);	/* mask all of 8259A-1 */
+}
+
 static struct device_driver i8259A_driver = {
 	.name		= "pic",
 	.bus		= &system_bus_type,
 	.resume		= i8259A_resume,
+	.shutdown	= i8259A_shutdown,
 };
 
 static struct sys_device device_i8259A = {

_

#2 lore raw
Quoted 16 lines · Andrew Morton
Quoted 8 lines · Felipe Alfaro Solana

Hi again, Andrew,

Besides the "make_KOBJ_NAME-match_BUS_ID_SIZE.patch" causing "pccard" oopses, I've also found that, with 2.5.69-mm5 compiled with ACPI support, my laptop is unable to power off. The kernel invokes "acpi_power_off" and stays there forever.

Quoted 4 lines

I've found that reverting the "i8259-shutdown.patch" fixes the problem and my laptop is able to shutdown properly (init 0) when using ACPI.

A hardware bug? A kernel bug?

And thanks again, again.

Quoted 8 lines

That's the below patch. It looks pretty innocuous. I'd be assuming that there's something in the shutdown sequence which needs 8259 functionality after the thing has been turned off.

This could well depend upon .config contents and linkage order.

Eric, maybe we need to turn it off by hand at the right time rather than relying on driver model shutdown ordering?

Interesting. This is yet more proof that system-level devices cannot be treated as common, everyday devices. Sure, it's nice to see them show up in sysfs with little overhead, and very nice not to have to work about them during shutdown or power transitions. But there are just too many special cases (like getting the ordering right ;) that you have to worry about.

So, what do we do with them?

-pat

#3 lore raw
Quoted 8 lines · Patrick Mochel

Interesting. This is yet more proof that system-level devices cannot be treated as common, everyday devices. Sure, it's nice to see them show up in sysfs with little overhead, and very nice not to have to work about them during shutdown or power transitions. But there are just too many special cases (like getting the ordering right ;) that you have to worry about.

So, what do we do with them?

Does the PIC shutdown callback get called _just_ before acpi_power_off?

Zwane

Signature · 1 line
function.linuxpower.ca
#4 lore raw
Quoted 9 lines · Zwane Mwaikambo
Quoted 7 lines · Patrick Mochel

Interesting. This is yet more proof that system-level devices cannot be treated as common, everyday devices. Sure, it's nice to see them show up in sysfs with little overhead, and very nice not to have to work about them during shutdown or power transitions. But there are just too many special cases (like getting the ordering right ;) that you have to worry about.

Quoted 3 lines
Quoted 1 line

So, what do we do with them?

Does the PIC shutdown callback get called _just_ before acpi_power_off?

It may or may not be. It depends on which order it gets registered in, which is arbitrary (*). One can enable DEBUG in drivers/base/power.c and crank up the console log level to see the order that devices get shutdown in on their system.

-pat

(*) - Ok, we can control the registration via link order, but that's something we'll be tweaking until our dying days in absence of a good solution.

#5 lore raw
Quoted 11 lines · Patrick Mochel
Quoted 9 lines · Zwane Mwaikambo
Quoted 7 lines · Patrick Mochel

Interesting. This is yet more proof that system-level devices cannot be treated as common, everyday devices. Sure, it's nice to see them show up in sysfs with little overhead, and very nice not to have to work about them during shutdown or power transitions. But there are just too many special cases (like getting the ordering right ;) that you have to worry about.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

So, what do we do with them?

Does the PIC shutdown callback get called _just_ before acpi_power_off?

It may or may not be. It depends on which order it gets registered in, which is arbitrary (*). One can enable DEBUG in drivers/base/power.c and crank up the console log level to see the order that devices get shutdown in on their system.

OK, I've changed "#undef DEBUG" to "#define DEBUG" in drivers/base/power.c, but during shutdown, I can see no extra debug messages. What am I doing wrong?

#6 lore raw
Quoted 4 lines

OK, I've changed "#undef DEBUG" to "#define DEBUG" in drivers/base/power.c, but during shutdown, I can see no extra debug messages. What am I doing wrong?

Nothing. No one has shutdown methods in their drivers. This patch should give you a little more info. For me, it says the i8259 is getting shutdown very early in the process, which surely can't be good..

-pat

===== drivers/base/power.c 1.18 vs edited =====

drivers/base/power.c +5 -3
@@ -8,7 +8,7 @@
  *
  */
 
-#undef DEBUG
+#define DEBUG
 
 #include <linux/device.h>
 #include <linux/module.h>
@@ -88,10 +88,12 @@
 	down_write(&devices_subsys.rwsem);
 	list_for_each(entry,&devices_subsys.kset.list) {
 		struct device * dev = to_dev(entry);
+		pr_debug("shutting down %s: ",dev->name);
 		if (dev->driver && dev->driver->shutdown) {
-			pr_debug("shutting down %s\n",dev->name);
+			pr_debug("Ok\n");
 			dev->driver->shutdown(dev);
-		}
+		} else
+			pr_debug("Ignored.\n");
 	}
 	up_write(&devices_subsys.rwsem);
 }
#7 lore raw
In reply to Patrick Mochel
Quoted 4 lines · Patrick Mochel
Quoted 3 lines

Eric, maybe we need to turn it off by hand at the right time rather than relying on driver model shutdown ordering?

Quoted 8 lines

Interesting. This is yet more proof that system-level devices cannot be treated as common, everyday devices. Sure, it's nice to see them show up in sysfs with little overhead, and very nice not to have to work about them during shutdown or power transitions. But there are just too many special cases (like getting the ordering right ;) that you have to worry about.

So, what do we do with them?

I'd say that as long as the shutdown routines are executed in reverse order of startup, then the core driver stuff has fulfilled its obligations.

In this case we need to understand why the lockup is happening - what code is requiring 8259 services after the thing has been turned off? Could be that the bug lies there.

Felipe, please send your .config. (again - in fact you may as well do
cp .config ~/.signature)

#8 lore raw
Quoted 7 lines · Andrew Morton

I'd say that as long as the shutdown routines are executed in reverse order of startup, then the core driver stuff has fulfilled its obligations.

In this case we need to understand why the lockup is happening - what code is requiring 8259 services after the thing has been turned off? Could be that the bug lies there.

The registration is somewhat unfair here, it depends on device_initcall and we initialise the 8259 in init_IRQ.

Zwane

Signature · 1 line
function.linuxpower.ca
#9 lore raw
Quoted 6 lines · Zwane Mwaikambo
Quoted 4 lines · Andrew Morton

I'd say that as long as the shutdown routines are executed in reverse order of startup, then the core driver stuff has fulfilled its obligations.

Quoted 6 lines
Quoted 3 lines

In this case we need to understand why the lockup is happening - what code is requiring 8259 services after the thing has been turned off? Could be that the bug lies there.

The registration is somewhat unfair here, it depends on device_initcall and we initialise the 8259 in init_IRQ.

Pat what do you say to some late shutdown callbacks? I'll drop you a patch sometime tommorrow.

Zwane

Signature · 1 line
function.linuxpower.ca
#10 lore raw
Quoted 3 lines

Pat what do you say to some late shutdown callbacks? I'll drop you a patch sometime tommorrow.

Bah. It would work, but it's a hack. We'll get caught in a game similar to the leap-frogging initcalls. In fact, we could just get really twisted and define various levels of exitcalls. [ Or, do them implicitly with some linkser-section-fu by calling the modules' exit functions in the reverse order in which they were initialized, but that's another story. ]

I just think that system level devices need to be treated specially in every case. They just don't work as normal devices because of the ordering issue. We can keep a separate list of them and deal with them explicitly after regular devices. It's not that bad of a change, but will take a few days, unless someone wants to take a stab at it..

-pat

#11 lore raw
In reply to Andrew Morton
Quoted 18 lines · Andrew Morton
Quoted 4 lines · Patrick Mochel
Quoted 3 lines

Eric, maybe we need to turn it off by hand at the right time rather than relying on driver model shutdown ordering?

Quoted 8 lines

Interesting. This is yet more proof that system-level devices cannot be treated as common, everyday devices. Sure, it's nice to see them show up in sysfs with little overhead, and very nice not to have to work about them during shutdown or power transitions. But there are just too many special cases (like getting the ordering right ;) that you have to worry about.

So, what do we do with them?

I'd say that as long as the shutdown routines are executed in reverse order of startup, then the core driver stuff has fulfilled its obligations.

Quoted 6 lines

In this case we need to understand why the lockup is happening - what code is requiring 8259 services after the thing has been turned off? Could be that the bug lies there.

Felipe, please send your .config. (again - in fact you may as well do
cp .config ~/.signature)

Config attached...
Don't understand what do you mean with "cp .config ~/.signature" :-?

#
# Automatically generated make config: don't edit
#
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_GENERIC_ISA_DMA=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y

#
# General setup
#
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_FUTEX=y

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y

#
# Processor type and features
#
CONFIG_X86_PC=y
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
CONFIG_MPENTIUMIII=y
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MELAN is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_SMP is not set
CONFIG_PREEMPT=y
# CONFIG_X86_UP_APIC is not set
CONFIG_X86_TSC=y
# CONFIG_X86_MCE is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_EDD is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_025GB is not set
# CONFIG_05GB is not set
CONFIG_1GB=y
# CONFIG_2GB is not set
# CONFIG_3GB is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_HAVE_DEC_LOCK=y
# CONFIG_KEXEC is not set

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_SOFTWARE_SUSPEND is not set

#
# ACPI Support
#
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_APM is not set

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set

#
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_LEGACY_PROC is not set
CONFIG_PCI_NAMES=y
# CONFIG_ISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
CONFIG_HOTPLUG=y

#
# PCMCIA/CardBus support
#
CONFIG_PCMCIA=y
CONFIG_CARDBUS=y
# CONFIG_I82092 is not set
# CONFIG_I82365 is not set
# CONFIG_TCIC is not set

#
# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats
#
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Plug and Play support
#
# CONFIG_PNP is not set

#
# Block devices
#
CONFIG_BLK_DEV_FD=m
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_LBD is not set

#
# ATA/ATAPI/MFM/RLL device support
#
CONFIG_IDE=y

#
# IDE, ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives #
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_IDE_TASK_IOCTL is not set

#
# IDE chipset support/bugfixes
#
# CONFIG_BLK_DEV_CMD640 is not set
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_IDEPCI_SHARE_IRQ is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDE_TCQ is not set
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_PCI_WIP is not set
CONFIG_BLK_DEV_ADMA=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_BLK_DEV_IDE_MODES=y

#
# SCSI device support
#
# CONFIG_SCSI is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Fusion MPT device support
#

#
# IEEE 1394 (FireWire) support (EXPERIMENTAL)
#
# CONFIG_IEEE1394 is not set

#
# I2O device support
#
# CONFIG_I2O is not set

#
# Networking support
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
# CONFIG_NETLINK_DEV is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=m
CONFIG_IP_NF_FTP=m
CONFIG_IP_NF_IRC=m
CONFIG_IP_NF_TFTP=m
CONFIG_IP_NF_AMANDA=m
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
CONFIG_IP_NF_MATCH_MAC=m
CONFIG_IP_NF_MATCH_PKTTYPE=m
CONFIG_IP_NF_MATCH_MARK=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
CONFIG_IP_NF_MATCH_TOS=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_DSCP=m
# CONFIG_IP_NF_MATCH_AH_ESP is not set
CONFIG_IP_NF_MATCH_LENGTH=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_MATCH_TCPMSS=m
CONFIG_IP_NF_MATCH_HELPER=m
CONFIG_IP_NF_MATCH_STATE=m
CONFIG_IP_NF_MATCH_CONNTRACK=m
CONFIG_IP_NF_MATCH_UNCLEAN=m
CONFIG_IP_NF_MATCH_OWNER=m
CONFIG_IP_NF_FILTER=m
# CONFIG_IP_NF_TARGET_REJECT is not set
# CONFIG_IP_NF_TARGET_MIRROR is not set
# CONFIG_IP_NF_NAT is not set
# CONFIG_IP_NF_MANGLE is not set
# CONFIG_IP_NF_TARGET_LOG is not set
# CONFIG_IP_NF_TARGET_ULOG is not set
# CONFIG_IP_NF_TARGET_TCPMSS is not set
# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set
# CONFIG_IPV6 is not set
# CONFIG_XFRM_USER is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_NETDEVICES=y

#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
# CONFIG_ETHERTAP is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_MII is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
CONFIG_NET_VENDOR_3COM=y
CONFIG_VORTEX=m
# CONFIG_TYPHOON is not set

#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_NET_PCI is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set

#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Token Ring devices (depends on LLC=y)
#
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set

#
# PCMCIA network device support
#
# CONFIG_NET_PCMCIA is not set

#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set

#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set

#
# ISDN subsystem
#
# CONFIG_ISDN_BOOL is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set

#
# Non-8250 serial port support
#
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256

#
# I2C support
#
# CONFIG_I2C is not set

#
# I2C Hardware Sensors Mainboard support
#

#
# I2C Hardware Sensors Chip support
#
# CONFIG_I2C_SENSOR is not set

#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set

#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
CONFIG_AGP=y
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD_8151 is not set
CONFIG_AGP_INTEL=y
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_DRM is not set

#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HANGCHECK_TIMER is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set

#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT3_FS is not set
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_ZISOFS_FS=m
CONFIG_UDF_FS=m

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
# CONFIG_MSDOS_FS is not set
CONFIG_VFAT_FS=m
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y
CONFIG_TMPFS=y
CONFIG_RAMFS=y

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
# CONFIG_NFS_V4 is not set
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_SUNRPC=m
# CONFIG_SUNRPC_GSS is not set
CONFIG_SMB_FS=m
CONFIG_SMB_NLS_DEFAULT=y
CONFIG_SMB_NLS_REMOTE="cp437"
CONFIG_CIFS=m
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_SMB_NLS=y
CONFIG_NLS=y

#
# Native Language Support
#
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_850=m
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ISO8859_1=m
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=m
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=m

#
# Graphics support
#
# CONFIG_FB is not set
CONFIG_VIDEO_SELECT=y

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y

#
# Sound
#
CONFIG_SOUND=y

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
# CONFIG_SND_SEQUENCER is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_RTCTIMER=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

#
# Generic devices
#
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set

#
# PCI devices
#
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_TRIDENT is not set
CONFIG_SND_YMFPCI=y
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set

#
# ALSA USB devices
#
# CONFIG_SND_USB_AUDIO is not set

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set

#
# USB support
#
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_DYNAMIC_MINORS is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_OHCI_HCD is not set
CONFIG_USB_UHCI_HCD=y

#
# USB Device Class drivers
#
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_BLUETOOTH_TTY is not set
# CONFIG_USB_MIDI is not set
# CONFIG_USB_ACM is not set
CONFIG_USB_PRINTER=m

#
# SCSI support is needed for USB Storage
#

#
# USB Human Interface Devices (HID)
#
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
# CONFIG_HID_FF is not set
CONFIG_USB_HIDDEV=y
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_XPAD is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
CONFIG_USB_SCANNER=m

#
# USB Multimedia devices
#
# CONFIG_USB_DABUSB is not set

#
# Video4Linux support is needed for USB Multimedia device support #

#
# USB Network adaptors
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set

#
# USB port drivers
#

#
# USB Serial Converter support
#
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
# CONFIG_USB_SERIAL_VISOR is not set
CONFIG_USB_SERIAL_IPAQ=m
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_SAFE is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
# CONFIG_USB_SERIAL_OMNINET is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_TIGL is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_BRLVGER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_GADGET is not set

#
# Bluetooth support
#
# CONFIG_BT is not set

#
# Profiling support
#
# CONFIG_PROFILING is not set

#
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
# CONFIG_KALLSYMS is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
CONFIG_DEBUG_INFO=y
# CONFIG_FRAME_POINTER is not set

#
# Security options
#
# CONFIG_SECURITY is not set

#
# Cryptographic options
#
# CONFIG_CRYPTO is not set

#
# Library routines
#
# CONFIG_CRC32 is not set
CONFIG_ZLIB_INFLATE=m
CONFIG_X86_BIOS_REBOOT=y

#12 lore raw
Quoted 10 lines · Felipe Alfaro Solana
Quoted 6 lines

In this case we need to understand why the lockup is happening - what code is requiring 8259 services after the thing has been turned off? Could be that the bug lies there.

Felipe, please send your .config. (again - in fact you may as well do
cp .config ~/.signature)

Config attached...
Don't understand what do you mean with "cp .config ~/.signature" :-?

Unable to reproduce, appears to be machine specific, 1 laptop and 2 test systems both managed to power off with APM or ACPI. Also tried with Felipe's config

Zwane

Signature · 1 line
function.linuxpower.ca
#13 lore raw
Quoted 9 lines · Zwane Mwaikambo
Quoted 7 lines · Felipe Alfaro Solana
Quoted 6 lines

In this case we need to understand why the lockup is happening - what code is requiring 8259 services after the thing has been turned off? Could be that the bug lies there.

Felipe, please send your .config. (again - in fact you may as well do
cp .config ~/.signature)

Quoted 6 lines
Quoted 3 lines

Config attached...
Don't understand what do you mean with "cp .config ~/.signature" :-?

Unable to reproduce, appears to be machine specific, 1 laptop and 2 test systems both managed to power off with APM or ACPI. Also tried with Felipe's config

The machine is a NEC (Packard Bell) Chrom@. Could an lspci be of interest?

#14 lore raw
Quoted 2 lines · Felipe Alfaro Solana

The machine is a NEC (Packard Bell) Chrom@. Could an lspci be of interest?

Hmm perhaps /var/log/dmesg, also can you try this ugly patch?

Index: linux-2.5.69-mm6/drivers/acpi/hardware/hwsleep.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.69/drivers/acpi/hardware/hwsleep.c,v retrieving revision 1.1.1.1

drivers/acpi/hardware/hwsleep.c +1 -1
diff -u -p -B -r1.1.1.1 hwsleep.c
@@ -306,7 +306,7 @@ acpi_enter_sleep_state (
 		 * still read the right value. Ideally, this entire block would go
 		 * away entirely.
 		 */
-		acpi_os_stall (10000000);
+		/* acpi_os_stall (10000000); */
 
 		status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_CONTROL,
 				 sleep_enable_reg_info->access_bit_mask);

Index: linux-2.5.69-mm6/drivers/acpi/sleep/poweroff.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.69/drivers/acpi/sleep/poweroff.c,v retrieving revision 1.1.1.1

drivers/acpi/sleep/poweroff.c +1 -0
diff -u -p -B -r1.1.1.1 poweroff.c
@@ -15,6 +15,7 @@ acpi_power_off (void)
 	printk("%s called\n",__FUNCTION__);
 	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
 	ACPI_DISABLE_IRQS();
+	printk("%s:%d\n", __FUNCTION__, __LINE__);
 	acpi_enter_sleep_state(ACPI_STATE_S5);
 }
 
Signature · 1 line
function.linuxpower.ca
#15 lore raw
Quoted 31 lines · Zwane Mwaikambo
Quoted 2 lines · Felipe Alfaro Solana

The machine is a NEC (Packard Bell) Chrom@. Could an lspci be of interest?

Hmm perhaps /var/log/dmesg, also can you try this ugly patch?

Index: linux-2.5.69-mm6/drivers/acpi/hardware/hwsleep.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.69/drivers/acpi/hardware/hwsleep.c,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 hwsleep.c

drivers/acpi/hardware/hwsleep.c +1 -1
@@ -306,7 +306,7 @@ acpi_enter_sleep_state (
 		 * still read the right value. Ideally, this entire block would go
 		 * away entirely.
 		 */
-		acpi_os_stall (10000000);
+		/* acpi_os_stall (10000000); */
 
 		status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_CONTROL,
 				 sleep_enable_reg_info->access_bit_mask);

Index: linux-2.5.69-mm6/drivers/acpi/sleep/poweroff.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.69/drivers/acpi/sleep/poweroff.c,v retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 poweroff.c

drivers/acpi/sleep/poweroff.c acpi_power_off (void) · line 21

Quoted 7 lines
drivers/acpi/sleep/poweroff.c +1 -0
@@ -15,6 +15,7 @@ acpi_power_off (void)
 	printk("%s called\n",__FUNCTION__);
 	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
 	ACPI_DISABLE_IRQS();
+	printk("%s:%d\n", __FUNCTION__, __LINE__);
 	acpi_enter_sleep_state(ACPI_STATE_S5);
 }
 

With the previous patch applied, I can't make the kernel to printk anything interesting after "Halting the computer". Now, I can't even see the "acpi_power_off" message I was seen before.

Attached is "/var/log/dmesg" of a 2.5.69-mm6 kernel. Thanks!

#16 lore raw
In reply to Patrick Mochel

Hi!

Quoted 23 lines
Quoted 14 lines
Quoted 11 lines

Hi again, Andrew,

Besides the "make_KOBJ_NAME-match_BUS_ID_SIZE.patch" causing "pccard" oopses, I've also found that, with 2.5.69-mm5 compiled with ACPI support, my laptop is unable to power off. The kernel invokes "acpi_power_off" and stays there forever.

I've found that reverting the "i8259-shutdown.patch" fixes the problem and my laptop is able to shutdown properly (init 0) when using ACPI.

A hardware bug? A kernel bug?

And thanks again, again.

Quoted 8 lines

That's the below patch. It looks pretty innocuous. I'd be assuming that there's something in the shutdown sequence which needs 8259 functionality after the thing has been turned off.

This could well depend upon .config contents and linkage order.

Eric, maybe we need to turn it off by hand at the right time rather than relying on driver model shutdown ordering?

Quoted 8 lines

Interesting. This is yet more proof that system-level devices cannot be treated as common, everyday devices. Sure, it's nice to see them show up in sysfs with little overhead, and very nice not to have to work about them during shutdown or power transitions. But there are just too many special cases (like getting the ordering right ;) that you have to worry about.

So, what do we do with them?

I guess shutdown needs to be treated like suspend, and needs to have "level". There should be no shutdown, you should do suspend(5, ) and go through all levels properly.
Pavel

Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]