Date: Monday, May 17, 2010 @ 14:21:34
  Author: tpowa
Revision: 80491

upgpkg: fcpcmcia 31107-51
rebuild against latest kernel

Added:
  fcpcmcia/trunk/kernel-2.6.34.patch

---------------------+
 kernel-2.6.34.patch |  170 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 170 insertions(+)

Added: kernel-2.6.34.patch
===================================================================
--- kernel-2.6.34.patch                         (rev 0)
+++ kernel-2.6.34.patch 2010-05-17 18:21:34 UTC (rev 80491)
@@ -0,0 +1,170 @@
+--- driver.c~  2010-05-17 11:51:30.315940940 +0200
++++ driver.c   2010-05-17 11:51:30.362264370 +0200
+@@ -48,6 +48,8 @@
+ #include "defs.h"
+ #include "lib.h"
+ #include "driver.h"
++#include <linux/proc_fs.h>
++#include <linux/seq_file.h>
+ 
+ 
/*---------------------------------------------------------------------------*\
+ 
\*---------------------------------------------------------------------------*/
+@@ -490,39 +492,34 @@
+ 
+ 
/*---------------------------------------------------------------------------*\
+ 
\*---------------------------------------------------------------------------*/
+-static int __kcapi ctr_info (
+-      char *                  page, 
+-      char **                 start, 
+-      off_t                   ofs,
+-      int                     count, 
+-      int *                   eof,
+-      struct capi_ctr *       ctrl
++
++static int __kcapi ctr_info (struct seq_file *m, void *v
+ ) {
++        struct capi_ctr *ctrl = m->private;
+       card_t *                card;
+       char *                  temp;
+       unsigned char           flag;
+-      int                     len = 0;
+ 
+       assert (ctrl != NULL);
+       card = (card_t *) ctrl->driverdata;
+       assert (card != NULL);
+-      pprintf (page, &len, "%-16s %s\n", "name", SHORT_LOGO);
+-      pprintf (page, &len, "%-16s 0x%04x\n", "io", card->base);
+-      pprintf (page, &len, "%-16s %d\n", "irq", card->irq);
++      seq_printf(m, "%-16s %s\n", "name", SHORT_LOGO);
++      seq_printf(m, "%-16s 0x%04x\n", "io", card->base);
++      seq_printf(m, "%-16s %d\n", "irq", card->irq);
+       temp = card->version ? card->string[1] : "A1";
+-      pprintf (page, &len, "%-16s %s\n", "type", temp);
++      seq_printf(m, "%-16s %s\n", "type", temp);
+       temp = card->version ? card->string[0] : "-";
+ #if defined (__fcclassic__) || defined (__fcpcmcia__)
+-      pprintf (page, &len, "%-16s 0x%04x\n", "revision", card->info);
++      seq_printf(m, "%-16s 0x%04x\n", "revision", card->info);
+ #elif defined (__fcpci__)
+-      pprintf (page, &len, "%-16s %d\n", "class", card_id);
++      seq_printf(m, "%-16s %d\n", "class", card_id);
+ #endif
+-      pprintf (page, &len, "%-16s %s\n", "ver_driver", temp);
+-      pprintf (page, &len, "%-16s %s\n", "ver_cardtype", SHORT_LOGO);
++      seq_printf(m, "%-16s %s\n", "ver_driver", temp);
++      seq_printf(m, "%-16s %s\n", "ver_cardtype", SHORT_LOGO);
+ 
+       flag = ((unsigned char *) (ctrl->profile.manu))[3];
+       if (flag) {
+-              pprintf(page, &len, "%-16s%s%s%s%s%s%s%s\n", "protocol",
++              seq_printf(m, "%-16s%s%s%s%s%s%s%s\n", "protocol",
+                       (flag & 0x01) ? " DSS1" : "",
+                       (flag & 0x02) ? " CT1" : "",
+                       (flag & 0x04) ? " VN3" : "",
+@@ -534,21 +531,30 @@
+       }
+       flag = ((unsigned char *) (ctrl->profile.manu))[5];
+       if (flag) {
+-              pprintf(page, &len, "%-16s%s%s%s%s\n", "linetype",
++              seq_printf(m, "%-16s%s%s%s%s\n", "linetype",
+                       (flag & 0x01) ? " point to point" : "",
+                       (flag & 0x02) ? " point to multipoint" : "",
+                       (flag & 0x08) ? " leased line without D-channel" : "",
+                       (flag & 0x04) ? " leased line with D-channel" : ""
+               );
+       }
+-      if (len < ofs) {
+-              return 0;
+-      }
+-      *eof = 1;
+-      *start = page - ofs;
+-      return ((count < len - ofs) ? count : len - ofs);
++
++       return 0;
+ } /* ctr_info */
+ 
++static int ctr_proc_open(struct inode *inode, struct file *file)
++{
++       return single_open(file, ctr_info, PDE(inode)->data);
++}
++
++const struct file_operations ctr_proc_fops = {
++       .owner          = THIS_MODULE,
++       .open           = ctr_proc_open,
++       .read           = seq_read,
++       .llseek         = seq_lseek,
++       .release        = single_release,
++};
++
+ 
/*---------------------------------------------------------------------------*\
+ 
\*---------------------------------------------------------------------------*/
+ static void __kcapi reset_ctrl (struct capi_ctr * ctrl) {
+--- driver.c~  2010-05-17 19:55:09.158499792 +0200
++++ driver.c   2010-05-17 19:55:09.190784099 +0200
+@@ -222,16 +222,6 @@
+ } /* kill_version */
+ 
+ 
/*---------------------------------------------------------------------------*\
+-\*---------------------------------------------------------------------------*/
+-static void pprintf (char * page, int * len, const char * fmt, ...) {
+-      va_list args;
+-
+-      va_start (args, fmt);
+-      *len += vsprintf (page + *len, fmt, args);
+-      va_end (args);
+-} /* pprintf */
+-
+-/*---------------------------------------------------------------------------*\
+ 
\*-C-------------------------------------------------------------------------*/
+ static inline int in_critical (void) {
+       
+@@ -632,7 +622,7 @@
+       ctrl->release_appl =    release_appl;
+       ctrl->send_message =    send_msg;
+       ctrl->procinfo =        proc_info;
+-      ctrl->ctr_read_proc =   ctr_info;
++      ctrl->proc_fops =       &ctr_proc_fops;
+       if (0 != (res = attach_capi_ctr (ctrl))) {
+               dec_use_count ();
+               stop (card);
+--- driver.c~  2010-05-17 19:57:16.935038735 +0200
++++ driver.c   2010-05-17 19:57:16.997010852 +0200
+@@ -109,7 +109,7 @@
+ 
/*---------------------------------------------------------------------------*\
+ 
\*---------------------------------------------------------------------------*/
+ static void scheduler (unsigned long data);
+-static irqreturn_t irq_handler (int irq, void * args, struct pt_regs * regs);
++static irqreturn_t irq_handler (int irq, void * args);
+ 
+ static DECLARE_TASKLET_DISABLED (scheduler_tasklet, scheduler, 0);
+ 
+@@ -832,7 +832,7 @@
+ 
+ 
/*---------------------------------------------------------------------------*\
+ 
\*---------------------------------------------------------------------------*/
+-static irqreturn_t irq_handler (int irq, void * args, struct pt_regs * regs) {
++static irqreturn_t irq_handler (int irq, void * args) {
+       int     res     = IRQ_NONE;
+       
+       UNUSED_ARG (irq);
+--- driver.c~  2010-05-17 20:00:05.071747956 +0200
++++ driver.c   2010-05-17 20:00:05.130307573 +0200
+@@ -836,7 +836,6 @@
+       int     res     = IRQ_NONE;
+       
+       UNUSED_ARG (irq);
+-      UNUSED_ARG (regs);
+       if (args != NULL) {
+               assert (capi_lib->cm_handle_events != NULL);
+               if (atomic_read (&scheduler_id) == smp_processor_id ()) {
+--- driver.c~  2010-05-17 20:03:10.224528922 +0200
++++ driver.c   2010-05-17 20:03:10.273706462 +0200
+@@ -196,7 +196,7 @@
+       }
+       lib_strncpy (ctrl->serial, tmp, CAPI_SERIAL_LEN);
+       lib_memcpy (&ctrl->profile, card->string[6], sizeof (capi_profile));
+-      strncpy (ctrl->manu, "AVM GmbH", CAPI_MANUFACTURER_LEN);
++      lib_strncpy (ctrl->manu, "AVM GmbH", CAPI_MANUFACTURER_LEN);
+       ctrl->version.majorversion = 2;
+       ctrl->version.minorversion = 0;
+       tmp = card->string[0];

Reply via email to