Re: laptop reboots right after hibernation

2007-12-10 Thread Kjartan Maraas

ma., 10.12.2007 kl. 10.03 +0900, skrev Tejun Heo:
> Kjartan Maraas wrote:
> >> Hmmm... Ah.. okay.  Wrongly splitted patch.  Can you please do it one
> >> more time?
> >>
> > Attached.
> 
> Alright, it works now but it seems both dmesgs are from no-filter patch.
>  I'm pretty sure it works too because one of your previous dmesgs showed
> it worked.  Please double check.
> 
Hmm, not sure what happened there. Attaching the filter dmesg output
here.

Cheers
Kjartan

Initializing cgroup subsys cpuset
Linux version 2.6.24-rc4 ([EMAIL PROTECTED]) (gcc version 4.1.2 20071124 (Red 
Hat 4.1.2-35)) #6 SMP Sun Dec 9 21:36:41 CET 2007
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000e - 0010 (reserved)
 BIOS-e820: 0010 - bf7d (usable)
 BIOS-e820: bf7d - bf7e5600 (reserved)
 BIOS-e820: bf7e5600 - bf7f8000 (ACPI NVS)
 BIOS-e820: bf7f8000 - bf80 (reserved)
 BIOS-e820: fec0 - fec01000 (reserved)
 BIOS-e820: fed2 - fed9b000 (reserved)
 BIOS-e820: feda - fedc (reserved)
 BIOS-e820: fee0 - fee01000 (reserved)
 BIOS-e820: ffb0 - ffc0 (reserved)
 BIOS-e820: fff0 - 0001 (reserved)
2167MB HIGHMEM available.
896MB LOWMEM available.
Entering add_active_range(0, 0, 784336) 0 entries of 256 used
Zone PFN ranges:
  DMA 0 -> 4096
  Normal   4096 ->   229376
  HighMem229376 ->   784336
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0:0 ->   784336
On node 0 totalpages: 784336
  DMA zone: 56 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4040 pages, LIFO batch:0
  Normal zone: 3080 pages used for memmap
  Normal zone: 00 pages, LIFO batch:31
  HighMem zone: 7587 pages used for memmap
  HighMem zone: 547373 pages, LIFO batch:31
  Movable zone: 0 pages used for memmap
DMI 2.4 present.
Using APIC driver default
ACPI: RSDP 000F78B0, 0024 (r2 HP)
ACPI: XSDT BF7E57C8, 007C (r1 HPQOEM SLIC-MPC1 HP  1)
ACPI: FACP BF7E5684, 00F4 (r4 HP 30AD3 HP  1)
ACPI: DSDT BF7E5ACC, FE7B (r1 HP   nc64001 MSFT  10E)
ACPI: FACS BF7F7E80, 0040
ACPI: SLIC BF7E5844, 0176 (r1 HPQOEM SLIC-MPC1 HP  1)
ACPI: HPET BF7E59BC, 0038 (r1 HP 30AD1 HP  1)
ACPI: APIC BF7E59F4, 0068 (r1 HP 30AD1 HP  1)
ACPI: MCFG BF7E5A5C, 003C (r1 HP 30AD1 HP  1)
ACPI: TCPA BF7E5A98, 0032 (r2 HP 30AD1 HP  1)
ACPI: SSDT BF7F5947, 0059 (r1 HP   HPQNLP1 MSFT  10E)
ACPI: SSDT BF7F59A0, 032D (r1 HP   HPQSAT1 MSFT  10E)
ACPI: SSDT BF7F64E0, 025F (r1 HP  Cpu0Tst 3000 INTL 20060317)
ACPI: SSDT BF7F673F, 00A6 (r1 HP  Cpu1Tst 3000 INTL 20060317)
ACPI: SSDT BF7F67E5, 04D7 (r1 HPCpuPm 3000 INTL 20060317)
ACPI: PM-Timer IO Port: 0x1008
ACPI: Local APIC address 0xfee0
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:15 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 6:15 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
ACPI: IOAPIC (id[0x01] address[0xfec0] gsi_base[0])
IOAPIC[0]: apic_id 1, version 32, address 0xfec0, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
ACPI: HPET id: 0x8086a201 base: 0xfed0
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at c000 (gap: bf80:3f40)
swsusp: Registered nosave memory region: 0009f000 - 000a
swsusp: Registered nosave memory region: 000a - 000e
swsusp: Registered nosave memory region: 000e - 0010
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 773613
Kernel command line: ro root=LABEL=/1 pci=assign-busses selinux=off
mapped APIC to b000 (fee0)
mapped IOAPIC to a000 (fec0)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c0821000 soft=c0801000
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 1828.865 MHz processor.
Console: colour VGA+ 80x25
console [tty0] enabled
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES:8
... MAX_LOCK_DEPTH:  30
... MAX_LOCKDEP_KEYS:2048
... CLASSHASH_SIZE:   1024
... MAX_LOCKDEP_ENTRIES: 8192
... MAX_LOCKDEP_CHAINS:

Re: laptop reboots right after hibernation

2007-12-10 Thread Tejun Heo
Kjartan Maraas wrote:
> ma., 10.12.2007 kl. 10.03 +0900, skrev Tejun Heo:
>> Kjartan Maraas wrote:
 Hmmm... Ah.. okay.  Wrongly splitted patch.  Can you please do it one
 more time?

>>> Attached.
>> Alright, it works now but it seems both dmesgs are from no-filter patch.
>>  I'm pretty sure it works too because one of your previous dmesgs showed
>> it worked.  Please double check.
>>
> Hmm, not sure what happened there. Attaching the filter dmesg output
> here.

Cool, thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-12-09 Thread Tejun Heo
Kjartan Maraas wrote:
>> Hmmm... Ah.. okay.  Wrongly splitted patch.  Can you please do it one
>> more time?
>>
> Attached.

Alright, it works now but it seems both dmesgs are from no-filter patch.
 I'm pretty sure it works too because one of your previous dmesgs showed
it worked.  Please double check.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-12-09 Thread Kjartan Maraas

sø., 09.12.2007 kl. 15.46 +0900, skrev Tejun Heo:
> Kjartan Maraas wrote:
> > to., 06.12.2007 kl. 11.38 +0900, skrev Tejun Heo:
> >> Thanks.  Almost there.  Can you please try the attached two patches and
> >> report the boot log?
> >>
> > Here we go again.
> 
> Hmmm... Ah.. okay.  Wrongly splitted patch.  Can you please do it one
> more time?
> 
> Thanks.
> 
Attached.

Cheers
Kjartan

Initializing cgroup subsys cpuset
Linux version 2.6.24-rc4 ([EMAIL PROTECTED]) (gcc version 4.1.2 20071124 (Red 
Hat 4.1.2-35)) #6 SMP Sun Dec 9 21:36:41 CET 2007
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000e - 0010 (reserved)
 BIOS-e820: 0010 - bf7d (usable)
 BIOS-e820: bf7d - bf7e5600 (reserved)
 BIOS-e820: bf7e5600 - bf7f8000 (ACPI NVS)
 BIOS-e820: bf7f8000 - bf80 (reserved)
 BIOS-e820: fec0 - fec01000 (reserved)
 BIOS-e820: fed2 - fed9b000 (reserved)
 BIOS-e820: feda - fedc (reserved)
 BIOS-e820: fee0 - fee01000 (reserved)
 BIOS-e820: ffb0 - ffc0 (reserved)
 BIOS-e820: fff0 - 0001 (reserved)
2167MB HIGHMEM available.
896MB LOWMEM available.
Entering add_active_range(0, 0, 784336) 0 entries of 256 used
Zone PFN ranges:
  DMA 0 -> 4096
  Normal   4096 ->   229376
  HighMem229376 ->   784336
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0:0 ->   784336
On node 0 totalpages: 784336
  DMA zone: 56 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4040 pages, LIFO batch:0
  Normal zone: 3080 pages used for memmap
  Normal zone: 00 pages, LIFO batch:31
  HighMem zone: 7587 pages used for memmap
  HighMem zone: 547373 pages, LIFO batch:31
  Movable zone: 0 pages used for memmap
