Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 245318 Details for
Bug 284565
fcpci-0.1-ri does not emerge with kernel 2.6.31
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fcpci Patch for Kernel 2.6.34
fcpci-linux-2.6.34.diff (text/plain), 5.32 KB, created by
Thomas Pohl
on 2010-08-30 08:50:06 UTC
(
hide
)
Description:
fcpci Patch for Kernel 2.6.34
Filename:
MIME Type:
Creator:
Thomas Pohl
Created:
2010-08-30 08:50:06 UTC
Size:
5.32 KB
patch
obsolete
>--- fritz/src/driver.c.org 2010-08-26 15:11:57.000000000 +0200 >+++ fritz/src/driver.c 2010-08-26 15:13:22.000000000 +0200 >@@ -48,6 +48,8 @@ > #include "defs.h" > #include "lib.h" > #include "driver.h" >+#include <linux/proc_fs.h> >+#include <linux/seq_file.h> > > /*---------------------------------------------------------------------------*\ > \*---------------------------------------------------------------------------*/ >@@ -221,16 +223,6 @@ static void kill_version (card_t * card) > > /*---------------------------------------------------------------------------*\ > \*---------------------------------------------------------------------------*/ >-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) { > > return (atomic_read (&crit_level) > 0); >@@ -367,7 +359,11 @@ static int install_card (card_t * card) > return FALSE; > } > #endif >+#ifdef __LP64__ >+ card->data = (unsigned long) &irq_handler; >+#else > card->data = (unsigned) &irq_handler; >+#endif > tasklet_init (&scheduler_tasklet, scheduler, 0); > disable_scheduler (); > result = request_irq ( >@@ -490,39 +486,33 @@ static char * __kcapi proc_info (struct > > /*---------------------------------------------------------------------------*\ > \*---------------------------------------------------------------------------*/ >-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,20 +524,28 @@ static int __kcapi ctr_info ( > } > 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, >+}; >+ > > /*---------------------------------------------------------------------------*\ > \*---------------------------------------------------------------------------*/ >@@ -569,7 +567,7 @@ static void __kcapi reset_ctrl (struct c > } > } > stop (card); >- capi_ctr_reseted (ctrl); >+ capi_ctr_down (ctrl); > #if defined (__fcpnp__) > pnp_disable_dev (card->dev); > #endif >@@ -626,7 +624,7 @@ int __kcapi add_card (struct capi_driver > 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); >--- fritz/src/driver.h.org 2010-08-26 15:11:57.000000000 +0200 >+++ fritz/src/driver.h 2010-08-26 15:13:22.000000000 +0200 >@@ -40,7 +40,11 @@ typedef struct __card { > unsigned base; > unsigned irq; > unsigned info; >+#ifdef __LP64__ >+ unsigned long data; >+#else > unsigned data; >+#endif > char * version; > char * string[8]; > unsigned count;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 284565
:
207734
|
208387
|
208388
|
208389
|
212408
| 245318 |
247474