Hello Dave,
The lis_pci_find_device() function has a problem.
It calls native pci_find_device() function only once for given vendor
and device ids in slot. This approach does not work good for the
hot plug-able devices, since Linux deallocates pci_dev structure
when card is removed and allocates new pci_dev structure when card
is plugged back in.
As a result, when the lis_pci_find_device() function is called from,
say, driver's probe function for device that is re-inserted, it returns
lis_pci_dev pointer that in turn refers to a pci_dev pointer
(through kern_ptr) that is no longer valid.
The offending code is this one:
while(p != NULL)
{
if (p->vendor == vendor && p->device == device) return(p) ; <----- (1)
p = p->next;
}
kp = pci_find_device(vendor, device, prev_kp) ; (2)
The (1) returns without calling (2), with an old kern_ptr pointer.
That causes problems(like system panic) when card is re-inserted
since old kern_ptr pointer is invalid then.
It looks to me like, pci_find_device() should be called every time
the lis_pci_find_device() is called. No shortcuts.
The lis_pci_find_class(), lis_pci_find_slot() are susceptible to the same problem.
--
Eugene
__________________________________________________________________
Introducing the New Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp
_______________________________________________
Linux-streams mailing list
[EMAIL PROTECTED]
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams