Date: Saturday, February 27, 2010 @ 12:38:42
  Author: tpowa
Revision: 70635

upgpkg: fcpcmcia 31107-50
rebuild against .33 kernel

Added:
  fcpcmcia/trunk/kernel-2.6.33.patch
Modified:
  fcpcmcia/trunk/PKGBUILD
  fcpcmcia/trunk/fcpcmcia.install

---------------------+
 PKGBUILD            |   19 ++---
 fcpcmcia.install    |    4 -
 kernel-2.6.33.patch |  188 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 201 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2010-02-27 17:34:45 UTC (rev 70634)
+++ PKGBUILD    2010-02-27 17:38:42 UTC (rev 70635)
@@ -3,17 +3,17 @@
 
 pkgname=fcpcmcia
 pkgver=31107
-pkgrel=49
-_kernver=2.6.32-ARCH
+pkgrel=50
+_kernver=2.6.33-ARCH
 pkgdesc="AVM ISDN driver for FRITZ PCMCIA isdn cards. For stock arch 2.6 
kernel"
 arch=(i686 x86_64)
 license=('custom:"AVM"' 'LPGL')
 url="http://www.avm.de";
-depends=('capi4k-utils' 'kernel26>=2.6.32.3' 'kernel26<2.6.33')
-makedepends=('kernel26-headers>=2.6.32' 'kernel26-headers<2.6.33')
+depends=('capi4k-utils' 'kernel26>=2.6.33' 'kernel26<2.6.34')
+makedepends=('kernel26-headers>=2.6.33' 'kernel26-headers<2.6.34')
 if [ "$CARCH" = "i686" ]; then 
source=(ftp://ftp.avm.de/cardware/fritzcrd.pcm/linux/suse.93/fcpcmcia-suse93-3.11-07.tar.gz
         pcmcia-2.6.17.patch atomic.patch kernel-2.6.19.patch 
kernel-2.6.20.patch kernel-2.6.22.patch kernel-2.6.24.patch\
-        kernel-2.6.27.patch kernel-2.6.28.patch kernel-2.6.31.patch)
+        kernel-2.6.27.patch kernel-2.6.28.patch kernel-2.6.31.patch 
kernel-2.6.33.patch)
  md5sums=('96fc3e72afdc2087b4dafe41c069ec18'
          'ec21dee3a5a09203dc55b399c29bc58c'
          '258b13bb2ac46960b9c91635f02cd080'
@@ -23,11 +23,12 @@
          '21bfa466b1fb94663ed1f265948dba5e'
          'e32439084b62ee7975ae45a443b6eba9'
          'e953a90fe3d08ebbd8736f66902414dc'
-         '34f5b78b219de8ce12793b16e0171e87')
+         '34f5b78b219de8ce12793b16e0171e87'
+         '410f077bbe271e924be6d8b6b5f9540d')
 fi
 if [ "$CARCH" = "x86_64" ]; then 
source=(ftp://ftp.avm.de/cardware/fritzcrd.pcm/linux_64bit/suse.10.0/fcpcmcia-suse10.0-64bit-3.11-07.tar.gz
         pcmcia-2.6.17.patch atomic.patch kernel-2.6.19.patch 
kernel-2.6.20.patch kernel-2.6.22.patch kernel-2.6.24.patch\
-        kernel-2.6.27.patch kernel-2.6.28.patch kernel-2.6.31.patch)
+        kernel-2.6.27.patch kernel-2.6.28.patch kernel-2.6.31.patch 
kernel-2.6.33.patch)
 md5sums=('4f461710cf57ebf50b3c4f2842288752'
          'ec21dee3a5a09203dc55b399c29bc58c'
          '258b13bb2ac46960b9c91635f02cd080'
@@ -37,7 +38,8 @@
          '21bfa466b1fb94663ed1f265948dba5e'
          'e32439084b62ee7975ae45a443b6eba9'
          'e953a90fe3d08ebbd8736f66902414dc'
-         '34f5b78b219de8ce12793b16e0171e87')
+         '34f5b78b219de8ce12793b16e0171e87'
+         '410f077bbe271e924be6d8b6b5f9540d')
 fi
 install=(fcpcmcia.install)
 options=(!makeflags)
@@ -52,6 +54,7 @@
   patch -Np2 -i ../../kernel-2.6.27.patch || return 1
   patch -Np1 -i ../../kernel-2.6.28.patch || return 1
   patch -Np0 -i ../../kernel-2.6.31.patch || return 1
