lkml.org 
[lkml]   [2001]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    SubjectRe: 2.4.17-pre2 & PCMCIA Errors
    Alan Ford writes:

    > Just tried 2.4.17-pre2 (was previously on 2.4.16-pre1) and when pcmcia-cs is
    > started on bootup, the following happens:
    >
    > cs: IO port probe 0x0c00-0x0cff: clean.
    > cs: IO port probe 0x0100-0x04ff: excluding 0x4d0-0x4d7
    > cs: IO port probe 0x0a00-0x0aff: clean.
    > cs: memory probe 0xa0000000-0xa0ffffff:<1>Unable to handle kernel NULL pointer
    > dereference at virtual address 00000004

    Please try this patch and let me know whether it fixes the problem.

    Paul.

    diff -urN linux-2.4.17-pre2/drivers/pcmcia/rsrc_mgr.c pmac/drivers/pcmcia/rsrc_mgr.c
    --- linux-2.4.17-pre2/drivers/pcmcia/rsrc_mgr.c Sat Dec 1 15:49:24 2001
    +++ pmac/drivers/pcmcia/rsrc_mgr.c Mon Dec 3 14:28:16 2001
    @@ -107,17 +107,19 @@
    static struct resource *resource_parent(unsigned long b, unsigned long n,
    int flags, struct pci_dev *dev)
    {
    - struct resource res;
    + struct resource res, *pr;

    - if (dev == NULL) {
    - if (flags & IORESOURCE_MEM)
    - return &iomem_resource;
    - return &ioport_resource;
    + if (dev != NULL) {
    + res.start = b;
    + res.end = b + n - 1;
    + res.flags = flags;
    + pr = pci_find_parent_resource(dev, &res);
    + if (pr)
    + return pr;
    }
    - res.start = b;
    - res.end = b + n - 1;
    - res.flags = flags;
    - return pci_find_parent_resource(dev, &res);
    + if (flags & IORESOURCE_MEM)
    + return &iomem_resource;
    + return &ioport_resource;
    }

    static inline int check_io_resource(unsigned long b, unsigned long n,
    -
    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:18    [W:0.045 / U:62.264 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site