All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] acer-wmi: two Bugs fixed and set device state by access new wmi method
@ 2011-05-21 23:33 Lee, Chun-Yi
  2011-05-21 23:33 ` [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state Lee, Chun-Yi
  0 siblings, 1 reply; 16+ messages in thread
From: Lee, Chun-Yi @ 2011-05-21 23:33 UTC (permalink / raw)
  To: mjg; +Cc: platform-driver-x86, Lee, Chun-Yi

Here have 4 patches, from first to third patches fixed bko#32862, bko#34142,
the 3 patches will check negative number before set initial devices state, make 
sure 3G device exist before generate 3G rfkill and allow 64-bits return buffer
from 2 old wmi methods.

And, the fourth patch improve to set communication device state by evaluate new
WMID_GUID3 method, it's good to avoid potential problem if we still use old wmi
method on new Acer machines.

Changed after last posted:
 + Add negative number check in commandline_init() before set initial state. bko#32862
 + Add check 3G device exist flag in WMID_set_capabilities(). bko#32862
 + Allow u64 result buffer in WMI_execute_u32(). bko#34142
 + Add wmid3_set_device_status() then access it in set_block.

Next step for acer-wmi:
 + Dig more old wmi event in DSDT, try to remove devices state polling on more machines.
	+ Already found some old wmi event, can be used by sync devices state.
 + Clear up acer-wmi driver base on different wmi interface on different time frame.


Lee, Chun-Yi (4):
  acer-wmi: does not allow negative number set to initial device state
  acer-wmi: check the existence of internal 3G device when set
    capability
  acer-wmi: allow 64-bits return buffer from WMI methods
  acer-wmi: support to set communication device state by new wmid
    method

 drivers/platform/x86/acer-wmi.c |  131 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 123 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state
  2011-05-21 23:33 [PATCH 0/4] acer-wmi: two Bugs fixed and set device state by access new wmi method Lee, Chun-Yi
@ 2011-05-21 23:33 ` Lee, Chun-Yi
  2011-05-21 23:33   ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Lee, Chun-Yi
  2011-05-21 23:38   ` [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state Carlos Corbacho
  0 siblings, 2 replies; 16+ messages in thread
From: Lee, Chun-Yi @ 2011-05-21 23:33 UTC (permalink / raw)
  To: mjg
  Cc: platform-driver-x86, Lee, Chun-Yi, Carlos Corbacho,
	Dmitry Torokhov, Corentin Chary, Thomas Renninger

The driver set module parameter value: mailled, threeg and brightness
to BIOS by evaluate wmi method when driver was initialled. The default
values for those parameters are -1, so, that will be better don't set
negative value to BIOS.

Reference: bko#32862
        https://bugzilla.kernel.org/show_bug.cgi?id=32862

Tested on Acer Aspire 8930G, Acer Travelmate 8572

Tested-by: Hector Martin <hector@marcansoft.com> 
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
---
 drivers/platform/x86/acer-wmi.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index ac4e7f8..c3cb603 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -961,10 +961,12 @@ static void __init acer_commandline_init(void)
 	 * These will all fail silently if the value given is invalid, or the
 	 * capability isn't available on the given interface
 	 */
-	set_u32(mailled, ACER_CAP_MAILLED);
-	if (!has_type_aa)
+	if (mailled >= 0)
+		set_u32(mailled, ACER_CAP_MAILLED);
+	if (!has_type_aa && threeg >= 0)
 		set_u32(threeg, ACER_CAP_THREEG);
-	set_u32(brightness, ACER_CAP_BRIGHTNESS);
+	if (brightness >= 0)
+		set_u32(brightness, ACER_CAP_BRIGHTNESS);
 }
 
 /*
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-21 23:33 ` [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state Lee, Chun-Yi
@ 2011-05-21 23:33   ` Lee, Chun-Yi
  2011-05-21 23:33     ` [PATCH 3/4] acer-wmi: allow 64-bits return buffer from WMI methods Lee, Chun-Yi
  2011-05-21 23:43     ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Carlos Corbacho
  2011-05-21 23:38   ` [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state Carlos Corbacho
  1 sibling, 2 replies; 16+ messages in thread
From: Lee, Chun-Yi @ 2011-05-21 23:33 UTC (permalink / raw)
  To: mjg
  Cc: platform-driver-x86, Lee, Chun-Yi, Carlos Corbacho,
	Dmitry Torokhov, Corentin Chary, Thomas Renninger

That will be better to check the existence of internal 3G device when
we set threeg capability and generate killswitch for threeg. It can
avoid userland access 3G rfkill but the machine doesn't have internal
3G device.

Reference: bko#32862
	https://bugzilla.kernel.org/show_bug.cgi?id=32862

Tested on Acer Aspire 8930G, Acer Travelmate 8572

Tested-by: Hector Martin <hector@marcansoft.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
---
 drivers/platform/x86/acer-wmi.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index c3cb603..6c4716d 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -876,7 +876,8 @@ static acpi_status WMID_set_capabilities(void)
 	dmi_walk(type_aa_dmi_decode, NULL);
 	if (!has_type_aa) {
 		interface->capability |= ACER_CAP_WIRELESS;
-		interface->capability |= ACER_CAP_THREEG;
+		if (devices & 0x40)
+			interface->capability |= ACER_CAP_THREEG;
 		if (devices & 0x10)
 			interface->capability |= ACER_CAP_BLUETOOTH;
 	}
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/4] acer-wmi: allow 64-bits return buffer from WMI methods
  2011-05-21 23:33   ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Lee, Chun-Yi
@ 2011-05-21 23:33     ` Lee, Chun-Yi
  2011-05-21 23:33       ` [PATCH 4/4] acer-wmi: support to set communication device state by new wmid method Lee, Chun-Yi
  2011-05-21 23:43     ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Carlos Corbacho
  1 sibling, 1 reply; 16+ messages in thread
From: Lee, Chun-Yi @ 2011-05-21 23:33 UTC (permalink / raw)
  To: mjg
  Cc: platform-driver-x86, Lee, Chun-Yi, Carlos Corbacho,
	Dmitry Torokhov, Corentin Chary, Thomas Renninger

Acer WMID_GUID1/2 method's return buffer was declared to 64-bits
on some Acer notebook, but WMI method only use 32-bits in return
buffer.
So, add this patch for allow 64-bits return buffer.

Reference: bko#34142
	https://bugzilla.kernel.org/show_bug.cgi?id=34142

Tested on Acer Travelmate 5735Z-452G32Mnss

Tested-by: Melchior FRANZ <melchior.franz@gmail.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
---
 drivers/platform/x86/acer-wmi.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 6c4716d..73a7b63 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -737,7 +737,8 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out)
 
 	obj = (union acpi_object *) result.pointer;
 	if (obj && obj->type == ACPI_TYPE_BUFFER &&
-		obj->buffer.length == sizeof(u32)) {
+		(obj->buffer.length == sizeof(u32) ||
+		obj->buffer.length == sizeof(u64))) {
 		tmp = *((u32 *) obj->buffer.pointer);
 	} else {
 		tmp = 0;
@@ -866,7 +867,8 @@ static acpi_status WMID_set_capabilities(void)
 
 	obj = (union acpi_object *) out.pointer;
 	if (obj && obj->type == ACPI_TYPE_BUFFER &&
-		obj->buffer.length == sizeof(u32)) {
+		(obj->buffer.length == sizeof(u32) ||
+		obj->buffer.length == sizeof(u64))) {
 		devices = *((u32 *) obj->buffer.pointer);
 	} else {
 		kfree(out.pointer);
@@ -1509,7 +1511,8 @@ static u32 get_wmid_devices(void)
 
 	obj = (union acpi_object *) out.pointer;
 	if (obj && obj->type == ACPI_TYPE_BUFFER &&
-		obj->buffer.length == sizeof(u32)) {
+		(obj->buffer.length == sizeof(u32) ||
+		obj->buffer.length == sizeof(u64))) {
 		devices = *((u32 *) obj->buffer.pointer);
 	}
 
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/4] acer-wmi: support to set communication device state by new wmid method
  2011-05-21 23:33     ` [PATCH 3/4] acer-wmi: allow 64-bits return buffer from WMI methods Lee, Chun-Yi
@ 2011-05-21 23:33       ` Lee, Chun-Yi
  0 siblings, 0 replies; 16+ messages in thread
From: Lee, Chun-Yi @ 2011-05-21 23:33 UTC (permalink / raw)
  To: mjg
  Cc: platform-driver-x86, Lee, Chun-Yi, Carlos Corbacho,
	Dmitry Torokhov, Corentin Chary, Thomas Renninger

Have many Acer notebooks' BIOS already support new WMID_GUID3 method.
On those machines, that will be better set communication device by
evaluate WMID_GUID3 method.

Tested on Acer Travelmate 8572

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
---
 drivers/platform/x86/acer-wmi.c |  111 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 110 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 73a7b63..a36937c 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -122,6 +122,7 @@ struct event_return_value {
  */
 #define ACER_WMID3_GDS_WIRELESS		(1<<0)	/* WiFi */
 #define ACER_WMID3_GDS_THREEG		(1<<6)	/* 3G */
+#define ACER_WMID3_GDS_WIMAX		(1<<7)	/* WiMAX */
 #define ACER_WMID3_GDS_BLUETOOTH	(1<<11)	/* BT */
 
 struct lm_input_params {
@@ -1129,6 +1130,114 @@ static acpi_status get_device_status(u32 *value, u32 cap)
 	}
 }
 
+static acpi_status wmid3_set_device_status(u32 value, u16 device)
+{
+	struct wmid3_gds_return_value return_value;
+	acpi_status status;
+	union acpi_object *obj;
+	u16 devices;
+	struct wmid3_gds_input_param params = {
+		.function_num = 0x1,
+		.hotkey_number = 0x01,
+		.devices = ACER_WMID3_GDS_WIRELESS &
+				ACER_WMID3_GDS_THREEG &
+				ACER_WMID3_GDS_WIMAX &
+				ACER_WMID3_GDS_BLUETOOTH,
+	};
+	struct acpi_buffer input = {
+		sizeof(struct wmid3_gds_input_param),
+		&params
+	};
+	struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+	struct acpi_buffer output2 = { ACPI_ALLOCATE_BUFFER, NULL };
+
+	status = wmi_evaluate_method(WMID_GUID3, 0, 0x2, &input, &output);
+	if (ACPI_FAILURE(status))
+		return status;
+
+	obj = output.pointer;
+
+	if (!obj)
+		return AE_ERROR;
+	else if (obj->type != ACPI_TYPE_BUFFER) {
+		kfree(obj);
+		return AE_ERROR;
+	}
+	if (obj->buffer.length != 8) {
+		pr_warning("Unknown buffer length %d\n", obj->buffer.length);
+		kfree(obj);
+		return AE_ERROR;
+	}
+
+	return_value = *((struct wmid3_gds_return_value *)obj->buffer.pointer);
+	kfree(obj);
+
+	if (return_value.error_code || return_value.ec_return_value) {
+		pr_warning("Get Current Device Status failed: "
+			"0x%x - 0x%x\n", return_value.error_code,
+			return_value.ec_return_value);
+		return status;
+	}
+
+	devices = return_value.devices;
+	params.function_num = 0x2;
+	params.hotkey_number = 0x01;
+	params.devices = (value) ? (devices | device) : (devices & ~device);
+
+	status = wmi_evaluate_method(WMID_GUID3, 0, 0x1, &input, &output2);
+	if (ACPI_FAILURE(status))
+		return status;
+
+	obj = output2.pointer;
+
+	if (!obj)
+		return AE_ERROR;
+	else if (obj->type != ACPI_TYPE_BUFFER) {
+		kfree(obj);
+		return AE_ERROR;
+	}
+	if (obj->buffer.length != 4) {
+		pr_warning("Unknown buffer length %d\n", obj->buffer.length);
+		kfree(obj);
+		return AE_ERROR;
+	}
+
+	return_value = *((struct wmid3_gds_return_value *)obj->buffer.pointer);
+	kfree(obj);
+
+	if (return_value.error_code || return_value.ec_return_value)
+		pr_warning("Set Device Status failed: "
+			"0x%x - 0x%x\n", return_value.error_code,
+			return_value.ec_return_value);
+
+	return status;
+}
+
+static acpi_status set_device_status(u32 value, u32 cap)
+{
+	if (wmi_has_guid(WMID_GUID3)) {
+		u16 device;
+
+		switch (cap) {
+		case ACER_CAP_WIRELESS:
+			device = ACER_WMID3_GDS_WIRELESS;
+			break;
+		case ACER_CAP_BLUETOOTH:
+			device = ACER_WMID3_GDS_BLUETOOTH;
+			break;
+		case ACER_CAP_THREEG:
+			device = ACER_WMID3_GDS_THREEG;
+			break;
+		default:
+			return AE_ERROR;
+		}
+		return wmid3_set_device_status(value, device);
+
+	} else {
+		return set_u32(value, cap);
+	}
+}
+
 /*
  * Rfkill devices
  */
@@ -1165,7 +1274,7 @@ static int acer_rfkill_set(void *data, bool blocked)
 	u32 cap = (unsigned long)data;
 
 	if (rfkill_inited) {
-		status = set_u32(!blocked, cap);
+		status = set_device_status(!blocked, cap);
 		if (ACPI_FAILURE(status))
 			return -ENODEV;
 	}
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state
  2011-05-21 23:33 ` [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state Lee, Chun-Yi
  2011-05-21 23:33   ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Lee, Chun-Yi
@ 2011-05-21 23:38   ` Carlos Corbacho
  2011-05-21 23:43     ` Joey Lee
  1 sibling, 1 reply; 16+ messages in thread
From: Carlos Corbacho @ 2011-05-21 23:38 UTC (permalink / raw)
  To: Lee, Chun-Yi
  Cc: mjg, platform-driver-x86, Lee, Chun-Yi, Dmitry Torokhov,
	Corentin Chary, Thomas Renninger

On Sunday 22 May 2011 00:33:51 Lee, Chun-Yi wrote:
> The driver set module parameter value: mailled, threeg and brightness
> to BIOS by evaluate wmi method when driver was initialled. The default
> values for those parameters are -1, so, that will be better don't set
> negative value to BIOS.
> 
> Reference: bko#32862
>         https://bugzilla.kernel.org/show_bug.cgi?id=32862
> 
> Tested on Acer Aspire 8930G, Acer Travelmate 8572
> 
> Tested-by: Hector Martin <hector@marcansoft.com>

Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>

-Carlos

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state
  2011-05-21 23:38   ` [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state Carlos Corbacho
@ 2011-05-21 23:43     ` Joey Lee
  0 siblings, 0 replies; 16+ messages in thread
From: Joey Lee @ 2011-05-21 23:43 UTC (permalink / raw)
  To: carlos; +Cc: corentincj, dtor, Joey Lee, mjg, trenn, platform-driver-x86

於 日,2011-05-22 於 00:38 +0100,Carlos Corbacho 提到:
> On Sunday 22 May 2011 00:33:51 Lee, Chun-Yi wrote:
> > The driver set module parameter value: mailled, threeg and brightness
> > to BIOS by evaluate wmi method when driver was initialled. The default
> > values for those parameters are -1, so, that will be better don't set
> > negative value to BIOS.
> > 
> > Reference: bko#32862
> >         https://bugzilla.kernel.org/show_bug.cgi?id=32862
> > 
> > Tested on Acer Aspire 8930G, Acer Travelmate 8572
> > 
> > Tested-by: Hector Martin <hector@marcansoft.com>
> 
> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
> 
> -Carlos

Thank's for Carlos's acked.

Joey Lee

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-21 23:33   ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Lee, Chun-Yi
  2011-05-21 23:33     ` [PATCH 3/4] acer-wmi: allow 64-bits return buffer from WMI methods Lee, Chun-Yi
@ 2011-05-21 23:43     ` Carlos Corbacho
  2011-05-22  0:02       ` Joey Lee
  1 sibling, 1 reply; 16+ messages in thread
From: Carlos Corbacho @ 2011-05-21 23:43 UTC (permalink / raw)
  To: Lee, Chun-Yi
  Cc: mjg, platform-driver-x86, Lee, Chun-Yi, Dmitry Torokhov,
	Corentin Chary, Thomas Renninger

On Sunday 22 May 2011 00:33:52 Lee, Chun-Yi wrote:
> That will be better to check the existence of internal 3G device when
> we set threeg capability and generate killswitch for threeg. It can
> avoid userland access 3G rfkill but the machine doesn't have internal
> 3G device.
> 
> Reference: bko#32862
> 	https://bugzilla.kernel.org/show_bug.cgi?id=32862
> 
> Tested on Acer Aspire 8930G, Acer Travelmate 8572
> 
> Tested-by: Hector Martin <hector@marcansoft.com>

Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>

If you can now autodetect 3G and already have the relevant rfkill device, then 
you should also rip out the remaining sysfs support for it as it's no longer 
necessary.

-Carlos

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-21 23:43     ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Carlos Corbacho
@ 2011-05-22  0:02       ` Joey Lee
  2011-05-23  6:25         ` Corentin Chary
  0 siblings, 1 reply; 16+ messages in thread
From: Joey Lee @ 2011-05-22  0:02 UTC (permalink / raw)
  To: carlos; +Cc: corentincj, dtor, Joey Lee, mjg, trenn, platform-driver-x86

於 日,2011-05-22 於 00:43 +0100,Carlos Corbacho 提到:
> On Sunday 22 May 2011 00:33:52 Lee, Chun-Yi wrote:
> > That will be better to check the existence of internal 3G device when
> > we set threeg capability and generate killswitch for threeg. It can
> > avoid userland access 3G rfkill but the machine doesn't have internal
> > 3G device.
> > 
> > Reference: bko#32862
> > 	https://bugzilla.kernel.org/show_bug.cgi?id=32862
> > 
> > Tested on Acer Aspire 8930G, Acer Travelmate 8572
> > 
> > Tested-by: Hector Martin <hector@marcansoft.com>
> 
> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
> 
> If you can now autodetect 3G and already have the relevant rfkill device, then 
> you should also rip out the remaining sysfs support for it as it's no longer 
> necessary.
> 
> -Carlos

Got it!
I will send another patch to remove threeg sysfs file.


Thank's a lot!
Joey Lee

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-22  0:02       ` Joey Lee
@ 2011-05-23  6:25         ` Corentin Chary
  2011-05-23  6:39           ` Joey Lee
  0 siblings, 1 reply; 16+ messages in thread
From: Corentin Chary @ 2011-05-23  6:25 UTC (permalink / raw)
  To: Joey Lee; +Cc: carlos, dtor, mjg, trenn, platform-driver-x86

On Sun, May 22, 2011 at 2:02 AM, Joey Lee <jlee@novell.com> wrote:
> 於 日,2011-05-22 於 00:43 +0100,Carlos Corbacho 提到:
>> On Sunday 22 May 2011 00:33:52 Lee, Chun-Yi wrote:
>> > That will be better to check the existence of internal 3G device when
>> > we set threeg capability and generate killswitch for threeg. It can
>> > avoid userland access 3G rfkill but the machine doesn't have internal
>> > 3G device.
>> >
>> > Reference: bko#32862
>> >     https://bugzilla.kernel.org/show_bug.cgi?id=32862
>> >
>> > Tested on Acer Aspire 8930G, Acer Travelmate 8572
>> >
>> > Tested-by: Hector Martin <hector@marcansoft.com>
>>
>> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
>>
>> If you can now autodetect 3G and already have the relevant rfkill device, then
>> you should also rip out the remaining sysfs support for it as it's no longer
>> necessary.
>>
>> -Carlos
>
> Got it!
> I will send another patch to remove threeg sysfs file.

I'm not sure you can drop sysfs files like that, as it will break the ABI.

Could you document acer-wmi in
Documentation/ABI/testing/sysfs-platform-acer-wmi.txt ?
This allows to check when a sysfs file was added, who use it, etc...

Thanks,

-- 
Corentin Chary
http://xf.iksaif.net

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-23  6:25         ` Corentin Chary
@ 2011-05-23  6:39           ` Joey Lee
  2011-05-23  6:41             ` Carlos Corbacho
  0 siblings, 1 reply; 16+ messages in thread
From: Joey Lee @ 2011-05-23  6:39 UTC (permalink / raw)
  To: corentin.chary; +Cc: dtor, Joey Lee, mjg, carlos, trenn, platform-driver-x86

Hi Corentin, 

於 一,2011-05-23 於 08:25 +0200,Corentin Chary 提到:
> On Sun, May 22, 2011 at 2:02 AM, Joey Lee <jlee@novell.com> wrote:
> > 於 日,2011-05-22 於 00:43 +0100,Carlos Corbacho 提到:
> >> On Sunday 22 May 2011 00:33:52 Lee, Chun-Yi wrote:
> >> > That will be better to check the existence of internal 3G device when
> >> > we set threeg capability and generate killswitch for threeg. It can
> >> > avoid userland access 3G rfkill but the machine doesn't have internal
> >> > 3G device.
> >> >
> >> > Reference: bko#32862
> >> >     https://bugzilla.kernel.org/show_bug.cgi?id=32862
> >> >
> >> > Tested on Acer Aspire 8930G, Acer Travelmate 8572
> >> >
> >> > Tested-by: Hector Martin <hector@marcansoft.com>
> >>
> >> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
> >>
> >> If you can now autodetect 3G and already have the relevant rfkill device, then
> >> you should also rip out the remaining sysfs support for it as it's no longer
> >> necessary.
> >>
> >> -Carlos
> >
> > Got it!
> > I will send another patch to remove threeg sysfs file.
> 
> I'm not sure you can drop sysfs files like that, as it will break the ABI.
> 

Yes, you are right.

> Could you document acer-wmi in
> Documentation/ABI/testing/sysfs-platform-acer-wmi.txt ?
> This allows to check when a sysfs file was added, who use it, etc...
> 
> Thanks,
> 

Thank's for your suggestion, I will maintain the ABI document like
sysfs-platform-asus-wmi. 

But, when can I remove threeg sysfs file?


Thank's
Joey Lee

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-23  6:39           ` Joey Lee
@ 2011-05-23  6:41             ` Carlos Corbacho
  2011-05-23  6:51               ` Corentin Chary
  2011-05-23  7:33               ` Joey Lee
  0 siblings, 2 replies; 16+ messages in thread
From: Carlos Corbacho @ 2011-05-23  6:41 UTC (permalink / raw)
  To: Joey Lee; +Cc: corentin.chary, dtor, mjg, trenn, platform-driver-x86

On Monday 23 May 2011 07:39:36 Joey Lee wrote:
> > I'm not sure you can drop sysfs files like that, as it will break the
> > ABI.
>>
> > Could you document acer-wmi in
> > Documentation/ABI/testing/sysfs-platform-acer-wmi.txt ?
> > This allows to check when a sysfs file was added, who use it, etc...

I don't agree, the 3G sysfs interface should just be dropped as it's the only 
remaining sysfs stuff for this driver - it's not worth documenting as it's 
already exposed as an rfkill device, and we've already dropped all the 
remaining sysfs interfaces a long time ago without going through any of this.

Besides, anybody who used it (and I never could find any 3G users of Acer 
laptops on Linux) was never guaranteed it wouldn't break horribly anyway as we 
couldn't properly autodetect 3G in the past or knew much about it other than 
Acer's WMI API suggested it existed.

-Carlos

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-23  6:41             ` Carlos Corbacho
@ 2011-05-23  6:51               ` Corentin Chary
  2011-05-23  7:33               ` Joey Lee
  1 sibling, 0 replies; 16+ messages in thread
From: Corentin Chary @ 2011-05-23  6:51 UTC (permalink / raw)
  To: Carlos Corbacho; +Cc: Joey Lee, dtor, mjg, trenn, platform-driver-x86

On Mon, May 23, 2011 at 8:41 AM, Carlos Corbacho
<carlos@strangeworlds.co.uk> wrote:
> On Monday 23 May 2011 07:39:36 Joey Lee wrote:
>> > I'm not sure you can drop sysfs files like that, as it will break the
>> > ABI.
>>>
>> > Could you document acer-wmi in
>> > Documentation/ABI/testing/sysfs-platform-acer-wmi.txt ?
>> > This allows to check when a sysfs file was added, who use it, etc...
>
> I don't agree, the 3G sysfs interface should just be dropped as it's the only
> remaining sysfs stuff for this driver - it's not worth documenting as it's
> already exposed as an rfkill device, and we've already dropped all the
> remaining sysfs interfaces a long time ago without going through any of this.
>
> Besides, anybody who used it (and I never could find any 3G users of Acer
> laptops on Linux) was never guaranteed it wouldn't break horribly anyway as we
> couldn't properly autodetect 3G in the past or knew much about it other than
> Acer's WMI API suggested it existed.

I asked for documentation because I didn't check if there were other
sysfs files remaining, if it's the last, we don't really care.
I did a quick search, and you're right, this file doesn't seems to
have a lot of user, but it would still break the ABI without any
notice.
I would be more confortable with one or two cycle with this feature
marked as deprecated and scheduled for removal.

-- 
Corentin Chary
http://xf.iksaif.net

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-23  6:41             ` Carlos Corbacho
  2011-05-23  6:51               ` Corentin Chary
@ 2011-05-23  7:33               ` Joey Lee
  2011-05-23 18:54                 ` Carlos Corbacho
  1 sibling, 1 reply; 16+ messages in thread
From: Joey Lee @ 2011-05-23  7:33 UTC (permalink / raw)
  To: carlos; +Cc: corentin.chary, dtor, Joey Lee, mjg, trenn, platform-driver-x86

Hi Carlos, 

於 一,2011-05-23 於 07:41 +0100,Carlos Corbacho 提到:
> On Monday 23 May 2011 07:39:36 Joey Lee wrote:
> > > I'm not sure you can drop sysfs files like that, as it will break the
> > > ABI.
> >>
> > > Could you document acer-wmi in
> > > Documentation/ABI/testing/sysfs-platform-acer-wmi.txt ?
> > > This allows to check when a sysfs file was added, who use it, etc...
> 
> I don't agree, the 3G sysfs interface should just be dropped as it's the only 
> remaining sysfs stuff for this driver - it's not worth documenting as it's 
> already exposed as an rfkill device, and we've already dropped all the 
> remaining sysfs interfaces a long time ago without going through any of this.
> 

After removed threeg sysfs file, there still have the latest one sysfs
file the name is "interface". It provide a interface to know which WMI
interface was used currently.

Should we also direct drop it from acer-wmi or move to debugfs?


Thank's a lot!
Joey Lee

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-23  7:33               ` Joey Lee
@ 2011-05-23 18:54                 ` Carlos Corbacho
  2011-05-25  7:07                   ` Joey Lee
  0 siblings, 1 reply; 16+ messages in thread
From: Carlos Corbacho @ 2011-05-23 18:54 UTC (permalink / raw)
  To: Joey Lee; +Cc: corentin.chary, dtor, mjg, trenn, platform-driver-x86

On Monday 23 May 2011 08:33:10 Joey Lee wrote:
> After removed threeg sysfs file, there still have the latest one sysfs
> file the name is "interface". It provide a interface to know which WMI
> interface was used currently.
> 
> Should we also direct drop it from acer-wmi or move to debugfs?

I'd say drop it, the logs are more useful anyway and I doubt it's been updated 
to be useful with your recent work either.

-Carlos

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability
  2011-05-23 18:54                 ` Carlos Corbacho
@ 2011-05-25  7:07                   ` Joey Lee
  0 siblings, 0 replies; 16+ messages in thread
From: Joey Lee @ 2011-05-25  7:07 UTC (permalink / raw)
  To: carlos; +Cc: corentin.chary, dtor, Joey Lee, mjg, trenn, platform-driver-x86

Hi Carlos, 

於 一,2011-05-23 於 19:54 +0100,Carlos Corbacho 提到:
> On Monday 23 May 2011 08:33:10 Joey Lee wrote:
> > After removed threeg sysfs file, there still have the latest one sysfs
> > file the name is "interface". It provide a interface to know which WMI
> > interface was used currently.
> > 
> > Should we also direct drop it from acer-wmi or move to debugfs?
> 
> I'd say drop it, the logs are more useful anyway and I doubt it's been updated 
> to be useful with your recent work either.
> 
> -Carlos

You are right, just need add a log when acer-wmi probed but don't need
maintain a sysfs file.
I will send out patch to drop it and add log.


Thank's
Joey Lee

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-05-25  7:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-21 23:33 [PATCH 0/4] acer-wmi: two Bugs fixed and set device state by access new wmi method Lee, Chun-Yi
2011-05-21 23:33 ` [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state Lee, Chun-Yi
2011-05-21 23:33   ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Lee, Chun-Yi
2011-05-21 23:33     ` [PATCH 3/4] acer-wmi: allow 64-bits return buffer from WMI methods Lee, Chun-Yi
2011-05-21 23:33       ` [PATCH 4/4] acer-wmi: support to set communication device state by new wmid method Lee, Chun-Yi
2011-05-21 23:43     ` [PATCH 2/4] acer-wmi: check the existence of internal 3G device when set capability Carlos Corbacho
2011-05-22  0:02       ` Joey Lee
2011-05-23  6:25         ` Corentin Chary
2011-05-23  6:39           ` Joey Lee
2011-05-23  6:41             ` Carlos Corbacho
2011-05-23  6:51               ` Corentin Chary
2011-05-23  7:33               ` Joey Lee
2011-05-23 18:54                 ` Carlos Corbacho
2011-05-25  7:07                   ` Joey Lee
2011-05-21 23:38   ` [PATCH 1/4] acer-wmi: does not allow negative number set to initial device state Carlos Corbacho
2011-05-21 23:43     ` Joey Lee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.