On Tue, Aug 14, 2007 at 10:54:32AM +0100, Mark Hindley wrote:
> On Tue, Aug 14, 2007 at 01:33:26AM -0400, Jeff Garzik wrote:
> > I would strongly prefer that vortex_up return a value, since all the
> > important callers of this function can themselves return an error back
> > to the system.
> >
> > we can definitely return a meaningful return value here, if
> > pci_enable_device() fails, and I would rather not apply a patch that
> > fails to propagate a serious condition (pci_enable_device failure is
> > indeed serious) when it is possible to do so
> >
>
> OK. Any comments on this revised version? I have only ignored the return of
> vortex_up in vortex_error. It is not immediately clear what to do if
> vortex_up still fails there after a pci reset.
>
> Mark
>
>
> diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
> index 001c66d..a1dfd6b 100644
> --- a/drivers/net/3c59x.c
> +++ b/drivers/net/3c59x.c
> @@ -705,7 +705,7 @@ static struct {
>
> static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int
> irq,
> int chip_idx, int card_idx);
> -static void vortex_up(struct net_device *dev);
> +static int vortex_up(struct net_device *dev);
> static void vortex_down(struct net_device *dev, int final);
> static int vortex_open(struct net_device *dev);
> static void mdio_sync(void __iomem *ioaddr, int bits);
> @@ -841,8 +841,11 @@ static int vortex_resume(struct pci_dev *pdev)
> return -EBUSY;
> }
> if (netif_running(dev)) {
> - vortex_up(dev);
> - netif_device_attach(dev);
> + err = vortex_up(dev);
> + if (err)
> + return err;
> + else
> + netif_device_attach(dev);
> }
> }
> return 0;
I think we should free the requested irq if vortex_up really fails here.
Steffen
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html