diff mbox series

[1/4] drm/i915: Report -ENODEV after injecting probe failure

Message ID 20190729152301.22588-2-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show
Series add more probe failures | expand

Commit Message

Michal Wajdeczko July 29, 2019, 3:22 p.m. UTC
We want to do more driver testing using injected load errors,
but we don't want to limit ourselves to use only -ENODEV (as
other errors are interpreted as real issues, like this:

<4> [381.569479] i915: probe of 0000:00:02.0 failed with error -7

Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/i915_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniele Ceraolo Spurio July 29, 2019, 5:54 p.m. UTC | #1
On 7/29/19 8:22 AM, Michal Wajdeczko wrote:
> We want to do more driver testing using injected load errors,
> but we don't want to limit ourselves to use only -ENODEV (as
> other errors are interpreted as real issues, like this:
> 
> <4> [381.569479] i915: probe of 0000:00:02.0 failed with error -7
> 
> Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

IIRC the final outcome of the discussion we had on this a while back was 
that CI would ignore this kind of error message. Anything changed? We 
already have places we return something different from -ENODEV (e.g. 
__fw_domain_init() in intel_uncore.c)

Daniele

> ---
>   drivers/gpu/drm/i915/i915_pci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index bd9211b3d76e..332949c20a29 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -956,7 +956,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>   
>   	err = i915_driver_probe(pdev, ent);
>   	if (err)
> -		return err;
> +		return i915_error_injected() ? -ENODEV : err;
>   
>   	if (i915_inject_probe_failure()) {
>   		i915_pci_remove(pdev);
>
Chris Wilson July 29, 2019, 7:45 p.m. UTC | #2
Quoting Daniele Ceraolo Spurio (2019-07-29 18:54:15)
> 
> 
> On 7/29/19 8:22 AM, Michal Wajdeczko wrote:
> > We want to do more driver testing using injected load errors,
> > but we don't want to limit ourselves to use only -ENODEV (as
> > other errors are interpreted as real issues, like this:
> > 
> > <4> [381.569479] i915: probe of 0000:00:02.0 failed with error -7
> > 
> > Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> 
> IIRC the final outcome of the discussion we had on this a while back was 
> that CI would ignore this kind of error message. Anything changed? We 
> already have places we return something different from -ENODEV (e.g. 
> __fw_domain_init() in intel_uncore.c)

If it was only a note, it would be naturally ignored... We could simply
make it a notice and justify as the base really doesn't know how severe
the error is, just that the probe failed:

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 994a90747420..877735f2dfd4 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -613,7 +613,7 @@ static int really_probe(struct device *dev, struct device_driver *drv)
                break;
        default:
                /* driver matched but the probe failed */
-               printk(KERN_WARNING
+               printk(KERN_NOTICE
                       "%s: probe of %s failed with error %d\n",
                       drv->name, dev_name(dev), ret);
        }

> 
> Daniele
> 
> > ---
> >   drivers/gpu/drm/i915/i915_pci.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> > index bd9211b3d76e..332949c20a29 100644
> > --- a/drivers/gpu/drm/i915/i915_pci.c
> > +++ b/drivers/gpu/drm/i915/i915_pci.c
> > @@ -956,7 +956,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> >   
> >       err = i915_driver_probe(pdev, ent);
> >       if (err)
> > -             return err;
> > +             return i915_error_injected() ? -ENODEV : err;
> >   
> >       if (i915_inject_probe_failure()) {
> >               i915_pci_remove(pdev);
> > 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index bd9211b3d76e..332949c20a29 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -956,7 +956,7 @@  static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = i915_driver_probe(pdev, ent);
 	if (err)
-		return err;
+		return i915_error_injected() ? -ENODEV : err;
 
 	if (i915_inject_probe_failure()) {
 		i915_pci_remove(pdev);