Re: [PATCH] pcmcia: add socket_offset for multiple pci_sockets, correct suspend&resume

From: Russell King (rmk@arm.linux.org.uk)
Date: Sun Feb 23 2003 - 07:00:11 EST


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/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:38 EST