forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'mhi-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== Core ---- - Removed the "mhi_poll()" API as there are no in-kernel users available at the moment. - Added range check for the CHDBOFF and ERDBOFF registers in case the device reports bad values. - Fixed the errno for the rest of the range checks to use -ERANGE. - Modified the event ring handlers to ring the doorbell only if there are any pending elements in the ring to process for the device. - Removed the check for EE (Execution Environment) while processing the SYS_ERR transition as it creates device recovery issues when SBL (Secondary Bootloader) crashes early. - Used mhi_tryset_pm_state() API to set the error state instead of open coding if the firmware loading fails. This avoids the race with other pm_state updates. pci_generic ----------- - Dropped the dedundant pci_{enable/disable}_pcie_error_reporting() calls from driver probe's error path as the PCI core itself takes care of that now. - Revered the commit 2d5253a ("bus: mhi: host: pci_generic: Add a secondary AT port to Telit FN990") as it turned out to be erroneous. This happened due to the patch adding secondary AT port for FN990 getting applied through NET and MHI trees and this caused two commits for the same functionality but one of them ended up wrong. - Added support for Foxconn T99W510 modem based on SDX24 chipset from Qualcomm. MHI Endpoint ============ - Demoted the channel not supported error log to debug as not all devices will support all channels defined in MHI spec and this may spam users. * tag 'mhi-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: Use mhi_tryset_pm_state() for setting fw error state bus: mhi: host: Remove duplicate ee check for syserr bus: mhi: host: Avoid ringing EV DB if there are no elements to process bus: mhi: pci_generic: Add Foxconn T99W510 bus: mhi: host: Use ERANGE for BHIOFF/BHIEOFF range check bus: mhi: host: Range check CHDBOFF and ERDBOFF bus: mhi: host: pci_generic: Revert "Add a secondary AT port to Telit FN990" bus: mhi: host: pci_generic: Drop redundant pci_enable_pcie_error_reporting() bus: mhi: ep: Demote unsupported channel error log to debug bus: mhi: host: Remove mhi_poll() API
- Loading branch information
Showing
6 changed files
with
54 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
* Copyright (C) 2020 Linaro Ltd <[email protected]> | ||
*/ | ||
|
||
#include <linux/aer.h> | ||
#include <linux/delay.h> | ||
#include <linux/device.h> | ||
#include <linux/mhi.h> | ||
|
@@ -344,8 +343,6 @@ static const struct mhi_channel_config mhi_foxconn_sdx55_channels[] = { | |
MHI_CHANNEL_CONFIG_DL(13, "MBIM", 32, 0), | ||
MHI_CHANNEL_CONFIG_UL(32, "DUN", 32, 0), | ||
MHI_CHANNEL_CONFIG_DL(33, "DUN", 32, 0), | ||
MHI_CHANNEL_CONFIG_UL(92, "DUN2", 32, 1), | ||
MHI_CHANNEL_CONFIG_DL(93, "DUN2", 32, 1), | ||
MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0_MBIM", 128, 2), | ||
MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3), | ||
}; | ||
|
@@ -366,6 +363,15 @@ static const struct mhi_controller_config modem_foxconn_sdx55_config = { | |
.event_cfg = mhi_foxconn_sdx55_events, | ||
}; | ||
|
||
static const struct mhi_pci_dev_info mhi_foxconn_sdx24_info = { | ||
.name = "foxconn-sdx24", | ||
.config = &modem_foxconn_sdx55_config, | ||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM, | ||
.dma_data_width = 32, | ||
.mru_default = 32768, | ||
.sideband_wake = false, | ||
}; | ||
|
||
static const struct mhi_pci_dev_info mhi_foxconn_sdx55_info = { | ||
.name = "foxconn-sdx55", | ||
.fw = "qcom/sdx55m/sbl1.mbn", | ||
|
@@ -590,6 +596,15 @@ static const struct pci_device_id mhi_pci_id_table[] = { | |
/* T99W373 (sdx62) */ | ||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0d9), | ||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info }, | ||
/* T99W510 (sdx24), variant 1 */ | ||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f0), | ||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info }, | ||
/* T99W510 (sdx24), variant 2 */ | ||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f1), | ||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info }, | ||
/* T99W510 (sdx24), variant 3 */ | ||
{ PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f2), | ||
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info }, | ||
/* MV31-W (Cinterion) */ | ||
{ PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b3), | ||
.driver_data = (kernel_ulong_t) &mhi_mv31_info }, | ||
|
@@ -903,11 +918,9 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |
mhi_pdev->pci_state = pci_store_saved_state(pdev); | ||
pci_load_saved_state(pdev, NULL); | ||
|
||
pci_enable_pcie_error_reporting(pdev); | ||
|
||
err = mhi_register_controller(mhi_cntrl, mhi_cntrl_config); | ||
if (err) | ||
goto err_disable_reporting; | ||
return err; | ||
|
||
/* MHI bus does not power up the controller by default */ | ||
err = mhi_prepare_for_power_up(mhi_cntrl); | ||
|
@@ -941,8 +954,6 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |
mhi_unprepare_after_power_down(mhi_cntrl); | ||
err_unregister: | ||
mhi_unregister_controller(mhi_cntrl); | ||
err_disable_reporting: | ||
pci_disable_pcie_error_reporting(pdev); | ||
|
||
return err; | ||
} | ||
|
@@ -965,7 +976,6 @@ static void mhi_pci_remove(struct pci_dev *pdev) | |
pm_runtime_get_noresume(&pdev->dev); | ||
|
||
mhi_unregister_controller(mhi_cntrl); | ||
pci_disable_pcie_error_reporting(pdev); | ||
} | ||
|
||
static void mhi_pci_shutdown(struct pci_dev *pdev) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters