q2spi-msm-geni: unmap rx response buffers during port_close
Currently driver using q2spi_flush_pending_crs() to delete the pending q2spi packets during port_close. along with this we should unmap the previous pending RX response buffers which are not read by User space client application. Remove unwanted comment from uapi common header file. Also fix the issue of using geni_resource_lock without initialize. Change-Id: Ib1ac0fcd338e33f5f331d077034633a44631edf0 Signed-off-by: Chandana Kishori Chiluveru <quic_cchiluve@quicinc.com>
This commit is contained in:
parent
7588f585b4
commit
f5f35f4465
@ -2305,6 +2305,7 @@ static void q2spi_flush_pending_crs(struct q2spi_geni *q2spi)
|
||||
if (q2spi_pkt->state == DATA_AVAIL) {
|
||||
Q2SPI_DEBUG(q2spi, "%s q2spi_pkt %p data avail, force delete\n",
|
||||
__func__, q2spi_pkt);
|
||||
q2spi_unmap_rx_buf(q2spi_pkt);
|
||||
q2spi_pkt->state = IN_DELETION;
|
||||
list_del(&q2spi_pkt->list);
|
||||
q2spi_free_q2spi_pkt(q2spi_pkt, __LINE__);
|
||||
@ -3998,6 +3999,7 @@ static int q2spi_geni_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto chardev_destroy;
|
||||
|
||||
mutex_init(&q2spi->geni_resource_lock);
|
||||
ret = q2spi_geni_resources_on(q2spi);
|
||||
if (ret)
|
||||
goto chardev_destroy;
|
||||
@ -4015,7 +4017,6 @@ static int q2spi_geni_probe(struct platform_device *pdev)
|
||||
spin_lock_init(&q2spi->txn_lock);
|
||||
mutex_init(&q2spi->queue_lock);
|
||||
mutex_init(&q2spi->send_msgs_lock);
|
||||
mutex_init(&q2spi->geni_resource_lock);
|
||||
spin_lock_init(&q2spi->cr_queue_lock);
|
||||
|
||||
q2spi->kworker = kthread_create_worker(0, "kthread_q2spi");
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#ifndef _UAPI_LINUX_Q2SPI_H
|
||||
#define _UAPI_LINUX_Q2SPI_H
|
||||
@ -93,7 +93,7 @@ struct q2spi_request {
|
||||
__u8 end_point;
|
||||
__u8 proto_ind;
|
||||
__u32 data_len;
|
||||
enum priority_type priority;//TODO to use in driver next phase
|
||||
enum priority_type priority;
|
||||
__u8 flow_id;
|
||||
_Bool sync;
|
||||
__u32 reserved[20];
|
||||
|
Loading…
Reference in New Issue
Block a user