[char-misc-next 00/11 V4] Add Client MEI bus and NFC device

2013-03-20 Thread Tomas Winkler
This is take 4 on the MEI bus + NFC device patches This patch set adds implementation of MEI CLIENT BUS abstraction over MEI device, this allows standard Linux device drivers to access functionality exposed by MEI device clients that was previously available only to the user space through /dev/mei

[char-misc-next 01/11 V4] mei: bus: Initial MEI Client bus type implementation

2013-03-20 Thread Tomas Winkler
Signed-off-by: Tomas Winkler --- Documentation/misc-devices/mei/mei-client-bus.txt | 143 drivers/misc/mei/Makefile | 1 + drivers/misc/mei/bus.c| 151 ++ drivers/misc/mei/mei_dev.h

[char-misc-next 06/11 V4] mei: bus: Synchronous API for the data transmission

2013-03-20 Thread Tomas Winkler
Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 39 +-- drivers/misc/mei/mei_dev.h | 1 + 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index d55f6d8..d542950 100644 --- a

[char-misc-next 11/11 V4] mei: nfc: Implement MEI bus IO ops

2013-03-20 Thread Tomas Winkler
From: Samuel Ortiz The send ops for NFC builds the command header, updates the request id and then waits for an ACK. The recv ops check if it receives data or an ACK and in the latter case wakes the send ops up. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei

[char-misc-next 04/11 V4] mei: bus: Add bus related structures to mei_cl

2013-03-20 Thread Tomas Winkler
From: Samuel Ortiz We keep track of all MEI devices on the bus through a specific linked list. We also have a mei_device instance in the mei_cl structure. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 48

[char-misc-next 05/11 V4] mei: bus: Call bus routines from the core code

2013-03-20 Thread Tomas Winkler
From: Samuel Ortiz Register the MEI bus type against the kernel core bus APIs and call the bus Rx handler from interrupt.c Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 22 ++ drivers/misc/mei/interrupt.c | 2 ++ drivers/misc

[char-misc-next 10/11 V4] mei: nfc: Add NFC device to the MEI bus

2013-03-20 Thread Tomas Winkler
From: Samuel Ortiz After building its bus name as a string based on its vendor id and radio type, we can add it to the bus. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/nfc.c | 55 ++ drivers/misc/mei/nfc.h | 6

[char-misc-next 09/11 V4] mei: nfc: Connect also the regular ME client

2013-03-20 Thread Tomas Winkler
From: Samuel Ortiz After receiving the NFC interface version, IVN and radio type, we can connect to the the actual nfc ME client and send the initialization (nfc connect) message. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/nfc.c | 128

[char-misc-next 08/11 V4] mei: nfc: Initial nfc implementation

2013-03-20 Thread Tomas Winkler
-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig | 7 ++ drivers/misc/mei/Makefile | 1 + drivers/misc/mei/client.c | 3 + drivers/misc/mei/init.c| 2 + drivers/misc/mei/mei_dev.h | 28 ++ drivers/misc/mei/nfc.c | 209

[char-misc-next 02/11 V4] mei: bus: Implement driver registration

2013-03-20 Thread Tomas Winkler
From: Samuel Ortiz Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 26 ++ include/linux/mei_cl_bus.h | 7 +++ 2 files changed, 33 insertions(+) diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 24a25db

[char-misc-next 07/11 V4] mei: bus: Implement bus driver data setter/getter

2013-03-20 Thread Tomas Winkler
From: Samuel Ortiz MEI drivers should be able to carry their private data around. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 12 include/linux/mei_cl_bus.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/drivers/misc/mei

[char-misc-next 03/11 V4] mei: bus: Initial implementation for I/O routines

2013-03-20 Thread Tomas Winkler
From: Samuel Ortiz Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 226 + drivers/misc/mei/mei_dev.h | 30 ++ include/linux/mei_cl_bus.h | 11 +++ 3 files changed, 267 insertions(+) diff --git a

[char-misc-next 0/6] MEI and ME separation

2013-02-06 Thread Tomas Winkler
We are about to introduce new under laying hardware that supports MEI interface. For that purpose we split the driver into interface hand hardware specific layers Tomas Winkler (6): mei: sperate interface and pci code into two files mei: initial extract of ME hw specifics from mei_device

