Re: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-04-04 Thread Gwendal Grignou
Thank you. Gwendal. On Wed, Apr 3, 2013 at 4:49 PM, Jeff Garzik jgar...@pobox.com wrote: On 03/29/2013 01:56 AM, Gwendal Grignou wrote: commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed

Re: smartd broken in 3.9.0-rc4 : bisected

2013-03-28 Thread Gwendal Grignou
, 0x7fff04437340) = 0 Looks like I'll be bisecting. ken Bisection blames : commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 Author: Gwendal Grignou gwen...@google.com Date: Fri Jan 18 10:56:43 2013 -0800 [libata] Set proper SK when CK_COND is set. When the user application sends

[PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-28 Thread Gwendal Grignou
commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed accordingly. Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0 instead of EIO. Signed-off-by: Gwendal Grignou gwen...@google.com

Re: ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression

2013-03-29 Thread Gwendal Grignou
Ronald [and other], Sorry for the bug I introduced. I just send a mail with a patch [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check that addresses the problem. Gwendal. On Mon, Mar 25, 2013 at 10:26 AM, Ronald ronald...@gmail.com wrote: In reply to [1]: I have the same issue. Git

[PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Gwendal Grignou
commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed accordingly. Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0 instead of EIO. Signed-off-by: Gwendal Grignou gwen...@google.com

Re: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Gwendal Grignou
Yours work. On Fri, Mar 29, 2013 at 9:10 AM, Krzysztof Mazur krzys...@podlesie.net wrote: On Fri, Mar 29, 2013 at 08:26:41AM -0700, Gwendal Grignou wrote: commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl

[PATCH v2] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Gwendal Grignou
Signed-off-by: Gwendal Grignou gwen...@google.com --- drivers/ata/libata-scsi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 318b413..5eae74b 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata

[PATCH v2] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Gwendal Grignou
commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed accordingly. Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0 instead of EIO. Signed-off-by: Gwendal Grignou gwen...@google.com

[PATCH v3] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-30 Thread Gwendal Grignou
commit 84a9a8 Set proper SK when CK_COND is set changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed accordingly. Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0 instead of EIO. Signed-off-by: Gwendal Grignou gwen...@google.com

Re: [PATCH] sysfs: handle duplicate removal attempts in sysfs_remove_group()

2013-11-25 Thread Gwendal Grignou
Rafael, As you pointed out, ata_tport_delete() should be after scsi_remove_host(), consistent with ata_tport_add() currently before ata_scsi_add_host(). Thanks for fixing it, Gwendal. On Mon, Nov 25, 2013 at 2:41 AM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Monday, November 25, 2013

[PATCH 3/4] Limit max_discard_sectors to UINT_MAX9

2014-03-25 Thread Gwendal Grignou
max_discard_sectors can not be larger than UINT_MAX9, otherwise, there is a risk that discard requests would be merged into a request larger than 4GB. Ensure that max_discard_sectors is in unit of sectors. Signed-off-by: Gwendal Grignou gwen...@chromium.org --- drivers/mmc/core/core.c | 6

[PATCH 1/4] Limit max_discard_sectors to UINT_MAX9

2014-03-25 Thread Gwendal Grignou
max_discard_sectors can not be larger than UINT_MAX9, otherwise, there is a risk that discard requests would be merged into a request larger than 4GB. Signed-off-by: Gwendal Grignou gwen...@chromium.org --- drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/4] Limit max_discard_sectors to UINT_MAX9

2014-03-25 Thread Gwendal Grignou
max_discard_sectors can not be larger than UINT_MAX9, otherwise, there is a risk that discard requests would be merged into a request larger than 4GB. Signed-off-by: Gwendal Grignou gwen...@chromium.org --- block/blk-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block

[PATCH 4/4] Limit max_discard_sectors to UINT_MAX9

2014-03-25 Thread Gwendal Grignou
max_discard_sectors can not be larger than UINT_MAX9, otherwise, there is a risk that discard requests would be merged into a request larger than 4GB. Signed-off-by: Gwendal Grignou gwen...@chromium.org --- drivers/mtd/mtd_blkdevs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 0/4] Set max_discard_sectors maximal value to UINT_MAX9

2014-03-25 Thread Gwendal Grignou
sectors. Gwendal Grignou (4): Limit max_discard_sectors to UINT_MAX9 Limit max_discard_sectors to UINT_MAX9 Limit max_discard_sectors to UINT_MAX9 Limit max_discard_sectors to UINT_MAX9 block/blk-lib.c | 2 +- drivers/block/nbd.c | 2 +- drivers/mmc/core/core.c | 6

Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Gwendal Grignou
On Tue, Mar 3, 2015 at 5:47 PM, Al Viro v...@zeniv.linux.org.uk wrote: On Tue, Mar 03, 2015 at 05:37:31PM -0800, Gwendal Grignou wrote: At least, to base the device format on whether we are running on a 32 bit or 64 bit architecture does not make sense. Yes, it does. Note that on 32bit ones

Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Gwendal Grignou
At least, to base the device format on whether we are running on a 32 bit or 64 bit architecture does not make sense. If a tool calling stat(2) can not handle 12 bit major/20 bits minor, it would already break or about to break when running on a 64 bit machine. Regarding SCSI, the 17th disk will

Re: [PATCH v5 4/7] platform/chrome: Add Chrome OS EC userspace device interface

2015-02-25 Thread Gwendal Grignou
This patch adds a device interface to access the Chrome OS Embedded Controller from user-space. Signed-off-by: Bill Richardson wfric...@chromium.org Reviewed-by: Simon Glass s...@google.com Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk Reviewed-by: Gwendal Grignou gwen

Re: [PATCH v5 0/7] platform/chrome: Add user-space dev inferface support

2015-02-26 Thread Gwendal Grignou
Tested-by: Gwendal Grignou gwen...@chromium.org Reviewed-by: Gwendal Grignou gwen...@chromium.org Tested on a chromebook pixel with kernel 4.0.0-rc1 and ectool using the enclosed patch in chromiumos platform/ec tree. I checked the lightbar is working, check the calls with strace ectool ..., check

Re: [PATCH RESEND v2 4/7] platform/chrome: Add Chrome OS EC userspace device interface

2015-01-13 Thread Gwendal Grignou
Reviewed-by: Simon Glass s...@google.com Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk Reviewed-by: Gwendal Grignou gwen...@chromium.org --- Changes since v1: - The cros_ec_dev driver does not belong to drivers/mfd (Lee Jones) - Don't call class_create in the probe

Re: [RESEND PATCH 1/8] mfd: cros ec: Remove parent field

2015-04-23 Thread Gwendal Grignou
Be consistent, use cros_ec instead of cros ec or cros-ec. Otherwise: Reviewed-by: Gwendal Grignou gwen...@chromium.org Tested-by: Gwendal Grignou gwen...@chromium.org On Mon, Apr 6, 2015 at 9:14 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: From: Gwendal Grignou gwen

Re: [RESEND PATCH 5/8] mfd: cros-ec: Support multiple EC in a system

2015-04-23 Thread Gwendal Grignou
This patch needs https://chromium-review.googlesource.com/217297: /dev/cros_ec0 was not a good idea, because it is difficult to know what it represents. On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: From: Gwendal Grignou gwen...@chromium.org

Re: [RESEND PATCH 8/8] mfd: cros_ec: add bus-specific proto v3 code

2015-04-25 Thread Gwendal Grignou
Reviewed-by: Gwendal Grignou gwen...@chromium.org Tested-by: Gwendal Grignou gwen...@chromium.org On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: From: Stephen Barber smbar...@chromium.org Add proto v3 support to the SPI, I2C, and LPC. Signed

Re: [RESEND PATCH 7/8] mfd: cros_ec: add proto v3 skeleton

2015-04-25 Thread Gwendal Grignou
You can merge change https://chromium-review.googlesource.com/#/c/262870/ with it, that fixes an issue with newer firmware. Reviewed-by: Gwendal Grignou gwen...@chromium.org Tested-by: Gwendal Grignou gwen...@chromium.org On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas javier.marti

Re: [RESEND PATCH 6/8] mfd: cros_ec: rev cros_ec_commands.h

2015-04-25 Thread Gwendal Grignou
Reviewed-by: Gwendal Grignou gwen...@chromium.org Tested-by: Gwendal Grignou gwen...@chromium.org On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: From: Stephen Barber smbar...@chromium.org Update cros_ec_commands.h to the latest version in the EC

Re: [RESEND PATCH 3/8] mfd: cros_ec: Instantiate sub-devices from device tree

2015-04-25 Thread Gwendal Grignou
Reviewed-by: Gwendal Grignou gwen...@chromium.org Tested-by: Gwendal Grignou gwen...@chromium.org On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: From: Todd Broch tbr...@chromium.org If the EC device tree node has sub-nodes, try to instantiate

Re: [RESEND PATCH 2/8] platform/chrome: cros_ec_lpc - Use existing function to check EC result

2015-04-25 Thread Gwendal Grignou
Reviewed-by: Gwendal Grignou gwen...@chromium.org Tested-by: Gwendal Grignou gwen...@chromium.org On Mon, Apr 6, 2015 at 9:15 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: Commit 6db07b633658 (mfd: cros_ec: Check result code from EC messages) added a common

Re: [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data

2015-04-24 Thread Gwendal Grignou
for some big commands, use a zero-length array that is both 64-bit safe and flexible. The same buffer is used for both output and input data so the maximum of these values should be used to allocate it. Suggested-by: Gwendal Grignou gwen...@chromium.org Signed-off-by: Javier Martinez Canillas

Re: [RESEND PATCH 4/8] mfd: cros_ec: Use a zero-length array for command data

2015-04-23 Thread Gwendal Grignou
. The same buffer is used for both output and input data so the maximum of these values should be used to allocate it. Suggested-by: Gwendal Grignou gwen...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- drivers/i2c/busses/i2c-cros-ec-tunnel.c| 44

Re: [PATCH v2 04/10] mfd: cros_ec: Use a zero-length array for command data

2015-05-11 Thread Gwendal Grignou
for some big commands, use a zero-length array that is both 64-bit safe and flexible. The same buffer is used for both output and input data so the maximum of these values should be used to allocate it. Suggested-by: Gwendal Grignou gwen...@chromium.org Signed-off-by: Javier Martinez Canillas

Re: [PATCH] mfd: cros_ec: Fix possible leak in led_rgb_store()

2015-07-20 Thread Gwendal Grignou
On Sun, Jul 19, 2015 at 12:43 PM, Christian Engelmayer cenge...@gmx.at wrote: Function led_rgb_store() contains some direct returns in error cases that leak the already allocated cros_ec_command message structure. Make sure that 'msg' is freed in all exit paths. Detected by Coverity CID

Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands

2015-09-16 Thread Gwendal Grignou
On Mon, Sep 14, 2015 at 8:00 AM, Jon Hunter wrote: > From: Seshagiri Holi > > Certain eMMC devices allow vendor specific device information to be read > via a sequence of vendor commands. These vendor commands must be issued > in sequence and an atomic

Re: RFC: 32-bit __data_len and REQ_DISCARD+REQ_SECURE

2015-09-29 Thread Gwendal Grignou
The issue is mmc_init_erase() needs to be updated: On modern eMMC, we set pref_erase to >ext_csd.hc_erase_size. hc_erase_size, aka High Capacity Erase Group Size, is the minimum amount of data that can be erased on that device, not the optimal amount. It is used to be sure a partition ends on

Re: [PATCH v3] mfd: cros ec: Lock the SPI bus while holding chipselect

2015-11-25 Thread Gwendal Grignou
Reviewed-by: Gwendal Grignou <gwen...@chromium.org> On Wed, Nov 25, 2015 at 12:12 AM, Lee Jones <lee.jo...@linaro.org> wrote: > On Wed, 25 Nov 2015, Nicolas Boichat wrote: > >> cros_ec_cmd_xfer_spi and cros_ec_pkt_xfer_spi generally work like >> this: >>

[PATCH v3] CHROMIUM: mmc: Set pref erase size based on size.

2016-06-03 Thread Gwendal Grignou
size. Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- v2: fix comments v3: rereading the patch, we should not compare to hc_erase_size again, it has already been set properly in the caller function. drivers/mmc/core/core.c | 14 +++--- 1 file changed, 7 insertions

[PATCH v2] mmc: Set pref erase size based on size.

2016-06-02 Thread Gwendal Grignou
If available, eMMC stack uses HC_ERASE_GRP_SIZE as preferred erase size. However, that size is the minimal size we must use, not the optimal size. Calculate the optimal size based on whole device size and fall back to HC_ERASE_GRP_SIZE if too small. Signed-off-by: Gwendal Grignou <g

[PATCH] mmc: Set pref erase size based on size.

2016-06-02 Thread Gwendal Grignou
If available, eMMC stack uses HC_ERASE_GRP_SIZE as preferred erase size. However, that size is the minimal size we must use, not the optimal size. Calculate the optimal size based on whole device size and fall back to HC_ERASE_GRP_SIZE if too small. Signed-off-by: Gwendal Grignou <g

Re: [PATCH 4/4] pwm: add ChromeOS EC PWM driver

2016-05-28 Thread Gwendal Grignou
On Fri, May 27, 2016 at 6:39 PM, Brian Norris wrote: > Use the new ChromeOS EC EC_CMD_PWM_{GET,SET}_DUTY commands to control > one or more PWMs attached to the Embedded Controller. Because the EC > allows us to modify the duty cycle (as a percentage, where U16_MAX is >

Re: [PATCH 3/4] doc: dt: pwm: add binding for ChromeOS EC PWM

2016-05-28 Thread Gwendal Grignou
Instead of using device tree, assuming you have firmware control, another way could be to add a firmware feature: for instance, there is one EC_FEATURE_PWM_FAN, the fan PWM, one for the keyboard lightning as well. (see num ec_feature_code) By adding one more, you let cros_ec_dev load the platform

Re: [PATCH v1 2/6] mfd: cros_ec: Add MKBP event support

2016-02-10 Thread Gwendal Grignou
[Resend[We should not used kmalloc when get events, these functions are called quite often. Gwendal. On Fri, Feb 5, 2016 at 5:32 AM, Tomeu Vizoso wrote: > From: Vic Yang > > Newer revisions of the ChromeOS EC add more events besides the

Re: [PATCH v1 2/6] mfd: cros_ec: Add MKBP event support

2016-02-11 Thread Gwendal Grignou
On Thu, Feb 11, 2016 at 6:52 AM, Tomeu Vizoso <tomeu.viz...@collabora.com> wrote: > > On 02/05/2016 06:24 PM, Gwendal Grignou wrote: > > We should not used kmalloc when get events, these functions are called > > quite often. > > Gwendal. > > > > On

Re: [PATCH] keyrings: Allow searching the user session keyring

2016-03-19 Thread Gwendal Grignou
Resent to a larger audience. On Thu, Mar 10, 2016 at 2:20 PM, Gwendal Grignou <gwen...@chromium.org> wrote: > Currently, if a session keyring exists, we are not searching in the > user session or user keyrings. > > This is a problem when a session keyring exists and we want to u

Re: [PATCH v2] platform/chrome: cros_ec_dev - Fix security issue

2016-03-08 Thread Gwendal Grignou
On Sun, Mar 6, 2016 at 12:11 PM, Olof Johansson wrote: > Hi, > ... > > How about you introduce a reasonable max size for a transaction instead > (256K?), and compare data_size with that? Might want to check with the EC > folks > what they expect larges transactions to be from

[PATCH v3] platform/chrome: cros_ec_dev - Fix security issue

2016-03-08 Thread Gwendal Grignou
limit allows argument checking of the ioctl. With the current EC, it is expected .insize and .outsize to be at around 512 bytes or less. Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- drivers/platform/chrome/cros_ec_dev.c | 4 drivers/platform/chrome/cros_ec_proto

[PATCH] platform/chrome: cros_ec_dev - Fix security issue

2016-03-02 Thread Gwendal Grignou
Add a check to prevent memory scribbe when sending an ioctl with .insize set so large that memory allocation argument overflows. Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- drivers/platform/chrome/cros_ec_dev.c | 12 +++- 1 file changed, 11 insertions(+), 1 de

[PATCH v2] platform/chrome: cros_ec_dev - Fix security issue

2016-03-03 Thread Gwendal Grignou
Add a check to prevent memory scribble when sending an ioctl with .insize set so large that memory allocation argument overflows. Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- drivers/platform/chrome/cros_ec_dev.c | 12 +++- 1 file changed, 11 insertions(+), 1 de

Re: [RFC 0/6] mmc: Field Firmware Update

2016-04-01 Thread Gwendal Grignou
On Thu, Jan 14, 2016 at 5:16 AM, Ulf Hansson wrote: > On 28 December 2015 at 15:12, Alex Lemberg wrote: >> Hi Ulf, >> >> We succeeded to run FFU via new mmc multi-command ioctl without any code >> modification, >> but only by using Single Sector

Re: [PATCH] block: partitions: efi: Always check for alternative GPT at end of drive

2016-04-26 Thread Gwendal Grignou
On Tue, Apr 26, 2016 at 2:15 PM, Davidlohr Bueso wrote: > On Tue, 26 Apr 2016, Elliott, Robert (Persistent Memory) wrote: > > > I have nothing against the agpt, just pass a boot param and voila, > you can use it. This is not some sort of recent regression we are > talking

Re: [PATCH] loop: properly observe rotational flag of underlying device

2016-05-12 Thread gwendal grignou
> >>> Signed-off-by: Holger Hoffstätte googlemail.com> > > Jens, > > I haven't seen this merged in any trees yet and was wondering if there's > any chance to get this into 4.5? If there's something left to fix up please > let me know. > > Thanks, > H

Re: [PATCH] keyrings: Allow searching the user session keyring

2016-05-03 Thread Gwendal Grignou
Any feedback on this? It is mandatory if we want to mount a ecryptfs directory while the session keyring is used. Thanks, Gwendal. On Thu, Mar 17, 2016 at 10:04 AM, Gwendal Grignou <gwen...@chromium.org> wrote: > Resent to a larger audience. > > On Thu, Mar 10, 2016 at 2:20 PM,

Re: [RFC 0/6] mmc: Field Firmware Update

2016-04-13 Thread Gwendal Grignou
On Mon, Apr 4, 2016 at 4:50 AM, Ulf Hansson <ulf.hans...@linaro.org> wrote: > > On 2 April 2016 at 02:23, Gwendal Grignou <gwen...@chromium.org> wrote: > > On Thu, Jan 14, 2016 at 5:16 AM, Ulf Hansson <ulf.hans...@linaro.org> wrote: > >> On 28 December

Re: [PATCH 08/10] iio: cros_ec_sensors_ring: add ChromeOS EC Sensors Ring

2016-07-26 Thread Gwendal Grignou
On Mon, Jul 18, 2016 at 9:27 AM, Jonathan Cameron wrote: > On 18/07/16 08:02, Enric Balletbo i Serra wrote: >> Add support for handling sensor events FIFO produced by the sensor >> hub. A single device with a buffer will collect all samples produced >> by the sensors managed by

Re: [PATCH] keyrings: Allow searching the user session keyring

2016-08-08 Thread Gwendal Grignou
On Tue, Jun 14, 2016 at 2:46 AM, David Howells <dhowe...@redhat.com> wrote: > Gwendal Grignou <gwen...@chromium.org> wrote: > >> Currently, if a session keyring exists, we are not searching in the >> user session or user keyrings. > > That is correct. N

[PATCH] platform: chrome: Add Tablet Switch ACPI driver

2017-01-23 Thread Gwendal Grignou
... Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- drivers/platform/chrome/Kconfig | 46 - drivers/platform/chrome/Makefile| 1 + drivers/platform/chrome/chromeos_tbmc.c | 117 3 files changed, 146 insertions(

[PATCH v2] platform: chrome: Add Tablet Switch ACPI driver

2017-01-30 Thread Gwendal Grignou
... Check state is updated at resume time when different from suspend time. Change-Id: Ie51d426de68770fad8eeb83aaab9abe8d69e84a2 Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- drivers/platform/chrome/Kconfig | 10 +++ drivers/platform/chrome/Makefile| 1 + d

[PATCH v3] platform: chrome: Add Tablet Switch ACPI driver

2017-01-30 Thread Gwendal Grignou
... Check state is updated at resume time when different from suspend time. Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- Changes since v2: Rebase on top of linux/master, remove Change-Id Changes since v1: Leave tab/space changes in Kconfig to another CL Add resume entry

Re: [PATCHv2 2/2] iio: cros_ec_light_prox: add ChromeOS EC Light and Proximity Sensors

2017-01-23 Thread Gwendal Grignou
/01/17 15:51, Enric Balletbo i Serra wrote: >>> From: Gwendal Grignou <gwen...@chromium.org> >>> >>> Handle Light and Proximity sensors presented by the ChromeOS EC Sensor hub. >>> Creates an IIO device for each functions. >>> >>

Re: [PATCH] iio: light: acpi-als: Add IO_CHAN_INFO_OFFSET/SCALE to mask.

2016-10-21 Thread Gwendal Grignou
On Fri, Oct 21, 2016 at 1:17 AM, Enric Balletbo i Serra wrote: > According the ACPI specification (Version 5.0 Errata A) [1], the data > coming from the sensor represent the ambient light illuminance reading > expressed in lux. Unfortunately ACPI interface doesn't

Re: [PATCH v3 1/4] mfd: cros_ec: Get rid of cros_ec_check_features from cros_ec_dev.

2017-07-13 Thread Gwendal Grignou
On Wed, Jul 12, 2017 at 3:13 AM, Enric Balletbo i Serra wrote: > The cros_ec_dev driver should be used only to expose the Chrome OS Embedded > Controller to user-space and should not be used to add MFD devices by > calling mfd_add_devices. This patch moves this logic

Re: [PATCH 2/3] iio: core: Add double tap as possible gesture

2017-06-07 Thread Gwendal Grignou
translation in a input > bridge using that... > > Certainly bridging buffered data in userspace didn't turn out as neatly > as the in kernel version. > >> >>> Signed-off-by: Gwendal Grignou <gwen...@chromium.org> >>> Signed-off-by: Thierry Escande <

Re: [PATCH v5 1/3] platform/chrome: cros_ec_lpc: Register the driver if ACPI entry is missing.

2017-12-01 Thread Gwendal Grignou
Checked against 7412f0a0d90ee6ddbad4cde794f88f1489422f3a (CHROMIUM: platform/chrome: Support MKBP protocol over ACPI) Reviewed-by: Gwendal Grignou <gwen...@chromium.org> On Fri, Dec 1, 2017 at 5:42 AM, Thierry Escande <thierry.esca...@collabora.com> wrote: > From: Enric B

Re: [PATCH v5 2/3] platform/chrome: cros_ec_lpc: Add support for Google Glimmer

2017-12-01 Thread Gwendal Grignou
This is not required. Looking with dmidecode, Glimmer reports: ... BIOS Information Vendor: coreboot Version: Google_Glimmer.5216.198.19 ... Therefore, the first entry of cros_ec_lpc_dmi_table will match. Gwendal. On Fri, Dec 1, 2017 at 5:42 AM, Thierry Escande

Re: [PATCH v5 3/3] platform/chrome: Register cros_ec_accel_legacy driver

2017-12-01 Thread Gwendal Grignou
Checked against 3bf98755f9c670c5c10ca05cba22848d65117cb2 (CHROMIUM: iio: accel: Add cros_ec_accel_legacy driver) Fixup f2b141a242e59017dbc774dc916748670a41da0b (FIXUP: CHROMIUM: iio: accel: Add cros_ec_accel_legacy driver) is required for devices with secondary Embedded Controllers. Gwendal. On

Re: [PATCH v2 2/2] cros_ec: Move cros_ec_dev module to drivers/mfd

2017-12-01 Thread Gwendal Grignou
Reviewed-by: Gwendal Grignou <gwen...@chromium.org> On Thu, Nov 30, 2017 at 12:50 PM, Guenter Roeck <gro...@google.com> wrote: > On Mon, Nov 20, 2017 at 8:15 AM, Thierry Escande > <thierry.esca...@collabora.com> wrote: >> The cros_ec_dev module is responsible f

Re: [PATCH v2 1/2] cros_ec: Split cros_ec_devs module

2017-12-01 Thread Gwendal Grignou
Reviewed-by: Gwendal Grignou <gwen...@chromium.org> On Thu, Nov 30, 2017 at 12:49 PM, Guenter Roeck <gro...@google.com> wrote: > On Mon, Nov 20, 2017 at 8:15 AM, Thierry Escande > <thierry.esca...@collabora.com> wrote: >> This patch splits the cr

Re: [PATCH v5 2/3] platform/chrome: cros_ec_lpc: Add support for Google Glimmer

2017-12-06 Thread Gwendal Grignou
On Tue, Dec 5, 2017 at 1:55 PM, Thierry Escande <thierry.esca...@collabora.com> wrote: > Hi Gwendal, > > On 01/12/2017 20:54, Gwendal Grignou wrote: >> >> This is not required. >> Looking with dmidecode, Glimmer reports: >> ... >> BIOS Information >

[PATCH] cros_ec: Use devm_kzalloc for private data

2018-05-09 Thread Gwendal Grignou
Use dev_kzmalloc, remove .release entry point. Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- drivers/mfd/cros_ec_dev.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c index eafd06f62a3a..45d425

[PATCH] platform/chrome: Use to_cros_ec_dev more broadly

2018-05-09 Thread Gwendal Grignou
Move to_cros_ec_dev macro to cros_ec.h and use it when the private ec object is needed from device object. Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- drivers/mfd/cros_ec_dev.c | 4 ++-- drivers/platform/chrome/cros_ec_lightbar.

Re: [PATCH] mfd: cros_ec: remove unused __remove function

2018-06-12 Thread Gwendal Grignou
On Sun, Jun 10, 2018 at 11:08 PM Lee Jones wrote: > > On Fri, 08 Jun 2018, Benson Leung wrote: > > > > > On Fri, Jun 08, 2018 at 04:48:06PM +0200, Arnd Bergmann wrote: > > > This function is no longer called, so we get a harmless > > > warning until it is removed as well: > > > > > >

[PATCH] FIXUP checkpatch: improve patch recognition

2018-05-30 Thread Gwendal Grignou
Fix syntax error in patch. Signed-off-by: Gwendal Grignou --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f1fecd8aa4d7..03dd7b6b0eab 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl

[PATCH v2] platform/chrome: Use to_cros_ec_dev more broadly

2018-05-30 Thread Gwendal Grignou
Move to_cros_ec_dev macro to cros_ec.h and use it when the private ec object is needed from device object. Signed-off-by: Gwendal Grignou --- Change since v1: Remove changes in cros_ec_dev.c to avoid inter-dependencies. drivers/platform/chrome/cros_ec_lightbar.c | 21

[PATCH v2] cros_ec: Use devm_kzalloc for private data

2018-05-30 Thread Gwendal Grignou
Use dev_kzmalloc, remove .release entry point. Signed-off-by: Gwendal Grignou --- Change sinc v1: - Readd __remove to avoid a warning when loaded as a module. drivers/mfd/cros_ec_dev.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/mfd/cros_ec_dev.c b

Re: [PATCH] Cleanup dependency chain for cros_ec modules

2018-06-04 Thread Gwendal Grignou
On Mon, Jun 4, 2018 at 1:22 PM Enrico Granata wrote: > > From: Enrico Granata > > If one builds the Chrome EC support as modules, there is no explicit > dependency chain amongst the several modules (LPC, CHARDEV, CORE, ...) > > This makes it possible - for instance - to rmmod cros_ec_core, even

Re: [PATCH v5 3/3] platform/chrome: Register cros_ec_accel_legacy driver

2018-01-18 Thread Gwendal Grignou
On Thu, Dec 7, 2017 at 1:31 AM, Lee Jones <lee.jo...@linaro.org> wrote: > On Fri, 01 Dec 2017, Gwendal Grignou wrote: > >> Checked against 3bf98755f9c670c5c10ca05cba22848d65117cb2 (CHROMIUM: >> iio: accel: Add cros_ec_accel_legacy driver) >> >> Fixup f2b141a242e

Re: [PATCH v6 3/3] platform/chrome: Register cros_ec_accel_legacy driver

2018-01-29 Thread Gwendal Grignou
c_sensors_register(). > This legacy device is present on Chromebook devices with older EC > firmware only supporting deprecated EC commands (Glimmer based devices). > > Signed-off-by: Thierry Escande <thierry.esca...@collabora.com> Tested-by: Gwendal Grignou <gwen...@chromium.org>

Re: [PATCH 3/6] mfd: cros_ec_dev: Register cros-ec-rtc driver as a subdevice.

2018-02-21 Thread Gwendal Grignou
llabora.com> Reviewed-by: Gwendal Grignou <gwen...@chromium.org> > --- > drivers/mfd/cros_ec_dev.c | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c > index e4fafdd96e5e..e0c604ab380f 100644 &

Re: [PATCH 5/6] mfd: cros_ec_dev: Check communication with ec at resume

2018-02-21 Thread Gwendal Grignou
On Mon, Feb 19, 2018 at 2:41 PM, Enric Balletbo i Serra <enric.balle...@collabora.com> wrote: > From: Gwendal Grignou <gwen...@chromium.org> This patch is not needed anymore. It was added to > > Send dummy command to EC at resume time, wait for status. > If EC loses

Re: [PATCH v2 1/6] platform/chrome: cros_ec_sysfs: Modify error handling

2018-02-21 Thread Gwendal Grignou
On Wed, Feb 21, 2018 at 9:07 AM, Enric Balletbo i Serra <enric.balle...@collabora.com> wrote: > From: Gwendal Grignou <gwen...@chromium.org> > > When accessing a sysfs attribute, if the EC command fails, -EPROTO is > now returned instead of an error message as it is unli

Re: [PATCH 4/6] mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdevice.

2018-02-21 Thread Gwendal Grignou
ensors_register(). > This legacy device is present on Chromebook devices with older EC > firmware only supporting deprecated EC commands (Glimmer based devices). > > Tested-by: Gwendal Grignou <gwen...@chromium.org> > Signed-off-by: Enric Balletbo i Serra <enric.balle...@coll

Re: [PATCH 1/6] mfd: cros_ec: fail early if we cannot identify the EC

2018-02-21 Thread Gwendal Grignou
: Enric Balletbo i Serra <enric.balle...@collabora.com> Reviewed-by: Gwendal Grignou <gwen...@chromium.org> > --- > drivers/mfd/cros_ec.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c > index

Re: [PATCH 6/6] mfd: cros_ec_i2c: add ACPI module device table

2018-02-21 Thread Gwendal Grignou
d-off-by: Wei-Ning Huang <wnhu...@google.com> > Acked-by: Benson Leung <ble...@chromium.org> > Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com> Reviewed-by: Gwendal Grignou <gwen...@chromium.org> > --- > drivers/mfd/cros_ec_i2c.c | 12 +++

Re: [PATCH 5/6] mfd: cros_ec_dev: Check communication with ec at resume

2018-02-23 Thread Gwendal Grignou
On Thu, Feb 22, 2018 at 1:41 AM, Enric Balletbo i Serra <enric.balle...@collabora.com> wrote: > Hi Gwendal, > > On 22/02/18 03:20, Gwendal Grignou wrote: >> On Mon, Feb 19, 2018 at 2:41 PM, Enric Balletbo i Serra >> <enric.balle...@collabora.com> wrote

Re: [PATCH] configfs: initialize inode with owner

2018-03-07 Thread Gwendal Grignou
This patch is not correct: When listed with ls, configfs attributes have the uid/gid of the user who list them, but looks wrong. I will test it more and repost. Gwendal. On Tue, Mar 6, 2018 at 7:36 PM, Gwendal Grignou <gwen...@chromium.org> wrote: > From: Sarthak Kukreti <

[PATCH] configfs: initialize inode with owner

2018-03-06 Thread Gwendal Grignou
From: Sarthak Kukreti <sarthakkukr...@chromium.org> Use standard helper to set inode owner when created from user space. This is a noop when the owner is root. Signed-off-by: Sarthak Kukreti <sarthakkukr...@chromium.org> Signed-off-by: Gwendal Grignou <gwen...@chromium.org>

[PATCH] configfs: inherit file and directory owners

2018-04-13 Thread Gwendal Grignou
the ability to create any groups inside of that group. Signed-off-by: Daniel Rosenberg <dro...@google.com> Signed-off-by: Gwendal Grignou <gwen...@chromium.org> --- fs/configfs/inode.c | 38 +++--- 1 file changed, 31 insertions(+), 7 deletions(-) dif

Re: [PATCH v4 0/6] platform/chrome: cros_ec debugfs and sysfs updates

2018-03-26 Thread Gwendal Grignou
i Serra (3): >platform/chrome: cros_ec_sysfs: introduce to_cros_ec_dev define. >platform/chrome: cros_ec_sysfs: use permission-specific DEVICE_ATTR > variants >platform/chrome: cros_ec_debugfs: Use octal permissions '0444' > Gwendal Grignou (2): >platform/chrom

Re: [PATCH v3 6/6] platform/chrome: mfd/cros_ec_dev: Add sysfs entry to set keyboard wake lid angle

2018-03-20 Thread Gwendal Grignou
On Tue, Mar 20, 2018 at 8:51 AM, Enric Balletbo i Serra <enric.balle...@collabora.com> wrote: > From: Gwendal Grignou <gwen...@chromium.org> > > This adds a sysfs attribute (/sys/class/chromeos/cros_ec/kb_wake_angle) > used to set and get the keyboard wake lid angle. Thi

Re: [PATCH v2 6/6] platform/chrome: mfd/cros_ec_dev: Add sysfs entry to set keyboard wake lid angle

2018-03-16 Thread Gwendal Grignou
On Wed, Mar 7, 2018 at 8:28 AM Lee Jones <lee.jo...@linaro.org> wrote: > On Wed, 21 Feb 2018, Enric Balletbo i Serra wrote: > > From: Gwendal Grignou <gwen...@chromium.org> > > > > This adds a sysfs attribute (/sys/class/chromeos/cros_ec/kb_wake_angle) > >

Re: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-04-04 Thread Gwendal Grignou
Thank you. Gwendal. On Wed, Apr 3, 2013 at 4:49 PM, Jeff Garzik wrote: > On 03/29/2013 01:56 AM, Gwendal Grignou wrote: >> >> commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key >> used for returning task registers, but HDIO_DRIVE_CMD ioctl was >&

Re: [PATCH] sysfs: handle duplicate removal attempts in sysfs_remove_group()

2013-11-25 Thread Gwendal Grignou
Rafael, As you pointed out, ata_tport_delete() should be after scsi_remove_host(), consistent with ata_tport_add() currently before ata_scsi_add_host(). Thanks for fixing it, Gwendal. On Mon, Nov 25, 2013 at 2:41 AM, Rafael J. Wysocki wrote: > > On Monday, November 25, 2013 12:11:54 PM Mika

Re: smartd broken in 3.9.0-rc4 : bisected

2013-03-28 Thread Gwendal Grignou
ing. >> >> Using strace, in the failing version I get >> 2643 ioctl(3, HDIO_DRIVE_CMD, 0x7fff53288a60) = -1 EIO (Input/output error) >> >> instead of the normal >> 3981 ioctl(3, HDIO_DRIVE_CMD, 0x7fff04437340) = 0 >> 3981 ioctl(3, HDIO_DRIVE_TASK, 0x7f

[PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-28 Thread Gwendal Grignou
commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed accordingly. Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0 instead of EIO. Signed-off-by: Gwendal Grignou --- drivers/ata

Re: ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression

2013-03-29 Thread Gwendal Grignou
Ronald [and other], Sorry for the bug I introduced. I just send a mail with a patch "[PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check" that addresses the problem. Gwendal. On Mon, Mar 25, 2013 at 10:26 AM, Ronald wrote: > In reply to [1]: I have the same issue. Git bisect took 50+

[PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Gwendal Grignou
commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed accordingly. Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0 instead of EIO. Signed-off-by: Gwendal Grignou --- drivers/ata

Re: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Gwendal Grignou
Yours work. On Fri, Mar 29, 2013 at 9:10 AM, Krzysztof Mazur wrote: > On Fri, Mar 29, 2013 at 08:26:41AM -0700, Gwendal Grignou wrote: >> commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key >> used for returning task registers, but HDIO_DRIVE_CMD ioctl was

[PATCH v2] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Gwendal Grignou
Signed-off-by: Gwendal Grignou --- drivers/ata/libata-scsi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 318b413..5eae74b 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -532,8

[PATCH v2] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-29 Thread Gwendal Grignou
commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed accordingly. Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0 instead of EIO. Signed-off-by: Gwendal Grignou --- drivers/ata

[PATCH v3] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-03-30 Thread Gwendal Grignou
commit 84a9a8 "Set proper SK when CK_COND is set" changed the sense key used for returning task registers, but HDIO_DRIVE_CMD ioctl was not changed accordingly. Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0 instead of EIO. Signed-off-by: Gwendal Grignou --- d

[PATCH 3/4] Limit max_discard_sectors to UINT_MAX>>9

2014-03-25 Thread Gwendal Grignou
max_discard_sectors can not be larger than UINT_MAX>>9, otherwise, there is a risk that discard requests would be merged into a request larger than 4GB. Ensure that max_discard_sectors is in unit of sectors. Signed-off-by: Gwendal Grignou --- drivers/mmc/core/core.c | 6 -- 1 file c

[PATCH 1/4] Limit max_discard_sectors to UINT_MAX>>9

2014-03-25 Thread Gwendal Grignou
max_discard_sectors can not be larger than UINT_MAX>>9, otherwise, there is a risk that discard requests would be merged into a request larger than 4GB. Signed-off-by: Gwendal Grignou --- drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block

  1   2   3   4   5   >