+  patch -Np0 -i ../../kernel-2.6.33.patch || return 1
 
   cd ..
   # fix from Karsten Keil <[email protected]>

Modified: fcpcmcia.install
===================================================================
--- fcpcmcia.install    2010-02-27 17:34:45 UTC (rev 70634)
+++ fcpcmcia.install    2010-02-27 17:38:42 UTC (rev 70635)
@@ -9,7 +9,7 @@
   sed -i -e 's/#fcpcmcia       -       -       -       -       -       
-/fcpcmcia      -       -       -       -       -       -/g' /etc/capi.conf
     # updating module dependencies
   echo ">>> Updating module dependencies. Please wait ..."
-  KERNEL_VERSION=2.6.32-ARCH
+  KERNEL_VERSION=2.6.33-ARCH
   depmod -v $KERNEL_VERSION > /dev/null 2>&1
 }
 
@@ -24,7 +24,7 @@
   sed -i -e 's/fcpcmcia        -       -       -       -       -       
-/#fcpcmcia     -       -       -       -       -       -/g' /etc/capi.conf
     # updating module dependencies
   echo ">>> Updating module dependencies. Please wait ..."
-  KERNEL_VERSION=2.6.32-ARCH
+  KERNEL_VERSION=2.6.33-ARCH
   depmod -v $KERNEL_VERSION > /dev/null 2>&1
 }
 

