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
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
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
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
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
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
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
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
-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
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
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
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
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
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
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
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
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
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
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
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
@@
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
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
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
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
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
: 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
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
-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
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
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
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
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
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
-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
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
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
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
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
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
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
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
: 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
*** 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 - 100 of 1346 matches
Mail list logo