[char-misc-next 6/6] mei: move clients cleanup code from init.c to client.c

2013-02-06 Thread Tomas Winkler
during reset we clean up client data structures we move that code into wrappers in client and call the wrappers Signed-off-by: Tomas Winkler --- drivers/misc/mei/client.c | 51 + drivers/misc/mei/client.h |5 drivers/misc/mei/init.c

[char-misc-next 1/6] mei: sperate interface and pci code into two files

2013-02-06 Thread Tomas Winkler
leave misc file operations in the main and move PCI related code into pci-me Signed-off-by: Tomas Winkler --- drivers/misc/mei/Makefile |1 + drivers/misc/mei/main.c| 354 ++-- drivers/misc/mei/mei_dev.h |3 + drivers/misc/mei/pci-me.c | 393

[char-misc-next 4/6] mei: move interrupt handlers to be me hw specific

2013-02-06 Thread Tomas Winkler
interrupt handler are platform specifics so we move them to hw-mei.c. For sake of that we need to export write, read, and complete handlers from the interrupt.c Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw-me.c | 164 +++-- drivers/misc/mei/hw

[char-misc-next 5/6] mei: rename to mei_host_buffer_is_empty to hbuf_is_ready

2013-02-06 Thread Tomas Winkler
we rename the mei_host_buffer_is_empty to keep naming convention of hbuf and also make the query more generic to be correct also for other under laying hardware Signed-off-by: Tomas Winkler --- drivers/misc/mei/amthif.c |8 drivers/misc/mei/client.c | 13 ++--- drivers

[char-misc-next 2/6] mei: initial extract of ME hw specifics from mei_device

2013-02-06 Thread Tomas Winkler
This is initial step of move the ME hw specifics out of mei_device structure into mei_me_hw Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw-me.c | 131 +--- drivers/misc/mei/hw-me.h | 12 drivers/misc/mei/init.c| 28

[char-misc-next 3/6] mei: separate compilation of the ME hardware specifics

2013-02-06 Thread Tomas Winkler
We add struct mei_hw_ops to virtualize access to hw specific configurations. This allows us to separate the compilation of the ME interface from the ME hardware specifics Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig | 17 - drivers/misc/mei/Makefile|6 +- drivers

[char-misc-next] mei: fix undefined wd symbols when MEI_ME is not set

2013-02-07 Thread Tomas Winkler
Randy Dunlap Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/misc/mei/Kconfig b/drivers/misc/mei/Kconfig index fa5c249..d21b4d0 100644 --- a/drivers/misc/mei/Kconfig +++ b/drivers/misc/mei/Kconfig @@

[char-misc-next 10/11] mei: nfc: Add NFC device to the MEI bus

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz After building its bus name as a string based on its vendor id and radio type, we can add it to the bus. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/nfc.c | 56 drivers/misc/mei/nfc.h

[char-misc-next 11/11] mei: nfc: Implement MEI bus IO ops

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz The send ops for NFC builds the command header, updates the request id and then waits for an ACK. The recv ops check if it receives data or an ACK and in the latter case wakes the send ops up. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei

[char-misc-next 04/11] mei: bus: Add bus related structures to mei_cl

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz We keep track of all MEI bus clients through a specific linked list. We also have a mei_bus_client instance in the mei_cl structure. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 47

[char-misc-next 09/11] mei: nfc: Connect also the regular ME client

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz After receiving the NFC interface version, IVN and radio type, we can connect to the the actual nfc me client and send the initialization (nfc connect) message. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/nfc.c | 128

[char-misc-next 02/11] mei: bus: Implement driver registration

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 29 + include/linux/mei_bus.h |3 +++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c

[char-misc-next 08/11] mei: nfc: Initial nfc implementation

2013-02-07 Thread Tomas Winkler
: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig |7 ++ drivers/misc/mei/Makefile |1 + drivers/misc/mei/client.c |3 + drivers/misc/mei/mei_dev.h | 28 ++ drivers/misc/mei/nfc.c | 210 drivers/misc/mei

[char-misc-next 07/11] mei: bus: Implement bus driver data setter/getter

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz MEI bus drivers should be able to carry their private data around. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 12 include/linux/mei_bus.h |3 +++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a

