From brandon@ifup.org Mon Nov 13 01:02:51 2006 Date: Mon, 13 Nov 2006 01:02:51 -0800 From: Brandon Philips To: Kristen Carlson Accardi Subject: [PATCH 1/2] ACPI: Move sysfs definitions from scan.c to acpi_bus.h Message-ID: <20061113090251.GA4327@plankton.ifup.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Status: RO Content-Length: 1926 Move the acpi_device_attribute and ACPI_DEVICE_ATTR definitions out of scan.c into acpi_bus.h for use in ACPI drivers. Signed-off-by: Brandon Philips --- drivers/acpi/scan.c | 9 --------- include/acpi/acpi_bus.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) Index: linux-2.6-rc/drivers/acpi/scan.c =================================================================== --- linux-2.6-rc.orig/drivers/acpi/scan.c +++ linux-2.6-rc/drivers/acpi/scan.c @@ -33,11 +33,6 @@ static void acpi_device_release(struct k kfree(dev); } -struct acpi_device_attribute { - struct attribute attr; - ssize_t(*show) (struct acpi_device *, char *); - ssize_t(*store) (struct acpi_device *, const char *, size_t); -}; typedef void acpi_device_sysfs_files(struct kobject *, const struct attribute *); @@ -345,10 +340,6 @@ static int acpi_bus_get_wakeup_device_fl static ssize_t acpi_eject_store(struct acpi_device *device, const char *buf, size_t count); -#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ -static struct acpi_device_attribute acpi_device_attr_##_name = \ - __ATTR(_name, _mode, _show, _store) - ACPI_DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store); /** Index: linux-2.6-rc/include/acpi/acpi_bus.h =================================================================== --- linux-2.6-rc.orig/include/acpi/acpi_bus.h +++ linux-2.6-rc/include/acpi/acpi_bus.h @@ -182,6 +182,18 @@ struct acpi_device_dir { #define acpi_device_dir(d) ((d)->dir.entry) +#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ +static struct acpi_device_attribute acpi_device_attr_##_name = \ + __ATTR(_name, _mode, _show, _store) + +struct acpi_device_attribute { + struct attribute attr; + ssize_t(*show) (struct acpi_device *, char *); + ssize_t(*store) (struct acpi_device *, const char *, size_t); +}; + + + /* Plug and Play */ typedef char acpi_bus_id[5]; From brandon@ifup.org Mon Nov 13 01:03:08 2006 Date: Mon, 13 Nov 2006 01:03:08 -0800 From: Brandon Philips To: Kristen Carlson Accardi Subject: [PATCH 2/2] ACPI: Add a docked sysfs file to the dock driver Message-ID: <20061113090308.GB4327@plankton.ifup.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Status: RO Content-Length: 2551 Add a docked attribute to the dock_station kobject and export it via sysfs. Warning: Compile tested only Signed-off-by: Brandon Philips --- drivers/acpi/dock.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) Index: linux-2.6-rc/drivers/acpi/dock.c =================================================================== --- linux-2.6-rc.orig/drivers/acpi/dock.c +++ linux-2.6-rc/drivers/acpi/dock.c @@ -603,6 +603,34 @@ find_dock_devices(acpi_handle handle, u3 return AE_OK; } +#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ +static struct acpi_device_attribute acpi_device_attr_##_name = \ + __ATTR(_name, _mode, _show, _store) +/* + * show_docked - read method for "docked" file in sysfs + */ +static ssize_t show_docked(struct acpi_device *dev, char *buf) +{ + struct dock_station *ds = (struct dock_station *)dev->driver_data; + return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(ds)); + +} +ACPI_DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); + +static void dock_remove_sysfs_files(struct acpi_device *ad) { + sysfs_remove_file(&ad->kobj, &acpi_device_attr_docked.attr); +} + +static int dock_add_syfs_files(struct acpi_device *ad) { + int ret; + + ret = sysfs_create_file(&ad->kobj, &acpi_device_attr_docked.attr); + if (ret) + dock_remove_sysfs_files(ad);; + + return ret; +} + /** * dock_add - add a new dock station * @handle: the dock station handle @@ -615,6 +643,7 @@ static int dock_add(acpi_handle handle) int ret; acpi_status status; struct dock_dependent_device *dd; + struct acpi_device *ad; /* allocate & initialize the dock_station private data */ dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL); @@ -652,6 +681,14 @@ static int dock_add(acpi_handle handle) goto dock_add_err; } + ret = acpi_bus_get_device(handle, &ad); + if (ret) goto dock_add_err; + + ad->driver_data = (void *)dock_station; + + if (dock_add_syfs_files(ad)) + printk(KERN_ERR PREFIX "Unable to create sysfs files\n"); + printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_NAME); return 0; @@ -669,6 +706,7 @@ static int dock_remove(void) { struct dock_dependent_device *dd, *tmp; acpi_status status; + struct acpi_device *ad; if (!dock_station) return 0; @@ -685,6 +723,9 @@ static int dock_remove(void) if (ACPI_FAILURE(status)) printk(KERN_ERR "Error removing notify handler\n"); + acpi_bus_get_device(dock_station->handle, &ad); + dock_remove_sysfs_files(ad); + /* free dock station memory */ kfree(dock_station); return 0; From brandon@ifup.org Wed Nov 29 16:33:04 2006 Date: Wed, 29 Nov 2006 16:33:04 -0800 From: Brandon Philips To: Kristen Carlson Accardi Subject: Re: [PATCH 2/2] ACPI: Add a docked sysfs file to the dock driver Message-ID: <20061130003304.GA5207@plankton.ifup.org> References: <20061113090308.GB4327@plankton.ifup.org> <20061129161310.9678dcec.kristen.c.accardi@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061129161310.9678dcec.kristen.c.accardi@intel.com> User-Agent: Mutt/1.5.13 (2006-08-11) Status: RO Content-Length: 4343 Hey Kristen- On 16:13 Wed 29 Nov 2006, Kristen Carlson Accardi wrote: > Sorry it has taken me so long to provide you with some feedback - I went > on vacation. No worries- school is nearing finals so I haven't had much time for fun. Luckily I am through with papers through the end of this week. > Do you think you still have time to work on this? I am hoping to get > this sysfs feature submitted by Friday - including the extra > stuff we talked about a couple weeks ago (i.e. the second syfs file > which would allow software to initiate an undock). If you don't have > time, I will just edit what you've got and finish it up myself. I will do the cleanup tonight and try to do the software undock file tonight. However, like before I won't be able to test that it works :-/ I am still a bit concerned about the file location in the tree. If the ACPI port to the device core happens it should be an easy move. > Thanks for your work so far, my comments below, Thanks! > One generic comment first - Have you read the Documentation/CodingStyle ? > I notice some style violations here :). Heh, oops! Best, Brandon > On Mon, 13 Nov 2006 01:03:08 -0800 > Brandon Philips wrote: > > > Add a docked attribute to the dock_station kobject and export it via > > sysfs. > > > > Warning: Compile tested only > > > > Signed-off-by: Brandon Philips > > --- > > drivers/acpi/dock.c | 41 +++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 41 insertions(+) > > > > Index: linux-2.6-rc/drivers/acpi/dock.c > > =================================================================== > > --- linux-2.6-rc.orig/drivers/acpi/dock.c > > +++ linux-2.6-rc/drivers/acpi/dock.c > > @@ -603,6 +603,34 @@ find_dock_devices(acpi_handle handle, u3 > > return AE_OK; > > } > > > > +#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ > > +static struct acpi_device_attribute acpi_device_attr_##_name = \ > > + __ATTR(_name, _mode, _show, _store) > > +/* > > + * show_docked - read method for "docked" file in sysfs > > + */ > > +static ssize_t show_docked(struct acpi_device *dev, char *buf) > > +{ > > + struct dock_station *ds = (struct dock_station *)dev->driver_data; > > + return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(ds)); > > + > > +} > > +ACPI_DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); > > + > > +static void dock_remove_sysfs_files(struct acpi_device *ad) { > > + sysfs_remove_file(&ad->kobj, &acpi_device_attr_docked.attr); > > +} > > ^^^ Follow CodingStyle for curly braces. > > > + > > +static int dock_add_syfs_files(struct acpi_device *ad) { > ditto - CodingStyle. Also, this should be dock_add_sysfs (not syfs). > > > + int ret; > > + > > + ret = sysfs_create_file(&ad->kobj, &acpi_device_attr_docked.attr); > > + if (ret) > > + dock_remove_sysfs_files(ad);; > > + > > + return ret; > > +} > > + > > /** > > * dock_add - add a new dock station > > * @handle: the dock station handle > > @@ -615,6 +643,7 @@ static int dock_add(acpi_handle handle) > > int ret; > > acpi_status status; > > struct dock_dependent_device *dd; > > + struct acpi_device *ad; > > > > /* allocate & initialize the dock_station private data */ > > dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL); > > @@ -652,6 +681,14 @@ static int dock_add(acpi_handle handle) > > goto dock_add_err; > > } > > > > + ret = acpi_bus_get_device(handle, &ad); > > + if (ret) goto dock_add_err; > > this should be 2 lines > > > + > > + ad->driver_data = (void *)dock_station; > > + > > + if (dock_add_syfs_files(ad)) > > + printk(KERN_ERR PREFIX "Unable to create sysfs files\n"); > > + > > printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_NAME); > > > > return 0; > > @@ -669,6 +706,7 @@ static int dock_remove(void) > > { > > struct dock_dependent_device *dd, *tmp; > > acpi_status status; > > + struct acpi_device *ad; > > > > if (!dock_station) > > return 0; > > @@ -685,6 +723,9 @@ static int dock_remove(void) > > if (ACPI_FAILURE(status)) > > printk(KERN_ERR "Error removing notify handler\n"); > > > > + acpi_bus_get_device(dock_station->handle, &ad); > > ^^^ should check for return value and valid ad > > > + dock_remove_sysfs_files(ad); > > + > > /* free dock station memory */ > > kfree(dock_station); > > return 0; From kristen.c.accardi@intel.com Wed Nov 8 13:04:55 2006 Return-Path: X-Original-To: brandon@osuosl.org Delivered-To: philips@osuosl.org Date: Wed, 8 Nov 2006 13:04:26 -0800 From: Kristen Carlson Accardi To: Brandon Philips Subject: Re: [PATCH] acpi: dock.c add docked file to sysfs Message-Id: <20061108130426.a0e8ec00.kristen.c.accardi@intel.com> In-Reply-To: <20061108204721.GB9817@plankton.ifup.org> References: <20061104091250.GB5156@plankton.ifup.org> <70b6f0bf0611041255i5c52c002x9bc0fb77c97204d1@mail.gmail.com> <4c64689d0611061459ged7c05elc511cdea513e8dd2@mail.gmail.com> <20061106235245.GD7809@plankton.ifup.org> <4c64689d0611071004p2ba7659fkd4331d2bec5109f3@mail.gmail.com> <20061107195532.GC5413@plankton.ifup.org> <4c64689d0611081056s16dd9deahd36e71152564f3aa@mail.gmail.com> <20061108204721.GB9817@plankton.ifup.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 29017 On Wed, 8 Nov 2006 12:47:21 -0800 Brandon Philips wrote: > On 10:56 Wed 08 Nov 2006, kristen accardi wrote: > > > Thanks for the patch. Can you send the revised patch to my work > > address next time? kristen.c.accardi@intel.com. One problem I have > > with your approach is that now we have to maintain state (the flag). > > This can be tricky in the case of error conditions, and also is not > > always an accurrate representation of physical reality :). For > > example, you set the flag to indicate the machine is docked prior to > > actually performing the dock. What happens if the acpi _DCK method > > fails? Your state will now be incorrect. If you use the > > dock_present() function to determine whether you are docked instead, > > then you will a) save having to worry about inconsistent state because > > you aren't saving any and b) display a more accurrate state because > > you are querying the firmware every time you read the sysfs entry. > > Good point. I will revise the patch. Also, did you test the patch on > hardware? > > I borrowed an IBM X40 and UltraBase X4 with the intention of testing the > patch but got the following stack trace. The system didn't respond to > interrupts while undocked. When redocked key presses made while > undocked were handled and displayed on the screen and the system started > running normally again. This was before applying my patch. Also, this > was using ACPI dock NOT ibm_acpi dock. > > I will try looking into it again later tonight if I can get at the > hardware. > > Thanks, > > Brandon > > Nov 8 01:39:16 caps NMI: IOCK error (debug interrupt?) > Nov 8 01:39:16 caps Modules linked in: snd_pcm_oss snd_mixer_oss snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device parport_pc parport ipw2200 ieee80211 ieee80211_crypt sdhci mmc_core snd_intel8x0m snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_pcm snd_timer snd soundcore snd_page_alloc i2c_i801 ehci_hcd intelfb i2c_algo_bit i2c_core acpiphp pci_hotplug usb_storage scsi_mod uhci_hcd usbhid ff_memless usbcore > Nov 8 01:39:16 caps CPU: 0 > Nov 8 01:39:16 caps EIP: 0060:[] Not tainted VLI > Nov 8 01:39:16 caps EFLAGS: 00000246 (2.6.19-rc5-dirty #4) > Nov 8 01:39:16 caps EIP is at acpi_os_write_port+0x22/0x39 > Nov 8 01:39:16 caps eax: 000000f5 ebx: 00000008 ecx: 00000008 edx: 000000b2 > Nov 8 01:39:16 caps esi: c1d99c7c edi: c1ce77cc ebp: c1ce77a4 esp: c1d99bbc > Nov 8 01:39:16 caps ds: 007b es: 007b ss: 0068 > Nov 8 01:39:16 caps Process kacpid (pid: 35, ti=c1d98000 task=c1d77550 task.ti=c1d98000) > Nov 8 01:39:16 caps Stack: c022ed87 000000b2 000000f5 00000008 c1cf5204 c022ed34 c1cf51dc c0226973 > Nov 8 01:39:16 caps 00000001 000000b2 00000000 00000008 c1d99c7c 00000000 00000000 000000b2 > Nov 8 01:39:16 caps 00000000 00000000 00000000 c1ce77cc c1cf5574 00000000 c022b455 c1ce77cc > Nov 8 01:39:16 caps Call Trace: > Nov 8 01:39:16 caps [] acpi_ex_system_io_space_handler+0x53/0x60 > Nov 8 01:39:16 caps [] acpi_ex_system_io_space_handler+0x0/0x60 > Nov 8 01:39:16 caps [] acpi_ev_address_space_dispatch+0x1a4/0x1f4 > Nov 8 01:39:16 caps [] acpi_ex_access_region+0x64/0xd9 > Nov 8 01:39:16 caps [] acpi_ex_field_datum_io+0x12b/0x1e6 > Nov 8 01:39:16 caps [] acpi_ev_address_space_dispatch+0x1e6/0x1f4 > Nov 8 01:39:16 caps [] acpi_ex_write_with_update_rule+0x13d/0x145 > Nov 8 01:39:16 caps [] acpi_ex_insert_into_field+0x30f/0x31a > Nov 8 01:39:16 caps [] acpi_ex_write_data_to_field+0x226/0x24c > Nov 8 01:39:16 caps [] acpi_ex_store_object_to_node+0x7e/0xc9 > Nov 8 01:39:16 caps [] acpi_ex_store+0x61/0x189 > Nov 8 01:39:16 caps [] acpi_ex_opcode_1A_1T_1R+0x4f6/0x6dc > Nov 8 01:39:16 caps [] acpi_ex_resolve_operands+0x2e4/0x5a7 > Nov 8 01:39:16 caps [] acpi_ds_exec_end_op+0xd3/0x3e5 > Nov 8 01:39:16 caps [] acpi_ps_append_arg+0x1d/0x82 > Nov 8 01:39:16 caps [] acpi_ps_parse_loop+0x649/0x9f0 > Nov 8 01:39:16 caps [] acpi_ps_parse_aml+0x70/0x21c > Nov 8 01:39:16 caps [] acpi_ps_execute_pass+0xa3/0xb8 > Nov 8 01:39:16 caps [] acpi_ps_execute_method+0x6c/0x9e > Nov 8 01:39:16 caps [] acpi_ns_evaluate+0xb5/0x118 > Nov 8 01:39:16 caps [] acpi_evaluate_object+0x141/0x205 > Nov 8 01:39:16 caps [] snprintf+0x27/0x30 > Nov 8 01:39:16 caps [] acpi_ec_gpe_query+0x7b/0x9b > Nov 8 01:39:16 caps [] acpi_os_execute_deferred+0x21/0x2c > Nov 8 01:39:16 caps [] run_workqueue+0x7f/0x120 > Nov 8 01:39:16 caps [] acpi_os_execute_deferred+0x0/0x2c > Nov 8 01:39:16 caps [] worker_thread+0x158/0x180 > Nov 8 01:39:16 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:16 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:16 caps [] worker_thread+0x0/0x180 > Nov 8 01:39:16 caps [] kthread+0xb7/0xc0 > Nov 8 01:39:16 caps [] kthread+0x0/0xc0 > Nov 8 01:39:16 caps [] kernel_thread_helper+0x7/0x18 > Nov 8 01:39:16 caps ======================= > Nov 8 01:39:16 caps Code: 09 34 37 c0 5a 31 c0 5b c3 8b 4c 24 0c 8b 54 24 04 8b 44 24 08 83 f9 10 74 13 77 07 83 f9 08 74 09 eb 14 83 f9 20 74 0c eb 0d ee 12 0f b7 c0 66 ef eb 0b ef eb 08 0f 0b 77 01 09 34 37 c0 31 > Nov 8 01:39:16 caps ipw2200: Firmware error detected. Restarting. > Nov 8 01:39:16 caps usb 4-1: USB disconnect, address 2 > Nov 8 01:39:16 caps logger: ACPI group ac_adapter / action ac_adapter is not defined > Nov 8 01:39:18 caps ACPI: docking > Nov 8 01:39:18 caps usb 4-1: new high speed USB device using ehci_hcd and address 3 > Nov 8 01:39:18 caps hda: cache flushes supported > Nov 8 01:39:18 caps usb 4-1: configuration #1 chosen from 1 choice > Nov 8 01:39:18 caps hub 4-1:1.0: USB hub found > Nov 8 01:39:18 caps hub 4-1:1.0: 3 ports detected > Nov 8 01:39:18 caps logger: ACPI group processor / action processor is not defined > Nov 8 01:39:18 caps logger: ACPI group processor / action processor is not defined > Nov 8 01:39:18 caps logger: ACPI group battery / action battery is not defined > Nov 8 01:39:18 caps BUG: scheduling while atomic: kacpi_notify/0x00000001/36 > Nov 8 01:39:18 caps [] schedule+0x622/0x630 > Nov 8 01:39:18 caps [] ipw_rx+0x101/0x510 [ipw2200] > Nov 8 01:39:18 caps [] schedule_timeout+0x57/0xb0 > Nov 8 01:39:18 caps [] process_timeout+0x0/0x10 > Nov 8 01:39:18 caps [] acpi_ec_wait+0xd8/0x135 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] d_callback+0x29/0x40 > Nov 8 01:39:18 caps [] acpi_ec_transaction_unlocked+0x40/0xa8 > Nov 8 01:39:18 caps [] acpi_ec_transaction+0xdd/0x108 > Nov 8 01:39:18 caps [] acpi_ec_read+0x3f/0x4e > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0xac/0x1b1 > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0x0/0x1b1 > Nov 8 01:39:18 caps [] acpi_ev_address_space_dispatch+0x1a4/0x1f4 > Nov 8 01:39:18 caps [] acpi_ex_access_region+0x64/0xd9 > Nov 8 01:39:18 caps [] acpi_ex_field_datum_io+0x12b/0x1e6 > Nov 8 01:39:18 caps [] acpi_ns_search_one_scope+0x1e/0x44 > Nov 8 01:39:18 caps [] acpi_ex_extract_from_field+0xc7/0x267 > Nov 8 01:39:18 caps [] acpi_ut_create_internal_object_dbg+0x27/0x7e > Nov 8 01:39:18 caps [] acpi_ex_read_data_from_field+0x13f/0x16c > Nov 8 01:39:18 caps [] acpi_ex_resolve_node_to_value+0x182/0x224 > Nov 8 01:39:18 caps [] acpi_ex_resolve_to_value+0x7c/0x88 > Nov 8 01:39:18 caps [] acpi_ex_resolve_operands+0x2e4/0x5a7 > Nov 8 01:39:18 caps [] acpi_ds_exec_end_op+0xc3/0x3e5 > Nov 8 01:39:18 caps [] acpi_ps_append_arg+0x1d/0x82 > Nov 8 01:39:18 caps [] acpi_ps_parse_loop+0x649/0x9f0 > Nov 8 01:39:18 caps [] acpi_ut_create_generic_state+0x2b/0x46 > Nov 8 01:39:18 caps [] acpi_ps_parse_aml+0x70/0x21c > Nov 8 01:39:18 caps [] acpi_ds_init_aml_walk+0xd3/0x141 > Nov 8 01:39:18 caps [] acpi_ps_execute_pass+0xa3/0xb8 > Nov 8 01:39:18 caps [] acpi_ps_execute_method+0x6c/0x9e > Nov 8 01:39:18 caps [] acpi_ns_evaluate+0xb5/0x118 > Nov 8 01:39:18 caps [] acpi_evaluate_object+0x141/0x205 > Nov 8 01:39:18 caps [] acpi_ut_release_mutex+0x65/0x6b > Nov 8 01:39:18 caps [] acpi_evaluate_integer+0x97/0xd4 > Nov 8 01:39:18 caps [] acpi_bus_get_status+0x41/0x97 > Nov 8 01:39:18 caps [] acpi_add_single_object+0xa3/0x1ac > Nov 8 01:39:18 caps [] acpi_get_data+0x65/0x72 > Nov 8 01:39:18 caps [] acpi_bus_add+0x28/0x50 > Nov 8 01:39:18 caps [] dock_create_acpi_device+0x6e/0x80 > Nov 8 01:39:18 caps [] hotplug_dock_devices+0x88/0xb9 > Nov 8 01:39:18 caps [] dock_notify+0x97/0x14b > Nov 8 01:39:18 caps [] acpi_ev_notify_dispatch+0x6a/0x77 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x21/0x2c > Nov 8 01:39:18 caps [] run_workqueue+0x7f/0x120 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x0/0x2c > Nov 8 01:39:18 caps [] worker_thread+0x158/0x180 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] worker_thread+0x0/0x180 > Nov 8 01:39:18 caps [] kthread+0xb7/0xc0 > Nov 8 01:39:18 caps [] kthread+0x0/0xc0 > Nov 8 01:39:18 caps [] kernel_thread_helper+0x7/0x18 > Nov 8 01:39:18 caps ======================= > Nov 8 01:39:18 caps BUG: scheduling while atomic: kacpi_notify/0x00000001/36 > Nov 8 01:39:18 caps [] schedule+0x622/0x630 > Nov 8 01:39:18 caps [] ipw_rx+0x101/0x510 [ipw2200] > Nov 8 01:39:18 caps [] schedule_timeout+0x57/0xb0 > Nov 8 01:39:18 caps [] process_timeout+0x0/0x10 > Nov 8 01:39:18 caps [] acpi_ec_wait+0xd8/0x135 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] d_callback+0x29/0x40 > Nov 8 01:39:18 caps [] acpi_ec_transaction_unlocked+0x8a/0xa8 > Nov 8 01:39:18 caps [] acpi_ec_transaction+0xdd/0x108 > Nov 8 01:39:18 caps [] acpi_ec_read+0x3f/0x4e > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0xac/0x1b1 > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0x0/0x1b1 > Nov 8 01:39:18 caps [] acpi_ev_address_space_dispatch+0x1a4/0x1f4 > Nov 8 01:39:18 caps [] acpi_ex_access_region+0x64/0xd9 > Nov 8 01:39:18 caps [] acpi_ex_field_datum_io+0x12b/0x1e6 > Nov 8 01:39:18 caps [] acpi_ns_search_one_scope+0x1e/0x44 > Nov 8 01:39:18 caps [] acpi_ex_extract_from_field+0xc7/0x267 > Nov 8 01:39:18 caps [] acpi_ut_create_internal_object_dbg+0x27/0x7e > Nov 8 01:39:18 caps [] acpi_ex_read_data_from_field+0x13f/0x16c > Nov 8 01:39:18 caps [] acpi_ex_resolve_node_to_value+0x182/0x224 > Nov 8 01:39:18 caps [] acpi_ex_resolve_to_value+0x7c/0x88 > Nov 8 01:39:18 caps [] acpi_ex_resolve_operands+0x2e4/0x5a7 > Nov 8 01:39:18 caps [] acpi_ds_exec_end_op+0xc3/0x3e5 > Nov 8 01:39:18 caps [] acpi_ps_append_arg+0x1d/0x82 > Nov 8 01:39:18 caps [] acpi_ps_parse_loop+0x649/0x9f0 > Nov 8 01:39:18 caps [] acpi_ut_create_generic_state+0x2b/0x46 > Nov 8 01:39:18 caps [] acpi_ps_parse_aml+0x70/0x21c > Nov 8 01:39:18 caps [] acpi_ds_init_aml_walk+0xd3/0x141 > Nov 8 01:39:18 caps [] acpi_ps_execute_pass+0xa3/0xb8 > Nov 8 01:39:18 caps [] acpi_ps_execute_method+0x6c/0x9e > Nov 8 01:39:18 caps [] acpi_ns_evaluate+0xb5/0x118 > Nov 8 01:39:18 caps [] acpi_evaluate_object+0x141/0x205 > Nov 8 01:39:18 caps [] acpi_ut_release_mutex+0x65/0x6b > Nov 8 01:39:18 caps [] acpi_evaluate_integer+0x97/0xd4 > Nov 8 01:39:18 caps [] acpi_bus_get_status+0x41/0x97 > Nov 8 01:39:18 caps [] acpi_add_single_object+0xa3/0x1ac > Nov 8 01:39:18 caps [] acpi_get_data+0x65/0x72 > Nov 8 01:39:18 caps [] acpi_bus_add+0x28/0x50 > Nov 8 01:39:18 caps [] dock_create_acpi_device+0x6e/0x80 > Nov 8 01:39:18 caps [] hotplug_dock_devices+0x88/0xb9 > Nov 8 01:39:18 caps [] dock_notify+0x97/0x14b > Nov 8 01:39:18 caps [] acpi_ev_notify_dispatch+0x6a/0x77 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x21/0x2c > Nov 8 01:39:18 caps [] run_workqueue+0x7f/0x120 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x0/0x2c > Nov 8 01:39:18 caps [] worker_thread+0x158/0x180 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] worker_thread+0x0/0x180 > Nov 8 01:39:18 caps [] kthread+0xb7/0xc0 > Nov 8 01:39:18 caps [] kthread+0x0/0xc0 > Nov 8 01:39:18 caps [] kernel_thread_helper+0x7/0x18 > Nov 8 01:39:18 caps ======================= > Nov 8 01:39:18 caps BUG: scheduling while atomic: kacpi_notify/0x00000001/36 > Nov 8 01:39:18 caps [] schedule+0x622/0x630 > Nov 8 01:39:18 caps [] ipw_rx+0x101/0x510 [ipw2200] > Nov 8 01:39:18 caps [] schedule_timeout+0x57/0xb0 > Nov 8 01:39:18 caps [] process_timeout+0x0/0x10 > Nov 8 01:39:18 caps [] acpi_ec_wait+0xd8/0x135 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] d_callback+0x29/0x40 > Nov 8 01:39:18 caps [] acpi_ec_transaction_unlocked+0x40/0xa8 > Nov 8 01:39:18 caps [] acpi_ec_transaction+0xdd/0x108 > Nov 8 01:39:18 caps [] acpi_ec_read+0x3f/0x4e > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0xac/0x1b1 > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0x0/0x1b1 > Nov 8 01:39:18 caps [] acpi_ev_address_space_dispatch+0x1a4/0x1f4 > Nov 8 01:39:18 caps [] acpi_ex_access_region+0x64/0xd9 > Nov 8 01:39:18 caps [] acpi_ex_field_datum_io+0x12b/0x1e6 > Nov 8 01:39:18 caps [] acpi_ns_search_one_scope+0x1e/0x44 > Nov 8 01:39:18 caps [] acpi_ex_extract_from_field+0xc7/0x267 > Nov 8 01:39:18 caps [] acpi_ut_create_internal_object_dbg+0x27/0x7e > Nov 8 01:39:18 caps [] acpi_ex_read_data_from_field+0x13f/0x16c > Nov 8 01:39:18 caps [] acpi_ex_resolve_node_to_value+0x182/0x224 > Nov 8 01:39:18 caps [] acpi_ex_resolve_to_value+0x7c/0x88 > Nov 8 01:39:18 caps [] acpi_ex_resolve_operands+0x2e4/0x5a7 > Nov 8 01:39:18 caps [] acpi_ds_exec_end_op+0xc3/0x3e5 > Nov 8 01:39:18 caps [] acpi_ps_append_arg+0x1d/0x82 > Nov 8 01:39:18 caps [] acpi_ps_parse_loop+0x649/0x9f0 > Nov 8 01:39:18 caps [] acpi_ut_create_generic_state+0x2b/0x46 > Nov 8 01:39:18 caps [] acpi_ps_parse_aml+0x70/0x21c > Nov 8 01:39:18 caps [] acpi_ds_init_aml_walk+0xd3/0x141 > Nov 8 01:39:18 caps [] acpi_ps_execute_pass+0xa3/0xb8 > Nov 8 01:39:18 caps [] acpi_ps_execute_method+0x6c/0x9e > Nov 8 01:39:18 caps [] acpi_ns_evaluate+0xb5/0x118 > Nov 8 01:39:18 caps [] acpi_evaluate_object+0x141/0x205 > Nov 8 01:39:18 caps [] acpi_ut_release_mutex+0x65/0x6b > Nov 8 01:39:18 caps [] acpi_evaluate_integer+0x97/0xd4 > Nov 8 01:39:18 caps [] acpi_bus_get_status+0x41/0x97 > Nov 8 01:39:18 caps [] acpi_add_single_object+0xa3/0x1ac > Nov 8 01:39:18 caps [] acpi_get_data+0x65/0x72 > Nov 8 01:39:18 caps [] acpi_bus_add+0x28/0x50 > Nov 8 01:39:18 caps [] dock_create_acpi_device+0x6e/0x80 > Nov 8 01:39:18 caps [] hotplug_dock_devices+0x88/0xb9 > Nov 8 01:39:18 caps [] dock_notify+0x97/0x14b > Nov 8 01:39:18 caps [] acpi_ev_notify_dispatch+0x6a/0x77 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x21/0x2c > Nov 8 01:39:18 caps [] run_workqueue+0x7f/0x120 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x0/0x2c > Nov 8 01:39:18 caps [] worker_thread+0x158/0x180 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] worker_thread+0x0/0x180 > Nov 8 01:39:18 caps [] kthread+0xb7/0xc0 > Nov 8 01:39:18 caps [] kthread+0x0/0xc0 > Nov 8 01:39:18 caps [] kernel_thread_helper+0x7/0x18 > Nov 8 01:39:18 caps ======================= > Nov 8 01:39:18 caps BUG: scheduling while atomic: kacpi_notify/0x00000001/36 > Nov 8 01:39:18 caps [] schedule+0x622/0x630 > Nov 8 01:39:18 caps [] ipw_rx+0x101/0x510 [ipw2200] > Nov 8 01:39:18 caps [] schedule_timeout+0x57/0xb0 > Nov 8 01:39:18 caps [] process_timeout+0x0/0x10 > Nov 8 01:39:18 caps [] acpi_ec_wait+0xd8/0x135 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] d_callback+0x29/0x40 > Nov 8 01:39:18 caps [] acpi_ec_transaction_unlocked+0x8a/0xa8 > Nov 8 01:39:18 caps [] acpi_ec_transaction+0xdd/0x108 > Nov 8 01:39:18 caps [] acpi_ec_read+0x3f/0x4e > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0xac/0x1b1 > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0x0/0x1b1 > Nov 8 01:39:18 caps [] acpi_ev_address_space_dispatch+0x1a4/0x1f4 > Nov 8 01:39:18 caps [] acpi_ex_access_region+0x64/0xd9 > Nov 8 01:39:18 caps [] acpi_ex_field_datum_io+0x12b/0x1e6 > Nov 8 01:39:18 caps [] acpi_ns_search_one_scope+0x1e/0x44 > Nov 8 01:39:18 caps [] acpi_ex_extract_from_field+0xc7/0x267 > Nov 8 01:39:18 caps [] acpi_ut_create_internal_object_dbg+0x27/0x7e > Nov 8 01:39:18 caps [] acpi_ex_read_data_from_field+0x13f/0x16c > Nov 8 01:39:18 caps [] acpi_ex_resolve_node_to_value+0x182/0x224 > Nov 8 01:39:18 caps [] acpi_ex_resolve_to_value+0x7c/0x88 > Nov 8 01:39:18 caps [] acpi_ex_resolve_operands+0x2e4/0x5a7 > Nov 8 01:39:18 caps [] acpi_ds_exec_end_op+0xc3/0x3e5 > Nov 8 01:39:18 caps [] acpi_ps_append_arg+0x1d/0x82 > Nov 8 01:39:18 caps [] acpi_ps_parse_loop+0x649/0x9f0 > Nov 8 01:39:18 caps [] acpi_ut_create_generic_state+0x2b/0x46 > Nov 8 01:39:18 caps [] acpi_ps_parse_aml+0x70/0x21c > Nov 8 01:39:18 caps [] acpi_ds_init_aml_walk+0xd3/0x141 > Nov 8 01:39:18 caps [] acpi_ps_execute_pass+0xa3/0xb8 > Nov 8 01:39:18 caps [] acpi_ps_execute_method+0x6c/0x9e > Nov 8 01:39:18 caps [] acpi_ns_evaluate+0xb5/0x118 > Nov 8 01:39:18 caps [] acpi_evaluate_object+0x141/0x205 > Nov 8 01:39:18 caps [] acpi_ut_release_mutex+0x65/0x6b > Nov 8 01:39:18 caps [] acpi_evaluate_integer+0x97/0xd4 > Nov 8 01:39:18 caps [] acpi_bus_get_status+0x41/0x97 > Nov 8 01:39:18 caps [] acpi_add_single_object+0xa3/0x1ac > Nov 8 01:39:18 caps [] acpi_get_data+0x65/0x72 > Nov 8 01:39:18 caps [] acpi_bus_add+0x28/0x50 > Nov 8 01:39:18 caps [] dock_create_acpi_device+0x6e/0x80 > Nov 8 01:39:18 caps [] hotplug_dock_devices+0x88/0xb9 > Nov 8 01:39:18 caps [] dock_notify+0x97/0x14b > Nov 8 01:39:18 caps [] acpi_ev_notify_dispatch+0x6a/0x77 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x21/0x2c > Nov 8 01:39:18 caps [] run_workqueue+0x7f/0x120 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x0/0x2c > Nov 8 01:39:18 caps [] worker_thread+0x158/0x180 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] worker_thread+0x0/0x180 > Nov 8 01:39:18 caps [] kthread+0xb7/0xc0 > Nov 8 01:39:18 caps [] kthread+0x0/0xc0 > Nov 8 01:39:18 caps [] kernel_thread_helper+0x7/0x18 > Nov 8 01:39:18 caps ======================= > Nov 8 01:39:18 caps BUG: scheduling while atomic: kacpi_notify/0x00000001/36 > Nov 8 01:39:18 caps [] schedule+0x622/0x630 > Nov 8 01:39:18 caps [] ipw_rx+0x101/0x510 [ipw2200] > Nov 8 01:39:18 caps [] schedule_timeout+0x57/0xb0 > Nov 8 01:39:18 caps [] process_timeout+0x0/0x10 > Nov 8 01:39:18 caps [] acpi_ec_wait+0xd8/0x135 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] d_callback+0x29/0x40 > Nov 8 01:39:18 caps [] acpi_ec_transaction_unlocked+0x40/0xa8 > Nov 8 01:39:18 caps [] acpi_ec_transaction+0xdd/0x108 > Nov 8 01:39:18 caps [] acpi_ec_read+0x3f/0x4e > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0xac/0x1b1 > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0x0/0x1b1 > Nov 8 01:39:18 caps [] acpi_ev_address_space_dispatch+0x1a4/0x1f4 > Nov 8 01:39:18 caps [] acpi_ex_access_region+0x64/0xd9 > Nov 8 01:39:18 caps [] acpi_ex_field_datum_io+0x12b/0x1e6 > Nov 8 01:39:18 caps [] acpi_ns_search_one_scope+0x1e/0x44 > Nov 8 01:39:18 caps [] acpi_ex_extract_from_field+0xc7/0x267 > Nov 8 01:39:18 caps [] acpi_ut_create_internal_object_dbg+0x27/0x7e > Nov 8 01:39:18 caps [] acpi_ex_read_data_from_field+0x13f/0x16c > Nov 8 01:39:18 caps [] acpi_ex_resolve_node_to_value+0x182/0x224 > Nov 8 01:39:18 caps [] acpi_ex_resolve_to_value+0x7c/0x88 > Nov 8 01:39:18 caps [] acpi_ex_resolve_operands+0x2e4/0x5a7 > Nov 8 01:39:18 caps [] acpi_ds_exec_end_op+0xc3/0x3e5 > Nov 8 01:39:18 caps [] acpi_ps_append_arg+0x1d/0x82 > Nov 8 01:39:18 caps [] acpi_ps_parse_loop+0x649/0x9f0 > Nov 8 01:39:18 caps [] acpi_ut_create_generic_state+0x2b/0x46 > Nov 8 01:39:18 caps [] acpi_ps_parse_aml+0x70/0x21c > Nov 8 01:39:18 caps [] acpi_ds_init_aml_walk+0xd3/0x141 > Nov 8 01:39:18 caps [] acpi_ps_execute_pass+0xa3/0xb8 > Nov 8 01:39:18 caps [] acpi_ps_execute_method+0x6c/0x9e > Nov 8 01:39:18 caps [] acpi_ns_evaluate+0xb5/0x118 > Nov 8 01:39:18 caps [] acpi_evaluate_object+0x141/0x205 > Nov 8 01:39:18 caps [] acpi_ut_release_mutex+0x65/0x6b > Nov 8 01:39:18 caps [] acpi_evaluate_integer+0x97/0xd4 > Nov 8 01:39:18 caps [] acpi_bus_get_status+0x41/0x97 > Nov 8 01:39:18 caps [] acpi_add_single_object+0xa3/0x1ac > Nov 8 01:39:18 caps [] acpi_get_data+0x65/0x72 > Nov 8 01:39:18 caps [] acpi_bus_add+0x28/0x50 > Nov 8 01:39:18 caps [] dock_create_acpi_device+0x6e/0x80 > Nov 8 01:39:18 caps [] hotplug_dock_devices+0x88/0xb9 > Nov 8 01:39:18 caps [] dock_notify+0x97/0x14b > Nov 8 01:39:18 caps [] acpi_ev_notify_dispatch+0x6a/0x77 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x21/0x2c > Nov 8 01:39:18 caps [] run_workqueue+0x7f/0x120 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x0/0x2c > Nov 8 01:39:18 caps [] worker_thread+0x158/0x180 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] worker_thread+0x0/0x180 > Nov 8 01:39:18 caps [] kthread+0xb7/0xc0 > Nov 8 01:39:18 caps [] kthread+0x0/0xc0 > Nov 8 01:39:18 caps [] kernel_thread_helper+0x7/0x18 > Nov 8 01:39:18 caps ======================= > Nov 8 01:39:18 caps BUG: scheduling while atomic: kacpi_notify/0x00000001/36 > Nov 8 01:39:18 caps [] schedule+0x622/0x630 > Nov 8 01:39:18 caps [] ipw_rx+0x101/0x510 [ipw2200] > Nov 8 01:39:18 caps [] schedule_timeout+0x57/0xb0 > Nov 8 01:39:18 caps [] process_timeout+0x0/0x10 > Nov 8 01:39:18 caps [] acpi_ec_wait+0xd8/0x135 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] autoremove_wake_function+0x0/0x60 > Nov 8 01:39:18 caps [] d_callback+0x29/0x40 > Nov 8 01:39:18 caps [] acpi_ec_transaction_unlocked+0x8a/0xa8 > Nov 8 01:39:18 caps [] acpi_ec_transaction+0xdd/0x108 > Nov 8 01:39:18 caps [] acpi_ec_read+0x3f/0x4e > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0xac/0x1b1 > Nov 8 01:39:18 caps [] acpi_ec_space_handler+0x0/0x1b1 > Nov 8 01:39:18 caps [] acpi_ev_address_space_dispatch+0x1a4/0x1f4 > Nov 8 01:39:18 caps [] acpi_ex_access_region+0x64/0xd9 > Nov 8 01:39:18 caps [] acpi_ex_field_datum_io+0x12b/0x1e6 > Nov 8 01:39:18 caps [] acpi_ns_search_one_scope+0x1e/0x44 > Nov 8 01:39:18 caps [] acpi_ex_extract_from_field+0xc7/0x267 > Nov 8 01:39:18 caps [] acpi_ut_create_internal_object_dbg+0x27/0x7e > Nov 8 01:39:18 caps [] acpi_ex_read_data_from_field+0x13f/0x16c > Nov 8 01:39:18 caps [] acpi_ex_resolve_node_to_value+0x182/0x224 > Nov 8 01:39:18 caps [] acpi_ex_resolve_to_value+0x7c/0x88 > Nov 8 01:39:18 caps [] acpi_ex_resolve_operands+0x2e4/0x5a7 > Nov 8 01:39:18 caps [] acpi_ds_exec_end_op+0xc3/0x3e5 > Nov 8 01:39:18 caps [] acpi_ps_append_arg+0x1d/0x82 > Nov 8 01:39:18 caps [] acpi_ps_parse_loop+0x649/0x9f0 > Nov 8 01:39:18 caps [] acpi_ut_create_generic_state+0x2b/0x46 > Nov 8 01:39:18 caps [] acpi_ps_parse_aml+0x70/0x21c > Nov 8 01:39:18 caps [] acpi_ds_init_aml_walk+0xd3/0x141 > Nov 8 01:39:18 caps [] acpi_ps_execute_pass+0xa3/0xb8 > Nov 8 01:39:18 caps [] acpi_ps_execute_method+0x6c/0x9e > Nov 8 01:39:18 caps [] acpi_ns_evaluate+0xb5/0x118 > Nov 8 01:39:18 caps [] acpi_evaluate_object+0x141/0x205 > Nov 8 01:39:18 caps [] acpi_ut_release_mutex+0x65/0x6b > Nov 8 01:39:18 caps [] acpi_evaluate_integer+0x97/0xd4 > Nov 8 01:39:18 caps [] acpi_bus_get_status+0x41/0x97 > Nov 8 01:39:18 caps [] acpi_add_single_object+0xa3/0x1ac > Nov 8 01:39:18 caps [] acpi_get_data+0x65/0x72 > Nov 8 01:39:18 caps [] acpi_bus_add+0x28/0x50 > Nov 8 01:39:18 caps [] dock_create_acpi_device+0x6e/0x80 > Nov 8 01:39:18 caps [] hotplug_dock_devices+0x88/0xb9 > Nov 8 01:39:18 caps [] dock_notify+0x97/0x14b > Nov 8 01:39:18 caps [] acpi_ev_notify_dispatch+0x6a/0x77 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x21/0x2c > Nov 8 01:39:18 caps [] run_workqueue+0x7f/0x120 > Nov 8 01:39:18 caps [] acpi_os_execute_deferred+0x0/0x2c > Nov 8 01:39:18 caps [] worker_thread+0x158/0x180 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] default_wake_function+0x0/0x20 > Nov 8 01:39:18 caps [] worker_thread+0x0/0x180 > Nov 8 01:39:18 caps [] kthread+0xb7/0xc0 > Nov 8 01:39:18 caps [] kthread+0x0/0xc0 > Nov 8 01:39:18 caps [] kernel_thread_helper+0x7/0x18 > Nov 8 01:39:18 caps ======================= > Nov 8 01:39:19 caps logger: ACPI group battery / action battery is not defined > Nov 8 01:39:19 caps logger: ACPI group ac_adapter / action ac_adapter is not defined > Nov 8 01:39:19 caps logger: ACPI group processor / action processor is not defined > Nov 8 01:39:19 caps logger: ACPI group processor / action processor is not defined > Nov 8 01:39:19 caps logger: ACPI group ibm / action bay is not defined > Nov 8 01:39:19 caps logger: ACPI group battery / action battery is not defined > Nov 8 01:39:19 caps logger: ACPI group battery / action battery is not defined Make sure you are using -mm, this looks like a bug I fixed a couple weeks ago. Kristen From kristen.c.accardi@intel.com Mon Nov 13 11:22:03 2006 Return-Path: X-Original-To: brandon@osuosl.org Delivered-To: philips@osuosl.org Date: Mon, 13 Nov 2006 11:21:14 -0800 From: Kristen Carlson Accardi To: Brandon Philips Subject: Re: [PATCH] acpi: dock.c add docked file to sysfs Message-Id: <20061113112114.33e1af10.kristen.c.accardi@intel.com> In-Reply-To: <20061113094442.GC4327@plankton.ifup.org> References: <20061104091250.GB5156@plankton.ifup.org> <70b6f0bf0611041255i5c52c002x9bc0fb77c97204d1@mail.gmail.com> <4c64689d0611061459ged7c05elc511cdea513e8dd2@mail.gmail.com> <20061106235245.GD7809@plankton.ifup.org> <4c64689d0611071004p2ba7659fkd4331d2bec5109f3@mail.gmail.com> <20061107195532.GC5413@plankton.ifup.org> <4c64689d0611081056s16dd9deahd36e71152564f3aa@mail.gmail.com> <20061108204721.GB9817@plankton.ifup.org> <20061108130426.a0e8ec00.kristen.c.accardi@intel.com> <20061113094442.GC4327@plankton.ifup.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 2152 On Mon, 13 Nov 2006 01:44:42 -0800 Brandon Philips wrote: > On 13:04 Wed 08 Nov 2006, Kristen Carlson Accardi wrote: > > On Wed, 8 Nov 2006 12:47:21 -0800 > > Brandon Philips wrote: > > > > > On 10:56 Wed 08 Nov 2006, kristen accardi wrote: > > > > > > > Thanks for the patch. Can you send the revised patch to my work > > > > address next time? kristen.c.accardi@intel.com. One problem I have > > > > with your approach is that now we have to maintain state (the flag). > > > > This can be tricky in the case of error conditions, and also is not > > > > always an accurrate representation of physical reality :). For > > > > example, you set the flag to indicate the machine is docked prior to > > > > actually performing the dock. What happens if the acpi _DCK method > > > > fails? Your state will now be incorrect. If you use the > > > > dock_present() function to determine whether you are docked instead, > > > > then you will a) save having to worry about inconsistent state because > > > > you aren't saving any and b) display a more accurrate state because > > > > you are querying the firmware every time you read the sysfs entry. > > I sent you the updated patches. thanks, I will test it out soon and provide you with some feedback. > > However, while I was updating this patch I ran upon something in the > ACPI code. > > From what I can tell, ACPI devices don't use the device model despite > struct acpi_device having a struct device. The only call to > device_register is for the acpi_root device. > > Then I found this in drivers/acpi/scan.c > > /* > * Initialize Device > * ----------------- > * TBD: Synch with Core's enumeration/initialization process. > */ > > Is there ongoing work to get acpi_device integrated into the rest of the > device model? Or maybe I should look into integrating ACPI into the > device model? There is ongoing work, but I don't know how much progress they've made on it. You should check the acpi mailing list archives and search for driver model - you should find the most recent posts on this. From kristen.c.accardi@intel.com Mon Nov 13 12:19:03 2006 Return-Path: X-Original-To: brandon@osuosl.org Delivered-To: philips@osuosl.org Date: Mon, 13 Nov 2006 12:18:33 -0800 From: Kristen Carlson Accardi To: Holger Macht , brandon@ifup.org Cc: Matthew Garrett , linux-acpi@vger.kernel.org, fseidel@suse.de Subject: Re: Comments about commit 'PCI: docking station: remove dock uevents'? Message-Id: <20061113121833.12c4d1fd.kristen.c.accardi@intel.com> In-Reply-To: <20061113195740.GA6465@homac2> References: <20061112140737.GA21908@homac2.suse.de> <20061113121437.GA18369@srcf.ucam.org> <20061113194326.GD4646@homac2> <20061113195025.GA23091@srcf.ucam.org> <20061113195740.GA6465@homac2> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 1862 On Mon, 13 Nov 2006 20:57:40 +0100 Holger Macht wrote: > On Mon 13. Nov - 19:50:25, Matthew Garrett wrote: > > On Mon, Nov 13, 2006 at 08:43:27PM +0100, Holger Macht wrote: > > > > > What I'm doing at the moment (for about a week ;-) is to echo "- - -" to > > > /sys/class/scsi_host/host*/scan for all unoccupied hosts on a dock > > > event. And this works pretty good. But it's of course only a workaround if > > > the scsi bus generates an event. > > > > That's just about workable for adding a device, but it loses badly for > > removing one. > > On before physically removing the laptop I did an echo 1 > > /sys/.../device/delete . That's actually the reason why I need a undock > event in userspace for now. > > > > > With recent kernel I have to unregister from the drive from userspace to > > > prevent confusion about if the drive is still there or not. > > > > Right. And that doesn't help in the case where the user undocks without > > waiting for everything to stop flashing first. Of course, in that case > > it's probably reasonable to tell the user that they lose, but we can do > > better than leaving a random drive lying around and a partially wedged > > sata bus... > > User presses lever on dock station or presses Fn+F9 on a thinkpad > generates a undock acpi event, then I'm unregistering the device, then I > trigger the undock from userspace and at this point the indicator on the > dock station turns green so the user knows that he can remove the laptop. > > Regards, > Holger Brandon is working on adding a sysfs interface to the dock driver right now. We have so far only added a read only parameter that will display the dock status, however, it is possible to add a sysfs entry that would allow the user to undock by writing to it. Brandon, can you add this to your sysfs patch? Thanks, Kristen From kristen.c.accardi@intel.com Wed Nov 29 16:22:53 2006 Return-Path: X-Original-To: brandon@osuosl.org Delivered-To: philips@osuosl.org Date: Wed, 29 Nov 2006 16:13:10 -0800 From: Kristen Carlson Accardi To: Brandon Philips Subject: Re: [PATCH 2/2] ACPI: Add a docked sysfs file to the dock driver Message-Id: <20061129161310.9678dcec.kristen.c.accardi@intel.com> In-Reply-To: <20061113090308.GB4327@plankton.ifup.org> References: <20061113090308.GB4327@plankton.ifup.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 3608 Hi Brandon, Sorry it has taken me so long to provide you with some feedback - I went on vacation. Do you think you still have time to work on this? I am hoping to get this sysfs feature submitted by Friday - including the extra stuff we talked about a couple weeks ago (i.e. the second syfs file which would allow software to initiate an undock). If you don't have time, I will just edit what you've got and finish it up myself. Thanks for your work so far, my comments below, Kristen One generic comment first - Have you read the Documentation/CodingStyle ? I notice some style violations here :). On Mon, 13 Nov 2006 01:03:08 -0800 Brandon Philips wrote: > Add a docked attribute to the dock_station kobject and export it via > sysfs. > > Warning: Compile tested only > > Signed-off-by: Brandon Philips > --- > drivers/acpi/dock.c | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > > Index: linux-2.6-rc/drivers/acpi/dock.c > =================================================================== > --- linux-2.6-rc.orig/drivers/acpi/dock.c > +++ linux-2.6-rc/drivers/acpi/dock.c > @@ -603,6 +603,34 @@ find_dock_devices(acpi_handle handle, u3 > return AE_OK; > } > > +#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ > +static struct acpi_device_attribute acpi_device_attr_##_name = \ > + __ATTR(_name, _mode, _show, _store) > +/* > + * show_docked - read method for "docked" file in sysfs > + */ > +static ssize_t show_docked(struct acpi_device *dev, char *buf) > +{ > + struct dock_station *ds = (struct dock_station *)dev->driver_data; > + return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(ds)); > + > +} > +ACPI_DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); > + > +static void dock_remove_sysfs_files(struct acpi_device *ad) { > + sysfs_remove_file(&ad->kobj, &acpi_device_attr_docked.attr); > +} ^^^ Follow CodingStyle for curly braces. > + > +static int dock_add_syfs_files(struct acpi_device *ad) { ditto - CodingStyle. Also, this should be dock_add_sysfs (not syfs). > + int ret; > + > + ret = sysfs_create_file(&ad->kobj, &acpi_device_attr_docked.attr); > + if (ret) > + dock_remove_sysfs_files(ad);; > + > + return ret; > +} > + > /** > * dock_add - add a new dock station > * @handle: the dock station handle > @@ -615,6 +643,7 @@ static int dock_add(acpi_handle handle) > int ret; > acpi_status status; > struct dock_dependent_device *dd; > + struct acpi_device *ad; > > /* allocate & initialize the dock_station private data */ > dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL); > @@ -652,6 +681,14 @@ static int dock_add(acpi_handle handle) > goto dock_add_err; > } > > + ret = acpi_bus_get_device(handle, &ad); > + if (ret) goto dock_add_err; this should be 2 lines > + > + ad->driver_data = (void *)dock_station; > + > + if (dock_add_syfs_files(ad)) > + printk(KERN_ERR PREFIX "Unable to create sysfs files\n"); > + > printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_NAME); > > return 0; > @@ -669,6 +706,7 @@ static int dock_remove(void) > { > struct dock_dependent_device *dd, *tmp; > acpi_status status; > + struct acpi_device *ad; > > if (!dock_station) > return 0; > @@ -685,6 +723,9 @@ static int dock_remove(void) > if (ACPI_FAILURE(status)) > printk(KERN_ERR "Error removing notify handler\n"); > > + acpi_bus_get_device(dock_station->handle, &ad); ^^^ should check for return value and valid ad > + dock_remove_sysfs_files(ad); > + > /* free dock station memory */ > kfree(dock_station); > return 0; From kristen.c.accardi@intel.com Wed Nov 29 16:26:23 2006 Return-Path: X-Original-To: brandon@osuosl.org Delivered-To: philips@osuosl.org Date: Wed, 29 Nov 2006 16:16:16 -0800 From: Kristen Carlson Accardi To: Brandon Philips Subject: Re: [PATCH 1/2] ACPI: Move sysfs definitions from scan.c to acpi_bus.h Message-Id: <20061129161616.0921a24c.kristen.c.accardi@intel.com> In-Reply-To: <20061113090251.GA4327@plankton.ifup.org> References: <20061113090251.GA4327@plankton.ifup.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 2255 On Mon, 13 Nov 2006 01:02:51 -0800 Brandon Philips wrote: > Move the acpi_device_attribute and ACPI_DEVICE_ATTR definitions out of > scan.c into acpi_bus.h for use in ACPI drivers. I think this is ok - we'll see what the acpi folks say. > > Signed-off-by: Brandon Philips > --- > drivers/acpi/scan.c | 9 --------- > include/acpi/acpi_bus.h | 12 ++++++++++++ > 2 files changed, 12 insertions(+), 9 deletions(-) > > Index: linux-2.6-rc/drivers/acpi/scan.c > =================================================================== > --- linux-2.6-rc.orig/drivers/acpi/scan.c > +++ linux-2.6-rc/drivers/acpi/scan.c > @@ -33,11 +33,6 @@ static void acpi_device_release(struct k > kfree(dev); > } > > -struct acpi_device_attribute { > - struct attribute attr; > - ssize_t(*show) (struct acpi_device *, char *); > - ssize_t(*store) (struct acpi_device *, const char *, size_t); > -}; > > typedef void acpi_device_sysfs_files(struct kobject *, > const struct attribute *); > @@ -345,10 +340,6 @@ static int acpi_bus_get_wakeup_device_fl > static ssize_t acpi_eject_store(struct acpi_device *device, > const char *buf, size_t count); > > -#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ > -static struct acpi_device_attribute acpi_device_attr_##_name = \ > - __ATTR(_name, _mode, _show, _store) > - > ACPI_DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store); > > /** > Index: linux-2.6-rc/include/acpi/acpi_bus.h > =================================================================== > --- linux-2.6-rc.orig/include/acpi/acpi_bus.h > +++ linux-2.6-rc/include/acpi/acpi_bus.h > @@ -182,6 +182,18 @@ struct acpi_device_dir { > > #define acpi_device_dir(d) ((d)->dir.entry) > > +#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ > +static struct acpi_device_attribute acpi_device_attr_##_name = \ > + __ATTR(_name, _mode, _show, _store) > + > +struct acpi_device_attribute { > + struct attribute attr; > + ssize_t(*show) (struct acpi_device *, char *); > + ssize_t(*store) (struct acpi_device *, const char *, size_t); > +}; > + > + > + Don't include excess (>1) line breaks - apparently this is frowned upon. > /* Plug and Play */ > > typedef char acpi_bus_id[5]; From brandon@ifup.org Wed Nov 29 23:49:01 2006 Message-Id: <20061130074901.818023393@ifup.org> References: <20061130074215.188856608@ifup.org> User-Agent: quilt/0.45-1 Date: Wed, 29 Nov 2006 23:42:16 -0800 From: brandon@ifup.org To: kristen.c.accardi@intel.com Cc: Brandon Philips Subject: [patch 1/3] ACPI: Move sysfs definitions from scan.c to acpi_bus.h Content-Disposition: inline; filename=acpi_sysfs.patch Status: RO Content-Length: 1804 Lines: 56 Signed-off-by: Brandon Philips --- drivers/acpi/scan.c | 9 --------- include/acpi/acpi_bus.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) Index: linux-2.6-rc/drivers/acpi/scan.c =================================================================== --- linux-2.6-rc.orig/drivers/acpi/scan.c +++ linux-2.6-rc/drivers/acpi/scan.c @@ -32,11 +32,6 @@ static void acpi_device_release(struct k kfree(dev); } -struct acpi_device_attribute { - struct attribute attr; - ssize_t(*show) (struct acpi_device *, char *); - ssize_t(*store) (struct acpi_device *, const char *, size_t); -}; typedef void acpi_device_sysfs_files(struct kobject *, const struct attribute *); @@ -344,10 +339,6 @@ static int acpi_bus_get_wakeup_device_fl static ssize_t acpi_eject_store(struct acpi_device *device, const char *buf, size_t count); -#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ -static struct acpi_device_attribute acpi_device_attr_##_name = \ - __ATTR(_name, _mode, _show, _store) - ACPI_DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store); /** Index: linux-2.6-rc/include/acpi/acpi_bus.h =================================================================== --- linux-2.6-rc.orig/include/acpi/acpi_bus.h +++ linux-2.6-rc/include/acpi/acpi_bus.h @@ -182,6 +182,16 @@ struct acpi_device_dir { #define acpi_device_dir(d) ((d)->dir.entry) +#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ +static struct acpi_device_attribute acpi_device_attr_##_name = \ + __ATTR(_name, _mode, _show, _store) + +struct acpi_device_attribute { + struct attribute attr; + ssize_t(*show) (struct acpi_device *, char *); + ssize_t(*store) (struct acpi_device *, const char *, size_t); +}; + /* Plug and Play */ typedef char acpi_bus_id[5]; -- From brandon@ifup.org Wed Nov 29 23:49:02 2006 Message-Id: <20061130074901.933931388@ifup.org> References: <20061130074215.188856608@ifup.org> User-Agent: quilt/0.45-1 Date: Wed, 29 Nov 2006 23:42:17 -0800 From: brandon@ifup.org To: kristen.c.accardi@intel.com Cc: Brandon Philips Subject: [patch 2/3] ACPI: Add a docked sysfs file to the dock driver. Content-Disposition: inline; filename=docked-sysfs.patch Status: RO Content-Length: 2609 Lines: 98 Warning: Compile tested only Signed-off-by: Brandon Philips --- drivers/acpi/dock.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) Index: linux-2.6-rc/drivers/acpi/dock.c =================================================================== --- linux-2.6-rc.orig/drivers/acpi/dock.c +++ linux-2.6-rc/drivers/acpi/dock.c @@ -603,6 +603,36 @@ find_dock_devices(acpi_handle handle, u3 return AE_OK; } +#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ +static struct acpi_device_attribute acpi_device_attr_##_name = \ + __ATTR(_name, _mode, _show, _store) +/* + * show_docked - read method for "docked" file in sysfs + */ +static ssize_t show_docked(struct acpi_device *dev, char *buf) +{ + struct dock_station *ds = (struct dock_station *)dev->driver_data; + return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(ds)); + +} +ACPI_DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); + +static void dock_remove_sysfs_files(struct acpi_device *ad) +{ + sysfs_remove_file(&ad->kobj, &acpi_device_attr_docked.attr); +} + +static int dock_add_sysfs_files(struct acpi_device *ad) +{ + int ret; + + ret = sysfs_create_file(&ad->kobj, &acpi_device_attr_docked.attr); + if (ret) + dock_remove_sysfs_files(ad);; + + return ret; +} + /** * dock_add - add a new dock station * @handle: the dock station handle @@ -615,6 +645,7 @@ static int dock_add(acpi_handle handle) int ret; acpi_status status; struct dock_dependent_device *dd; + struct acpi_device *ad; /* allocate & initialize the dock_station private data */ dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL); @@ -652,6 +683,14 @@ static int dock_add(acpi_handle handle) goto dock_add_err; } + if ((ret = acpi_bus_get_device(handle, &ad))) + goto dock_add_err; + + ad->driver_data = (void *)dock_station; + + if (dock_add_sysfs_files(ad)) + printk(KERN_ERR PREFIX "Unable to create sysfs files\n"); + printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_NAME); return 0; @@ -669,6 +708,8 @@ static int dock_remove(void) { struct dock_dependent_device *dd, *tmp; acpi_status status; + struct acpi_device *ad; + int ret; if (!dock_station) return 0; @@ -685,6 +726,15 @@ static int dock_remove(void) if (ACPI_FAILURE(status)) printk(KERN_ERR "Error removing notify handler\n"); + ret = acpi_bus_get_device(dock_station->handle, &ad); + if (ret < 0) { + printk(KERN_ERR "Error getting docking station\n"); + goto error; + } + + dock_remove_sysfs_files(ad); + +error: /* free dock station memory */ kfree(dock_station); return 0; -- From brandon@ifup.org Wed Nov 29 23:49:02 2006 Message-Id: <20061130074902.046997473@ifup.org> References: <20061130074215.188856608@ifup.org> User-Agent: quilt/0.45-1 Date: Wed, 29 Nov 2006 23:42:18 -0800 From: brandon@ifup.org To: kristen.c.accardi@intel.com Cc: Brandon Philips Subject: [patch 3/3] Add undock attribute to dock sysfs Content-Disposition: inline; filename=undock-sysfs.patch Status: RO Content-Length: 4026 Lines: 133 Add an undock attribute to the dock_station kobject and export it via sysfs. Anything written to this file will cause an undock event to be triggered. Warning: Compile tested only Signed-off-by: Brandon Philips --- drivers/acpi/dock.c | 78 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 17 deletions(-) Index: linux-2.6-rc/drivers/acpi/dock.c =================================================================== --- linux-2.6-rc.orig/drivers/acpi/dock.c +++ linux-2.6-rc/drivers/acpi/dock.c @@ -511,6 +511,37 @@ void unregister_hotplug_dock_device(acpi EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device); /** + * handle_eject_request - handle an undock request checking for error conditions + * + * Check to make sure the dock device is still present, then undock and + * hotremove all the devices that may need removing. + */ +static int handle_eject_request(struct dock_station *ds, u32 event) +{ + if (!dock_present(ds)) + return -ENODEV; + + if (dock_in_progress(ds)) + return -EBUSY; + + /* + * here we need to generate the undock + * event prior to actually doing the undock + * so that the device struct still exists. + */ + dock_event(ds, event, UNDOCK_EVENT); + hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); + undock(ds); + eject_dock(ds); + if (dock_present(ds)) { + printk(KERN_ERR PREFIX "Unable to undock!\n"); + return -EBUSY; + } + + return 0; +} + +/** * dock_notify - act upon an acpi dock notification * @handle: the dock station handle * @event: the acpi event @@ -518,9 +549,7 @@ EXPORT_SYMBOL_GPL(unregister_hotplug_doc * * If we are notified to dock, then check to see if the dock is * present and then dock. Notify all drivers of the dock event, - * and then hotplug and devices that may need hotplugging. For undock - * check to make sure the dock device is still present, then undock - * and hotremove all the devices that may need removing. + * and then hotplug and devices that may need hotplugging. */ static void dock_notify(acpi_handle handle, u32 event, void *data) { @@ -552,19 +581,7 @@ static void dock_notify(acpi_handle hand * to the driver who wish to hotplug. */ case ACPI_NOTIFY_EJECT_REQUEST: - if (!dock_in_progress(ds) && dock_present(ds)) { - /* - * here we need to generate the undock - * event prior to actually doing the undock - * so that the device struct still exists. - */ - dock_event(ds, event, UNDOCK_EVENT); - hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); - undock(ds); - eject_dock(ds); - if (dock_present(ds)) - printk(KERN_ERR PREFIX "Unable to undock!\n"); - } + handle_eject_request(ds, event); break; default: printk(KERN_ERR PREFIX "Unknown dock event %d\n", event); @@ -617,9 +634,29 @@ static ssize_t show_docked(struct acpi_d } ACPI_DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); +/* + * write_undock - write method for "undock" file in sysfs + * + * anything written to this file will cause an undock to be written + */ +static ssize_t write_undock(struct acpi_device *dev, const char *buf, size_t count) +{ + struct dock_station *ds = (struct dock_station *)dev->driver_data; + int ret; + + if (!count) + return -EINVAL; + + ret = handle_eject_request(ds, ACPI_NOTIFY_EJECT_REQUEST); + + return ret ? ret: count; +} +ACPI_DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock); + static void dock_remove_sysfs_files(struct acpi_device *ad) { sysfs_remove_file(&ad->kobj, &acpi_device_attr_docked.attr); + sysfs_remove_file(&ad->kobj, &acpi_device_attr_undock.attr); } static int dock_add_sysfs_files(struct acpi_device *ad) @@ -628,8 +665,15 @@ static int dock_add_sysfs_files(struct a ret = sysfs_create_file(&ad->kobj, &acpi_device_attr_docked.attr); if (ret) - dock_remove_sysfs_files(ad);; + goto error; + ret = sysfs_create_file(&ad->kobj, &acpi_device_attr_undock.attr); + if (ret) + goto error; + + return 0; +error: + dock_remove_sysfs_files(ad);; return ret; } -- From brandon@ifup.org Wed Nov 29 23:49:01 2006 Message-Id: <20061130074215.188856608@ifup.org> User-Agent: quilt/0.45-1 Date: Wed, 29 Nov 2006 23:42:15 -0800 From: brandon@ifup.org To: kristen.c.accardi@intel.com Subject: [patch 0/3] ACPI: dock sysfs files for docked and undock Status: RO Content-Length: 318 Lines: 16 Hello Kristen- White space was cleaned up on the scan.c move. The docked patch has been reworked to follow coding style and handle the error condition. And the undock sysfs file is added in the third file- totally untested. Thanks, Brandon P.S. Sorry for the bad patch bombs! My MTA flipped out on me :-( --