On Mon, 2004-07-05 at 21:57, David Brownell wrote:
> Dimitris Lampridis wrote:
> 
> > struct isp1160_hcd *isp1160 = hcd_to_isp1160 (hcd);
> > struct pci_dev *pdev = NULL;
> > 
> > if(hcd->self.controller &&(hcd->self.controller->bus == &pci_bus_type))
> 
> Needs "{" ... and probably a comment about
> the eval board used with this non-pci driver.
> 
"non-pci"??? This IS a pci board. What makes you think the opposite?
Is it something in my code that leads you to this conclusion?

> >     pdev = to_pci_dev(hcd->self.controller);
> >   
> > if (pci_request_region (pdev, 2, (char *) hcd_name))
> >     return -ENOMEM;
> 
> ... and "}" plus probably "else { ... }".  That "else"
> branch should probably use platform_device.resource[N];
> board-specific code would set up the platform device.
> 
So, if I get this right, the else {} branch that you propose, is in case
the HC is on a non-pci platform, to make sure that this driver will work
even if PCI is not configured? i.e to make the driver portable to other
implementations with the same USB controller?

> > Any ideas???
> 
> You didn't actually say what wasn't working ... the failure
> mode is always a big clue to what's wrong!
> 
Right, of course :-) The driver->reset function was aborting with an
error, but it doesn't matter now. The addition of pci_request_region
inside the if branch solved it, whatever that was (...). I just can't
stand it though when something works and I don't understand why. That
"if" branch was always evaluated "TRUE" in my case, so I don't see why
moving the request inside the branch solves the problem...

Thanx,

Dimitris



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to