DMI 2.4 present.
Using APIC driver default
ACPI: RSDP 000F78B0, 0024 (r2 HP)
ACPI: XSDT BF7E57C8, 007C (r1 HPQOEM SLIC-MPC1 HP  1)
ACPI: FACP BF7E5684, 00F4 (r4 HP 30AD3 HP  1)
ACPI: DSDT BF7E5ACC, FE7B (r1 HP   nc64001 MSFT  10E)
ACPI: FACS BF7F7E80, 0040
ACPI: SLIC BF7E5844, 0176 (r1 HPQOEM SLIC-MPC1 HP  1)
ACPI: HPET BF7E59BC, 0038 (r1 HP 30AD1 HP  1)
ACPI: APIC BF7E59F4, 0068 (r1 HP 30AD1 HP  1)
ACPI: MCFG BF7E5A5C, 003C (r1 HP 30AD1 HP  1)
ACPI: TCPA BF7E5A98, 0032 (r2 HP 30AD1 HP  1)
ACPI: SSDT BF7F5947, 0059 (r1 HP   HPQNLP1 MSFT  10E)
ACPI: SSDT BF7F59A0, 032D (r1 HP   HPQSAT1 MSFT  10E)
ACPI: SSDT BF7F64E0, 025F (r1 HP  Cpu0Tst 3000 INTL 20060317)
ACPI: SSDT BF7F673F, 00A6 (r1 HP  Cpu1Tst 3000 INTL 20060317)
ACPI: SSDT BF7F67E5, 04D7 (r1 HPCpuPm 3000 INTL 20060317)
ACPI: PM-Timer IO Port: 0x1008
ACPI: Local APIC address 0xfee0
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:15 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 6:15 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
ACPI: IOAPIC (id[0x01] address[0xfec0] gsi_base[0])
IOAPIC[0]: apic_id 1, version 32, address 0xfec0, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
ACPI: HPET id: 0x8086a201 base: 0xfed0
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at c000 (gap: bf80:3f40)
swsusp: Registered nosave memory region: 0009f000 - 000a
swsusp: Registered nosave memory region: 000a - 000e
swsusp: Registered nosave memory region: 000e - 0010
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 773613
Kernel command line: ro root=LABEL=/1 rhgb quiet pci=assign-busses selinux=off
mapped APIC to b000 (fee0)
mapped IOAPIC to a000 (fec0)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c0821000 soft=c0801000
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 1828.818 MHz processor.
Console: colour VGA+ 80x25
console [tty0] enabled
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES:8
... MAX_LOCK_DEPTH:  30
... MAX_LOCKDEP_KEYS:2048
... CLASSHASH_SIZE:   1024
... MAX_LOCKDEP_ENTRIES: 8192
... MAX_LOCKDEP_CHAINS:  16384
... CHAINHASH_SIZE:  8192
 memory used by lock 

Re: laptop reboots right after hibernation

2007-12-08 Thread Tejun Heo
Kjartan Maraas wrote:
> to., 06.12.2007 kl. 11.38 +0900, skrev Tejun Heo:
>> Thanks.  Almost there.  Can you please try the attached two patches and
>> report the boot log?
>>
> Here we go again.

Hmmm... Ah.. okay.  Wrongly splitted patch.  Can you please do it one
more time?

Thanks.

