Re: [PATCH] Add bluetooth enabling support for toshiba_acpi
In my last patch was a bug in checking parametrs in write_bt().. This patch doesn't have this bug. Add interface to enable usb-bluetooth device in Toshiba notebook. Index: linux-2.6.23-rc6/drivers/acpi/toshiba_acpi.c === --- /usr/src/linux-2.6.23-rc6.orig/drivers/acpi/toshiba_acpi.c 2007-07-09 01:32:17.0 +0200 +++ /usr/src/linux-2.6.23-rc6/drivers/acpi/toshiba_acpi.c 2007-09-14 11:44:22.0 +0200 @@ -90,6 +90,10 @@ #define HCI_VIDEO_OUT 0x001c #define HCI_HOTKEY_EVENT 0x001e #define HCI_LCD_BRIGHTNESS 0x002a +#define HCI_BT 0x0056 +#define HCI_BT_POWER 0x0080 +#define HCI_BT_ATTACH 0x0040 + /* field definitions */ #define HCI_LCD_BRIGHTNESS_BITS3 @@ -201,6 +205,17 @@ return status; } + +static acpi_status hci_write2(u32 reg, u32 in1, u32 in2, u32* result) +{ + u32 in[HCI_WORDS] = { HCI_SET, reg, in1, in2, 0, 0 }; + u32 out[HCI_WORDS]; + acpi_status status = hci_raw(in, out); + *result = (status == AE_OK) ? out[0] : HCI_FAILURE; + return status; +} + + static acpi_status hci_read1(u32 reg, u32 * out1, u32 * result) { u32 in[HCI_WORDS] = { HCI_GET, reg, 0, 0, 0, 0 }; @@ -211,6 +226,19 @@ return status; } + static acpi_status hci_read2(u32 reg, u32* out1, u32* out2, u32* result) + { + u32 in[HCI_WORDS] = { HCI_GET, reg, *out1, *out2, 0, 0 }; + u32 out[HCI_WORDS]; + acpi_status status = hci_raw(in, out); + *out1 = out[2]; + *out2 = out[3]; + *result = (status == AE_OK) ? out[0] : HCI_FAILURE; + return status; + } + + + static struct proc_dir_entry *toshiba_proc_dir /*= 0*/ ; static struct backlight_device *toshiba_backlight_device; static int force_fan; @@ -482,6 +510,54 @@ return count; } + +static char* read_bt(char* p) +{ +u32 hci_result; + u32 value = 0; +u32 value2 = 0x000; + hci_read2(HCI_BT, value, value2, hci_result); +if (hci_result == HCI_SUCCESS) { +p += sprintf(p,present: %d\n, (value 0x0f)?1:0); +} else { +p += sprintf(p, ERROR\n); +} + +value = 0; +value2 = 0x0001; + hci_read2(HCI_BT, value, value2, hci_result); +if (hci_result == HCI_SUCCESS) { +p += sprintf(p,power:%d\n, (value 128) 7); +p += sprintf(p,attach: %d\n, (value 64) 6); +p += sprintf(p,wireless: %d\n, (value 512) 9); +} else { +p += sprintf(p, ERROR\n); +} + +return p; +} + +static unsigned long write_bt(const char* buffer, unsigned long count) +{ +int value; +u32 hci_result; + +if (sscanf(buffer, power : %i, value) == 1 (value = 0 value = 1) ) { + hci_write2(HCI_BT, value, HCI_BT_POWER, hci_result); +if (hci_result != HCI_SUCCESS) +return -EFAULT; +} else if (sscanf(buffer, attach : %i, value) == 1 ( value = 0 value = 1 )) { + hci_write2(HCI_BT, value, HCI_BT_ATTACH, hci_result); +if (hci_result != HCI_SUCCESS) +return -EFAULT; +} else { +return -EINVAL; +} + +return count; +} + + static char *read_version(char *p) { p += sprintf(p, driver: %s\n, TOSHIBA_ACPI_VERSION); @@ -501,6 +577,7 @@ {fan, read_fan, write_fan}, {keys, read_keys, write_keys}, {version, read_version, NULL}, + {bluetooth, read_bt, write_bt }, {NULL} }; regards, Marek Hobler, 'neutrinus' -- GNU/Human - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Clean-up GPE handling for wake-up devices.
Hi, It is already sent to Len, linux-acpi list and Rafael already added it to his list of patches. Regards, Alex. Pavel Machek wrote: Hi! Please take a look if it is better approach :) Yep, that seems to work. will you send it upstream? (Feel free to add my Acked-by:) Pavel - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: wmi.c - Any news?
Len, On Friday 31 August 2007 19:23:50 Len Brown wrote: I plan to get back to [wmi.c] when i return from the kernel summit. Are you planning to get back to this still in the next few weeks? -Carlos -- E-Mail: [EMAIL PROTECTED] Web: strangeworlds.co.uk GPG Key ID: 0x23EE722D - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] [PATCH] ACPI: video: Don't call absent methods
What's the status of this particular patch? Ryan Alexey Starikovskiy wrote: Signed-off-by: Ryan May [EMAIL PROTECTED] Signed-off-by: Alexey Starikovskiy [EMAIL PROTECTED] --- drivers/acpi/video.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 3c9bb85..83aa41c 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -409,14 +409,16 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device, static int acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) { - int status; + int status = AE_OK; union acpi_object arg0 = { ACPI_TYPE_INTEGER }; struct acpi_object_list args = { 1, arg0 }; arg0.integer.value = level; - status = acpi_evaluate_object(device-dev-handle, _BCM, args, NULL); - + if (device-cap._BCM) + status = acpi_evaluate_object(device-dev-handle, _BCM, + args, NULL); + device-brightness-curr = level; printk(KERN_DEBUG set_level status: %x\n, status); return status; } @@ -425,11 +427,11 @@ static int acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, unsigned long *level) { - int status; - - status = acpi_evaluate_integer(device-dev-handle, _BQC, NULL, level); - - return status; + if (device-cap._BQC) + return acpi_evaluate_integer(device-dev-handle, _BQC, NULL, + level); + *level = device-brightness-curr; + return AE_OK; } static int - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [2/4] 2.6.23-rc6: known regressions
Michal Piotrowski wrote: Hi all, Here is a list of some known regressions in 2.6.23-rc6. Feel free to add new regressions/remove fixed etc. http://kernelnewbies.org/known_regressions List of Aces NameRegressions fixed since 21-Jun-2007 Adrian Bunk10 Linus Torvalds 6 Alan Stern 5 Andi Kleen 5 Hugh Dickins 5 Trond Myklebust5 Andrew Morton 4 Al Viro3 Alexey Starikovskiy3 Cornelia Huck 3 David S. Miller3 Jens Axboe 3 Stephen Hemminger 3 Tejun Heo 3 ACPI Subject : 2.6.23-rc5 hangs on boot, apparently when initializing the EC References : http://lkml.org/lkml/2007/9/11/369 Last known good : ? Submitter : Chuck Ebbert [EMAIL PROTECTED] Caused-By : ? Handled-By : ? Status : unknown CPUFREQ Subject : ide problems: 2.6.22-git17 working, 2.6.23-rc1* is not References : http://lkml.org/lkml/2007/7/27/298 http://lkml.org/lkml/2007/7/29/371 Last known good : ? Submitter : dth [EMAIL PROTECTED] Caused-By : Len Brown [EMAIL PROTECTED] commit f79e3185dd0f8650022518d7624c876d8929061b Handled-By : Len Brown [EMAIL PROTECTED] Status : problem is being debugged FS Subject : hanging ext3 dbench tests References : http://lkml.org/lkml/2007/9/11/176 Last known good : ? Submitter : Andy Whitcroft [EMAIL PROTECTED] Caused-By : ? Handled-By : ? Status : unknown Subject : umount triggers a warning in jfs and takes almost a minute References : http://lkml.org/lkml/2007/9/4/73 Last known good : ? Submitter : Oliver Neukum [EMAIL PROTECTED] Caused-By : ? Handled-By : ? Status : unknown Subject : [NFSv4] 2.6.23-rc4 oops in nfs4_cb_recall References : http://lkml.org/lkml/2007/9/4/53 http://bugzilla.kernel.org/show_bug.cgi?id=9003 Last known good : ? Submitter : Daniel J Blueman [EMAIL PROTECTED] Caused-By : ? Handled-By : ? Workaround : http://bugzilla.kernel.org/attachment.cgi?id=12797 Status : unknown Subject : [NFSD OOPS] 2.6.23-rc1-git10 References : http://lkml.org/lkml/2007/8/2/462 Last known good : ? Submitter : Andrew Clayton [EMAIL PROTECTED] Caused-By : ? Handled-By : ? Status : unknown Regards, Michal -- LOG http://www.stardust.webpages.pl/log/ - 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/ Hi Michal, The NFSV4 [BUG] 2.6.23-rc5 kernel BUG at fs/nfs/nfs4xdr.c:945, is again seen in 2.6.23-rc6. Can this bug be added as known regression for 2.6.23-rc6. References http://lkml.org/lkml/2007/9/7/27. -- Thanks Regards, Kamalesh Babulal, Linux Technology Center, IBM, ISTL. - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [2/4] 2.6.23-rc6: known regressions
On Wed, Sep 12, 2007 at 06:58:54PM +0200, Michal Piotrowski wrote: Subject : [NFSv4] 2.6.23-rc4 oops in nfs4_cb_recall References : http://lkml.org/lkml/2007/9/4/53 http://bugzilla.kernel.org/show_bug.cgi?id=9003 Last known good : ? Submitter : Daniel J Blueman [EMAIL PROTECTED] Caused-By : ? Handled-By : ? Workaround : http://bugzilla.kernel.org/attachment.cgi?id=12797 Status : unknown I have patches which fix this, which we're testing. (See bugzilla.) It's a long-standing bug, not a regression. Subject : [NFSD OOPS] 2.6.23-rc1-git10 References : http://lkml.org/lkml/2007/8/2/462 Last known good : ? Submitter : Andrew Clayton [EMAIL PROTECTED] Caused-By : ? Handled-By : ? Status : unknown Neil's working on this. Also not a regression. --b. - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Removing of useless printk in drivers/acpi/video.c
Hi, i am actually heavily using the ACPI video extension for my Thinkpad X61 Tablet. I have bound the input events triggered by the brightness up/down keys to a simple echo value /sys/class/backlight/acpi_video1/brightness but everytime the event is triggered and acpi_video_device_lcd_set_level() is called i got a notificication in my kernel log like: set_level status: 0 set_level status: 0 set_level status: 0 set_level status: 0 ... I have attached a patch to remove this one printk() i really don't know why it is needed. :) --Maik diff -Nur linux-2.6.23-rc6-acpi-video-fix/drivers/acpi/video.c linux-2.6.23-rc6/drivers/acpi/video.c --- linux-2.6.23-rc6-acpi-video-fix/drivers/acpi/video.c2007-09-11 04:50:29.0 +0200 +++ linux-2.6.23-rc6/drivers/acpi/video.c 2007-09-14 22:06:21.0 +0200 @@ -417,7 +417,6 @@ arg0.integer.value = level; status = acpi_evaluate_object(device-dev-handle, _BCM, args, NULL); - printk(KERN_DEBUG set_level status: %x\n, status); return status; }
Re: [Resend][PATCH -mm] Hibernation: Enter platform hibernation state in a consistent way (rev. 4)
On Wed, 12 Sep 2007 13:14:08 +0200 Rafael J. Wysocki [EMAIL PROTECTED] wrote: + if (!hibernation_ops) + return -ENOSYS; + + /* + * We have cancelled the power transition by running + * hibernation_ops-finish() before saving the image, so we should let + * the firmware know that we're going to enter the sleep state after all + */ + error = hibernation_ops-start(); + if (error) + return error; + + suspend_console(); + error = device_suspend(PMSG_SUSPEND); + if (error) + return error; + + error = hibernation_ops-prepare(); + if (error) + goto Resume_devices; + + error = disable_nonboot_cpus(); + if (error) + goto Finish; + + local_irq_disable(); + error = device_power_down(PMSG_SUSPEND); + if (!error) { + hibernation_ops-enter(); + /* We should never get here */ + while (1); } + local_irq_enable(); + Confused. afacit there's no way for the caller of this function to know whether or not suspend_console() was called, so the error recovery doesn't know whether or not to run resume_console(). How does all that work? - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Resend][PATCH -mm] Hibernation: Enter platform hibernation state in a consistent way (rev. 4)
On Saturday, 15 September 2007 01:37, Andrew Morton wrote: On Wed, 12 Sep 2007 13:14:08 +0200 Rafael J. Wysocki [EMAIL PROTECTED] wrote: + if (!hibernation_ops) + return -ENOSYS; + + /* +* We have cancelled the power transition by running +* hibernation_ops-finish() before saving the image, so we should let +* the firmware know that we're going to enter the sleep state after all +*/ + error = hibernation_ops-start(); + if (error) + return error; + + suspend_console(); + error = device_suspend(PMSG_SUSPEND); + if (error) + return error; + + error = hibernation_ops-prepare(); + if (error) + goto Resume_devices; + + error = disable_nonboot_cpus(); + if (error) + goto Finish; + + local_irq_disable(); + error = device_power_down(PMSG_SUSPEND); + if (!error) { + hibernation_ops-enter(); + /* We should never get here */ + while (1); } + local_irq_enable(); + Confused. afacit there's no way for the caller of this function to know whether or not suspend_console() was called, so the error recovery doesn't know whether or not to run resume_console(). How does all that work? Well, if this fails, we try to power off and if that fails, we halt. Resuming devices in case of an error is needed so that kernel_power_off() can work, but the consoles need not be resumed for that. Still, now that I think of it, the resuming of consoles in case of an error will probably be useful in diagnostics. I'll post a fix on top of this patch. - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
2.6.23-rc6: known regressions with patches v2
Hi all, Here is a list of some known regressions in 2.6.23-rc6 with patches available. Feel free to add new regressions/remove fixed etc. http://kernelnewbies.org/known_regressions List of Aces NameRegressions fixed since 21-Jun-2007 Adrian Bunk10 Andi Kleen 7 Linus Torvalds 6 Alan Stern 5 Hugh Dickins 5 Trond Myklebust5 Andrew Morton 4 David S. Miller4 Al Viro3 Alexey Starikovskiy3 Cornelia Huck 3 Jens Axboe 3 Stephen Hemminger 3 Tejun Heo 3 Unclassified Subject : Oops while modprobing phy fixed module References : http://lkml.org/lkml/2007/7/14/63 Last known good : ? Submitter : Gabriel C [EMAIL PROTECTED] Caused-By : ? Handled-By : Satyam Sharma [EMAIL PROTECTED] Vitaly Bordug [EMAIL PROTECTED] Patch1 : http://lkml.org/lkml/2007/7/18/506 Status : patch available ACPI Subject : 2.6.23-rc5 hangs on boot, apparently when initializing the EC References : http://lkml.org/lkml/2007/9/11/369 Last known good : ? Submitter : Chuck Ebbert [EMAIL PROTECTED] Caused-By : ? Handled-By : Alexey Starikovskiy [EMAIL PROTECTED] Patch : http://bugzilla.kernel.org/attachment.cgi?id=12673 Status : patch was suggested Drivercore Subject : sysfs change of input/event devices in 2.6.23rc breaks udev References : http://lkml.org/lkml/2007/9/8/86 Last known good : ? Submitter : Anssi Hannula [EMAIL PROTECTED] Caused-By : ? Handled-By : Dmitry Torokhov [EMAIL PROTECTED] Patch : http://lkml.org/lkml/2007/9/10/3 Status : patch available Networking Subject : 2.6.23-rc5: possible irq lock inversion dependency detected References : http://lkml.org/lkml/2007/9/2/97 Last known good : ? Submitter : Christian Kujau [EMAIL PROTECTED] Caused-By : ? Handled-By : jamal [EMAIL PROTECTED] Patch : http://lkml.org/lkml/2007/9/11/159 Status : patch available Farewell! Michal -- LOGOUT http://www.stardust.webpages.pl/ - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libata: Integrate ACPI-based PATA/SATA hotplug
Modern laptops with hotswap bays still tend to utilise a PATA interface on a SATA bridge, generally with the host controller in some legacy emulation mode rather than AHCI. This means that the existing hotplug code in libata is unable to work. The ACPI specification states that these devices can send notifications when hotswapped, which avoids the need to obtain notification from the controller. This patch uses the existing libata-acpi code and simply registers a notification in order to trigger a rescan whenever the firmware signals an event. Signed-off-by: Matthew Garrett [EMAIL PROTECTED] --- I've tested this on the Dell I have here - the removal is a bit chatty (and it spends several seconds attempting to revalidate), but it destroys the device happily enough and handles reinsertion without complaining. diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index c059f78..bc6bea6 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -66,6 +66,17 @@ static void ata_acpi_associate_ide_port(struct ata_port *ap) } } +static void ata_acpi_notify(acpi_handle handle, u32 event, void *data) +{ + struct ata_port *ap = data; + struct ata_eh_info *ehi = ap-eh_info; + + ata_ehi_clear_desc(ehi); + ata_ehi_push_desc(ehi, ACPI event); + ata_ehi_hotplugged(ehi); + ata_port_freeze(ap); +} + /** * ata_acpi_associate - associate ATA host with ACPI objects * @host: target ATA host @@ -97,6 +108,12 @@ void ata_acpi_associate(struct ata_host *host) ata_acpi_associate_sata_port(ap); else ata_acpi_associate_ide_port(ap); + + if (ap-device-acpi_handle) + acpi_install_notify_handler (ap-device-acpi_handle, +ACPI_SYSTEM_NOTIFY, +ata_acpi_notify, +ap); } } -- Matthew Garrett | [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-acpi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
system bios is requesting _OSI=Linux
dmidecode # dmidecode 2.9 SMBIOS 2.4 present. 37 structures occupying 1489 bytes. Table at 0x000E2AE0. Handle 0x, DMI type 0, 24 bytes BIOS Information Vendor: Acer Version: V1.07 Release Date: 06/06/2007 ROM Size: 1024 kB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported BIOS ROM is socketed EDD is supported Japanese floppy for NEC 9800 1.2 MB is supported (int 13h) Japanese floppy for Toshiba 1.2 MB is supported (int 13h) 5.25/360 KB floppy services are supported (int 13h) 5.25/1.2 MB floppy services are supported (int 13h) 3.5/720 KB floppy services are supported (int 13h) 3.5/2.88 MB floppy services are supported (int 13h) 8042 keyboard services are supported (int 9h) CGA/mono video services are supported (int 10h) ACPI is supported USB legacy is supported Targeted content distribution is supported Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Acer Product Name: Aspire 5720 Version: V1.07 Serial Number: LXAHE0X165726084101601 UUID: 05063D27-2420-1CBA-B927-0016D4DE3BA3 Wake-up Type: Power Switch SKU Number: Not Specified Family: Not Specified Handle 0x0002, DMI type 2, 16 bytes Base Board Information Manufacturer: Acer Product Name: Nettiling Version: V1.07 Serial Number: Base Board Serial Number Asset Tag: Base Board Asset Tag Features: Board is a hosting board Board is replaceable Location In Chassis: Base Board Chassis Location Chassis Handle: 0x0003 Type: Motherboard Contained Object Handles: 0 Handle 0x0003, DMI type 3, 22 bytes Chassis Information Manufacturer: Acer Type: Other Lock: Not Present Version: V1.07 Serial Number: Chassis Serial Number Asset Tag: Boot-up State: Safe Power Supply State: Safe Thermal State: Safe Security Status: None OEM Information: 0x Height: Unspecified Number Of Power Cords: 1 Contained Elements: 0 Handle 0x0004, DMI type 9, 13 bytes System Slot Information Designation: J6C1 Type: x16 PCI Express Current Usage: Available Length: Other ID: 0 Characteristics: PME signal is supported Hot-plug devices are supported Handle 0x0005, DMI type 9, 13 bytes System Slot Information Designation: J8C1 Type: x1 PCI Express Current Usage: Available Length: Other ID: 0 Characteristics: PME signal is supported Hot-plug devices are supported Handle 0x0006, DMI type 9, 13 bytes System Slot Information Designation: J7C1 Type: x1 PCI Express Current Usage: Available Length: Other ID: 1 Characteristics: PME signal is supported Hot-plug devices are supported Handle 0x0007, DMI type 9, 13 bytes System Slot Information Designation: J8D1 Type: x1 PCI Express Current Usage: Available Length: Other ID: 2 Characteristics: PME signal is supported Hot-plug devices are supported Handle 0x0008, DMI type 9, 13 bytes System Slot Information Designation: J8B1 Type: 32-bit PCI Current Usage: Available Length: Long ID: 3 Characteristics: 5.0 V is provided 3.3 V is provided Cardbus is supported Modem ring resume is supported PME signal is supported SMBus signal is supported Handle 0x0009, DMI type 9, 13 bytes System Slot Information Designation: J9B1 Type: 32-bit PCI Current Usage: Available Length: Long ID: 4 Characteristics: 5.0 V is provided 3.3 V is provided Cardbus is supported Modem ring resume is supported PME signal is supported SMBus signal is supported Handle 0x000A, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: PS/2 Internal Connector Type: None External Reference Designator: Keyboard External Connector Type: PS/2 Port Type: Keyboard Port Handle 0x000B, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: PS/2 Internal Connector Type: None