]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 Dec 2009 20:33:02 +0000 (12:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 Dec 2009 20:33:02 +0000 (12:33 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  pcmcia: CodingStyle fixes
  pcmcia: remove unused IRQ_FIRST_SHARED

1  2 
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/pcmcia/Kconfig
drivers/pcmcia/cardbus.c

index 81bafd57847814ef6875ff1447c092a5e24e1a03,cb2ce03bd681827abde4ed3de64f367ee6fc5150..d431b59e7d11bda7b203a96cec3217570344eade
@@@ -270,7 -270,7 +270,7 @@@ static int try_io_port(struct pcmcia_de
            /* for master/slave multifunction cards */
            link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
            link->irq.Attributes =
-               IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
+               IRQ_TYPE_DYNAMIC_SHARING;
        }
      } else {
        /* This should be two 16-port windows */
@@@ -1214,8 -1214,8 +1214,8 @@@ static irqreturn_t ax_interrupt(int irq
        ei_local->irqlock = 1;
     
        /* !!Assumption!! -- we stay in page 0.  Don't break this. */
 -      while ((interrupts = inb_p(e8390_base + EN0_ISR)) != 0
 -                 && ++nr_serviced < MAX_SERVICE) 
 +      while ((interrupts = inb_p(e8390_base + EN0_ISR)) != 0 &&
 +             ++nr_serviced < MAX_SERVICE)
        {
                if (!netif_running(dev) || (interrupts == 0xff)) {
                        if (ei_debug > 1)
index 8ad8384fc1c04ebde288ca9e8846d6b0ddb12eb7,fc5a890ba0a997357304d71449a6a988ecdde11f..813aca3fc433eed9d3411091e182e9f95c2602ca
@@@ -256,7 -256,7 +256,7 @@@ static int fmvj18x_probe(struct pcmcia_
  
      /* Interrupt setup */
      link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
 -    link->irq.Handler = &fjn_interrupt;
 +    link->irq.Handler = fjn_interrupt;
  
      /* General socket configuration */
      link->conf.Attributes = CONF_ENABLE_IRQ;
@@@ -364,9 -364,9 +364,9 @@@ static int fmvj18x_config(struct pcmcia
        switch (link->manf_id) {
        case MANFID_TDK:
            cardtype = TDK;
 -          if (link->card_id == PRODID_TDK_GN3410
 -                      || link->card_id == PRODID_TDK_NP9610
 -                      || link->card_id == PRODID_TDK_MN3200) {
 +          if (link->card_id == PRODID_TDK_GN3410 ||
 +              link->card_id == PRODID_TDK_NP9610 ||
 +              link->card_id == PRODID_TDK_MN3200) {
                /* MultiFunction Card */
                link->conf.ConfigBase = 0x800;
                link->conf.ConfigIndex = 0x47;
  
      if (link->io.NumPorts2 != 0) {
        link->irq.Attributes =
-               IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
+               IRQ_TYPE_DYNAMIC_SHARING;
        ret = mfc_try_io_port(link);
        if (ret != 0) goto failed;
      } else if (cardtype == UNGERMANN) {
@@@ -582,11 -582,11 +582,11 @@@ static int fmvj18x_get_hwinfo(struct pc
      */ 
      for (i = 0; i < 0x200; i++) {
        if (readb(base+i*2) == 0x22) {  
 -          if (readb(base+(i-1)*2) == 0xff
 -           && readb(base+(i+5)*2) == 0x04
 -           && readb(base+(i+6)*2) == 0x06
 -           && readb(base+(i+13)*2) == 0xff) 
 -              break;
 +              if (readb(base+(i-1)*2) == 0xff &&
 +                  readb(base+(i+5)*2) == 0x04 &&
 +                  readb(base+(i+6)*2) == 0x06 &&
 +                  readb(base+(i+13)*2) == 0xff)
 +                      break;
        }
      }
  
@@@ -1186,8 -1186,8 +1186,8 @@@ static void set_rx_mode(struct net_devi
      if (dev->flags & IFF_PROMISC) {
        memset(mc_filter, 0xff, sizeof(mc_filter));
        outb(3, ioaddr + RX_MODE);      /* Enable promiscuous mode */
 -    } else if (dev->mc_count > MC_FILTERBREAK
 -             ||  (dev->flags & IFF_ALLMULTI)) {
 +    } else if (dev->mc_count > MC_FILTERBREAK ||
 +             (dev->flags & IFF_ALLMULTI)) {
        /* Too many to filter perfectly -- accept all multicasts. */
        memset(mc_filter, 0xff, sizeof(mc_filter));
        outb(2, ioaddr + RX_MODE);      /* Use normal mode. */
index 2d26b6ca28b92949fd543b484d916a187c6bcaed,f41fbcc34327dc737bf0e3a78419e7bc35290ab1..92ed3fbf89a570c8c063521d3613828976e71461
@@@ -490,7 -490,7 +490,7 @@@ static int try_io_port(struct pcmcia_de
            /* for master/slave multifunction cards */
            link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
            link->irq.Attributes =
-               IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
+               IRQ_TYPE_DYNAMIC_SHARING;
        }
      } else {
        /* This should be two 16-port windows */
@@@ -586,8 -586,8 +586,8 @@@ static int pcnet_config(struct pcmcia_d
        dev->if_port = 0;
      }
  
 -    if ((link->conf.ConfigBase == 0x03c0)
 -      && (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) {
 +    if ((link->conf.ConfigBase == 0x03c0) &&
 +      (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) {
        printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n");
        printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n");
        goto failed;
@@@ -1751,13 -1751,6 +1751,13 @@@ static struct pcmcia_device_id pcnet_id
        PCMCIA_DEVICE_NULL
  };
  MODULE_DEVICE_TABLE(pcmcia, pcnet_ids);
 +MODULE_FIRMWARE("cis/PCMLM28.cis");
 +MODULE_FIRMWARE("cis/DP83903.cis");
 +MODULE_FIRMWARE("cis/LA-PCM.cis");
 +MODULE_FIRMWARE("PE520.cis");
 +MODULE_FIRMWARE("cis/NE2K.cis");
 +MODULE_FIRMWARE("cis/PE-200.cis");
 +MODULE_FIRMWARE("cis/tamarack.cis");
  
  static struct pcmcia_driver pcnet_driver = {
        .drv            = {
index cc4853bc025354ff62066ea9919598da1463b82d,49185c3c12016a30c1d5ab63b8c555ea8e642dd2..6dd486d2977ba47c5ea72d98c2ea2d3378ebd435
@@@ -454,7 -454,7 +454,7 @@@ static int mhz_mfc_config(struct pcmcia
      link->conf.Attributes |= CONF_ENABLE_SPKR;
      link->conf.Status = CCSR_AUDIO_ENA;
      link->irq.Attributes =
-       IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
+       IRQ_TYPE_DYNAMIC_SHARING;
      link->io.IOAddrLines = 16;
      link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
      link->io.NumPorts2 = 8;
        mem.CardOffset = link->conf.ConfigBase;
      i = pcmcia_map_mem_page(link, link->win, &mem);
  
 -    if ((i == 0)
 -      && (smc->manfid == MANFID_MEGAHERTZ)
 -      && (smc->cardid == PRODID_MEGAHERTZ_EM3288))
 -      mhz_3288_power(link);
 +    if ((i == 0) &&
 +      (smc->manfid == MANFID_MEGAHERTZ) &&
 +      (smc->cardid == PRODID_MEGAHERTZ_EM3288))
 +          mhz_3288_power(link);
  
      return 0;
  }
index a2eda28f903ea6e6ccd2b4104280e28d3314c07d,55fa5ca245d14d39d172233a6fbffc94c6895ec4..466fc72698c03c4599e78f961e257c2d1013cf92
@@@ -385,9 -385,9 +385,9 @@@ PrintRegisters(struct net_device *dev
            printk("\n");
        }
        for (page=0x40 ; page <= 0x5f; page++) {
 -          if (page == 0x43 || (page >= 0x46 && page <= 0x4f)
 -              || (page >= 0x51 && page <=0x5e))
 -              continue;
 +              if (page == 0x43 || (page >= 0x46 && page <= 0x4f) ||
 +                  (page >= 0x51 && page <=0x5e))
 +                      continue;
            printk(KDBG_XIRC "Register page %2x: ", page);
            SelectPage(page);
            for (i = 8; i < 16; i++)
@@@ -841,7 -841,7 +841,7 @@@ xirc2ps_config(struct pcmcia_device * l
            link->conf.Attributes |= CONF_ENABLE_SPKR;
            link->conf.Status |= CCSR_AUDIO_ENA;
        }
-       link->irq.Attributes |= IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED ;
+       link->irq.Attributes |= IRQ_TYPE_DYNAMIC_SHARING;
        link->io.NumPorts2 = 8;
        link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
        if (local->dingo) {
diff --combined drivers/pcmcia/Kconfig
index 58bee55a3dd38e75990051ff44be4015368ec035,6dc22770d8bc06d4623077fa6f20d03ad1f94f4d..9f3adbd9f7005e02b6886f5915f42faaee89994f
@@@ -64,7 -64,7 +64,7 @@@ config PCMCIA_IOCT
          If unsure, say Y.
  
  config CARDBUS
-       bool "32-bit CardBus support"   
+       bool "32-bit CardBus support"
        depends on PCI
        default y
        ---help---
@@@ -87,8 -87,8 +87,8 @@@ config YENT
        select PCCARD_NONSTATIC
        ---help---
          This option enables support for CardBus host bridges.  Virtually
-         all modern PCMCIA bridges are CardBus compatible.  A "bridge" is 
-         the hardware inside your computer that PCMCIA cards are plugged 
+         all modern PCMCIA bridges are CardBus compatible.  A "bridge" is
+         the hardware inside your computer that PCMCIA cards are plugged
          into.
  
          To compile this driver as modules, choose M here: the
@@@ -179,7 -179,7 +179,7 @@@ config PCMCIA_BCM63X
        depends on BCM63XX && PCMCIA
  
  config PCMCIA_SOC_COMMON
 -      bool
 +      tristate
  
  config PCMCIA_SA1100
        tristate "SA1100 support"
@@@ -208,7 -208,7 +208,7 @@@ config PCMCIA_PXA2X
        depends on ARM && ARCH_PXA && PCMCIA
        depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
                    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
 -                  || ARCH_VIPER || ARCH_PXA_ESERIES || MACH_STARGATE2)
 +                  || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2)
        select PCMCIA_SOC_COMMON
        help
          Say Y here to include support for the PXA2xx PCMCIA controller
diff --combined drivers/pcmcia/cardbus.c
index a73b040ddbfb81102fffe2a6da4768155f7689e3,5e9b636cbf71adc264a462d59ca2205ea55bd422..cdf50f3bc2df389af234ed8976017ba5c717e218
@@@ -27,8 -27,8 +27,8 @@@
  #include <linux/mm.h>
  #include <linux/pci.h>
  #include <linux/ioport.h>
+ #include <linux/io.h>
  #include <asm/irq.h>
- #include <asm/io.h>
  
  #include <pcmcia/cs_types.h>
  #include <pcmcia/ss.h>
@@@ -58,7 -58,7 +58,7 @@@
      image number and an offset within that image.  xlate_rom_addr()
      converts an image/offset address to an absolute offset from the
      ROM's base address.
-     
  =====================================================================*/
  
  static u_int xlate_rom_addr(void __iomem *b, u_int addr)
      These are similar to setup_cis_mem and release_cis_mem for 16-bit
      cards.  The "result" that is used externally is the cb_cis_virt
      pointer in the struct pcmcia_socket structure.
-     
  =====================================================================*/
  
- static void cb_release_cis_mem(struct pcmcia_socket * s)
+ static void cb_release_cis_mem(struct pcmcia_socket *s)
  {
        if (s->cb_cis_virt) {
                dev_dbg(&s->dev, "cb_release_cis_mem()\n");
@@@ -98,7 -98,7 +98,7 @@@
        }
  }
  
- static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res)
+ static int cb_setup_cis_mem(struct pcmcia_socket *s, struct resource *res)
  {
        unsigned int start, size;
  
  
      This is used by the CIS processing code to read CIS information
      from a CardBus device.
-     
  =====================================================================*/
  
- int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void *ptr)
+ int read_cb_mem(struct pcmcia_socket *s, int space, u_int addr, u_int len,
+               void *ptr)
  {
        struct pci_dev *dev;
        struct resource *res;
@@@ -181,47 -182,40 +182,47 @@@ fail
      cb_alloc() and cb_free() allocate and free the kernel data
      structures for a Cardbus device, and handle the lowest level PCI
      device setup issues.
-     
  =====================================================================*/
  
 -/*
 - * Since there is only one interrupt available to CardBus
 - * devices, all devices downstream of this device must
 - * be using this IRQ.
 - */
 -static void cardbus_assign_irqs(struct pci_bus *bus, int irq)
 +static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq)
  {
        struct pci_dev *dev;
  
        list_for_each_entry(dev, &bus->devices, bus_list) {
                u8 irq_pin;
  
 +              /*
 +               * Since there is only one interrupt available to
 +               * CardBus devices, all devices downstream of this
 +               * device must be using this IRQ.
 +               */
                pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &irq_pin);
                if (irq_pin) {
                        dev->irq = irq;
                        pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
                }
  
 +              /*
 +               * Some controllers transfer very slowly with 0 CLS.
 +               * Configure it.  This may fail as CLS configuration
 +               * is mandatory only for MWI.
 +               */
 +              pci_set_cacheline_size(dev);
 +
                if (dev->subordinate)
 -                      cardbus_assign_irqs(dev->subordinate, irq);
 +                      cardbus_config_irq_and_cls(dev->subordinate, irq);
        }
  }
  
- int __ref cb_alloc(struct pcmcia_socket * s)
+ int __ref cb_alloc(struct pcmcia_socket *s)
  {
        struct pci_bus *bus = s->cb_dev->subordinate;
        struct pci_dev *dev;
        unsigned int max, pass;
  
        s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0));
- //    pcibios_fixup_bus(bus);
+ /*    pcibios_fixup_bus(bus); */
  
        max = bus->secondary;
        for (pass = 0; pass < 2; pass++)
         */
        pci_bus_size_bridges(bus);
        pci_bus_assign_resources(bus);
 -      cardbus_assign_irqs(bus, s->pci_irq);
 +      cardbus_config_irq_and_cls(bus, s->pci_irq);
  
        /* socket specific tune function */
        if (s->tune_bridge)
        return 0;
  }
  
- void cb_free(struct pcmcia_socket * s)
+ void cb_free(struct pcmcia_socket *s)
  {
        struct pci_dev *bridge = s->cb_dev;