-- 
tejun
Index: work/include/linux/libata.h
===
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -1013,18 +1013,18 @@ extern void ata_do_eh(struct ata_port *a
  * printk helpers
  */
 #define ata_port_printk(ap, lv, fmt, args...) \
-	printk(lv"ata%u: "fmt, (ap)->print_id , ##args)
+	printk("%sata%u: "fmt, lv, (ap)->print_id , ##args)
 
 #define ata_link_printk(link, lv, fmt, args...) do { \
 	if ((link)->ap->nr_pmp_links) \
-		printk(lv"ata%u.%02u: "fmt, (link)->ap->print_id, \
+		printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id,	\
 		   (link)->pmp , ##args); \
 	else \
-		printk(lv"ata%u: "fmt, (link)->ap->print_id , ##args); \
+		printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
 	} while(0)
 
 #define ata_dev_printk(dev, lv, fmt, args...) \
-	printk(lv"ata%u.%02u: "fmt, (dev)->link->ap->print_id, \
+	printk("%sata%u.%02u: "fmt, lv, (dev)->link->ap->print_id,	\
 	   (dev)->link->pmp + (dev)->devno , ##args)
 
 /*
Index: work/include/linux/ata.h
===
--- work.orig/include/linux/ata.h
+++ work/include/linux/ata.h
@@ -190,6 +190,8 @@ enum {
 	ATA_CMD_READ_LOG_EXT	= 0x2f,
 	ATA_CMD_PMP_READ	= 0xE4,
 	ATA_CMD_PMP_WRITE	= 0xE8,
+	ATA_CMD_CONF_OVERLAY	= 0xB1,
+	ATA_CMD_SEC_FREEZE_LOCK	= 0xF5,
 
 	/* READ_LOG_EXT pages */
 	ATA_LOG_SATA_NCQ	= 0x10,
@@ -239,6 +241,19 @@ enum {
 	SATA_AN			= 0x05,  /* Asynchronous Notification */
 	SATA_DIPM		= 0x03,  /* Device Initiated Power Management */
 
+	/* feature values for SET_MAX */
+	ATA_SET_MAX_ADDR	= 0x00,
+	ATA_SET_MAX_PASSWD	= 0x01,
+	ATA_SET_MAX_LOCK	= 0x02,
+	ATA_SET_MAX_UNLOCK	= 0x03,
+	ATA_SET_MAX_FREEZE_LOCK	= 0x04,
+
+	/* feature values for DEVICE CONFIGURATION OVERLAY */
+	ATA_DCO_RESTORE		= 0xC0,
+	ATA_DCO_FREEZE_LOCK	= 0xC1,
+	ATA_DCO_IDENTIFY	= 0xC2,
+	ATA_DCO_SET		= 0xC3,
+
 	/* ATAPI stuff */
 	ATAPI_PKT_DMA		= (1 << 0),
 	ATAPI_DMADIR		= (1 << 2),	/* ATAPI data dir:
Index: work/drivers/ata/libata-acpi.c
===
--- work.orig/drivers/ata/libata-acpi.c
+++ work/drivers/ata/libata-acpi.c
@@ -311,8 +311,8 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm);
  * EH context.
  *
  * RETURNS:
- * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't
- * contain valid data.
+ * Number of taskfiles on success, 0 if _GTF doesn't exist.  -EINVAL
+ * if _GTF is invalid.
  */
 static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 			   void **ptr_to_free)
@@ -339,6 +339,7 @@ static int ata_dev_get_GTF(struct ata_de
 			ata_dev_printk(dev, KERN_WARNING,
    "_GTF evaluation failed (AE 0x%x)\n",
    status);
+			rc = -EINVAL;
 		}
 		goto out_free;
 	}
@@ -350,6 +351,7 @@ static int ata_dev_get_GTF(struct ata_de
 __FUNCTION__,
 (unsigned long long)output.length,
 output.pointer);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -358,6 +360,7 @@ static int ata_dev_get_GTF(struct ata_de
 		ata_dev_printk(dev, KERN_WARNING,
 			   "_GTF unexpected object type 0x%x\n",
 			   out_obj->type);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -365,6 +368,7 @@ static int ata_dev_get_GTF(struct ata_de
 		ata_dev_printk(dev, KERN_WARNING,
 			   "unexpected _GTF length (%d)\n",
 			   out_obj->buffer.length);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -397,7 +401,7 @@ int ata_acpi_cbl_80wire(struct ata_port 
 	int valid = 0;
 
 	/* No _GTM data, no information */
-	if (ata_acpi_gtm(ap, >m) < 0)
+	if (!ap->acpi_handle || ata_acpi_gtm(ap, >m) < 0)
 		return 0;
 
 	/* Split timing, DMA enabled */
@@ -422,7 +426,7 @@ int ata_acpi_cbl_80wire(struct ata_port 
 EXPORT_SYMBOL_GPL(ata_acpi_cbl_80wire);
 
 /**
- * taskfile_load_raw - send taskfile registers to host controller
+ * ata_acpi_run_tf - send taskfile registers to host controller
  * @dev: target ATA device
  * @gtf: raw ATA taskfile register set (0x1f1 - 0x1f7)
  *
@@ -441,14 +445,17 @@ EXPORT_SYMBOL_GPL(ata_acpi_cbl_80wire);
  * EH context.
  *
  * RETURNS:
- * 0 on success, -errno on failure.
+ * 1 if command is executed successfully.  0 if ignored or rejected,
+ * -errno on other errors.
  */
-static int taskfile_load_raw(struct ata_device *dev,
-			  const struct ata_acpi_gtf *gtf)
+static int ata_acpi_run_tf(struct ata_device *dev,
+			   const struct ata_acpi_gtf *gtf)
 {
-	struct ata_port *ap = dev->link->ap;
 	struct ata_taskfile tf, rtf;
 	unsigned int err_mask;
+	const char *level;
+	char msg[60];
+	int rc;
 
 	if ((gtf->tf[0] == 0) && (gtf->tf[1] == 0) && (gtf->tf[2] == 0)
 	&& (gtf->tf[3] == 0) && (gtf->tf[4] == 0) && (gtf->tf[5] == 0)
@@

Re: laptop reboots right after hibernation

2007-12-06 Thread Kjartan Maraas

to., 06.12.2007 kl. 11.38 +0900, skrev Tejun Heo:
> Thanks.  Almost there.  Can you please try the attached two patches and
> report the boot log?
> 
Here we go again.

Cheers
Kjartan

Initializing cgroup subsys cpuset
Linux version 2.6.24-rc4 ([EMAIL PROTECTED]) (gcc version 4.1.2 20071124 (Red 
Hat 4.1.2-35)) #3 SMP Thu Dec 6 13:29:39 CET 2007
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000e - 0010 (reserved)
 BIOS-e820: 0010 - bf7d (usable)
 BIOS-e820: bf7d - bf7e5600 (reserved)
 BIOS-e820: bf7e5600 - bf7f8000 (ACPI NVS)
 BIOS-e820: bf7f8000 - bf80 (reserved)
 BIOS-e820: fec0 - fec01000 (reserved)
 BIOS-e820: fed2 - fed9b000 (reserved)
 BIOS-e820: feda - fedc (reserved)
 BIOS-e820: fee0 - fee01000 (reserved)
 BIOS-e820: ffb0 - ffc0 (reserved)
 BIOS-e820: fff0 - 0001 (reserved)
2167MB HIGHMEM available.
896MB LOWMEM available.
Entering add_active_range(0, 0, 784336) 0 entries of 256 used
Zone PFN ranges:
  DMA 0 -> 4096
  Normal   4096 ->   229376
  HighMem229376 ->   784336
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0:0 ->   784336
On node 0 totalpages: 784336
  DMA zone: 56 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4040 pages, LIFO batch:0
  Normal zone: 3080 pages used for memmap
  Normal zone: 00 pages, LIFO batch:31
  HighMem zone: 7587 pages used for memmap
  HighMem zone: 547373 pages, LIFO batch:31
  Movable zone: 0 pages used for memmap
DMI 2.4 present.
Using APIC driver default
ACPI: RSDP 000F78B0, 0024 (r2 HP)
ACPI: XSDT BF7E57C8, 007C (r1 HPQOEM SLIC-MPC1 HP  1)
ACPI: FACP BF7E5684, 00F4 (r4 HP 30AD3 HP  1)
ACPI: DSDT BF7E5ACC, FE7B (r1 HP   nc64001 MSFT  10E)
ACPI: FACS BF7F7E80, 0040
ACPI: SLIC BF7E5844, 0176 (r1 HPQOEM SLIC-MPC1 HP  1)
ACPI: HPET BF7E59BC, 0038 (r1 HP 30AD1 HP  1)
ACPI: APIC BF7E59F4, 0068 (r1 HP 30AD1 HP  1)
ACPI: MCFG BF7E5A5C, 003C (r1 HP 30AD1 HP  1)
ACPI: TCPA BF7E5A98, 0032 (r2 HP 30AD1 HP  1)
ACPI: SSDT BF7F5947, 0059 (r1 HP   HPQNLP1 MSFT  10E)
ACPI: SSDT BF7F59A0, 032D (r1 HP   HPQSAT1 MSFT  10E)
ACPI: SSDT BF7F64E0, 025F (r1 HP  Cpu0Tst 3000 INTL 20060317)
ACPI: SSDT BF7F673F, 00A6 (r1 HP  Cpu1Tst 3000 INTL 20060317)
ACPI: SSDT BF7F67E5, 04D7 (r1 HPCpuPm 3000 INTL 20060317)
ACPI: PM-Timer IO Port: 0x1008
ACPI: Local APIC address 0xfee0
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:15 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 6:15 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
ACPI: IOAPIC (id[0x01] address[0xfec0] gsi_base[0])
IOAPIC[0]: apic_id 1, version 32, address 0xfec0, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
ACPI: HPET id: 0x8086a201 base: 0xfed0
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at c000 (gap: bf80:3f40)
swsusp: Registered nosave memory region: 0009f000 - 000a
swsusp: Registered nosave memory region: 000a - 000e
swsusp: Registered nosave memory region: 000e - 0010
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 773613
Kernel command line: ro root=LABEL=/1 rhgb quiet pci=assign-busses selinux=off
mapped APIC to b000 (fee0)
mapped IOAPIC to a000 (fec0)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c082 soft=c080
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 1828.814 MHz processor.
Console: colour VGA+ 80x25
console [tty0] enabled
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES:8
... MAX_LOCK_DEPTH:  30
... MAX_LOCKDEP_KEYS:2048
... CLASSHASH_SIZE:   1024
... MAX_LOCKDEP_ENTRIES: 8192
... MAX_LOCKDEP_CHAINS:  16384
... CHAINHASH_SIZE:  8192
 memory used by lock dependency info: 1024 kB
 per task-struct memory footprint: 1680 bytes
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memor

Re: laptop reboots right after hibernation

2007-12-05 Thread Tejun Heo
Thanks.  Almost there.  Can you please try the attached two patches and
report the boot log?

-- 
tejun
Index: work/include/linux/libata.h
===
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -1013,18 +1013,18 @@ extern void ata_do_eh(struct ata_port *a
  * printk helpers
  */
 #define ata_port_printk(ap, lv, fmt, args...) \
-	printk(lv"ata%u: "fmt, (ap)->print_id , ##args)
+	printk("%sata%u: "fmt, lv, (ap)->print_id , ##args)
 
 #define ata_link_printk(link, lv, fmt, args...) do { \
 	if ((link)->ap->nr_pmp_links) \
-		printk(lv"ata%u.%02u: "fmt, (link)->ap->print_id, \
+		printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id,	\
 		   (link)->pmp , ##args); \
 	else \
-		printk(lv"ata%u: "fmt, (link)->ap->print_id , ##args); \
+		printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
 	} while(0)
 
 #define ata_dev_printk(dev, lv, fmt, args...) \
-	printk(lv"ata%u.%02u: "fmt, (dev)->link->ap->print_id, \
+	printk("%sata%u.%02u: "fmt, lv, (dev)->link->ap->print_id,	\
 	   (dev)->link->pmp + (dev)->devno , ##args)
 
 /*
Index: work/include/linux/ata.h
===
--- work.orig/include/linux/ata.h
+++ work/include/linux/ata.h
@@ -190,6 +190,8 @@ enum {
 	ATA_CMD_READ_LOG_EXT	= 0x2f,
 	ATA_CMD_PMP_READ	= 0xE4,
 	ATA_CMD_PMP_WRITE	= 0xE8,
+	ATA_CMD_CONF_OVERLAY	= 0xB1,
+	ATA_CMD_SEC_FREEZE_LOCK	= 0xF5,
 
 	/* READ_LOG_EXT pages */
 	ATA_LOG_SATA_NCQ	= 0x10,
@@ -239,6 +241,19 @@ enum {
 	SATA_AN			= 0x05,  /* Asynchronous Notification */
 	SATA_DIPM		= 0x03,  /* Device Initiated Power Management */
 
+	/* feature values for SET_MAX */
+	ATA_SET_MAX_ADDR	= 0x00,
+	ATA_SET_MAX_PASSWD	= 0x01,
+	ATA_SET_MAX_LOCK	= 0x02,
+	ATA_SET_MAX_UNLOCK	= 0x03,
+	ATA_SET_MAX_FREEZE_LOCK	= 0x04,
+
+	/* feature values for DEVICE CONFIGURATION OVERLAY */
+	ATA_DCO_RESTORE		= 0xC0,
+	ATA_DCO_FREEZE_LOCK	= 0xC1,
+	ATA_DCO_IDENTIFY	= 0xC2,
+	ATA_DCO_SET		= 0xC3,
+
 	/* ATAPI stuff */
 	ATAPI_PKT_DMA		= (1 << 0),
 	ATAPI_DMADIR		= (1 << 2),	/* ATAPI data dir:
Index: work/drivers/ata/libata-acpi.c
===
--- work.orig/drivers/ata/libata-acpi.c
+++ work/drivers/ata/libata-acpi.c
@@ -311,8 +311,8 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm);
  * EH context.
  *
  * RETURNS:
- * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't
- * contain valid data.
+ * Number of taskfiles on success, 0 if _GTF doesn't exist.  -EINVAL
+ * if _GTF is invalid.
  */
 static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 			   void **ptr_to_free)
@@ -339,6 +339,7 @@ static int ata_dev_get_GTF(struct ata_de
 			ata_dev_printk(dev, KERN_WARNING,
    "_GTF evaluation failed (AE 0x%x)\n",
    status);
+			rc = -EINVAL;
 		}
 		goto out_free;
 	}
@@ -350,6 +351,7 @@ static int ata_dev_get_GTF(struct ata_de
 __FUNCTION__,
 (unsigned long long)output.length,
 output.pointer);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -358,6 +360,7 @@ static int ata_dev_get_GTF(struct ata_de
 		ata_dev_printk(dev, KERN_WARNING,
 			   "_GTF unexpected object type 0x%x\n",
 			   out_obj->type);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -365,6 +368,7 @@ static int ata_dev_get_GTF(struct ata_de
 		ata_dev_printk(dev, KERN_WARNING,
 			   "unexpected _GTF length (%d)\n",
 			   out_obj->buffer.length);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -397,7 +401,7 @@ int ata_acpi_cbl_80wire(struct ata_port 
 	int valid = 0;
 
 	/* No _GTM data, no information */
-	if (ata_acpi_gtm(ap, >m) < 0)
+	if (!ap->acpi_handle || ata_acpi_gtm(ap, >m) < 0)
 		return 0;
 
 	/* Split timing, DMA enabled */
@@ -422,7 +426,7 @@ int ata_acpi_cbl_80wire(struct ata_port 
 EXPORT_SYMBOL_GPL(ata_acpi_cbl_80wire);
 
 /**
- * taskfile_load_raw - send taskfile registers to host controller
+ * ata_acpi_run_tf - send taskfile registers to host controller
  * @dev: target ATA device
  * @gtf: raw ATA taskfile register set (0x1f1 - 0x1f7)
  *
@@ -441,14 +445,17 @@ EXPORT_SYMBOL_GPL(ata_acpi_cbl_80wire);
  * EH context.
  *
  * RETURNS:
- * 0 on success, -errno on failure.
+ * 1 if command is executed successfully.  0 if ignored or rejected,
+ * -errno on other errors.
  */
-static int taskfile_load_raw(struct ata_device *dev,
-			  const struct ata_acpi_gtf *gtf)
+static int ata_acpi_run_tf(struct ata_device *dev,
+			   const struct ata_acpi_gtf *gtf)
 {
-	struct ata_port *ap = dev->link->ap;
 	struct ata_taskfile tf, rtf;
 	unsigned int err_mask;
+	const char *level;
+	char msg[60];
+	int rc;
 
 	if ((gtf->tf[0] == 0) && (gtf->tf[1] == 0) && (gtf->tf[2] == 0)
 	&& (gtf->tf[3] == 0) && (gtf->tf[4] == 0) && (gtf->tf[5] == 0)
@@ -468,29 +475,45 @@ static int taskfile_load_raw(struct ata_
 	tf.device  = gtf->tf[5];	/* 0x1f6 */
 	tf.command = gtf->tf[6];	/* 0x1f7 */
 
-	if (ata_msg_probe(ap))
-		ata_dev_printk(dev, KERN_

Re: laptop reboots right after hibernation

2007-12-05 Thread Kjartan Maraas

on., 05.12.2007 kl. 16.46 +0900, skrev Tejun Heo:
> Kjartan Maraas wrote:
> > fr., 30.11.2007 kl. 19.39 +0900, skrev Tejun Heo:
> >> Kjartan Maraas wrote:
> >>> on., 28.11.2007 kl. 10.09 +0900, skrev Tejun Heo:
>  Kjartan Maraas wrote:
> > I get this exact error message on a normal first time boot here. I'm
> > using the latest fedora development kernel which is 2.6.24-rc2-git6
> > based. And I have the latest BIOS from HP IIRC.
> >
> > This is an HP nc6400 intel based laptop:
>  Care to post boot dmesg?  Or does harddisk detection fail because of 
>  this?
> 
> >>> Here you go. It shows the error two times and then it gets it right and
> >>> continues to boot. No other problems arise from this that I can see.
> >> I'm attaching two patches.  Please apply each on top of clean 2.6.24-rc3
> >> and report kernel boot logs for both.
> >>
> > I tried to do that but recent kernels hang on boot here after TSC:
> > clocksource installed.
> > 
> > Filed a bug here:
> > https://bugzilla.redhat.com/show_bug.cgi?id=405721
> > 
> > but it also happens on the plain rc3 kernel...
> 
> Can you please give a shot at -rc4 kernel?
> 
Here you go.

Cheers
Kjartan

Initializing cgroup subsys cpuset
Linux version 2.6.24-rc4 ([EMAIL PROTECTED]) (gcc version 4.1.2 20071124 (Red 
Hat 4.1.2-35)) #1 SMP Wed Dec 5 12:18:44 CET 2007
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000e - 0010 (reserved)
 BIOS-e820: 0010 - bf7d (usable)
 BIOS-e820: bf7d - bf7e5600 (reserved)
 BIOS-e820: bf7e5600 - bf7f8000 (ACPI NVS)
 BIOS-e820: bf7f8000 - bf80 (reserved)
 BIOS-e820: fec0 - fec01000 (reserved)
 BIOS-e820: fed2 - fed9b000 (reserved)
 BIOS-e820: feda - fedc (reserved)
 BIOS-e820: fee0 - fee01000 (reserved)
 BIOS-e820: ffb0 - ffc0 (reserved)
 BIOS-e820: fff0 - 0001 (reserved)
2167MB HIGHMEM available.
896MB LOWMEM available.
Entering add_active_range(0, 0, 784336) 0 entries of 256 used
Zone PFN ranges:
  DMA 0 -> 4096
  Normal   4096 ->   229376
  HighMem229376 ->   784336
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0:0 ->   784336
On node 0 totalpages: 784336
  DMA zone: 56 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4040 pages, LIFO batch:0
  Normal zone: 3080 pages used for memmap
  Normal zone: 00 pages, LIFO batch:31
  HighMem zone: 7587 pages used for memmap
  HighMem zone: 547373 pages, LIFO batch:31
  Movable zone: 0 pages used for memmap
DMI 2.4 present.
Using APIC driver default
ACPI: RSDP 000F78B0, 0024 (r2 HP)
ACPI: XSDT BF7E57C8, 007C (r1 HPQOEM SLIC-MPC1 HP  1)
ACPI: FACP BF7E5684, 00F4 (r4 HP 30AD3 HP  1)
ACPI: DSDT BF7E5ACC, FE7B (r1 HP   nc64001 MSFT  10E)
ACPI: FACS BF7F7E80, 0040
ACPI: SLIC BF7E5844, 0176 (r1 HPQOEM SLIC-MPC1 HP  1)
ACPI: HPET BF7E59BC, 0038 (r1 HP 30AD1 HP  1)
ACPI: APIC BF7E59F4, 0068 (r1 HP 30AD1 HP  1)
ACPI: MCFG BF7E5A5C, 003C (r1 HP 30AD1 HP  1)
ACPI: TCPA BF7E5A98, 0032 (r2 HP 30AD1 HP  1)
ACPI: SSDT BF7F5947, 0059 (r1 HP   HPQNLP1 MSFT  10E)
ACPI: SSDT BF7F59A0, 032D (r1 HP   HPQSAT1 MSFT  10E)
ACPI: SSDT BF7F64E0, 025F (r1 HP  Cpu0Tst 3000 INTL 20060317)
ACPI: SSDT BF7F673F, 00A6 (r1 HP  Cpu1Tst 3000 INTL 20060317)
ACPI: SSDT BF7F67E5, 04D7 (r1 HPCpuPm 3000 INTL 20060317)
ACPI: PM-Timer IO Port: 0x1008
ACPI: Local APIC address 0xfee0
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:15 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 6:15 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
ACPI: IOAPIC (id[0x01] address[0xfec0] gsi_base[0])
IOAPIC[0]: apic_id 1, version 32, address 0xfec0, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
ACPI: HPET id: 0x8086a201 base: 0xfed0
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at c000 (gap: bf80:3f40)
swsusp: Registered nosave memory region: 0009f000 - 000a
swsusp: Registered nosave memory region: 000a - 000e
swsusp: Registered nosave memory region: 000e - 0010
Built 1 zonelists in Zone order, mobility group

Re: laptop reboots right after hibernation

2007-12-05 Thread Kjartan Maraas

on., 05.12.2007 kl. 16.46 +0900, skrev Tejun Heo:
> Kjartan Maraas wrote:
> > fr., 30.11.2007 kl. 19.39 +0900, skrev Tejun Heo:
> >> Kjartan Maraas wrote:
> >>> on., 28.11.2007 kl. 10.09 +0900, skrev Tejun Heo:
>  Kjartan Maraas wrote:
> > I get this exact error message on a normal first time boot here. I'm
> > using the latest fedora development kernel which is 2.6.24-rc2-git6
> > based. And I have the latest BIOS from HP IIRC.
> >
> > This is an HP nc6400 intel based laptop:
>  Care to post boot dmesg?  Or does harddisk detection fail because of 
>  this?
> 
> >>> Here you go. It shows the error two times and then it gets it right and
> >>> continues to boot. No other problems arise from this that I can see.
> >> I'm attaching two patches.  Please apply each on top of clean 2.6.24-rc3
> >> and report kernel boot logs for both.
> >>
> > I tried to do that but recent kernels hang on boot here after TSC:
> > clocksource installed.
> > 
> > Filed a bug here:
> > https://bugzilla.redhat.com/show_bug.cgi?id=405721
> > 
> > but it also happens on the plain rc3 kernel...
> 
> Can you please give a shot at -rc4 kernel?
> 
Sure. It seems the bug above was caused by the compiler and has been
fixed in rawhide now so I'll give it a try.

Cheers
Kjartan


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-12-04 Thread Tejun Heo
Kjartan Maraas wrote:
> fr., 30.11.2007 kl. 19.39 +0900, skrev Tejun Heo:
>> Kjartan Maraas wrote:
>>> on., 28.11.2007 kl. 10.09 +0900, skrev Tejun Heo:
 Kjartan Maraas wrote:
> I get this exact error message on a normal first time boot here. I'm
> using the latest fedora development kernel which is 2.6.24-rc2-git6
> based. And I have the latest BIOS from HP IIRC.
>
> This is an HP nc6400 intel based laptop:
 Care to post boot dmesg?  Or does harddisk detection fail because of this?

>>> Here you go. It shows the error two times and then it gets it right and
>>> continues to boot. No other problems arise from this that I can see.
>> I'm attaching two patches.  Please apply each on top of clean 2.6.24-rc3
>> and report kernel boot logs for both.
>>
> I tried to do that but recent kernels hang on boot here after TSC:
> clocksource installed.
> 
> Filed a bug here:
> https://bugzilla.redhat.com/show_bug.cgi?id=405721
> 
> but it also happens on the plain rc3 kernel...

Can you please give a shot at -rc4 kernel?

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-30 Thread Kjartan Maraas

fr., 30.11.2007 kl. 19.39 +0900, skrev Tejun Heo:
> Kjartan Maraas wrote:
> > on., 28.11.2007 kl. 10.09 +0900, skrev Tejun Heo:
> >> Kjartan Maraas wrote:
> >>> I get this exact error message on a normal first time boot here. I'm
> >>> using the latest fedora development kernel which is 2.6.24-rc2-git6
> >>> based. And I have the latest BIOS from HP IIRC.
> >>>
> >>> This is an HP nc6400 intel based laptop:
> >> Care to post boot dmesg?  Or does harddisk detection fail because of this?
> >>
> > Here you go. It shows the error two times and then it gets it right and
> > continues to boot. No other problems arise from this that I can see.
> 
> I'm attaching two patches.  Please apply each on top of clean 2.6.24-rc3
> and report kernel boot logs for both.
> 
I tried to do that but recent kernels hang on boot here after TSC:
clocksource installed.

Filed a bug here:
https://bugzilla.redhat.com/show_bug.cgi?id=405721

but it also happens on the plain rc3 kernel...

Cheers
Kjartan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-30 Thread Tejun Heo
Kjartan Maraas wrote:
> on., 28.11.2007 kl. 10.09 +0900, skrev Tejun Heo:
>> Kjartan Maraas wrote:
>>> I get this exact error message on a normal first time boot here. I'm
>>> using the latest fedora development kernel which is 2.6.24-rc2-git6
>>> based. And I have the latest BIOS from HP IIRC.
>>>
>>> This is an HP nc6400 intel based laptop:
>> Care to post boot dmesg?  Or does harddisk detection fail because of this?
>>
> Here you go. It shows the error two times and then it gets it right and
> continues to boot. No other problems arise from this that I can see.

I'm attaching two patches.  Please apply each on top of clean 2.6.24-rc3
and report kernel boot logs for both.

Thanks.

-- 
tejun
Index: work/include/linux/libata.h
===
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -1013,18 +1013,18 @@ extern void ata_do_eh(struct ata_port *a
  * printk helpers
  */
 #define ata_port_printk(ap, lv, fmt, args...) \
-	printk(lv"ata%u: "fmt, (ap)->print_id , ##args)
+	printk("%sata%u: "fmt, lv, (ap)->print_id , ##args)
 
 #define ata_link_printk(link, lv, fmt, args...) do { \
 	if ((link)->ap->nr_pmp_links) \
-		printk(lv"ata%u.%02u: "fmt, (link)->ap->print_id, \
+		printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id,	\
 		   (link)->pmp , ##args); \
 	else \
-		printk(lv"ata%u: "fmt, (link)->ap->print_id , ##args); \
+		printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
 	} while(0)
 
 #define ata_dev_printk(dev, lv, fmt, args...) \
-	printk(lv"ata%u.%02u: "fmt, (dev)->link->ap->print_id, \
+	printk("%sata%u.%02u: "fmt, lv, (dev)->link->ap->print_id,	\
 	   (dev)->link->pmp + (dev)->devno , ##args)
 
 /*
Index: work/include/linux/ata.h
===
--- work.orig/include/linux/ata.h
+++ work/include/linux/ata.h
@@ -190,6 +190,8 @@ enum {
 	ATA_CMD_READ_LOG_EXT	= 0x2f,
 	ATA_CMD_PMP_READ	= 0xE4,
 	ATA_CMD_PMP_WRITE	= 0xE8,
+	ATA_CMD_CONF_OVERLAY	= 0xB1,
+	ATA_CMD_SEC_FREEZE_LOCK	= 0xF5,
 
 	/* READ_LOG_EXT pages */
 	ATA_LOG_SATA_NCQ	= 0x10,
@@ -239,6 +241,19 @@ enum {
 	SATA_AN			= 0x05,  /* Asynchronous Notification */
 	SATA_DIPM		= 0x03,  /* Device Initiated Power Management */
 
+	/* feature values for SET_MAX */
+	ATA_SET_MAX_ADDR	= 0x00,
+	ATA_SET_MAX_PASSWD	= 0x01,
+	ATA_SET_MAX_LOCK	= 0x02,
+	ATA_SET_MAX_UNLOCK	= 0x03,
+	ATA_SET_MAX_FREEZE_LOCK	= 0x04,
+
+	/* feature values for DEVICE CONFIGURATION OVERLAY */
+	ATA_DCO_RESTORE		= 0xC0,
+	ATA_DCO_FREEZE_LOCK	= 0xC1,
+	ATA_DCO_IDENTIFY	= 0xC2,
+	ATA_DCO_SET		= 0xC3,
+
 	/* ATAPI stuff */
 	ATAPI_PKT_DMA		= (1 << 0),
 	ATAPI_DMADIR		= (1 << 2),	/* ATAPI data dir:
Index: work/drivers/ata/libata-acpi.c
===
--- work.orig/drivers/ata/libata-acpi.c
+++ work/drivers/ata/libata-acpi.c
@@ -311,8 +311,8 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm);
  * EH context.
  *
  * RETURNS:
- * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't
- * contain valid data.
+ * Number of taskfiles on success, 0 if _GTF doesn't exist.  -EINVAL
+ * if _GTF is invalid.
  */
 static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 			   void **ptr_to_free)
@@ -339,6 +339,7 @@ static int ata_dev_get_GTF(struct ata_de
 			ata_dev_printk(dev, KERN_WARNING,
    "_GTF evaluation failed (AE 0x%x)\n",
    status);
+			rc = -EINVAL;
 		}
 		goto out_free;
 	}
@@ -350,6 +351,7 @@ static int ata_dev_get_GTF(struct ata_de
 __FUNCTION__,
 (unsigned long long)output.length,
 output.pointer);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -358,6 +360,7 @@ static int ata_dev_get_GTF(struct ata_de
 		ata_dev_printk(dev, KERN_WARNING,
 			   "_GTF unexpected object type 0x%x\n",
 			   out_obj->type);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -365,6 +368,7 @@ static int ata_dev_get_GTF(struct ata_de
 		ata_dev_printk(dev, KERN_WARNING,
 			   "unexpected _GTF length (%d)\n",
 			   out_obj->buffer.length);
+		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -422,7 +426,7 @@ int ata_acpi_cbl_80wire(struct ata_port 
 EXPORT_SYMBOL_GPL(ata_acpi_cbl_80wire);
 
 /**
- * taskfile_load_raw - send taskfile registers to host controller
+ * ata_acpi_run_tf - send taskfile registers to host controller
  * @dev: target ATA device
  * @gtf: raw ATA taskfile register set (0x1f1 - 0x1f7)
  *
@@ -441,14 +445,17 @@ EXPORT_SYMBOL_GPL(ata_acpi_cbl_80wire);
  * EH context.
  *
  * RETURNS:
- * 0 on success, -errno on failure.
+ * 1 if command is executed successfully.  0 if ignored or rejected,
+ * -errno on other errors.
  */
-static int taskfile_load_raw(struct ata_device *dev,
-			  const struct ata_acpi_gtf *gtf)
+static int ata_acpi_run_tf(struct ata_device *dev,
+			   const struct ata_acpi_gtf *gtf)
 {
-	struct ata_port *ap = dev->link->ap;
 	struct ata_taskfile tf, rtf;
 	unsigned int err_mask;
+	const char *level;
+	char msg

Re: laptop reboots right after hibernation

2007-11-28 Thread Mark Lord

Tejun Heo wrote:


Your BIOS is probably trying to issue DCO freeze lock to all drives.  I
don't have the faintest idea why it does but it does.  I think there are
several choices here.

1. Ignore device errors for _GTF commands.  Report the failure with
KERN_DEBUG priority and just keep processing.  ISTR there was a patch to
do this.  Anyone knows what happened to it.

..

Since we now *know* that this is how it has to be done
(as otherwise the BIOS would never even attempt DCO here
because most drives don't support it yet),
then ignoring the return value seems to be a useful strategy.


2. Filter out certain commands from ACPI.  I definitely don't like BIOS
locking up random features via _GTF commands.  It makes debugging difficult.

..

Mmmm.. I agree there, too!  I'm not big on filtering out commands
that *we* don't happen to like, but for this specific opcode, yes.


3. Look at opcode on failure and ignore error for certain operations.

..

Number 1. would take care of this.

Cheers
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-28 Thread Jeff Garzik

Tejun Heo wrote:

2. Filter out certain commands from ACPI.  I definitely don't like BIOS
locking up random features via _GTF commands.  It makes debugging difficult.


I agree.

Take a look at what Alan has been doing for the "trusted" command stuff.

At the very least we should definitely blare a warning into the log if 
the BIOS is taking away key features from the user.


Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-28 Thread Tejun Heo
[cc'ing libata people]

Hello,

Kjartan Maraas wrote:
> Here you go. It shows the error two times and then it gets it right and
> continues to boot. No other problems arise from this that I can see.

Cool, it proves even my code works from time to time if the moon and
stars are perfectly aligned.

> ata1.00: ACPI cmd b1/c1:00:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)

Your BIOS wants to issue DEVICE CONFIGURATION FREEZE LOCK but the device
NACKs it probably because the drive doesn't support DCO feature set.

> ata1: failed to recover some devices, retrying in 5 secs
> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
> ata1.00: ACPI cmd b1/c1:00:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
> ata1.00: ACPI on devcfg failed the second time, disabling (errno=-5)

libata EH gives ACPI one more chance but it fails again, so ACPI is
turned off.

> ata1.00: revalidation failed (errno=1)
> ata1: failed to recover some devices, retrying in 5 secs
> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
> ata1.00: configured for UDMA/100

Device is now configured properly.

Your BIOS is probably trying to issue DCO freeze lock to all drives.  I
don't have the faintest idea why it does but it does.  I think there are
several choices here.

1. Ignore device errors for _GTF commands.  Report the failure with
KERN_DEBUG priority and just keep processing.  ISTR there was a patch to
do this.  Anyone knows what happened to it.

2. Filter out certain commands from ACPI.  I definitely don't like BIOS
locking up random features via _GTF commands.  It makes debugging difficult.

3. Look at opcode on failure and ignore error for certain operations.

My favorite is #2 but #1 should be fine too.  Any thoughts?

Thanks.

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-28 Thread Kjartan Maraas

on., 28.11.2007 kl. 10.09 +0900, skrev Tejun Heo:
> Kjartan Maraas wrote:
> > I get this exact error message on a normal first time boot here. I'm
> > using the latest fedora development kernel which is 2.6.24-rc2-git6
> > based. And I have the latest BIOS from HP IIRC.
> > 
> > This is an HP nc6400 intel based laptop:
> 
> Care to post boot dmesg?  Or does harddisk detection fail because of this?
> 
Here you go. It shows the error two times and then it gets it right and
continues to boot. No other problems arise from this that I can see.

libata version 3.00 loaded.
ahci :00:1f.2: version 3.0
ACPI: PCI Interrupt :00:1f.2[B] -> GSI 21 (level, low) -> IRQ 22
ahci :00:1f.2: nr_ports (4) and implemented port map (0x1) don't match, 
using nr_ports
ahci :00:1f.2: forcing PORTS_IMPL to 0xf
usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
usb 3-1: new full speed USB device using uhci_hcd and address 2
usb 3-1: configuration #1 chosen from 1 choice
ahci :00:1f.2: AHCI 0001.0100 32 slots 4 ports 1.5 Gbps 0xf impl SATA mode
ahci :00:1f.2: flags: 64bit ncq ilck stag pm led clo pmp pio slum part 
PCI: Setting latency timer of device :00:1f.2 to 64
scsi0 : ahci
scsi1 : ahci
scsi2 : ahci
scsi3 : ahci
ata1: SATA max UDMA/133 abar [EMAIL PROTECTED] port 0xf4785100 irq 220
ata2: SATA max UDMA/133 abar [EMAIL PROTECTED] port 0xf4785180 irq 220
ata3: SATA max UDMA/133 abar [EMAIL PROTECTED] port 0xf4785200 irq 220
ata4: SATA max UDMA/133 abar [EMAIL PROTECTED] port 0xf4785280 irq 220
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ACPI cmd b1/c1:00:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
ata1: failed to recover some devices, retrying in 5 secs
input: PS/2 Generic Mouse as /class/input/input3
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ACPI cmd b1/c1:00:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
ata1.00: ACPI on devcfg failed the second time, disabling (errno=-5)
ata1.00: revalidation failed (errno=1)
ata1: failed to recover some devices, retrying in 5 secs
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: configured for UDMA/100
ata2: SATA link down (SStatus 0 SControl 0)
ata3: SATA link down (SStatus 0 SControl 0)
ata4: SATA link down (SStatus 0 SControl 0)
scsi 0:0:0:0: Direct-Access ATA  FUJITSU MHV2080B 892C PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support 
DPO or FUA
sd 0:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support 
DPO or FUA
 sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
insmod used greatest stack depth: 596 bytes left
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting.  Commit interval 5 seconds

Cheers
Kjartan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-28 Thread Tejun Heo
Tomas Carnecky wrote:
> I kindof had suspected that. The docking station has an ultrabay slot
> where I currently have a cdrom drive (since the notebook itself doesn't
> have any cdrom drive. Once I took the cdrom drive out, I was able to
> successfully perform what I wanted to do in points 3a and 5!
> 
> The 'undock' button probably doesn't tell the kernel that it should
> unload the cdrom driver. Even though after pressing the undock button
> the drive becomes unusable (the green led that is on the side of the
> ultrabay disables and it's impossible to open the tray). Though pressing
> the undock button causes the usb ports to be removed from the kernel, at
> least that's what dmesg suggests (I put the notebook into the dock,
> waited a bit and then pressed the undock button):

That undock button generate an ACPI event, right?  You probably need
to hook that ACPI event such that something like the following gets
executed.

echo 1 > /sys/device/pci:00/:00:1f.1/host?/target?:?:?:?/?:?:?:?/delete"

> usb 1-4: new high speed USB device using ehci_hcd and address 11
> usb 1-4: configuration #1 chosen from 1 choice
> hub 1-4:1.0: USB hub found
> hub 1-4:1.0: 4 ports detected
> ACPI: \_SB_.GDCK - docking
> ACPI: \_SB_.GDCK - undocking
> usb 1-4: USB disconnect, address 11

USB is capable of detecting hotplug event by itself.  Unfortunately,
ata_piix can't and in your case accessing non existent device is
resulting machine reset.  I don't know why tho.  It usually just
causes a bunch of timeouts before libata EH gives up on the device.

> The notebook+dock+STR works as long as the notebook doesn't know about
> the ultrabay device. That can be because the notebook was started
> outside of the docking station, or inside the docking station but with
> the ultrabay removed. But once the notebook sees the ultrabay device
> it's over. As little as one suspend/resume cycle inside the docking
> station and with a ultrabay device plugged in is enough to make the
> kernel (partially) recognize the device - the kernel doesn't recognize
> the device as a cdrom drive, but only as an UDMA/33 device. After one
> suspend/resume cycle I see this in dmesg:

Do you have sr_mod loaded?

> ata4.00: ACPI cmd ef/03:45:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
> ata4: failed to recover some devices, retrying in 5 secs
> Coming out of suspend...
> [... snip ...]
> ata4.00: ACPI cmd ef/03:45:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)

That's your BIOS trying to set UDMA UDMA5 on the drive and the drive
not liking it for some reason.

> ata4.00: ACPI on devcfg failed the second time, disabling (errno=-5)
> ata4.00: revalidation failed (errno=1)

After two tries, libata thinks BIOS is no good and decides to turn off
ACPI.

> ata4: failed to recover some devices, retrying in 5 secs
> ata4.00: configured for UDMA/33

Which results in successful configuration, yay.

> And after that I can't resume outside of the docking station. So the
> description of point 3 was incomplete, sorry about that.

Can you please post...

* full boot log with the ultra bay occupied.

* the result of "hdparm -I /dev/sr0" with the ultra bay occupied.

* the result of "lspci -nnvvv" with the ultra bay occupied.

* full boot log without docking station.

* the result of "lspci -nnvvv" without docking station.

Thanks.

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-27 Thread Tejun Heo
Kjartan Maraas wrote:
> I get this exact error message on a normal first time boot here. I'm
> using the latest fedora development kernel which is 2.6.24-rc2-git6
> based. And I have the latest BIOS from HP IIRC.
> 
> This is an HP nc6400 intel based laptop:

Care to post boot dmesg?  Or does harddisk detection fail because of this?

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-22 Thread Rafael J. Wysocki
On Thursday, 22 of November 2007, Tomas Carnecky wrote:
> Rafael J. Wysocki wrote:
> > On Sunday, 18 of November 2007, Tomas Carnecky wrote:
> >> Pavel Machek wrote:
> >>> Hi!
> >>>
>  echo disk > /sys/power/state
> 
>  successfully saves that state to the disk, but just as the laptop is
>  about to turn itself off, it reboots (successfully, so the
>  hibernation/resume process works well, even with X running! which is
>  awesome :) ). But I'd rather like the computer turned off after I
>  hibernate it. Where could the problem be?
> 
>  It's a new laptop, TP X61 tablet, I tried ubuntu (7.10, gutsy) for a few
>  days, both suspend and hibernate worked there (with one or two crashes,
>  probably due to X, I've read that the intel driver got some
>  suspend/resume improvements recently). Now I'm running gentoo, kernel
>  2.6.24-rc2. I'm using newer versions of almost all software now compared
>  to the ubuntu system.
> >>> If it works in older ubuntu, you can probably do bisect. Does normal
> >>> shutdown work? You can try platform vs. shutdown mode...
> >> I forgot, normal shutdown (init 0) works, the 'shutdown' command fails
> >> somewhere in the gentoo init scripts, but that has nothing to do with
> >> the kernel. 'init 6' also works. Both regardless of where the notebook
> >> is (dock or outside).
> > 
> > Please verify if you have the ehci_hcd driver loaded when the box is in the
> > dock.  If so, please try to unload it before hibernation and see if the box
> > will reboot.
> 
> I had to recompile the kernel because I have a monolithic kernel with as
> many components as possible compiled in. But after I disabled the whole
> USB subsystem, the laptop doesn't reboot anymore after hibernation. Is
> that a bug in the usb driver

Well, I suspect so.  We've already had a similar report and there are some
problems that seem to be related to it with some boxes.  Still, nobody knows
what the problem really is so far.

> or are users supposed to unload ehci_hcd each time before hibernation?

As a (hopefully temporary) workaround.

> In the former case, I'd be willing to help debug.

We have yet to figure out how to do that. :-)

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-22 Thread Tomas Carnecky
Rafael J. Wysocki wrote:
> On Sunday, 18 of November 2007, Tomas Carnecky wrote:
>> Pavel Machek wrote:
>>> Hi!
>>>
 echo disk > /sys/power/state

 successfully saves that state to the disk, but just as the laptop is
 about to turn itself off, it reboots (successfully, so the
 hibernation/resume process works well, even with X running! which is
 awesome :) ). But I'd rather like the computer turned off after I
 hibernate it. Where could the problem be?

 It's a new laptop, TP X61 tablet, I tried ubuntu (7.10, gutsy) for a few
 days, both suspend and hibernate worked there (with one or two crashes,
 probably due to X, I've read that the intel driver got some
 suspend/resume improvements recently). Now I'm running gentoo, kernel
 2.6.24-rc2. I'm using newer versions of almost all software now compared
 to the ubuntu system.
>>> If it works in older ubuntu, you can probably do bisect. Does normal
>>> shutdown work? You can try platform vs. shutdown mode...
>> I forgot, normal shutdown (init 0) works, the 'shutdown' command fails
>> somewhere in the gentoo init scripts, but that has nothing to do with
>> the kernel. 'init 6' also works. Both regardless of where the notebook
>> is (dock or outside).
> 
> Please verify if you have the ehci_hcd driver loaded when the box is in the
> dock.  If so, please try to unload it before hibernation and see if the box
> will reboot.

I had to recompile the kernel because I have a monolithic kernel with as
many components as possible compiled in. But after I disabled the whole
USB subsystem, the laptop doesn't reboot anymore after hibernation. Is
that a bug in the usb driver or are users supposed to unload ehci_hcd
each time before hibernation? In the former case, I'd be willing to help
debug.

tom
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-20 Thread Kjartan Maraas

sø., 18.11.2007 kl. 21.16 +0100, skrev Tomas Carnecky:
> Since this is becoming more an IDE/ATA issue, I added
> [EMAIL PROTECTED] to CC. I hope that's the right mailinglist.
> 
> Tomas Carnecky wrote:
> > (3) Once the notebook was in the docking station (whether I boot it
> > while in the dock or boot it outside and then put it into the dock) and
> > I take it out (press the 'undock' button on the dock, wait for the green
> > led, then take out the notebook) things get interesting:
> > 
> > (a) I initiate STR, notebook correctly goes to sleep, but it only wakes
> > up if I have it in the docking station. If I try to wake it up outside
> > of the docking station it will fail.
> 
[snip str problem description]

> ata4.00: ACPI cmd ef/03:45:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
> ata4: failed to recover some devices, retrying in 5 secs
> Coming out of suspend...
> [... snip ...]
> ata4.00: ACPI cmd ef/03:45:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
> ata4.00: ACPI on devcfg failed the second time, disabling (errno=-5)
> ata4.00: revalidation failed (errno=1)
> ata4: failed to recover some devices, retrying in 5 secs
> ata4.00: configured for UDMA/33
> 
I get this exact error message on a normal first time boot here. I'm
using the latest fedora development kernel which is 2.6.24-rc2-git6
based. And I have the latest BIOS from HP IIRC.

This is an HP nc6400 intel based laptop:

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ACPI cmd b1/c1:00:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
ata1.00: ACPI on devcfg failed the second time, disabling (errno=-5)
ata1.00: revalidation failed (errno=1)
ata1: failed to recover some devices, retrying in 5 secs
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: configured for UDMA/100
ata2: SATA link down (SStatus 0 SControl 0)
ata3: SATA link down (SStatus 0 SControl 0)
ata4: SATA link down (SStatus 0 SControl 0)
scsi 0:0:0:0: Direct-Access ATA  FUJITSU MHV2080B 892C PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support 
DPO or FUA
sd 0:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support 
DPO or FUA
 sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
insmod used greatest stack depth: 596 bytes left

lspci:

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 
945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 
943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS, 943/940GML 
Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition 
Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 
(rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 
(rev 01)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 
(rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI 
Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI 
Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI 
Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI 
Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI 
Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge 
(rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller 
(rev 01)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI 
Controller (rev 01)
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M Gigabit 
Ethernet PCI Express (rev 21)
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network 
Connection (rev 02)
04:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
04:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card 
Reader (SD/MMC/MS/MS PRO/xD)
04:06.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA 
Standard Compliant SD Host Controller
04:06.4 Communication controller: Texas Instruments PCIxx12 GemCore based 
SmartCard controller

Cheers
Kjartan


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.

Re: laptop reboots right after hibernation

2007-11-18 Thread Rafael J. Wysocki
On Sunday, 18 of November 2007, Tomas Carnecky wrote:
> Pavel Machek wrote:
> > Hi!
> > 
> >> echo disk > /sys/power/state
> >>
> >> successfully saves that state to the disk, but just as the laptop is
> >> about to turn itself off, it reboots (successfully, so the
> >> hibernation/resume process works well, even with X running! which is
> >> awesome :) ). But I'd rather like the computer turned off after I
> >> hibernate it. Where could the problem be?
> >>
> >> It's a new laptop, TP X61 tablet, I tried ubuntu (7.10, gutsy) for a few
> >> days, both suspend and hibernate worked there (with one or two crashes,
> >> probably due to X, I've read that the intel driver got some
> >> suspend/resume improvements recently). Now I'm running gentoo, kernel
> >> 2.6.24-rc2. I'm using newer versions of almost all software now compared
> >> to the ubuntu system.
> > 
> > If it works in older ubuntu, you can probably do bisect. Does normal
> > shutdown work? You can try platform vs. shutdown mode...
> 
> I forgot, normal shutdown (init 0) works, the 'shutdown' command fails
> somewhere in the gentoo init scripts, but that has nothing to do with
> the kernel. 'init 6' also works. Both regardless of where the notebook
> is (dock or outside).

Please verify if you have the ehci_hcd driver loaded when the box is in the
dock.  If so, please try to unload it before hibernation and see if the box
will reboot.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-18 Thread Tomas Carnecky
Since this is becoming more an IDE/ATA issue, I added
[EMAIL PROTECTED] to CC. I hope that's the right mailinglist.

Tomas Carnecky wrote:
> (3) Once the notebook was in the docking station (whether I boot it
> while in the dock or boot it outside and then put it into the dock) and
> I take it out (press the 'undock' button on the dock, wait for the green
> led, then take out the notebook) things get interesting:
> 
> (a) I initiate STR, notebook correctly goes to sleep, but it only wakes
> up if I have it in the docking station. If I try to wake it up outside
> of the docking station it will fail.

  Magic number: 0:971:888
  hash matches drivers/base/power/main.c:82
  hash matches device ptyuf
  hash matches device :00:1f.1

00:1f.1 IDE interface: Intel Corporation Mobile IDE Controller (rev 03)

> (5) If the notebook is in the dock, I press the undock button and wait
> for the green led then initiate STR, I can take the notebook out but
> resuming doesn't work - unless I resume it while the notebook is back in
> the docking station (see point 3a)

  Magic number: 0:648:888
  hash matches drivers/base/power/main.c:103
  hash matches device ptyuf
  hash matches device :00:1f.1

00:1f.1 IDE interface: Intel Corporation Mobile IDE Controller (rev 03)


I kindof had suspected that. The docking station has an ultrabay slot
where I currently have a cdrom drive (since the notebook itself doesn't
have any cdrom drive. Once I took the cdrom drive out, I was able to
successfully perform what I wanted to do in points 3a and 5!

The 'undock' button probably doesn't tell the kernel that it should
unload the cdrom driver. Even though after pressing the undock button
the drive becomes unusable (the green led that is on the side of the
ultrabay disables and it's impossible to open the tray). Though pressing
the undock button causes the usb ports to be removed from the kernel, at
least that's what dmesg suggests (I put the notebook into the dock,
waited a bit and then pressed the undock button):

usb 1-4: new high speed USB device using ehci_hcd and address 11
usb 1-4: configuration #1 chosen from 1 choice
hub 1-4:1.0: USB hub found
hub 1-4:1.0: 4 ports detected
ACPI: \_SB_.GDCK - docking
ACPI: \_SB_.GDCK - undocking
usb 1-4: USB disconnect, address 11

The notebook+dock+STR works as long as the notebook doesn't know about
the ultrabay device. That can be because the notebook was started
outside of the docking station, or inside the docking station but with
the ultrabay removed. But once the notebook sees the ultrabay device
it's over. As little as one suspend/resume cycle inside the docking
station and with a ultrabay device plugged in is enough to make the
kernel (partially) recognize the device - the kernel doesn't recognize
the device as a cdrom drive, but only as an UDMA/33 device. After one
suspend/resume cycle I see this in dmesg:

ata4.00: ACPI cmd ef/03:45:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
ata4: failed to recover some devices, retrying in 5 secs
Coming out of suspend...
[... snip ...]
ata4.00: ACPI cmd ef/03:45:00:00:00:a0 failed (Emask=0x1 Stat=0x51 Err=0x04)
ata4.00: ACPI on devcfg failed the second time, disabling (errno=-5)
ata4.00: revalidation failed (errno=1)
ata4: failed to recover some devices, retrying in 5 secs
ata4.00: configured for UDMA/33

And after that I can't resume outside of the docking station. So the
description of point 3 was incomplete, sorry about that.

At least the two failures 3a and 5 can be explained...

tom
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-18 Thread Tomas Carnecky
Pavel Machek wrote:
> Hi!
> 
>> echo disk > /sys/power/state
>>
>> successfully saves that state to the disk, but just as the laptop is
>> about to turn itself off, it reboots (successfully, so the
>> hibernation/resume process works well, even with X running! which is
>> awesome :) ). But I'd rather like the computer turned off after I
>> hibernate it. Where could the problem be?
>>
>> It's a new laptop, TP X61 tablet, I tried ubuntu (7.10, gutsy) for a few
>> days, both suspend and hibernate worked there (with one or two crashes,
>> probably due to X, I've read that the intel driver got some
>> suspend/resume improvements recently). Now I'm running gentoo, kernel
>> 2.6.24-rc2. I'm using newer versions of almost all software now compared
>> to the ubuntu system.
> 
> If it works in older ubuntu, you can probably do bisect. Does normal
> shutdown work? You can try platform vs. shutdown mode...

I forgot, normal shutdown (init 0) works, the 'shutdown' command fails
somewhere in the gentoo init scripts, but that has nothing to do with
the kernel. 'init 6' also works. Both regardless of where the notebook
is (dock or outside).

tom
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-18 Thread Tomas Carnecky
Tomas Carnecky wrote:
> Pavel Machek wrote:
>> Hi!
>>
>>> echo disk > /sys/power/state
>>>
>>> successfully saves that state to the disk, but just as the laptop is
>>> about to turn itself off, it reboots (successfully, so the
>>> hibernation/resume process works well, even with X running! which is
>>> awesome :) ). But I'd rather like the computer turned off after I
>>> hibernate it. Where could the problem be?
>>>
>>> It's a new laptop, TP X61 tablet, I tried ubuntu (7.10, gutsy) for a few
>>> days, both suspend and hibernate worked there (with one or two crashes,
>>> probably due to X, I've read that the intel driver got some
>>> suspend/resume improvements recently). Now I'm running gentoo, kernel
>>> 2.6.24-rc2. I'm using newer versions of almost all software now compared
>>> to the ubuntu system.
>> If it works in older ubuntu, you can probably do bisect. Does normal
>> shutdown work? You can try platform vs. shutdown mode...
>>
> 
> I don't have ubuntu anymore, though I'll try if hibernate works with the
> livecd. One interesting thing I've found out: hibernate reboots the
> laptop _only_ if it is in the docking station. If I hibernate while
> outside of the docking station, it properly shuts down the laptop.
> 
> The default mode seems to be 'platform', after I echoed 'shutdown' to
> /sys/power/disk the notebook correctly shuts down after hibernation!
> 
> Some interesting facts. All tests were done with 2.6.24-rc2, custom
> tailored kernel with just the options needed for my notebook (ThinkPad
> X61 Tablet) - without drm modules and bluetooth but with iwl4965 loaded.
> All tests were done without X running, from the console. If I say
> something 'works' it means I tested it at least three/four times in a
> row (if not even more).
> 
> (1) Both STR and STD work correctly if I keep the notebook outside of
> the docking station (both in platform and shutdown mode).
> 
> (2) Both STR and STD work correctly if I keep the notebook in the
> docking station (both in platform and shutdown mode - with the small
> glitch in platform mode that the notebook won't power off after
> hibernation).
> 
> (3) Once the notebook was in the docking station (whether I boot it
> while in the dock or boot it outside and then put it into the dock) and
> I take it out (press the 'undock' button on the dock, wait for the green
> led, then take out the notebook) things get interesting:
> 
> (a) I initiate STR, notebook correctly goes to sleep, but it only wakes
> up if I have it in the docking station. If I try to wake it up outside
> of the docking station it will fail.

That fails with a non-blinking cursor in the top left screen, just like
in point 3b.

> 
> (b) I initiate STD, and it locks up after a few seconds, at that time
> only the cursor in the top left screen is visible (not blinking). If I
> put the notebook in its locked up state into the dock, it will reboot
> after a few seconds.
> 
> (4) If the notebook is in the dock and I initiate STR and then press the
> undock button, it resumes (I assume that is 'working as intended').
> 
> (5) If the notebook is in the dock, I press the undock button and wait
> for the green led then initiate STR, I can take the notebook out but
> resuming doesn't work - unless I resume it while the notebook is back in
> the docking station (see point 3a)
> 
> (6) If the notebook is in the dock, I press the undock button and wait
> for the green led, then initiate STD:
> 
> (a) in platform mode: I can take the notebook out but resuming doesn't
> work - unless I resume it while the notebook is back in the docking
> station (contrary to point 3b). It seems as the notebook 'locks' itself
> into the docking station during STD, I see the green led change into red
> during the hibernation process (just before heavy HD activity starts).
> 
> (b) in shutdown mode: STD fails with a completely black screen, not even
> the cursor is visible.
> 
> There doesn't seem to be a difference between platform and shutdown mode
> other than the reboot glitch when the laptop is in the docking station
> or as described in point 6.
> 
> tom

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-18 Thread Tomas Carnecky
Pavel Machek wrote:
> Hi!
> 
>> echo disk > /sys/power/state
>>
>> successfully saves that state to the disk, but just as the laptop is
>> about to turn itself off, it reboots (successfully, so the
>> hibernation/resume process works well, even with X running! which is
>> awesome :) ). But I'd rather like the computer turned off after I
>> hibernate it. Where could the problem be?
>>
>> It's a new laptop, TP X61 tablet, I tried ubuntu (7.10, gutsy) for a few
>> days, both suspend and hibernate worked there (with one or two crashes,
>> probably due to X, I've read that the intel driver got some
>> suspend/resume improvements recently). Now I'm running gentoo, kernel
>> 2.6.24-rc2. I'm using newer versions of almost all software now compared
>> to the ubuntu system.
> 
> If it works in older ubuntu, you can probably do bisect. Does normal
> shutdown work? You can try platform vs. shutdown mode...
> 

I don't have ubuntu anymore, though I'll try if hibernate works with the
livecd. One interesting thing I've found out: hibernate reboots the
laptop _only_ if it is in the docking station. If I hibernate while
outside of the docking station, it properly shuts down the laptop.

The default mode seems to be 'platform', after I echoed 'shutdown' to
/sys/power/disk the notebook correctly shuts down after hibernation!

Some interesting facts. All tests were done with 2.6.24-rc2, custom
tailored kernel with just the options needed for my notebook (ThinkPad
X61 Tablet) - without drm modules and bluetooth but with iwl4965 loaded.
All tests were done without X running, from the console. If I say
something 'works' it means I tested it at least three/four times in a
row (if not even more).

(1) Both STR and STD work correctly if I keep the notebook outside of
the docking station (both in platform and shutdown mode).

(2) Both STR and STD work correctly if I keep the notebook in the
docking station (both in platform and shutdown mode - with the small
glitch in platform mode that the notebook won't power off after
hibernation).

(3) Once the notebook was in the docking station (whether I boot it
while in the dock or boot it outside and then put it into the dock) and
I take it out (press the 'undock' button on the dock, wait for the green
led, then take out the notebook) things get interesting:

(a) I initiate STR, notebook correctly goes to sleep, but it only wakes
up if I have it in the docking station. If I try to wake it up outside
of the docking station it will fail.

(b) I initiate STD, and it locks up after a few seconds, at that time
only the cursor in the top left screen is visible (not blinking). If I
put the notebook in its locked up state into the dock, it will reboot
after a few seconds.

(4) If the notebook is in the dock and I initiate STR and then press the
undock button, it resumes (I assume that is 'working as intended').

(5) If the notebook is in the dock, I press the undock button and wait
for the green led then initiate STR, I can take the notebook out but
resuming doesn't work - unless I resume it while the notebook is back in
the docking station (see point 3a)

(6) If the notebook is in the dock, I press the undock button and wait
for the green led, then initiate STD:

(a) in platform mode: I can take the notebook out but resuming doesn't
work - unless I resume it while the notebook is back in the docking
station (contrary to point 3b). It seems as the notebook 'locks' itself
into the docking station during STD, I see the green led change into red
during the hibernation process (just before heavy HD activity starts).

(b) in shutdown mode: STD fails with a completely black screen, not even
the cursor is visible.

There doesn't seem to be a difference between platform and shutdown mode
other than the reboot glitch when the laptop is in the docking station
or as described in point 6.

tom
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: laptop reboots right after hibernation

2007-11-18 Thread Pavel Machek
Hi!

> echo disk > /sys/power/state
> 
> successfully saves that state to the disk, but just as the laptop is
> about to turn itself off, it reboots (successfully, so the
> hibernation/resume process works well, even with X running! which is
> awesome :) ). But I'd rather like the computer turned off after I
> hibernate it. Where could the problem be?
> 
> It's a new laptop, TP X61 tablet, I tried ubuntu (7.10, gutsy) for a few
> days, both suspend and hibernate worked there (with one or two crashes,
> probably due to X, I've read that the intel driver got some
> suspend/resume improvements recently). Now I'm running gentoo, kernel
> 2.6.24-rc2. I'm using newer versions of almost all software now compared
> to the ubuntu system.

If it works in older ubuntu, you can probably do bisect. Does normal
shutdown work? You can try platform vs. shutdown mode...

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/