All of lore.kernel.org
 help / color / mirror / Atom feed
* sfc fixup patch
@ 2015-03-23  3:10 Benjamin Herrenschmidt
  2015-03-23 10:55 ` Shradha Shah
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2015-03-23  3:10 UTC (permalink / raw)
  To: David Miller, Shradha Shah; +Cc: netdev

Hi Dave, Shradha !

While merging some EEH changes, I noticed a breakage in the SFC driver
due to it using an API we didn't mean driver to use directly and that
is going away. I've done this small fixup patch, any objection to me
sticking it in the original series (as to avoid bisection breaks)
before I send it to Linus ?

Cheers,
Ben.

net/ethernet/sfc: Don't use of_node_to_eeh_dev()

This is deprecated, it forces the driver to hop via the OF node
that may or may not exist, instead use pci_dev_to_eeh_dev() which
is simpler.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 drivers/net/ethernet/sfc/efx.c   | 4 +---
 drivers/net/ethernet/sfc/siena.c | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 2384824..77d6453 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2523,9 +2523,7 @@ int efx_try_recovery(struct efx_nic *efx)
 	 * schedule a 'recover or reset', leading to this recovery handler.
 	 * Manually call the eeh failure check function.
 	 */
-	struct eeh_dev *eehdev =
-		of_node_to_eeh_dev(pci_device_to_OF_node(efx->pci_dev));
-
+	struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);
 	if (eeh_dev_check_failure(eehdev)) {
 		/* The EEH mechanisms will handle the error and reset the
 		 * device if necessary.
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index 3583f02..f12c811 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -205,8 +205,7 @@ static int siena_map_reset_flags(u32 *flags)
  */
 static void siena_monitor(struct efx_nic *efx)
 {
-	struct eeh_dev *eehdev =
-		of_node_to_eeh_dev(pci_device_to_OF_node(efx->pci_dev));
+	struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);
 
 	eeh_dev_check_failure(eehdev);
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: sfc fixup patch
  2015-03-23  3:10 sfc fixup patch Benjamin Herrenschmidt
@ 2015-03-23 10:55 ` Shradha Shah
  2015-03-23 11:05   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Shradha Shah @ 2015-03-23 10:55 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, David Miller; +Cc: netdev



On 23/03/15 03:10, Benjamin Herrenschmidt wrote:
> Hi Dave, Shradha !
> 
> While merging some EEH changes, I noticed a breakage in the SFC driver
> due to it using an API we didn't mean driver to use directly and that
> is going away. I've done this small fixup patch, any objection to me
> sticking it in the original series (as to avoid bisection breaks)
> before I send it to Linus ?
> 
> Cheers,
> Ben.
> 
> net/ethernet/sfc: Don't use of_node_to_eeh_dev()
> 
> This is deprecated, it forces the driver to hop via the OF node
> that may or may not exist, instead use pci_dev_to_eeh_dev() which
> is simpler.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Acked-by: Shradha Shah <sshah@solarflare.com>

> ---
>  drivers/net/ethernet/sfc/efx.c   | 4 +---
>  drivers/net/ethernet/sfc/siena.c | 3 +--
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
> index 2384824..77d6453 100644
> --- a/drivers/net/ethernet/sfc/efx.c
> +++ b/drivers/net/ethernet/sfc/efx.c
> @@ -2523,9 +2523,7 @@ int efx_try_recovery(struct efx_nic *efx)
>  	 * schedule a 'recover or reset', leading to this recovery handler.
>  	 * Manually call the eeh failure check function.
>  	 */
> -	struct eeh_dev *eehdev =
> -		of_node_to_eeh_dev(pci_device_to_OF_node(efx->pci_dev));
> -
> +	struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);
>  	if (eeh_dev_check_failure(eehdev)) {
>  		/* The EEH mechanisms will handle the error and reset the
>  		 * device if necessary.
> diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
> index 3583f02..f12c811 100644
> --- a/drivers/net/ethernet/sfc/siena.c
> +++ b/drivers/net/ethernet/sfc/siena.c
> @@ -205,8 +205,7 @@ static int siena_map_reset_flags(u32 *flags)
>   */
>  static void siena_monitor(struct efx_nic *efx)
>  {
> -	struct eeh_dev *eehdev =
> -		of_node_to_eeh_dev(pci_device_to_OF_node(efx->pci_dev));
> +	struct eeh_dev *eehdev = pci_dev_to_eeh_dev(efx->pci_dev);
>  
>  	eeh_dev_check_failure(eehdev);
>  }
> 
> 

-- 
Many Thanks,
Regards,
Shradha Shah

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sfc fixup patch
  2015-03-23 10:55 ` Shradha Shah
@ 2015-03-23 11:05   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2015-03-23 11:05 UTC (permalink / raw)
  To: Shradha Shah; +Cc: David Miller, netdev

On Mon, 2015-03-23 at 10:55 +0000, Shradha Shah wrote:

> > net/ethernet/sfc: Don't use of_node_to_eeh_dev()
> >
> > This is deprecated, it forces the driver to hop via the OF node
> > that may or may not exist, instead use pci_dev_to_eeh_dev() which
> > is simpler.
> >
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> Acked-by: Shradha Shah <sshah@solarflare.com>

Thanks !

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-23 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23  3:10 sfc fixup patch Benjamin Herrenschmidt
2015-03-23 10:55 ` Shradha Shah
2015-03-23 11:05   ` Benjamin Herrenschmidt

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.