diff mbox series

Revert "bus: mhi: pci-generic: configurable network interface MRU"

Message ID 20210813130014.6822-1-manivannan.sadhasivam@linaro.org (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series Revert "bus: mhi: pci-generic: configurable network interface MRU" | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Manivannan Sadhasivam Aug. 13, 2021, 1 p.m. UTC
This reverts commit 5c2c85315948c42c6c0258cf9bad596acaa79043.

First this commit should go via the MHI tree as the "pci_generic" driver
belongs to MHI bus.

Then from the review point of view, the commit uses "mru_default"
variable to hold the MRU size for the MHI device. The term default
doesn't make much sense since there is no way to override this value
anywhere. So the author should just use "mru" in mhi_pci_dev_info
struct.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/bus/mhi/pci_generic.c | 4 ----
 drivers/net/mhi_net.c         | 1 -
 include/linux/mhi.h           | 2 --
 3 files changed, 7 deletions(-)

Comments

kernel test robot Aug. 13, 2021, 2:53 p.m. UTC | #1
Hi Manivannan,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20210813]
[cannot apply to ipvs/master linus/master sparc-next/master v5.14-rc5 v5.14-rc4 v5.14-rc3 v5.14-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Manivannan-Sadhasivam/Revert-bus-mhi-pci-generic-configurable-network-interface-MRU/20210813-210217
base:    4b358aabb93a2c654cd1dcab1a25a589f6e2b153
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/fa503f1c2145bc97ea7da6f5ef2f7abf051d9aba
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Manivannan-Sadhasivam/Revert-bus-mhi-pci-generic-configurable-network-interface-MRU/20210813-210217
        git checkout fa503f1c2145bc97ea7da6f5ef2f7abf051d9aba
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/net/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/net/wwan/mhi_wwan_mbim.c: In function 'mhi_mbim_probe':
>> drivers/net/wwan/mhi_wwan_mbim.c:607:39: error: 'struct mhi_controller' has no member named 'mru'
     607 |         mbim->mru = mhi_dev->mhi_cntrl->mru ? mhi_dev->mhi_cntrl->mru : MHI_DEFAULT_MRU;
         |                                       ^~
   drivers/net/wwan/mhi_wwan_mbim.c:607:65: error: 'struct mhi_controller' has no member named 'mru'
     607 |         mbim->mru = mhi_dev->mhi_cntrl->mru ? mhi_dev->mhi_cntrl->mru : MHI_DEFAULT_MRU;
         |                                                                 ^~


vim +607 drivers/net/wwan/mhi_wwan_mbim.c

aa730a9905b7b0 Loic Poulain   2021-08-03  593  
aa730a9905b7b0 Loic Poulain   2021-08-03  594  static int mhi_mbim_probe(struct mhi_device *mhi_dev, const struct mhi_device_id *id)
aa730a9905b7b0 Loic Poulain   2021-08-03  595  {
aa730a9905b7b0 Loic Poulain   2021-08-03  596  	struct mhi_controller *cntrl = mhi_dev->mhi_cntrl;
aa730a9905b7b0 Loic Poulain   2021-08-03  597  	struct mhi_mbim_context *mbim;
aa730a9905b7b0 Loic Poulain   2021-08-03  598  	int err;
aa730a9905b7b0 Loic Poulain   2021-08-03  599  
aa730a9905b7b0 Loic Poulain   2021-08-03  600  	mbim = devm_kzalloc(&mhi_dev->dev, sizeof(*mbim), GFP_KERNEL);
aa730a9905b7b0 Loic Poulain   2021-08-03  601  	if (!mbim)
aa730a9905b7b0 Loic Poulain   2021-08-03  602  		return -ENOMEM;
aa730a9905b7b0 Loic Poulain   2021-08-03  603  
94c0a6fbd5cfc3 Wei Yongjun    2021-08-08  604  	spin_lock_init(&mbim->tx_lock);
aa730a9905b7b0 Loic Poulain   2021-08-03  605  	dev_set_drvdata(&mhi_dev->dev, mbim);
aa730a9905b7b0 Loic Poulain   2021-08-03  606  	mbim->mdev = mhi_dev;
aa730a9905b7b0 Loic Poulain   2021-08-03 @607  	mbim->mru = mhi_dev->mhi_cntrl->mru ? mhi_dev->mhi_cntrl->mru : MHI_DEFAULT_MRU;
aa730a9905b7b0 Loic Poulain   2021-08-03  608  
aa730a9905b7b0 Loic Poulain   2021-08-03  609  	INIT_DELAYED_WORK(&mbim->rx_refill, mhi_net_rx_refill_work);
aa730a9905b7b0 Loic Poulain   2021-08-03  610  
aa730a9905b7b0 Loic Poulain   2021-08-03  611  	/* Start MHI channels */
0ca8d3ca456153 Jakub Kicinski 2021-08-05  612  	err = mhi_prepare_for_transfer(mhi_dev, 0);
aa730a9905b7b0 Loic Poulain   2021-08-03  613  	if (err)
aa730a9905b7b0 Loic Poulain   2021-08-03  614  		return err;
aa730a9905b7b0 Loic Poulain   2021-08-03  615  
aa730a9905b7b0 Loic Poulain   2021-08-03  616  	/* Number of transfer descriptors determines size of the queue */
aa730a9905b7b0 Loic Poulain   2021-08-03  617  	mbim->rx_queue_sz = mhi_get_free_desc_count(mhi_dev, DMA_FROM_DEVICE);
aa730a9905b7b0 Loic Poulain   2021-08-03  618  
aa730a9905b7b0 Loic Poulain   2021-08-03  619  	/* Register wwan link ops with MHI controller representing WWAN instance */
aa730a9905b7b0 Loic Poulain   2021-08-03  620  	return wwan_register_ops(&cntrl->mhi_dev->dev, &mhi_mbim_wwan_ops, mbim, 0);
aa730a9905b7b0 Loic Poulain   2021-08-03  621  }
aa730a9905b7b0 Loic Poulain   2021-08-03  622  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
index b33b9d75e8af..4dd1077354af 100644
--- a/drivers/bus/mhi/pci_generic.c
+++ b/drivers/bus/mhi/pci_generic.c
@@ -32,7 +32,6 @@ 
  * @edl: emergency download mode firmware path (if any)
  * @bar_num: PCI base address register to use for MHI MMIO register space
  * @dma_data_width: DMA transfer word size (32 or 64 bits)
- * @mru_default: default MRU size for MBIM network packets
  * @sideband_wake: Devices using dedicated sideband GPIO for wakeup instead
  *		   of inband wake support (such as sdx24)
  */
@@ -43,7 +42,6 @@  struct mhi_pci_dev_info {
 	const char *edl;
 	unsigned int bar_num;
 	unsigned int dma_data_width;
-	unsigned int mru_default;
 	bool sideband_wake;
 };
 
@@ -274,7 +272,6 @@  static const struct mhi_pci_dev_info mhi_qcom_sdx55_info = {
 	.config = &modem_qcom_v1_mhiv_config,
 	.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
 	.dma_data_width = 32,
-	.mru_default = 32768,
 	.sideband_wake = false,
 };
 
@@ -667,7 +664,6 @@  static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	mhi_cntrl->status_cb = mhi_pci_status_cb;
 	mhi_cntrl->runtime_get = mhi_pci_runtime_get;
 	mhi_cntrl->runtime_put = mhi_pci_runtime_put;
-	mhi_cntrl->mru = info->mru_default;
 
 	if (info->sideband_wake) {
 		mhi_cntrl->wake_get = mhi_pci_wake_get_nop;
diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c
index 975f7f9bdf4c..a577bff82fe1 100644
--- a/drivers/net/mhi_net.c
+++ b/drivers/net/mhi_net.c
@@ -312,7 +312,6 @@  static int mhi_net_newlink(struct mhi_device *mhi_dev, struct net_device *ndev)
 	mhi_netdev->ndev = ndev;
 	mhi_netdev->mdev = mhi_dev;
 	mhi_netdev->skbagg_head = NULL;
-	mhi_netdev->mru = mhi_dev->mhi_cntrl->mru;
 
 	INIT_DELAYED_WORK(&mhi_netdev->rx_refill, mhi_net_rx_refill_work);
 	u64_stats_init(&mhi_netdev->stats.rx_syncp);
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index c493a80cb453..5e08468854db 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -356,7 +356,6 @@  struct mhi_controller_config {
  * @fbc_download: MHI host needs to do complete image transfer (optional)
  * @wake_set: Device wakeup set flag
  * @irq_flags: irq flags passed to request_irq (optional)
- * @mru: the default MRU for the MHI device
  *
  * Fields marked as (required) need to be populated by the controller driver
  * before calling mhi_register_controller(). For the fields marked as (optional)
@@ -449,7 +448,6 @@  struct mhi_controller {
 	bool fbc_download;
 	bool wake_set;
 	unsigned long irq_flags;
-	u32 mru;
 };
 
 /**