A recent commit added back the calls top stop tx and rx to shutdown()
which had previously been removed by commit e83766334f ("tty: serial:
qcom_geni_serial: No need to stop tx/rx on UART shutdown") in order to
be able to use kgdb after stopping the getty.
Not only did this again break kgdb, but it also broke serial consoles
more generally by hanging TX when stopping the getty during reboot.
The underlying problem has been there since the driver was first merged
and fixing it is going to be a bit involved so simply stop calling the
broken stop functions during shutdown for consoles for now.
Fixes: d8aca2f968 ("tty: serial: qcom-geni-serial: stop operations in progress at shutdown")
Cc: stable <stable@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride
Link: https://lore.kernel.org/r/20230307164405.14218-2-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 370629635
Change-Id: Ib532b26b318d720f74e02543e74fa26775ad4c4a
(cherry picked from commit 9aff74cc4e)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
The qcom-geni-serial driver currently only works in SE FIFO mode. This
limits the UART speed to around 180 kB/s. In order to achieve higher
speeds we need to use SE DMA mode.
Keep the console port working in FIFO mode but extend the code to use
DMA
for the high-speed port.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20221229155030.418800-15-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 370629635
Change-Id: I0880354e27e04cb1a49a4759d6df7fe315311574
(cherry picked from commit 2aaa43c707)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
After the SQ cleanup fix, the CQ will receive a response with
the corresponding tag marked as OCS: ABORTED. To align with
the behavior of Legacy SDB mode, the handling of OCS: ABORTED
has been changed to match that of OCS_INVALID_COMMAND_STATUS
(SDB), with both returning a SCSI result of DID_REQUEUE.
Furthermore, the workaround implemented before the SQ cleanup
fix can be removed.
Bug: 373785306
Fixes: ab248643d3 ("scsi: ufs: core: Add error handling for MCQ mode")
Change-Id: Id1d51f2921a519aa5d2a83b7fc70e17a45fb26b9
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/all/20241001091917.6917-3-peter.wang@mediatek.com/
When setting the ICU bit without using read-modify-write,
SQRTCy will restart SQ again and receive an RTC return
error code 2 (Failure - SQ not stopped).
Additionally, the error log has been modified so that
this type of error can be observed.
Bug: 373785306
Fixes: ab248643d3 ("scsi: ufs: core: Add error handling for MCQ mode")
Change-Id: I46fca8eaeaa17c622349b26f97fc100aa182dea2
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/all/20241001091917.6917-2-peter.wang@mediatek.com/
Don't run a protected VCPU in pKVM if it isn't in a runnable PSCI
state. For protected VMs, the PSCI state is the reference state
for whether they are runnable or not.
Bug: 278749606
Bug: 373638114
Reported-by: Dmytro Maluka <dmaluka@google.com>
Change-Id: I17cc60852aa45225e65fe810f9b196e3afe88a70
Signed-off-by: Fuad Tabba <tabba@google.com>
BmAttributes controls the maximum number of streams supported by the endpoint.
streaming is a data transmission mode that allows multiple data packets
to be sent simultaneously in one transmission cycle.
Set bmAttributes to 16, bulk endpoint with more than 65536 streams,
can effectively improve data throughput.
Modify bmAttributes to 16.
The 5Gbps peak rate increases from 350MB/s to 400MB/s.
The 10Gbps peak rate is increased from 500MB/s to 600MB/s.
Bug: 373314134
Change-Id: I4b6c9554ff39a7b2222461e1949825dd6148c006
Signed-off-by: Lianqin Hu <hulianqin@vivo.corp-partner.google.com>
Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
Spi geni driver switches between FIFO and DMA modes based on xfer length.
FIFO mode relies on M_CMD_DONE_EN interrupt for completion while DMA mode
relies on XX_DMA_DONE.
During dynamic switching, if FIFO mode is chosen, FIFO related interrupts
are enabled and DMA related interrupts are disabled. And viceversa.
Chip select shares M_CMD_DONE_EN interrupt with FIFO to check completion.
Now, if a chip select operation is preceded by a DMA xfer, M_CMD_DONE_EN
interrupt would have been disabled and hence it will never receive one
resulting in timeout.
For chip select, in addition to setting the xfer mode to FIFO,
select_mode() to FIFO so that required interrupts are enabled.
Fixes: e5f0dfa78a ("spi: spi-geni-qcom: Add support for SE DMA mode")
Suggested-by: Praveen Talari <quic_ptalari@quicinc.com
Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com
Reviewed-by: Douglas Anderson <dianders@chromium.org
Link: https://lore.kernel.org/r/1683626496-9685-1-git-send-email-quic_vnivarth@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org
Bug: 370629635
Change-Id: Icd72416f413abc7fd67ac69c1a56251d9b2b4149
(cherry picked from commit 4c329f5da7)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
If topup_hyp_memcache() fails mid-way through a memcache top-up, we
should still account for the pages that were successfully added.
Don't skip accounting when topup_hyp_memcache() fails.
Bug: 373813803
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I2ffcfbe45452600994f5b69b73ea2bd00d64aeae
When VM creation fails part-way through __pkvm_create_hyp_vm(), we end
up destroying the partial state by calling pkvm_destroy_hyp_vm()
before the memory accounting metadata has been updated. Consequently,
we underflow the 'protected_hyp_mem' counter and run into the following
warning:
18446744073709518848B of donations to the nVHE hyp are missing
Rework the accounting updates so that the per-VM structures are
accounted immediately after initialising the VM, with the vCPU memory
being accounted one-by-one as they are initialised.
Bug: 373813803
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: If4ae9816df009ca2a74aff5964676465c25fe6dc
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230303172041.2103336-30-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Bug: 370629635
Change-Id: I604c1be770a2413f9370befef1acbbcb05b5191d
(cherry picked from commit d0b52f6539)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
lru_gen_caps is exported to allow for lru_gen_enabled() to be used.
Bug: 369964379
Change-Id: Ic0a79eb19fd8da0232db1a63263be4184d960b4a
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
The commit 56526cf94076("ANDROID: mm: swap: export and whitelist
get_shadow_from_swap_cache") exports the api to get the shadow entry
from the swap cache which is then used to check if this entry can be
further pushed down to slower devices.
At present, we are manually extracting the information from this shadow
entry using the same macros being used by unpack_shadow(). Instead
export this function.
Bug: 369964379
Change-Id: Id044add31434d234e4a6136f192c11ab20ad0985
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.
Fixes: 37692de5d5 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: <stable@vger.kernel.org> # v4.19+
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Bug: 370629635
Change-Id: Ifeed53c2672c0b934dfbcd19f4aba3512a20d14f
(cherry picked from commit e2c85d85a05f16af2223fcc0195ff50a7938b372)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
Refactor the code by using goto statements to reduce duplication
and make the exit path clearer.
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Bug: 370629635
Change-Id: I6e7152bd47d76bc7dd0eb98ffd7906eb52b91478
(cherry picked from commit 23cc961a08591976eb17ca8552a602425b1a780d)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:
timeout = wait_for_completion_timeout(...)
if (!timeout) return -ETIMEDOUT;
with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.
Fix to the proper variable type 'unsigned long' while here.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Bug: 370629635
Change-Id: Idfddb7efcc4fb0aeceb7972316415afab815faca
(cherry picked from commit f9288ff67a8f4bc2645d32a512d4b30f73f956d5)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
I2C and SMBus timeouts are not something the user needs to be informed
about on controller level. The client driver may know if that really is
a problem and give more detailed information to the user. The controller
should just pass this information upwards. Remove the printout.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Bug: 370629635
Change-Id: Ie1390ae6031913154eb152517f2f4e5147c5fe87
(cherry picked from commit 6d128e73c7820356a3481024166b9f3dc3aee99c)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
i2c_master_hub is only used in i2c-qcom-geni.c now,
change it to static.
Fixes: cacd9643ec ("i2c: qcom-geni: add support for I2C Master Hub variant")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Bug: 370629635
Change-Id: If191b6b205f111c9b54590859438c75235e2bd0a
(cherry picked from commit 597688792c)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
The I2C Master Hub is a stripped down version of the GENI Serial Engine
QUP Wrapper Controller but only supporting I2C serial engines without
DMA support.
Add the I2C Master Hub serial engine compatible along the specific
requirements in a new desc struct passed through the device match data.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Bug: 370629635
Change-Id: I161a19650cd69595e0829411a2dd12a58de23615
(cherry picked from commit cacd9643ec)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
The I2C Master Hub is a stripped down version of the GENI Serial Engine
QUP Wrapper Controller but only supporting I2C serial engines without
DMA support.
Those I2C serial engines variants have some requirements:
- a separate "core" clock
- doesn't support DMA, thus no memory interconnect path
- fixed FIFO size not discoverable in the HW_PARAM_0 register
Add a desc struct specifying all those requirements which will be used in
a next change when adding the I2C Master Hub serial engine compatible.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Bug: 370629635
Change-Id: I9f007f3f4f435e59e41849d357fe0ed72b81c63d
(cherry picked from commit 14d02fbadb)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
Individual MLO links connection status is not copied to
EVENT_CONNECT_RESULT data while processing the connect response
information in cfg80211_connect_done(). Due to this failed links
are wrongly indicated with success status in EVENT_CONNECT_RESULT.
To fix this, copy the individual MLO links status to the
EVENT_CONNECT_RESULT data.
Bug: 254441685
Fixes: 53ad07e982 ("wifi: cfg80211: support reporting failed links")
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Link: https://patch.msgid.link/20240724125327.3495874-1-quic_vjakkam@quicinc.com
[commit message editorial changes]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit baeaabf970b9a90999f62ae27edf63f6cb86c023)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I0a1aacb180914e8d5509eab44aa27bd82272bbf7