[char-misc-next 01/11] mei: bus: Initial MEI bus type implementation

2013-02-07 Thread Tomas Winkler
-by: Tomas Winkler --- Documentation/misc-devices/mei/mei-bus.txt | 137 drivers/misc/mei/Makefile |1 + drivers/misc/mei/bus.c | 155 drivers/misc/mei/bus.h | 27 + drivers

[char-misc-next 00/11] Add MEI BUS and NFC Device

2013-02-07 Thread Tomas Winkler
This patch set adds implementation of MEI BUS abstraction over MEI device, this allows standard Linux device drivers to access functionality exposed by MEI device that was previously available only to the user space through /dev/mei The first exercises is to export the NFC radio More informati

[char-misc-next 03/11] mei: bus: Initial implementation for I/O routines

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 226 drivers/misc/mei/bus.h |3 + drivers/misc/mei/mei_dev.h | 14 +++ include/linux/mei_bus.h| 11 ++ 4 files changed

[char-misc-next 06/11] mei: bus: Synchronous API for the data transmission

2013-02-07 Thread Tomas Winkler
Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 38 -- drivers/misc/mei/bus.h |2 ++ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index e2e15d1..3f10d51 100644 --- a/drivers

[char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz Register the MEI bus type against the kernel core bus APIs and call the bus Rx handler from interrupt.c Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 22 ++ drivers/misc/mei/interrupt.c |2 ++ drivers

[char-misc-next 00/11 V2] Add MEI BUS and NFC Device

2013-02-08 Thread Tomas Winkler
This is take 2 on the MEI bus + NFC Device patches addressing Arnd's comments This patch set adds implementation of MEI BUS abstraction over MEI device, this allows standard Linux device drivers to access functionality exposed by MEI device that was previously available only to the user space thro

[char-misc-next 01/11 V2] mei: bus: Initial MEI bus type implementation

2013-02-08 Thread Tomas Winkler
-by: Tomas Winkler --- Documentation/misc-devices/mei/mei-bus.txt | 137 drivers/misc/mei/Makefile |1 + drivers/misc/mei/bus.c | 155 drivers/misc/mei/bus.h | 27 + drivers

[char-misc-next 06/11 V2] mei: bus: Synchronous API for the data transmission

2013-02-08 Thread Tomas Winkler
Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 38 -- drivers/misc/mei/bus.h |2 ++ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 1048cd4..5a700cd 100644 --- a/drivers

[char-misc-next 05/11 V2] mei: bus: Call bus routines from the core code

2013-02-08 Thread Tomas Winkler
From: Samuel Ortiz Register the MEI bus type against the kernel core bus APIs and call the bus Rx handler from interrupt.c Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 22 ++ drivers/misc/mei/interrupt.c |2 ++ drivers

[char-misc-next 07/11 V2] mei: bus: Implement bus driver data setter/getter

2013-02-08 Thread Tomas Winkler
From: Samuel Ortiz MEI bus drivers should be able to carry their private data around. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 12 include/linux/mei_bus.h |3 +++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a

[char-misc-next 11/11] mei: nfc: Implement MEI bus IO ops

2013-02-08 Thread Tomas Winkler
From: Samuel Ortiz The send ops for NFC builds the command header, updates the request id and then waits for an ACK. The recv ops check if it receives data or an ACK and in the latter case wakes the send ops up. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei

[char-misc-next 09/11 V2] mei: nfc: Connect also the regular ME client

2013-02-08 Thread Tomas Winkler
From: Samuel Ortiz After receiving the NFC interface version, IVN and radio type, we can connect to the the actual nfc me client and send the initialization (nfc connect) message. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/nfc.c | 128

[char-misc-next 03/11 V2] mei: bus: Initial implementation for I/O routines

2013-02-08 Thread Tomas Winkler
From: Samuel Ortiz Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 226 drivers/misc/mei/bus.h |3 + drivers/misc/mei/mei_dev.h | 15 +++ include/linux/mei_bus.h| 11 ++ 4 files changed

[char-misc-next 10/11] mei: nfc: Add NFC device to the MEI bus

2013-02-08 Thread Tomas Winkler
From: Samuel Ortiz After building its bus name as a string based on its vendor id and radio type, we can add it to the bus. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/nfc.c | 56 drivers/misc/mei/nfc.h

[char-misc-next 08/11 V2] mei: nfc: Initial nfc implementation

2013-02-08 Thread Tomas Winkler
: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig |7 ++ drivers/misc/mei/Makefile |1 + drivers/misc/mei/client.c |3 + drivers/misc/mei/mei_dev.h | 28 ++ drivers/misc/mei/nfc.c | 210 drivers/misc/mei

[char-misc-next 04/11 V2] mei: bus: Add bus related structures to mei_cl

2013-02-08 Thread Tomas Winkler
From: Samuel Ortiz We keep track of all MEI bus clients through a specific linked list. We also have a mei_bus_client instance in the mei_cl structure. Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 47

[char-misc-next 02/11 V2] mei: bus: Implement driver registration

2013-02-08 Thread Tomas Winkler
From: Samuel Ortiz Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 29 + include/linux/mei_bus.h |3 +++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c

[char-misc-next] mei: add debugfs hooks

2013-04-04 Thread Tomas Winkler
debugfs exposes device state and list of me clients and their properties Signed-off-by: Tomas Winkler --- drivers/misc/mei/Makefile | 1 + drivers/misc/mei/debugfs.c | 150 + drivers/misc/mei/main.c| 18 -- drivers/misc/mei/mei_dev.h | 20

[char-misc-next] mei: add debugfs hooks

2013-04-05 Thread Tomas Winkler
debugfs exposes device state and list of me clients and their properties Signed-off-by: Tomas Winkler --- V2: 1. don't use DEBUGFS_ADD_FILE macro 2. compile debugfs.c only if CONFIG_DEBUG_FS is set drivers/misc/mei/Makefile | 1 + drivers/misc/mei/debugfs.c

[char-misc-next V3] mei: add debugfs hooks

2013-04-05 Thread Tomas Winkler
debugfs exposes device state and list of me clients and their properties Signed-off-by: Tomas Winkler --- V3: 1. remove DEBUGFS_ADD_FILE macro V2: 1. don't use DEBUGFS_ADD_FILE macro 2. compile debugfs.c only if CONFIG_DEBUG_FS is set drivers/misc/mei/Makefile | 1 + drivers/mis

Re: [char-misc-next 01/12 v3] mei: Rename mei_device to mei_host

2013-02-19 Thread Tomas Winkler
On Wed, Feb 13, 2013 at 11:39 AM, Samuel Ortiz wrote: > > On Tue, Feb 12, 2013 at 11:09:00PM +, Arnd Bergmann wrote: > > On Tuesday 12 February 2013, gre...@linuxfoundation.org wrote: > > > > > > > > > Please let's find something that makes both hw and Linux happy > > > > I still believe it ma

[char-misc-next 1/2] mei: add mei_irq_compl_handler function

2013-03-17 Thread Tomas Winkler
similar to read/write add also irq completion handler that is called for the irq thread rename missnamed mei_irq_complete_handler to mei_cl_complete_handler as it operates on a single client Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw-me.c | 18 +- drivers/misc/mei

[char-misc-next 2/2] mei: drop RECOVERING_FROM_RESET device state

2013-03-17 Thread Tomas Winkler
ECOVERING_FROM_RESET device state is never set we can remove it Signed-off-by: Tomas Winkler --- drivers/misc/mei/init.c| 4 drivers/misc/mei/mei_dev.h | 1 - 2 files changed, 5 deletions(-) diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 1ab1fb1..09a9980 100644

[char-misc-next] mei: add lynx point pci device ids

2012-08-28 Thread Tomas Winkler
Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw.h |2 ++ drivers/misc/mei/main.c |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h index b3b4c6d..9700532 100644 --- a/drivers/misc/mei/hw.h +++ b/drivers/misc/mei

Re: [PATCH] [wireless/iwlwifi/iwl-4965.c] add parentheses

2008-02-02 Thread Tomas Winkler
On Feb 2, 2008 9:48 PM, Roel Kluin <[EMAIL PROTECTED]> wrote: > '!' has a higher priority than '&': bitanding has no effect. > > Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> > --- > diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c > b/drivers/net/wireless/iwlwifi/iwl-4965.c > index 569347f..2

[char-misc-next 2/6] mei: normalize timeouts definitions

2012-11-01 Thread Tomas Winkler
1. The hardware book defines timeouts in seconds so we stick to this and define the wrapper function mei_secs_to_jiffies around msecs_to_jiffies to use be used instead multiplying by HZ 2. We add name space prefix MEI_ to all timer defines Signed-off-by: Tomas Winkler --- drivers/misc/mei

[char-misc-next 6/6] mei: move amthif specific code from mei_write to mei_amthif_write

2012-11-01 Thread Tomas Winkler
mei_amthif_send_cmd Signed-off-by: Tomas Winkler --- drivers/misc/mei/amthif.c | 39 --- drivers/misc/mei/main.c | 25 + 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei

[char-misc-next 5/6] mei: use internal watchdog device registration tracking

2012-11-01 Thread Tomas Winkler
remove bool wd_interface_reg as watchdog device already keeps track of its registration Signed-off-by: Tomas Winkler --- drivers/misc/mei/init.c|2 -- drivers/misc/mei/mei_dev.h |1 - drivers/misc/mei/wd.c |5 + 3 files changed, 1 insertions(+), 7 deletions(-) diff

[char-misc-next 4/6] mei: mei_clear_list: kill file_temp

2012-11-01 Thread Tomas Winkler
file_temp is used only once, so there is no any benefit of creating a temporary variable Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index f69e085

[char-misc-next 1/6] mei: mei_write: revamp function flow

2012-11-01 Thread Tomas Winkler
Use goto statement for error handling instead of deeper if constructs and rename label 'unlock_dev' to more appropriate 'err' Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c | 88 +++--- 1 files changed, 44 insertions(+), 4

[char-misc-next 3/6] mei: extract AMTHI functions into the amthif.c file

2012-11-01 Thread Tomas Winkler
Move AMT Host Interface functions into the new amthif.c file. All functions has now common prefix: mei_amthif_ Signed-off-by: Tomas Winkler --- drivers/misc/mei/Makefile|1 + drivers/misc/mei/amthif.c| 572 ++ drivers/misc/mei/init.c

[3.10][PATCH 3/4] mei: me: fix waiting for hw ready

2013-08-25 Thread Tomas Winkler
with -ETIMEDOUT 3.Adjust error message Cc: sta...@vger.kernel.org Tested-by: Shuah Khan Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/hw-me.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/misc/mei/hw-me.c b/drivers

[3.10][PATCH 4/4] mei: me: fix hardware reset flow

2013-08-25 Thread Tomas Winkler
disablement embarrassing typo hcsr |= ~H_IE -> hcsr &= ~H_IE; this will remove the unwanted interrupt on power down 3. remove useless debug print outs Cc: sta...@vger.kernel.org Cc: Shuah Khan Cc: Konstantin Khlebnikov Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Co

[3.10][PATCH 1/4] mei: me: fix reset state machine

2013-08-25 Thread Tomas Winkler
is already in progress Cc: sta...@vger.kernel.org Tested-by: Shuah Khan Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/hw-me.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index

[3.10][PATCH 2/4] mei: don't have to clean the state on power up

2013-08-25 Thread Tomas Winkler
stable: 3.10 commit 99f22c4ef24cf87b0dae6aabe6b5e620b62961d9 upstream When powering up, we don't have to clean up the device state nothing is connected. Cc: sta...@vger.kernel.org Tested-by: Shuah Khan Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/i

[3.10][PATCH 0/4] resume reset fixes for stable 3.10

2013-08-25 Thread Tomas Winkler
Tomas Winkler (4): mei: me: fix reset state machine mei: don't have to clean the state on power up mei: me: fix waiting for hw ready mei: me: fix hardware reset flow drivers/misc/mei/hw-me.c | 22 +- drivers/misc/mei/init.c | 3 ++- 2 files changed, 15 inser

[char-misc-next 1/2] mei: mei_release: drop redundant check if cb is NULL

2013-09-15 Thread Tomas Winkler
mei_io_cb_free follows kfree design and check for NULL internally Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index b8f8604..c71420e 100644 --- a/drivers/misc

[char-misc-next 2/2] mei: prefix client log messages with client me and host ids

2013-09-15 Thread Tomas Winkler
From: Alexander Usyskin define cl_dbg and cl_err macros that add me and host id prefix for debug and error log messages so we can track for the client context of the flow. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/client.c| 43

[char-misc-next 6/7] mei: revamp open handler counts

2013-09-16 Thread Tomas Winkler
racing on allocation Signed-off-by: Tomas Winkler --- drivers/misc/mei/amthif.c | 5 +++-- drivers/misc/mei/client.c | 19 +++ drivers/misc/mei/init.c| 5 - drivers/misc/mei/main.c| 6 +- drivers/misc/mei/mei_dev.h | 1 + 5 files changed, 20 insertions(+), 16

[char-misc-next 7/7] mei: amthif: mei_amthif_host_init: propagate errors from called functions

2013-09-16 Thread Tomas Winkler
propagate error codes from called functions, they are correct. Signed-off-by: Tomas Winkler --- drivers/misc/mei/amthif.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 4f259d4..d22c686 100644 --- a

[char-misc-next 0/7] mei minor fixes and cleanups

2013-09-16 Thread Tomas Winkler
Alexander Usyskin (1): mei: fix function names in debug prints Tomas Winkler (6): mei: propagate error from write routines instead of ENODEV mei: push credentials inside the irq write handler mei: mei_cl_unlink: no need to loop over dev list mei: simplify mei_open error handling mei

[char-misc-next 2/7] mei: propagate error from write routines instead of ENODEV

2013-09-16 Thread Tomas Winkler
ENODEV will cause application to try to reconnect since it assumes that device went through the reset write errors are not always fatal it can happen due to resource contention Signed-off-by: Tomas Winkler --- drivers/misc/mei/amthif.c| 24 +--- drivers/misc/mei/client.c

[char-misc-next 1/7] mei: fix function names in debug prints

2013-09-16 Thread Tomas Winkler
From: Alexander Usyskin Fix calling function names in debug prints. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/interrupt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei

[char-misc-next 5/7] mei: simplify mei_open error handling

2013-09-16 Thread Tomas Winkler
1. Perform simple checks first and only then attempt to allocate cl structure. 2. Remove open_handler_count test, this is already checked in mei_cl_link function 3. return -EMFILE instead of -ENOENT as expected by user space Signed-off-by: Tomas Winkler --- drivers/misc/mei/client.c | 8

[char-misc-next 3/7] mei: push credentials inside the irq write handler

2013-09-16 Thread Tomas Winkler
this eventually allows as use a single write queue both for control and data messages and removing possible race Signed-off-by: Tomas Winkler --- drivers/misc/mei/amthif.c| 9 + drivers/misc/mei/client.c| 30 +- drivers/misc/mei/interrupt.c | 5

[char-misc-next 4/7] mei: mei_cl_unlink: no need to loop over dev list

2013-09-16 Thread Tomas Winkler
we can call list_del_init regardless the client is linked or not it is always properly initialized Signed-off-by: Tomas Winkler --- drivers/misc/mei/client.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c

[char-misc-next] hpet: remove useless check if fixmem32 is NULL

2013-09-04 Thread Tomas Winkler
ndy Dunlap Signed-off-by: Tomas Winkler --- drivers/char/hpet.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 448ce5e..c8f4329 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -971,8 +971,6 @@ static acpi_status hpet_resources(str

[char-misc-next 1/5] mei: mei_cl_link protect open_handle_count from overflow

2013-09-01 Thread Tomas Winkler
mei_cl_link is called both from mei_open and also from in-kernel drivers so we need to protect open_handle_count from overflow Signed-off-by: Tomas Winkler --- drivers/misc/mei/client.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei

[char-misc-next 4/5] mei: fix format compilation warrning on 32 bit architecture

2013-09-01 Thread Tomas Winkler
hbm.c: In function mei_hbm_me_cl_allocate: hbm.c:52:212: warning: format %zd expects argument of type signed size_t but argument 4 has type long unsigned Signed-off-by: Tomas Winkler --- drivers/misc/mei/hbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/mei

[char-misc-next 3/5] mei: mei_write correct checks for copy_from_user

2013-09-01 Thread Tomas Winkler
From: Alexander Usyskin 1. return -EFUALT when copy_from_user fails 2. display error message on failure in error level Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers

[char-misc-next 5/5] mei: revamp read and write length checks

2013-09-01 Thread Tomas Winkler
at a position past the maximum allowed offset. Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 5ff810b..7404584 100644 --- a/drivers/mis

[char-misc-next 2/5] mei: make sure that me_clients_map big enough before copying

2013-09-01 Thread Tomas Winkler
To make static analyzers happy validated that sizeof me_clients_map is larger than sizeof valid_addresses from the enumeration response before memcpy We can use BUILD_ON macro as both arrays are defined statically Signed-off-by: Tomas Winkler --- drivers/misc/mei/hbm.c | 5 - 1 file

[char-misc-next 0/5] mei driver small fixes and cleanups

2013-09-01 Thread Tomas Winkler
Alexander Usyskin (1): mei: mei_write correct checks for copy_from_user Tomas Winkler (4): mei: mei_cl_link protect open_handle_count from overflow mei: make sure that me_clients_map big enough before copying mei: fix format compilation warrning on 32 bit architecture mei: revamp read

[char-misc-next 0/3] mei: few more reset recursion fixes

2013-09-02 Thread Tomas Winkler
*** BLURB HERE *** Alexander Usyskin (1): mei: cancel stall timers in mei_reset Tomas Winkler (2): mei: make me client counters less error prone mei: bus: stop wait for read during cl state transition drivers/misc/mei/amthif.c | 1 + drivers/misc/mei/bus.c | 5 - drivers/misc

[char-misc-next 3/3] mei: cancel stall timers in mei_reset

2013-09-02 Thread Tomas Winkler
From: Alexander Usyskin Unset init_clients_timer and amthif_stall_timers in mei_reset in order to cancel timer ticking and hence avoid recursive reset calls. Cc: # 3.9+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/amthif.c | 1 + drivers/misc/mei

[char-misc-next 1/3] mei: make me client counters less error prone

2013-09-02 Thread Tomas Winkler
1. u8 counters are prone to hard to detect overflow: make them unsigned long to match bit_ functions argument type 2. don't check me_clients_num for negativity, it is unsigned. 3. init all the me client counters from one place Cc: # 3.9+ Signed-off-by: Tomas Winkler --- drivers/mis

[char-misc-next 2/3] mei: bus: stop wait for read during cl state transition

2013-09-02 Thread Tomas Winkler
Bus layer omitted check for client state transition while waiting for read completion The client state transition may occur for example as result of firmware initiated reset Add mei_cl_is_transitioning wrapper to reduce the code repetition.: Cc: # 3.9+ Signed-off-by: Tomas Winkler

drivers/char/hpet.c check

2013-09-03 Thread Tomas Winkler
In hpet_resources function Can anybody explain why we check fixmem32 for NULL, looks strange as it derreferences a member address I'm asking since a static analyzer is complaining about it. } else if (res->id == ACPI_RSTYPE_FIXED_MEM32) { struct acpi_resource_fixed_mem32 *f

drivers/char/hpet.c ACPI parsing

2013-09-03 Thread Tomas Winkler
In hpet_resources function Can anybody explain why we check fixmem32 for NULL, looks strange as it derreferences a member address I'm asking since a static analyzer is complaining about it. } else if (res->id == ACPI_RSTYPE_FIXED_MEM32) { struct acpi_resource_fixed_mem32 *f

Re: [PATCH v2] mei: me: downgrade two errors to debug level

2013-09-26 Thread Tomas Winkler
On Thu, Sep 19, 2013 at 1:17 PM, Paul Bolle wrote: > The mei_me driver prints "suspend" at error level at each suspend. It > also prints "stop" at error level at driver unload. Downgrade these > uninteresting messages to debug level. > > Signed-off-by: Paul Bolle > --- > 0) v1 was called "mei: me

[char-misc-next 1/3] mei: add error messages for open count errors

2012-09-10 Thread Tomas Winkler
Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index ae2cd0d..e8b0858 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -239,12

[char-misc-next 2/3] mei: struct mei_message_data doesn't have to be packed

2012-09-10 Thread Tomas Winkler
Signed-off-by: Tomas Winkler --- drivers/misc/mei/mei_dev.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 96d3e79..adb35fb 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h @@ -140,7

[char-misc-next 3/3] mei: don't print buffer as a string

2012-09-10 Thread Tomas Winkler
non readable junk was printed to the logs we will add proper buffer dumping mechanism later if needed Signed-off-by: Tomas Winkler --- drivers/misc/mei/interrupt.c |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei

[char-misc-next 1/6] mei: rename mei_cl_cb.information to mei_cl_cb.buf_idx

2012-10-09 Thread Tomas Winkler
rename 'information' member of the struct mei_cl_cb to more self-descriptive 'buf_idx' Signed-off-by: Tomas Winkler --- drivers/misc/mei/interrupt.c | 43 - drivers/misc/mei/iorw.c | 17 +++ drivers/misc/me

[char-misc-next 3/6] mei: mei_write: revamp error path handling

2012-10-09 Thread Tomas Winkler
1. unify common amt and regular error path and use it early in the function 2. fix indentation 3. propagate error code directly from copy_from_user 4. print out errors using dev_err instead of dev_dbg Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c | 75

[char-misc-next 4/6] mei: kill usless struct mei_io_list

2012-10-09 Thread Tomas Winkler
kill useless mei_io_list list wrapper and use directly struct mei_cl_cb mei_cb which was its only member for managing io queues Signed-off-by: Tomas Winkler --- drivers/misc/mei/init.c | 29 ++--- drivers/misc/mei/interrupt.c | 134 ++ drivers

[char-misc-next 6/6] mei: use mei_io_cb_ warppers also for control flows

2012-10-09 Thread Tomas Winkler
move the mei_io_cb_ wrappers to to iorw.c for global use and use them also for handling control flows Signed-off-by: Tomas Winkler --- drivers/misc/mei/init.c|4 +- drivers/misc/mei/iorw.c| 120 +-- drivers/misc/mei/main.c| 78

[char-misc-next 5/6] mei: rename mei_free_cb_private to mei_io_cb_free

2012-10-09 Thread Tomas Winkler
1. cb_private was an old name that we depriacated in earlier cleanups 2. we also group the funcion declaration with other _io_ functions 3. Don't check cb for NULL as mei_io_cb_free is NULL safe Signed-off-by: Tomas Winkler --- drivers/misc/mei/init.c |4 ++-- drivers/mis

[char-misc-next 2/6] mei: add allocation and initialization wrappers for io callback

2012-10-09 Thread Tomas Winkler
mei_io_cb_init - allocat and initializate mei_cl_cb mei_io_cb_alloc_req/resp_buf are separate function as buffers are not always needed Signed-off-by: Tomas Winkler --- drivers/misc/mei/main.c | 111 -- 1 files changed, 87 insertions(+), 24 deletions

[char-misc-next 01/15] mei: drop redundant length paramter from mei_write_message function

2012-12-04 Thread Tomas Winkler
The length is already part of the message header and it is validated before the function call Signed-off-by: Tomas Winkler --- drivers/misc/mei/amthif.c|6 ++ drivers/misc/mei/init.c |7 +++ drivers/misc/mei/interface.c | 24 +++- drivers/misc/mei

[char-misc-next 04/15] mei: extarct device dependent constants into hw-mei.h

2012-12-04 Thread Tomas Winkler
Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw-mei.h | 118 drivers/misc/mei/hw.h | 98 drivers/misc/mei/mei_dev.h |2 + 3 files changed, 120 insertions(+), 98 deletions(-) create mode 100644

[char-misc-next 08/15] mei: mei_me_client is not hw API move to mei_dev.h

2012-12-04 Thread Tomas Winkler
Remove struct mei_me_client from hw.h as it is not part of of the hardware API. Also it doesn't have to be packed Add kdoc for this structure Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw.h |6 -- drivers/misc/mei/mei_dev.h | 13 + 2 files change

[char-misc-next 10/15] mei: move host bus message handling to hbm.c

2012-12-04 Thread Tomas Winkler
for sake of more layered desing we move to the new hbm.c file Signed-off-by: Tomas Winkler --- drivers/misc/mei/Makefile|1 + drivers/misc/mei/hbm.c | 440 ++ drivers/misc/mei/init.c | 111 --- drivers/misc/mei/interface.c

  1   2   3   4   5   6   7   8   9   10   >