From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/drivers/pcmcia/cistpl.c | 50 ++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) (limited to 'kernel/drivers/pcmcia/cistpl.c') diff --git a/kernel/drivers/pcmcia/cistpl.c b/kernel/drivers/pcmcia/cistpl.c index 64d0515b7..55ef7d1fd 100644 --- a/kernel/drivers/pcmcia/cistpl.c +++ b/kernel/drivers/pcmcia/cistpl.c @@ -94,8 +94,7 @@ static void __iomem *set_cis_map(struct pcmcia_socket *s, mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s); if (mem->res == NULL) { - dev_printk(KERN_NOTICE, &s->dev, - "cs: unable to map card memory!\n"); + dev_notice(&s->dev, "cs: unable to map card memory!\n"); return NULL; } s->cis_virt = NULL; @@ -381,8 +380,7 @@ int verify_cis_cache(struct pcmcia_socket *s) buf = kmalloc(256, GFP_KERNEL); if (buf == NULL) { - dev_printk(KERN_WARNING, &s->dev, - "no memory for verifying CIS\n"); + dev_warn(&s->dev, "no memory for verifying CIS\n"); return -ENOMEM; } mutex_lock(&s->ops_mutex); @@ -414,14 +412,14 @@ int pcmcia_replace_cis(struct pcmcia_socket *s, const u8 *data, const size_t len) { if (len > CISTPL_MAX_CIS_SIZE) { - dev_printk(KERN_WARNING, &s->dev, "replacement CIS too big\n"); + dev_warn(&s->dev, "replacement CIS too big\n"); return -EINVAL; } mutex_lock(&s->ops_mutex); kfree(s->fake_cis); s->fake_cis = kmalloc(len, GFP_KERNEL); if (s->fake_cis == NULL) { - dev_printk(KERN_WARNING, &s->dev, "no memory to replace CIS\n"); + dev_warn(&s->dev, "no memory to replace CIS\n"); mutex_unlock(&s->ops_mutex); return -ENOMEM; } @@ -434,17 +432,17 @@ int pcmcia_replace_cis(struct pcmcia_socket *s, /* The high-level CIS tuple services */ -typedef struct tuple_flags { +struct tuple_flags { u_int link_space:4; u_int has_link:1; u_int mfc_fn:3; u_int space:4; -} tuple_flags; +}; -#define LINK_SPACE(f) (((tuple_flags *)(&(f)))->link_space) -#define HAS_LINK(f) (((tuple_flags *)(&(f)))->has_link) -#define MFC_FN(f) (((tuple_flags *)(&(f)))->mfc_fn) -#define SPACE(f) (((tuple_flags *)(&(f)))->space) +#define LINK_SPACE(f) (((struct tuple_flags *)(&(f)))->link_space) +#define HAS_LINK(f) (((struct tuple_flags *)(&(f)))->has_link) +#define MFC_FN(f) (((struct tuple_flags *)(&(f)))->mfc_fn) +#define SPACE(f) (((struct tuple_flags *)(&(f)))->space) int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple) @@ -1451,26 +1449,16 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *info) done: /* invalidate CIS cache on failure */ if (!dev_ok || !ident_ok || !count) { -#if defined(CONFIG_MTD_PCMCIA_ANONYMOUS) - /* Set up as an anonymous card. If we don't have anonymous - memory support then just error the card as there is no - point trying to second guess. - - Note: some cards have just a device entry, it may be - worth extending support to cover these in future */ - if (!dev_ok || !ident_ok) { - dev_info(&s->dev, "no CIS, assuming an anonymous memory card.\n"); - pcmcia_replace_cis(s, "\xFF", 1); - count = 1; - ret = 0; - } else -#endif - { - mutex_lock(&s->ops_mutex); - destroy_cis_cache(s); - mutex_unlock(&s->ops_mutex); + mutex_lock(&s->ops_mutex); + destroy_cis_cache(s); + mutex_unlock(&s->ops_mutex); + /* We differentiate between dev_ok, ident_ok and count + failures to allow for an override for anonymous cards + in ds.c */ + if (!dev_ok || !ident_ok) ret = -EIO; - } + else + ret = -EFAULT; } if (info) -- cgit 1.2.3-korg