* [PATCH] ice: Remove useless DMA-32 fallback configuration
@ 2022-01-09 18:25 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2022-01-09 18:25 UTC (permalink / raw)
To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Jakub Kicinski
Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
Christoph Hellwig, Alexander Lobakin, intel-wired-lan, netdev
As stated in [1], dma_set_mask() with a 64-bit mask never fails if
dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.
Simplify code and remove some dead code accordingly.
[1]: https://lkml.org/lkml/2021/6/7/398
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index e29176889c23..785d98889cb4 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4435,8 +4435,6 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
/* set up for high or low DMA */
err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
- if (err)
- err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (err) {
dev_err(dev, "DMA configuration failed: 0x%x\n", err);
return err;
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH] ice: Remove useless DMA-32 fallback configuration
@ 2022-01-09 18:25 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2022-01-09 18:25 UTC (permalink / raw)
To: intel-wired-lan
As stated in [1], dma_set_mask() with a 64-bit mask never fails if
dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.
Simplify code and remove some dead code accordingly.
[1]: https://lkml.org/lkml/2021/6/7/398
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index e29176889c23..785d98889cb4 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4435,8 +4435,6 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
/* set up for high or low DMA */
err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
- if (err)
- err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (err) {
dev_err(dev, "DMA configuration failed: 0x%x\n", err);
return err;
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [Intel-wired-lan] [PATCH] ice: Remove useless DMA-32 fallback configuration
2022-01-09 18:25 ` [Intel-wired-lan] " Christophe JAILLET
@ 2022-01-13 17:52 ` G, GurucharanX
-1 siblings, 0 replies; 4+ messages in thread
From: G, GurucharanX @ 2022-01-13 17:52 UTC (permalink / raw)
To: Christophe JAILLET, Brandeburg, Jesse, Nguyen, Anthony L,
David S. Miller, Jakub Kicinski
Cc: netdev, kernel-janitors, linux-kernel, intel-wired-lan,
Christoph Hellwig
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Christophe JAILLET
> Sent: Sunday, January 9, 2022 11:55 PM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>;
> Jakub Kicinski <kuba@kernel.org>
> Cc: netdev@vger.kernel.org; kernel-janitors@vger.kernel.org; linux-
> kernel@vger.kernel.org; Christophe JAILLET
> <christophe.jaillet@wanadoo.fr>; intel-wired-lan@lists.osuosl.org; Christoph
> Hellwig <hch@lst.de>
> Subject: [Intel-wired-lan] [PATCH] ice: Remove useless DMA-32 fallback
> configuration
>
> As stated in [1], dma_set_mask() with a 64-bit mask never fails if
> dev->dma_mask is non-NULL.
> So, if it fails, the 32 bits case will also fail for the same reason.
>
> Simplify code and remove some dead code accordingly.
>
> [1]: https://lkml.org/lkml/2021/6/7/398
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 2 --
> 1 file changed, 2 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH] ice: Remove useless DMA-32 fallback configuration
@ 2022-01-13 17:52 ` G, GurucharanX
0 siblings, 0 replies; 4+ messages in thread
From: G, GurucharanX @ 2022-01-13 17:52 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Christophe JAILLET
> Sent: Sunday, January 9, 2022 11:55 PM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; David S. Miller <davem@davemloft.net>;
> Jakub Kicinski <kuba@kernel.org>
> Cc: netdev at vger.kernel.org; kernel-janitors at vger.kernel.org; linux-
> kernel at vger.kernel.org; Christophe JAILLET
> <christophe.jaillet@wanadoo.fr>; intel-wired-lan at lists.osuosl.org; Christoph
> Hellwig <hch@lst.de>
> Subject: [Intel-wired-lan] [PATCH] ice: Remove useless DMA-32 fallback
> configuration
>
> As stated in [1], dma_set_mask() with a 64-bit mask never fails if
> dev->dma_mask is non-NULL.
> So, if it fails, the 32 bits case will also fail for the same reason.
>
> Simplify code and remove some dead code accordingly.
>
> [1]: https://lkml.org/lkml/2021/6/7/398
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 2 --
> 1 file changed, 2 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-13 17:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 18:25 [PATCH] ice: Remove useless DMA-32 fallback configuration Christophe JAILLET
2022-01-09 18:25 ` [Intel-wired-lan] " Christophe JAILLET
2022-01-13 17:52 ` G, GurucharanX
2022-01-13 17:52 ` G, GurucharanX
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.