summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei
Commit message (Collapse)AuthorAgeFilesLines
* Merge 4.7-rc4 into char-misc-nextGreg Kroah-Hartman2016-06-251-1/+1
|\ | | | | | | | | | | We want those fixes in here to help with merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mei: don't use wake_up_interruptible for wr_ctrlAlexander Usyskin2016-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | wr_ctrl waiters are none interruptible, so should be waken up with call to wake_up and not to wake_up_interruptible. This fixes commit: 7ff4bdd ("mei: fix waiting for wr_ctrl for corner cases.") Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: drop wr_msg from the mei_dev structureAlexander Usyskin2016-06-102-79/+68
|/ | | | | | | | | | | | The control messages are usually small, around 8 bytes, and can be allocated on the stack. Using on stack allocation allows us to drop 'wr_msg' a rather large buffer reserved in the mei_dev structure and relax contention of this device global buffer. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: bus: call mei_cl_read_start under device lockAlexander Usyskin2016-05-031-3/+12
| | | | | | | | | | | Ensure that mei_cl_read_start is called under the device lock also in the bus layer. The function updates global ctrl_wr_list which should be locked. Cc: <stable@vger.kernel.org> #4.4+ Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: fix waiting for wr_ctrl for corner cases.Alexander Usyskin2016-04-301-4/+14
| | | | | | | | | | | | | A control message reply may not be received if either a link reset has occurred or disconnection is initiated by the FW. In the both cases the client state will be set straight to DISCONNECTED and the driver will wait till timeout. Adding DISCONNECTED state in the waiting condition will release the client from the stall. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: don't clean control queues on notify request timeoutAlexander Usyskin2016-04-301-6/+2
| | | | | | | | | | Timeout on notify request is not a fatal condition, and actually cleaning control queues will disrupt other control flows of the same client. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: amthif: discard not read messagesAlexander Usyskin2016-04-303-2/+5
| | | | | | | | | | | | | | | When a message is received and amthif client is not in reading state the message is ignored and left dangling in the queue. This may happen after one of the amthif host connections is closed w/o completing the reading. Another client will pick up a wrong message on next read attempt which will lead to link reset. To prevent this the driver has to properly discard the message when amthif client is not in reading state. Cc: <stable@vger.kernel.org> #4.2+ Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: fix NULL dereferencing during FW initiated disconnectionAlexander Usyskin2016-04-303-6/+6
| | | | | | | | | | | | | | | | | | | In the case when disconnection is initiated from the FW the driver is flushing items from the write control list while iterating over it: mei_irq_write_handler() list_for_each_entry_safe(ctrl_wr_list) <-- outer loop mei_cl_irq_disconnect_rsp() mei_cl_set_disconnected() mei_io_list_flush(ctrl_wr_list) <-- destorying list We move the list flushing to the completion routine. Cc: <stable@vger.kernel.org> #4.2+ Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: drop global me_client_indexAlexander Usyskin2016-04-302-17/+8
| | | | | | | | | | Global me_client_index is used only during the enumeration process and can be effectively replaced by me_addr data from the last enumeration response as we always enumerate clients in the increasing order. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: do not pin module if cldrv->probe() failedAlexey Khoroshilov2016-04-301-2/+6
| | | | | | | | | | | | If cldrv->probe() failed in mei_cl_device_probe(), the mei module is left pinned. The patch moves __module_get(THIS_MODULE) after cldrv->probe(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: bus: use scnprintf in *_showRasmus Villemoes2016-03-311-15/+4
| | | | | | | | There's no reason to duplicate the logic provided by scnprintf(). Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: me: add broxton pci device idsTomas Winkler2016-03-012-0/+7
| | | | | | | Add device ids for Broxton SoC based devices. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: fix format string in debug printsAlexander Usyskin2016-02-204-6/+6
| | | | | | | | | | | | | buf_idx type was changed to size_t, and few places missed out to change the print format from %ld to %zu. Use also uz for buf.size which is also of size_t Fixes: commit 56988f22e097 ("mei: fix possible integer overflow issue")' Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.5-rc4 into char-misc-nextGreg Kroah-Hartman2016-02-141-1/+5
|\ | | | | | | | | | | We want those fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mei: validate request value in client notify request ioctlAlexander Usyskin2016-02-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch address a possible security issue: The request field in client notify request ioctl comes from user space as u32 and is downcasted to u8 with out validation. Check request field to have approved values MEI_HBM_NOTIFICATION_STAR/STOP Cc: <stable@vger.kernel.org> #4.3+ Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: fix double freeing of a cb during link resetAlexander Usyskin2016-02-113-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix double freeing of the cb that can happen if link reset kicks in the middle of blocked write from a device on the cl bus. Free cb inside mei_cl_write function on failure and drop cb free operation from callers, during a link reset the mei_cl_write function returns with an error, but the caller doesn't know if the cb was already queued or not so it doesn't know if the cb will be freed upon queue reclaim or it has to free it itself. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: wd: drop AGAIN the watchdog code from the core mei driverTomas Winkler2016-02-091-391/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The file wd.c was remove from the driver by commit commit fdd9b8655933 ("mei: wd: drop the watchdog code from the core mei driver") Unfortunately it came back by mistake in rebasing in the commit commit 06ee536bcb15 ("mei: fill file pointer in read cb for fixed address client") Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: split amthif client init from end of clients enumerationAlexander Usyskin2016-02-077-23/+15
| | | | | | | | | | | | | | | | | | | | The amthif FW client can appear after the end of client enumeration. Amthif host client initialization is done now at FW client discovery time. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: hbm: send immediate reply flag in enum requestAlexander Usyskin2016-02-074-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | Signal the FW that it can send an HBM enumeration answer immediately, without waiting for FW initialization completion, meaning before all the FW clients are ready and registered. Organize enumeration response options to enum as a byproduct. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: bus: run rescan on me_clients list changeAlexander Usyskin2016-02-074-1/+20
| | | | | | | | | | | | | | | | | | Since clients can be now added and removed during runtime we need to run bus rescan whenever me_clients list is modified. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: drop reserved host client idsAlexander Usyskin2016-02-077-24/+11
| | | | | | | | | | | | | | | | | | | | | | The reserved host clients can be obsoleted now, a portion of the platforms is shipped without iAMT enabled, where the reservation is not relevant and for platforms with iAMT dynamic allocation is sufficient. Dropping reserved ids makes enumeration more flexible and generic Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: hbm: warn about fw-initiated disconnectAlexander Usyskin2016-02-072-1/+4
| | | | | | | | | | | | | | | | | | | | The FW can initiate client disconnection only because an error condition, hence it make sense to bump the debug message to the warning level to have an entery in the log. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: fixed address clients for the new platformsAlexander Usyskin2016-02-075-6/+57
| | | | | | | | | | | | | | | | | | Enable by default connection to fixed address clients from user-space for skylake and newer platform. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: fill file pointer in read cb for fixed address clientAlexander Usyskin2016-02-073-10/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | The read callback created from a flow control request for a fixed address client have NULL in the file pointer. Fill the file pointer using a data from a write callback. This allows us to drop workaround introduced in: commit eeabfcf5a92a ("mei: connection to fixed address clients from user-space") Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: discard replies from unconnected fixed address clientsAlexander Usyskin2016-02-071-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | A fixed address client in the FW doesn't have a notion of connection and can send message after the file associated with it was already closed. Silently discard such messages. Add inline helpers to detect whether a message is hbm or intended for a fixed address client Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: clean write queues and wake waiters on disconnectAlexander Usyskin2016-02-073-48/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean write and write_waiting queues in disconnect. Requests in those queues are stale and processing will lead to fat warnings. In multi thread operations on disconnect and in FW disconnect case - write/read/event waiters should end wait and return error. Wake all waiters for disconnecting client to achieve that. Drop wake all and write queue clean on reset, as now we waking all waiters and cleaning write queues on disconnect. No need to do it twice. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: wake blocked write on link resetAlexander Usyskin2016-02-071-1/+6
| | | | | | | | | | | | | | | | | | In case of link reset all blocked writes should be interrupted. Note, that currently blocking write is used only through bus layer. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: drop superfluous closing bracket from write tracesAlexander Usyskin2016-02-071-2/+2
| | | | | | | | | | | | Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: bus: check if the device is enabled before data transferAlexander Usyskin2016-02-071-0/+9
| | | | | | | | | | | | | | | | | | | | The bus data transfer interface was missing the check if the device is in enabled state, this may lead to stack corruption during link reset. Cc: <stable@vger.kernel.org> #4.0 Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: bus: fix notification event deliveryTomas Winkler2016-02-073-7/+12
| | | | | | | | | | | | | | | | | | | | Call wake_up cl->ev_wait only in case there is no bus client registered to the event notification. Second, since we don't have exclusive waiter wake_up_interruptible_all is not used correctly here. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: bus: fix RX event schedulingTomas Winkler2016-02-073-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | In this particular case this more correct and safer to check if the RX event is set in the event mask rather than query waitqueue_active Since the check is already performed in the mei_cl_bus_rx_event function, it is just required to check for its return value. Second, since we don't have exclusive waiter wake_up_interruptible_all is not used correctly here. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: amthif: interrupt reader on link resetAlexander Usyskin2016-02-071-1/+7
| | | | | | | | | | | | | | | | In case of link reset all waiting readers should be interrupted. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: amthif: use rx_wait queue also for amthif clientAlexander Usyskin2016-02-071-5/+5
| | | | | | | | | | | | | | | | | | | | Switch using cl->rx_wait wait queue also for amthif, there is nothing special about amthif in that matter in Rx flow. The cl->wait is reserved for hbm flows and asynchronous events Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: amthif: drop parameter validation from mei_amthif_writeTomas Winkler2016-02-071-9/+1
| | | | | | | | | | | | | | | | | | | | Remove duplicated parameter validation from mei_amthif_write functions, The parameter check is already performed by the caller function mei_write Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: amthif: replace amthif_rd_complete_list with rd_completedTomas Winkler2016-02-075-37/+13
| | | | | | | | | | | | | | | | | | | | | | Now when we have per client rd_completed list we can remove the amthif specific amthif_rd_complete_list. In addition in the function mei_amthif_read do not loop over the rd_completed list like the original code as the code path is unlocked. Reviewed-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: amthif: allow only one request at a timeAlexander Usyskin2016-02-071-0/+8
| | | | | | | | | | | | | | | | | | A next amthif write can be executed only after the previous one has completed. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: rename variable names 'file_object' to fpTomas Winkler2016-02-074-19/+19
| | | | | | | | | | | | | | | | | | | | The driver uses three names file, fp, and file_object for struct file type. To improve code clarity and adjust to my taste rename file_object to more common and shorter fp. Reviewed-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: constify struct file pointerTomas Winkler2016-02-075-18/+22
| | | | | | | | | | | | | | | | | | | | The struct file file pointer is used as an opaque handle to for a connected client, for this part the pointer should be immutable and should be set to count. Reviewed-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: amthif: don't drop read packets on timeoutAlexander Usyskin2016-02-075-80/+0
| | | | | | | | | | | | | | | | | | | | Since the driver now uses a list for storing read packets instead of single variable a pending read is no longer blocking other connections. A pending read will be discarded up the file closure. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: amthif: don't copy from an empty bufferAlexander Usyskin2016-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | If empty message come from FW (buf_idx == 0) then the current code will still try to copy data from not filled buffer to the user-space, instead the code should behave the same as when end of a message has been reached, clean resources and return 0 Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: call stop on failed char device registerAlexander Usyskin2016-02-072-2/+6
| | | | | | | | | | | | | | | | If registering of character device failed stop the device properly. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: fix possible integer overflow issueTomas Winkler2016-02-075-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a possible integer overflow following by a buffer overflow when accumulating messages coming from the FW to compose a full payload. Occurrence of wrap around has to be prevented for next message size calculation. For unsigned integer the addition overflow has occurred when the result is smaller than one of the arguments. To simplify the fix, the types of buf.size and buf_idx are set to the same width, namely size_t also to be aligned with the type of length parameter in file read/write ops. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: debugfs: allow hbm features list dump in earlier stagesAlexander Usyskin2016-02-071-1/+2
| | | | | | | | | | | | | | | | | | HBM features list is ready while sending enumerate request and enumerating clients, output it to debugfs in these states too. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: debugfs: adjust active clients print bufferAlexander Usyskin2016-02-071-7/+22
| | | | | | | | | | | | | | | | | | | | In case of many active host clients clients (41 and more) 1K buffer is not enough for full information print. Calculate buffer size according to real clients number. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: trace pci configuration space ioTomas Winkler2016-02-074-4/+56
| | | | | | | | | | | | | | | | Use tracing events also for reading and writing pci configuration space <debugfs>/tracing/events/mei/mei_pci_reg_{read,write} Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: bus: whitelist the watchdog clientTomas Winkler2016-02-061-0/+29
| | | | | | | | | | | | | | | | | | | | | | The iAMT WD client has to be whitelisted sice it has two connections and is filtered out by number_of_connections fixup. Also the API has changed for BDW and SKL but firmware haven't updated the protocol version. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: wd: drop the watchdog code from the core mei driverAlexander Usyskin2016-02-068-491/+9
| | | | | | | | | | | | | | | | | | | | | | | | Instead of integrating the iAMT watchdog in the mei core driver we will create a watchdog device on the mei client bus and create a driver for it. This patch removes the watchdog code from the mei core driver. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: drop nfc leftovers from the mei driverTomas Winkler2016-02-061-11/+0
| | | | | | | | | | | | | | | | We left few function prototypes in the header file after moving nfc logic to bus. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: always copy the read buffer if data is readyAlexander Usyskin2016-02-061-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Copy completed callback content to the user space if we have such callback ready in the beginning of the read. Simplify offset processing logic as byproduct. This is a refinement for: commit 139aacf757fc ("mei: fix read after read scenario") Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: prevent queuing new flow control credit.Alexander Usyskin2016-02-061-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | The MEI FW can receive only one flow control for read. Currently the driver only checks if a flow control credit was already sent and read is pending in the rd_pending queue, but it also has to check if flow control credit already queued in the write control queue to prevent sending more than one flow control credits. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud