Re: linux-next: manual merge of the net-next tree with the pci tree
Hi all, On Tue, 3 Apr 2018 13:14:54 +1000 Stephen Rothwell wrote: > > Today's linux-next merge of the net-next tree got a conflict in: > > drivers/net/ethernet/mellanox/mlx5/core/en_main.c > > between commit: > > 2907938d2375 ("net/mlx5e: Use pcie_bandwidth_available() to compute > bandwidth") > > from the pci tree and commit: > > 0608d4dbaf4e ("net/mlx5e: Unify slow PCI heuristic") > > from the net-next tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. > > -- > Cheers, > Stephen Rothwell > > diff --cc drivers/net/ethernet/mellanox/mlx5/core/en_main.c > index 884337f88589,0aab3afc6885.. > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c > @@@ -3880,16 -4026,50 +4033,20 @@@ void mlx5e_build_default_indir_rqt(u32 > indirection_rqt[i] = i % num_channels; > } > > - static bool cqe_compress_heuristic(u32 link_speed, u32 pci_bw) > -static int mlx5e_get_pci_bw(struct mlx5_core_dev *mdev, u32 *pci_bw) > -{ > -enum pcie_link_width width; > -enum pci_bus_speed speed; > -int err = 0; > - > -err = pcie_get_minimum_link(mdev->pdev, &speed, &width); > -if (err) > -return err; > - > -if (speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN) > -return -EINVAL; > - > -switch (speed) { > -case PCIE_SPEED_2_5GT: > -*pci_bw = 2500 * width; > -break; > -case PCIE_SPEED_5_0GT: > -*pci_bw = 5000 * width; > -break; > -case PCIE_SPEED_8_0GT: > -*pci_bw = 8000 * width; > -break; > -default: > -return -EINVAL; > -} > - > -return 0; > -} > - > + static bool slow_pci_heuristic(struct mlx5_core_dev *mdev) > { > - return (link_speed && pci_bw && > - (pci_bw < 4) && (pci_bw < link_speed)); > - } > + u32 link_speed = 0; > + u32 pci_bw = 0; > > - static bool hw_lro_heuristic(u32 link_speed, u32 pci_bw) > - { > - return !(link_speed && pci_bw && > - (pci_bw <= 16000) && (pci_bw < link_speed)); > + mlx5e_get_max_linkspeed(mdev, &link_speed); > -mlx5e_get_pci_bw(mdev, &pci_bw); > ++pci_bw = pcie_bandwidth_available(mdev->pdev, NULL, NULL, NULL); > + mlx5_core_dbg_once(mdev, "Max link speed = %d, PCI BW = %d\n", > +link_speed, pci_bw); > + > + #define MLX5E_SLOW_PCI_RATIO (2) > + > + return link_speed && pci_bw && > + link_speed > MLX5E_SLOW_PCI_RATIO * pci_bw; > } > > void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params, u8 > cq_period_mode) This is now a conflict between the pci tree and Linus' tree. -- Cheers, Stephen Rothwell pgpraz7Cqf_sV.pgp Description: OpenPGP digital signature
Re: linux-next: manual merge of the net-next tree with the pci tree
Hi all, With the merge window opening, just a reminder that this conflict still exists. On Wed, 21 Jun 2017 11:54:43 +1000 Stephen Rothwell wrote: > > Today's linux-next merge of the net-next tree got a conflict in: > > drivers/net/wireless/marvell/mwifiex/pcie.c > > between commit: > > c336cc0ee4eb ("PCI: Split ->reset_notify() method into ->reset_prepare() > and ->reset_done()") > > from the pci tree and commit: > > 68efd0386988 ("mwifiex: pcie: stop setting/clearing 'surprise_removed'") > > from the net-next tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. > > -- > Cheers, > Stephen Rothwell > > diff --cc drivers/net/wireless/marvell/mwifiex/pcie.c > index 279adf124fc9,b53ecf1eddda.. > --- a/drivers/net/wireless/marvell/mwifiex/pcie.c > +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c > @@@ -361,48 -359,35 +361,46 @@@ static void mwifiex_pcie_reset_prepare( > } > > mwifiex_dbg(adapter, INFO, > -"%s: vendor=0x%4.04x device=0x%4.04x rev=%d %s\n", > -__func__, pdev->vendor, pdev->device, > -pdev->revision, > -prepare ? "Pre-FLR" : "Post-FLR"); > - > -if (prepare) { > -/* Kernel would be performing FLR after this notification. > - * Cleanup all software without cleaning anything related to > - * PCIe and HW. > - */ > -mwifiex_shutdown_sw(adapter); > -clear_bit(MWIFIEX_IFACE_WORK_DEVICE_DUMP, &card->work_flags); > -clear_bit(MWIFIEX_IFACE_WORK_CARD_RESET, &card->work_flags); > -} else { > -/* Kernel stores and restores PCIe function context before and > - * after performing FLR respectively. Reconfigure the software > - * and firmware including firmware redownload > - */ > -ret = mwifiex_reinit_sw(adapter); > -if (ret) { > -dev_err(&pdev->dev, "reinit failed: %d\n", ret); > -return; > -} > -} > +"%s: vendor=0x%4.04x device=0x%4.04x rev=%d Pre-FLR\n", > +__func__, pdev->vendor, pdev->device, pdev->revision); > + > +mwifiex_shutdown_sw(adapter); > - adapter->surprise_removed = true; > +clear_bit(MWIFIEX_IFACE_WORK_DEVICE_DUMP, &card->work_flags); > +clear_bit(MWIFIEX_IFACE_WORK_CARD_RESET, &card->work_flags); > mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__); > } > > -static const struct pci_error_handlers mwifiex_pcie_err_handler[] = { > -{ .reset_notify = mwifiex_pcie_reset_notify, }, > +/* > + * Kernel stores and restores PCIe function context before and after > performing > + * FLR respectively. Reconfigure the software and firmware including > firmware > + * redownload. > + */ > +static void mwifiex_pcie_reset_done(struct pci_dev *pdev) > +{ > +struct pcie_service_card *card = pci_get_drvdata(pdev); > +struct mwifiex_adapter *adapter = card->adapter; > +int ret; > + > +if (!adapter) { > +dev_err(&pdev->dev, "%s: adapter structure is not valid\n", > +__func__); > +return; > +} > + > +mwifiex_dbg(adapter, INFO, > +"%s: vendor=0x%4.04x device=0x%4.04x rev=%d Post-FLR\n", > +__func__, pdev->vendor, pdev->device, pdev->revision); > + > - adapter->surprise_removed = false; > +ret = mwifiex_reinit_sw(adapter); > +if (ret) > +dev_err(&pdev->dev, "reinit failed: %d\n", ret); > +else > +mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__); > +} > + > +static const struct pci_error_handlers mwifiex_pcie_err_handler = { > +.reset_prepare = mwifiex_pcie_reset_prepare, > +.reset_done = mwifiex_pcie_reset_done, > }; > > #ifdef CONFIG_PM_SLEEP -- Cheers, Stephen Rothwell
Re: linux-next: manual merge of the net-next tree with the pci tree
Hi Kalle, On Wed, 21 Jun 2017 16:29:29 +0300 Kalle Valo wrote: > > Thanks, the fix looks good to me. I guess there's nothing I can do at > the moment and Linus needs to fix this when he pulls from Dave (or > Bjorn, whichever is the last)? Right. -- Cheers, Stephen Rothwell
Re: linux-next: manual merge of the net-next tree with the pci tree
Stephen Rothwell writes: > Today's linux-next merge of the net-next tree got a conflict in: > > drivers/net/wireless/marvell/mwifiex/pcie.c > > between commit: > > c336cc0ee4eb ("PCI: Split ->reset_notify() method into > ->reset_prepare() and ->reset_done()") > > from the pci tree and commit: > > 68efd0386988 ("mwifiex: pcie: stop setting/clearing 'surprise_removed'") > > from the net-next tree. > > I fixed it up (see below) and can carry the fix as necessary. Thanks, the fix looks good to me. I guess there's nothing I can do at the moment and Linus needs to fix this when he pulls from Dave (or Bjorn, whichever is the last)? -- Kalle Valo
RE: linux-next: manual merge of the net-next tree with the pci tree
> Today's linux-next merge of the net-next tree got a conflict in > drivers/net/wireless/iwlwifi/pcie/trans.c between commit b9d146e30a2d > ("iwlwifi: collapse wrapper for pcie_capability_read_word()") from the pci > tree and commit 7afe3705cd4e ("iwlwifi: continue clean up - > pcie/trans.c") from the net-next tree. > > I fixed it up (see below) and can carry the fix as necessary (no action is > required). > Looks right - thanks Stephen! - Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/