pcmcia fixes for 2.5
PATCH RESEND 1/1 pcmcia fixes for 2.5
The patch below is a forward-port of PCMCIA fixes from 2.4 to 2.5.
It changes the pcmcia resource allocation code so that it allocates IO and memory resources from the correct resource parent. The details were discussed on lkml last year in the 2.4 context. I need this on powerbooks because they have multiple PCI host bridges.
Linus, please apply this to your tree.
Thanks,
Paul.
drivers/pcmcia/cistpl.c +2 -2
@@ -264,11 +264,11 @@ (s->cis_mem.sys_start == 0)) {int low = !(s->cap.features &SS_CAP_PAGE_REGS ); vs = s; -validate_mem (cis_readable, checksum_match, low); +validate_mem (cis_readable, checksum_match, low, s); s->cis_mem.sys_start =0 ; vs =NULL ;if (find_mem_region (&s->cis_mem.sys_start, s->cap.map_size, - s->cap.map_size, low,"card services" )) { + s->cap.map_size, low,"card services" , s)) {printk (KERN_NOTICE "cs: unable to map card memory!\n" );return CS_OUT_OF_RESOURCE ; }
drivers/pcmcia/cs.c +4 -4
@@ -809,7 +809,7 @@return 1 ;for (i =0 ; i <MAX_IO_WIN ; i++) {if (s->io[i].NumPorts ==0 ) { -if (find_io_region (base, num, align, name) ==0 ) { +if (find_io_region (base, num, align, name, s) ==0 ) { s->io[i].Attributes = attr; s->io[i].BasePort = *base; s->io[i].NumPorts = s->io[i].InUse = num;
@@ -821,7 +821,7 @@/* Try to extend top of window */ try = s->io[i].BasePort + s->io[i].NumPorts;if ((*base ==0 ) || (*base == try)) -if (find_io_region (&try, num,0 , name) ==0 ) { +if (find_io_region (&try, num,0 , name, s) ==0 ) { *base = try; s->io[i].NumPorts += num; s->io[i].InUse += num;
@@ -830,7 +830,7 @@/* Try to extend bottom of window */ try = s->io[i].BasePort - num;if ((*base ==0 ) || (*base == try)) -if (find_io_region (&try, num,0 , name) ==0 ) { +if (find_io_region (&try, num,0 , name, s) ==0 ) { s->io[i].BasePort = *base = try; s->io[i].NumPorts += num; s->io[i].InUse += num;
@@ -1974,7 +1974,7 @@find_mem_region (&win->base, win->size, align, (req->Attributes &WIN_MAP_BELOW_1MB ) || !(s->cap.features &SS_CAP_PAGE_REGS ), - (*handle)->dev_info)) + (*handle)->dev_info, s)) return CS_IN_USE; (*handle)->state |=CLIENT_WIN_REQ (w);
drivers/pcmcia/cs_internal.h +3 -3
@@ -238,11 +238,11 @@/* In rsrc_mgr */ void validate_mem (int (*is_valid)(u_long ),int (*do_cksum)(u_long ), -int force_low); +int force_low,socket_info_t *s);int find_io_region (ioaddr_t *base,ioaddr_t num,ioaddr_t align, -char *name); +char *name,socket_info_t *s);int find_mem_region (u_long *base,u_long num,u_long align, -int force_low,char *name); +int force_low,char *name,socket_info_t *s);int try_irq (u_int Attributes,int irq,int specific);void undo_irq (u_int Attributes,int irq);int adjust_resource_info (client_handle_t handle,adjust_t *adj);
drivers/pcmcia/rsrc_mgr.c +97 -22
234 lines not on this page · raw message