aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/rsrc_nonstatic.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-06-27 19:28:58 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 21:03:21 -0400
commit2ad0a0a793cbd87a87488d59abc744374669498f (patch)
tree13971415c68a769943c2323fc1659db8b40286a6 /drivers/pcmcia/rsrc_nonstatic.c
parentf861bd23076efc4c86063721b9021d82481fd6b2 (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/rsrc_nonstatic.c')
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index c8f21796c592..51aa04b7ecc9 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -372,6 +372,9 @@ static int do_mem_probe(u_long base, u_long num, struct pcmcia_socket *s)
372 base, base+num-1); 372 base, base+num-1);
373 bad = fail = 0; 373 bad = fail = 0;
374 step = (num < 0x20000) ? 0x2000 : ((num>>4) & ~0x1fff); 374 step = (num < 0x20000) ? 0x2000 : ((num>>4) & ~0x1fff);
375 /* don't allow too large steps */
376 if (step > 0x800000)
377 step = 0x800000;
375 /* cis_readable wants to map 2x map_size */ 378 /* cis_readable wants to map 2x map_size */
376 if (step < 2 * s->map_size) 379 if (step < 2 * s->map_size)
377 step = 2 * s->map_size; 380 step = 2 * s->map_size;
@@ -465,8 +468,7 @@ static void validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)
465 468
466 for (m = s_data->mem_db.next; m != &s_data->mem_db; m = mm.next) { 469 for (m = s_data->mem_db.next; m != &s_data->mem_db; m = mm.next) {
467 mm = *m; 470 mm = *m;
468 if (do_mem_probe(mm.base, mm.num, s)) 471 do_mem_probe(mm.base, mm.num, s);
469 break;
470 } 472 }
471} 473}
472 474