Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3816
b: refs/heads/master
c: 2ad0a0a
h: refs/heads/master
v: v3
  • Loading branch information
Dominik Brodowski authored and Linus Torvalds committed Jun 28, 2005
1 parent 4c9dda8 commit d15e6cb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f861bd23076efc4c86063721b9021d82481fd6b2
refs/heads/master: 2ad0a0a793cbd87a87488d59abc744374669498f
9 changes: 8 additions & 1 deletion trunk/drivers/pcmcia/cistpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ static void __iomem *
set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flags)
{
pccard_mem_map *mem = &s->cis_mem;
int ret;

if (!(s->features & SS_CAP_STATIC_MAP) && mem->res == NULL) {
mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s);
if (mem->res == NULL) {
Expand All @@ -99,7 +101,12 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag
}
mem->card_start = card_offset;
mem->flags = flags;
s->ops->set_mem_map(s, mem);
ret = s->ops->set_mem_map(s, mem);
if (ret) {
iounmap(s->cis_virt);
return NULL;
}

if (s->features & SS_CAP_STATIC_MAP) {
if (s->cis_virt)
iounmap(s->cis_virt);
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/pcmcia/rsrc_nonstatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ static int do_mem_probe(u_long base, u_long num, struct pcmcia_socket *s)
base, base+num-1);
bad = fail = 0;
step = (num < 0x20000) ? 0x2000 : ((num>>4) & ~0x1fff);
/* don't allow too large steps */
if (step > 0x800000)
step = 0x800000;
/* cis_readable wants to map 2x map_size */
if (step < 2 * s->map_size)
step = 2 * s->map_size;
Expand Down Expand Up @@ -465,8 +468,7 @@ static void validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)

for (m = s_data->mem_db.next; m != &s_data->mem_db; m = mm.next) {
mm = *m;
if (do_mem_probe(mm.base, mm.num, s))
break;
do_mem_probe(mm.base, mm.num, s);
}
}

Expand Down

0 comments on commit d15e6cb

Please sign in to comment.