aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/mei/interrupt.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-07mei: add common prefix to hbm functionTomas Winkler1-5/+5
1. use mei_hbm_ for basic host bus message function 2. use mei_hbm_cl prefix for host bus messages that operation on behalf of a client Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-07mei: use structured buffer for the write bufferTomas Winkler1-13/+12
We can drop useless castings and use proper types. We remove the casting in mei_hbm_hdr function and add new function mei_hbm_stop_request_prepare that utilize the new structure Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-07mei: move host bus message handling to hbm.cTomas Winkler1-230/+5
for sake of more layered design we move host bus message handling to the new hbm.c file Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-07mei: move hw dependent functions to interface.cTomas Winkler1-23/+1
1. move direct register handling to interface.c and make them static 2. add new function mei_clear_interrupts that wraps direct register access 3. export other functions in mei_dev.h Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-07mei: include local headers after the system onesTomas Winkler1-2/+2
first include linux/mei.h then only local headers to avoid possible false dependencies Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-07mei: use unified format for printing mei message headerTomas Winkler1-8/+6
Introduce MEI_HDR_FMT and MEI_HDR_PRM macros. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-07mei: drop redundant length parameter from mei_write_message functionTomas Winkler1-9/+8
The length is already part of the message header and it is validated before the function call Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21mei: Simplify the ME client enumeration codeSamuel Ortiz1-52/+23
After enumerating all ME clients we call the client init functions for all matching UUIDs from a separate context. This remove the hackish cascading client initialisation process that was interleaving properties and connection command replies. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21mei: simplify write complete loop in irq handlerTomas Winkler1-25/+12
extract the common, hence non conditional code from the if-else statment Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21mei: don't mix read and write slotsTomas Winkler1-16/+19
Do not pass read slots pointer into function mei_irq_thread_write_handler, the write slots management is handled internally in the write handler Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21mei: streamline amthif write complete functionTomas Winkler1-2/+2
Rename the function mei_amthif_irq_process_completed to mei_amthif_irq_write_complete Remove cl from the parameter list as it can be extracted from cb block. Extract the common flow from if statements and document the logic properly Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21mei: streamline write complete flow functionTomas Winkler1-70/+43
Rename the function _mei_irq_thread_cmpl to mei_irq_thread_write_complete to make clear it deals with writing. Remove cl from the parameter list as it can be extracted from cb block. Extract the common flow from if statements and document the logic properly Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21mei: use structured buffer for extra write bufferTomas Winkler1-22/+14
The structure of the message is static so we don't have to use and cast the buffer. We can also drop extra_write_index variable as this information can be extracted directly from the message header Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21mei: compact code for mei bus message creationTomas Winkler1-58/+38
1. replace boilerplate code for filling up the bus message header with a common wrapper function 2. shorten variable names and use temporal variables to save some screen space Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-15mei: use the same bus msg for connect and disconnect requestTomas Winkler1-9/+8
structs hbm_client_connect_request and hbm_client_disconnect_request have the same layout so we can drop the later Add kdoc for the request and response structure so it is clear they can be used for both purposes Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-15mei: rename enum mei_cb_major_types to enum mei_cb_file_opsTomas Winkler1-9/+9
1. Rename mei_cb_major_types to more understandable mei_cb_file_ops 2. Rename member struct mei_cl_cb of this type to simple 'fop_type' 3. Add kernel doc for the type Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-15mei: use type struct mei_cl *cl instead of void in struct mei_cbTomas Winkler1-7/+7
We can use correct type 'struct mei_cl' instead of 'void *' for file_private in the struct mei_cb as there is no other type assigned to this member of the structure We rename the member from file_private to cl Remove about 10 lines of declarations of temporary variables used for type casting Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-15mei: amthif: prefix cb list with amthifTomas Winkler1-4/+2
amthif cb list were prefixed with amthi_ instead if amthif. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-01mei: extract AMTHI functions into the amthif.c fileTomas Winkler1-208/+10
Move AMT Host Interface functions into the new amthif.c file. All functions has now common prefix: mei_amthif_ Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-01mei: normalize timeouts definitionsTomas Winkler1-2/+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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-24mei: rename mei_free_cb_private to mei_io_cb_freeTomas Winkler1-7/+5
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-24mei: kill usless struct mei_io_listTomas Winkler1-76/+58
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-24mei: rename mei_cl_cb.information to mei_cl_cb.buf_idxTomas Winkler1-22/+21
rename 'information' member of the struct mei_cl_cb to more self-descriptive 'buf_idx' Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-10mei: don't print buffer as a stringTomas Winkler1-8/+1
non readable junk was printed to the logs we will add proper buffer dumping mechanism later if needed Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-16mei: wd: decouple and revamp watchdog state machineTomas Winkler1-6/+3
Before ME watchdog was exported through standard watchdog interface it was closed and started together with the mei device. The major issue is that closing ME watchdog disabled also MEI device, to fix this the watchdog state machine has to be independent from MEI state machine. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-16mei: wd: rename watchdog constants to be more descriptiveTomas Winkler1-2/+2
1. rename defines to more be descriptive 2. remove duplicated defines from interface.h 3. add common prefix MEI_ Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-16mei: fix device stall after wd is stoppedTomas Winkler1-1/+1
After watchdog was disabled the driver would stall due to wrong calculation of credits reduction The cat&paste bug was introduced in the commit 7bdf72d3d8059a50214069ea4b87c2174645f40f mei: introduce mei_data2slots wrapper Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-16mei: name space for mei device stateTomas Winkler1-11/+11
1. add MEI_DEV_ prefix for mei device state enums 2. rename mei_state to dev_state 3. add constant to string translation for debug purposes Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-18Merge 3.5-rc7 into char-misc-next.Greg Kroah-Hartman1-1/+1
This lets us pick up the mei driver changes that we need in order to handle future merge issues. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-10mei: mei_irq_thread_write_handler - line break fixTomas Winkler1-28/+16
1. straight up lines that doesn't cross 80 characters 2. don't break strings Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-10mei: streamline the _mei_irq_thread_close/ioctol functionsTomas Winkler1-33/+30
change statements of types if (ok) do something else return err into if (err) return err do something Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-10mei: introduce mei_data2slots wrapperTomas Winkler1-22/+11
Introduce mei_data2slots wrapper for sake of readability. This wrapper close up the open code for computing slots from a message length: rond up dwords count from payload and header byte size Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-10mei: remove write only wariable wd_due_counterTomas Winkler1-8/+4
Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-26mei: revamp host buffer interface functionTomas Winkler1-4/+4
1. Use unified _hbuf_ prefix for host/write buffer functions. 2. Cleanup the code w/o functional changes. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-26mei: don't query HCSR for host buffer depthTomas Winkler1-3/+3
1. We record host (write) buffer depth during reset so we don't need to query HCSR register later on. The host buffer depth doesn't change after the reset 2. Use mei_hbuf_max_data function to compute payload size in bytes Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-20mei: mei_irq_thread_write_handler check for overflowTomas Winkler1-0/+3
check for overflow when retrieving empty write slots Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-20mei: check for error codes that mei_flow_ctrl_creds retunsTomas Winkler1-2/+2
we cannot use if(!mei_flow_ctrl_creds()) logic as mei_flow_ctrl_creds also negative error codes Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-13misc: mei: fix stalled readTomas Winkler1-1/+1
This bug caused severe connectivity issue in the LMS application (LMS is described in Documentation/misc-devices/mei/mei.txt) The bug was introduced in patch: commit 1ccb7b6249f9bc50678e2a383084ed0a34cc9239 staging/mei: propagate error codes up in the write flow The patch has reverted the return value logic of some fo function but the conditional in _mei_irq_thread_read function was not swapped making read always entering the error path Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-09mei: export mei.h for the user spaceTomas Winkler1-1/+1
The header exports API for application layer 1. move under include/linux and add to the export list 2. update include path n the sources 3. update TODO Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-01Staging: mei: move the mei code out of stagingGreg Kroah-Hartman1-0/+1590
It's been cleaned up, and there's nothing else left to do, so move it out of staging into drivers/misc/ where all can use it now. Cc: Tomas Winkler <[email protected]> Cc: Oren Weil <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>