lkml.org 
[lkml]   [2013]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cciss: return 0 from driver probe function on success, not 1
On Thu, 31 Oct 2013 16:54:44 -0500 scameron@beardog.cce.hp.com wrote:

> > > How did this ever work?
> >
> > Beats me. local_pci_probe() does
> >
> > rc = pci_drv->probe(pci_dev, ddi->id);
> > if (rc) {
> > pci_dev->driver = NULL;
> > pm_runtime_put_sync(dev);
> > }
> > return rc;
> >
> > shrug, maybe this ->probe somehow has a different caller which checks
> > for <0.
>
> Older kernels (eg: http://lxr.linux.no/#linux+v2.6.32.61/drivers/pci/pci-driver.c )
> had different code:
>
> 330__pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)
> 331{
> 332 const struct pci_device_id *id;
> 333 int error = 0;
> 334
> 335 if (!pci_dev->driver && drv->probe) {
> 336 error = -ENODEV;
> 337
> 338 id = pci_match_device(drv, pci_dev);
> 339 if (id)
> 340 error = pci_call_probe(drv, pci_dev, id);
> 341 if (error >= 0) {
> 342 pci_dev->driver = drv;
> 343 error = 0;
> 344 }
> 345 }
> 346 return error;
> 347}

So cciss is presently kompletely kaput? If so, the kapputting code is
present in 3.9 and probably earlier, so this patch is needed in 3.12 and
-stable. Or if not, what?

(Playing question and answer like this is a bad way of writing a
changelog btw - all this stuff should have been right there in the v1
changelog).



\
 
 \ /
  Last update: 2013-10-31 23:21    [W:0.110 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site