Added: kernel-2.6.33.patch
===================================================================
--- kernel-2.6.33.patch                         (rev 0)
+++ kernel-2.6.33.patch 2010-02-27 17:38:42 UTC (rev 70635)
@@ -0,0 +1,188 @@
+--- fcpcmcia_cs.c~     2010-02-27 14:28:58.000000000 +0100
++++ fcpcmcia_cs.c      2010-02-27 14:28:58.000000000 +0100
+@@ -186,8 +186,6 @@
+       for (i = 0; (i < irq_list_count) && (default_irq_list[i] > 0); i++)
+           p_dev->irq.IRQInfo2 |= 1 << default_irq_list[i];
+     }
+-#else
+-    p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID;
+ #endif
+     
+     /* General socket configuration */
+--- fcpcmcia_cs.c~     2010-02-27 14:42:09.000000000 +0100
++++ fcpcmcia_cs.c      2010-02-27 14:40:10.000000000 +0100
+@@ -175,7 +175,7 @@
+     p_dev->io.NumPorts2 = 0;
+ 
+     /* Interrupt setup */
+-    p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
++    p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
+ 
+ #if defined (PCMCIA_IRQ_INFO2)
+     p_dev->irq.IRQInfo1 = IRQ_INFO2_VALID|IRQ_LEVEL_ID;
+@@ -325,7 +325,6 @@
+ 
+ found_port:
+       if (i != 0) {
+-          cs_error(link, RequestIO, i);
+           break;
+       }
+       
+@@ -334,7 +333,6 @@
+        */
+       i = pcmcia_request_irq(link, &link->irq);
+       if (i != 0) {
+-          cs_error(link, RequestIRQ, i);
+             /* undo */
+             pcmcia_disable_device(link);
+           break;
+@@ -345,7 +343,6 @@
+         */
+       i = pcmcia_request_configuration(link, &link->conf);
+       if (i != 0) {
+-          cs_error(link, RequestConfiguration, i);
+             pcmcia_disable_device(link);
+           break;
+       }
+--- fcpcmcia_cs.c~     2010-02-27 18:21:14.000000000 +0100
++++ fcpcmcia_cs.c      2010-02-27 18:21:14.000000000 +0100
+@@ -195,10 +195,9 @@
+     p_dev->conf.Present = PRESENT_OPTION;
+ 
+     /* Allocate space for private device-specific data */
+-    local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
++    local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
+     if (!local)
+         goto err_kfree;
+-    memset(local, 0, sizeof(local_info_t));
+     p_dev->priv = local;
+     return cs_config(p_dev);
+ 
+@@ -230,104 +229,39 @@
+     
+ ======================================================================*/
+ 
+-static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple,
+-                      cisparse_t *parse)
++static int cs_configcheck(struct pcmcia_device *p_dev,
++                              cistpl_cftable_entry_t *cf,
++                              cistpl_cftable_entry_t *dflt,
++                              unsigned int vcc,
++                              void *priv_data)
+ {
+-    int i = pcmcia_get_tuple_data(handle, tuple);
+-    if (i != 0) return i;
+-    return pcmcia_parse_tuple(tuple, parse);
+-}
++       if (cf->io.nwin <= 0)
++               return -ENODEV;
+ 
+-static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple,
+-                   cisparse_t *parse)
+-{
+-    int i = pcmcia_get_first_tuple(handle, tuple);
+-    if (i != 0) return i;
+-    return get_tuple(handle, tuple, parse);
+-}
+-
+-static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple,
+-                   cisparse_t *parse)
+-{
+-    int i = pcmcia_get_next_tuple(handle, tuple);
+-    if (i != 0) return i;
+-    return get_tuple(handle, tuple, parse);
+-}
++       p_dev->io.BasePort1 = cf->io.win[0].base;
++       p_dev->io.NumPorts1 = cf->io.win[0].len;
++       p_dev->io.NumPorts2 = 0;
++       printk(KERN_INFO "fcpcmcia_cs: testing i/o %#x-%#x\n",
++              p_dev->io.BasePort1,
++              p_dev->io.BasePort1+p_dev->io.NumPorts1-1);
++       return pcmcia_request_io(p_dev, &p_dev->io);
++ }
+ 
+ static int cs_config(struct pcmcia_device *link)
+ {
+-    tuple_t tuple;
+-    cisparse_t parse;
+-    cistpl_cftable_entry_t *cf = &parse.cftable_entry;
+     local_info_t *dev;
+     int i;
+-    u_char buf[64];
+     char devname[128];
+     dev = link->priv;
+ 
+-    /*
+-       This reads the card's CONFIG tuple to find its configuration
+-       registers.
+-    */
+-    do {
+-      tuple.DesiredTuple = CISTPL_CONFIG;
+-      i = pcmcia_get_first_tuple(link, &tuple);
+-      if (i != 0) break;
+-      tuple.TupleData = buf;
+-      tuple.TupleDataMax = 64;
+-      tuple.TupleOffset = 0;
+-      i = pcmcia_get_tuple_data(link, &tuple);
+-      if (i != 0) break;
+-      i = pcmcia_parse_tuple(&tuple, &parse);
+-      if (i != 0) break;
+-      link->conf.ConfigBase = parse.config.base;
+-    } while (0);
+-    if (i != 0) {
+-      cs_error(link, ParseTuple, i);
+-        return -ENODEV;
+-    }
+-
+-    do {
+-
+-      tuple.Attributes = 0;
+-      tuple.TupleData = buf;
+-      tuple.TupleDataMax = 254;
+-      tuple.TupleOffset = 0;
+-      tuple.DesiredTuple = CISTPL_VERS_1;
+-
+-      devname[0] = 0;
+-      if( !first_tuple(link, &tuple, &parse) && parse.version_1.ns > 1 ) {
+-          strlcpy(devname,parse.version_1.str + parse.version_1.ofs[1], 
+-                      sizeof(devname));
+-      }
+-      /*
+-         * find IO port
+-         */
+-      tuple.TupleData = (cisdata_t *)buf;
+-      tuple.TupleOffset = 0; tuple.TupleDataMax = 255;
+-      tuple.Attributes = 0;
+-      tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
+-      i = first_tuple(link, &tuple, &parse);
+-      while (i == 0) {
+-          if (cf->io.nwin > 0) {
+-              link->conf.ConfigIndex = cf->index;
+-              link->io.BasePort1 = cf->io.win[0].base;
+-              link->io.NumPorts1 = cf->io.win[0].len;
+-              link->io.NumPorts2 = 0;
+-                NOTE("testing i/o %#x-%#x\n",
+-                      link->io.BasePort1,
+-                      link->io.BasePort1+link->io.NumPorts1-1);
+-              i = pcmcia_request_io(link, &link->io);
+-              if (i == 0) goto found_port;
+-          }
+-          i = next_tuple(link, &tuple, &parse);
+-      }
+-
+-found_port:
+-      if (i != 0) {
+-          break;
+-      }
+-      
++    devname[0] = 0;
++    if (link->prod_id[1])
++           strlcpy(devname, link->prod_id[1], sizeof(devname));
++
++    if (pcmcia_loop_config(link, cs_configcheck, NULL))
++           return -ENODEV;
++
++     do {
+       /*
+        * allocate an interrupt line
+        */

Reply via email to