cardbus/hotplugging still broken in 2.5.56
Quoted 4 lines · Jens Taprogge
You are not freeing the possibly already allocated resources in case of a failure of either
pci_assign_resource()orpca_enable_device(). In fact you are not even checking ifpci_assign_resource()fails. That seems wrong to me.
There are two separate issues :
1) Fix the "ressource collisions" problem (and irq not known).
2) Freeing ressources in case of failure of some functions.
My patch solves the first issue only in order to make cardbus with rom work. The point 2 is a janitor work.
Thanks,
Yaacov Akiba Slama
I am not sure if you have seen the patch I posted on l-k. It should fix both issues.
Jens
Quoted 16 lines · Yaacov Akiba Slama
Quoted 4 lines · Jens Taprogge
You are not freeing the possibly already allocated resources in case of a failure of either
pci_assign_resource()orpca_enable_device(). In fact you are not even checking ifpci_assign_resource()fails. That seems wrong to me.There are two separate issues :
1) Fix the "ressource collisions" problem (and irq not known).
2) Freeing ressources in case of failure of some functions.My patch solves the first issue only in order to make cardbus with rom work. The point 2 is a janitor work.
Thanks,
Yaacov Akiba Slama
Signature · 1 line
Jens Taprogge
Quoted 3 lines · [email protected] wrote:
I am not sure if you have seen the patch I posted on l-k. It should fix both issues.
I don't know enough about pci/cardbus, but in arch/i386/pci.c::pcibios_assign_resources, I can see the following :
if (!r->start && r->end)
pci_assign_resource(dev, idx);
without testing the result and without freeing the ressource for all index if it fails on one index. So I don't know if your tests are necessary. Beside that, testing (!r->start && r->end) seems to be more in sync with arch/i386/pci.c than testing r->flags
Thanks,
Yaacov Akiba Slama
Quoted 30 lines
Jens
Quoted 21 lines · Yaacov Akiba Slama
Quoted 6 lines · Jens Taprogge
You are not freeing the possibly already allocated resources in case of a failure of either
pci_assign_resource()orpca_enable_device(). In fact you are not even checking ifpci_assign_resource()fails. That seems wrong to me.There are two separate issues :
1) Fix the "ressource collisions" problem (and irq not known).
2) Freeing ressources in case of failure of some functions.My patch solves the first issue only in order to make cardbus with rom work. The point 2 is a janitor work.
Thanks,
Yaacov Akiba Slama