Hi,
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?
Only its support for a non-pci chip, the isp1160!
Plus as I recally you mentioned the structure of this board: a PLX bridge and the isp1160, with supporting glue logic.
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?
Exactly. An isp1160 driver will be useful primarily on systems without PCI ... with the exception of this PLX-based eval board!
I've seen the same structure with the TDI243 chip: a PLX-based eval board with PCI, but more typical designs don't use PCI. (Even development systems, like the ARM "Versatile" board for ARM926EJ-S.)
Now, you may not be in a position to make sure your driver works without the PLX and related glue ... but you're certainly in a position to make sure PCI-isms are limited in scope.
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...
Could be another change resolved the problem. At any rate, I'm glad your problem is solved now!
- Dave
-------------------------------------------------------
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