diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-06-27 19:28:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 21:03:21 -0400 |
commit | 2ad0a0a793cbd87a87488d59abc744374669498f (patch) | |
tree | 13971415c68a769943c2323fc1659db8b40286a6 /drivers/pcmcia/cistpl.c | |
parent | f861bd23076efc4c86063721b9021d82481fd6b2 (diff) |
[PATCH] pcmcia: resource handling fixes
- properly bail out in set_cis_map if call to socket driver's set_mem_map
failed
- don't abort do_mem_probe cycle if one entry failed (!CONFIG_PCMCIA_PROBE)
- don't do iomem probing in chunks larger than 0x800000 (1 << 23) as
yenta_socket and vrc4173_cardu.c fail to set_mem_map for windows equal to
or larger than (1 << 24).
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia/cistpl.c')
-rw-r--r-- | drivers/pcmcia/cistpl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 8567f4fad501..dd7651ff5b43 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c | |||
@@ -89,6 +89,8 @@ static void __iomem * | |||
89 | set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flags) | 89 | set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flags) |
90 | { | 90 | { |
91 | pccard_mem_map *mem = &s->cis_mem; | 91 | pccard_mem_map *mem = &s->cis_mem; |
92 | int ret; | ||
93 | |||
92 | if (!(s->features & SS_CAP_STATIC_MAP) && mem->res == NULL) { | 94 | if (!(s->features & SS_CAP_STATIC_MAP) && mem->res == NULL) { |
93 | mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s); | 95 | mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s); |
94 | if (mem->res == NULL) { | 96 | if (mem->res == NULL) { |
@@ -99,7 +101,12 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag | |||
99 | } | 101 | } |
100 | mem->card_start = card_offset; | 102 | mem->card_start = card_offset; |
101 | mem->flags = flags; | 103 | mem->flags = flags; |
102 | s->ops->set_mem_map(s, mem); | 104 | ret = s->ops->set_mem_map(s, mem); |
105 | if (ret) { | ||
106 | iounmap(s->cis_virt); | ||
107 | return NULL; | ||
108 | } | ||
109 | |||
103 | if (s->features & SS_CAP_STATIC_MAP) { | 110 | if (s->features & SS_CAP_STATIC_MAP) { |
104 | if (s->cis_virt) | 111 | if (s->cis_virt) |
105 | iounmap(s->cis_virt); | 112 | iounmap(s->cis_virt); |