lkml.org 
[lkml]   [2003]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pcmcia: add socket_offset for multiple pci_sockets, correct suspend&resume
On Sun, Feb 23, 2003 at 10:06:08AM +0100, Dominik Brodowski wrote:
> diff -ruN linux-original/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c
> --- linux-original/drivers/pcmcia/cs.c 2003-02-23 10:04:03.000000000 +0100
> +++ linux/drivers/pcmcia/cs.c 2003-02-23 10:04:25.000000000 +0100
> @@ -337,13 +337,14 @@
> return -ENOMEM;
> memset(s_info, 0, cls_d->nsock * sizeof(socket_info_t));
>
> + cls_d->s_info = s_info;
> +
> /* socket initialization */
> for (i = 0; i < cls_d->nsock; i++) {
> socket_info_t *s = &s_info[i];
>
> - cls_d->s_info[i] = s;
> s->ss_entry = cls_d->ops;
> - s->sock = i;
> + s->sock = i + cls_d->sock_offset;
>
> /* base address = 0, map = 0 */
> s->cis_mem.flags = 0;

I think you missed changing:

s->ss_entry->inquire_socket(i, &s->cap);

to:

s->ss_entry->inquire_socket(s->sock, &s->cap);

otherwise both sockets end up pointing at the same cb_dev.

--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.039 / U:13.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site