lkml.org 
[lkml]   [2005]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] serial_cs broken on 2.6.12-rc4/2.6.12-rc4-mm2
Hello,
serial_cs's vendor/device identification got broken by Yum Rayan's
change '[PATCH] serial_cs: Reduce stack usage in serial_event()' - it
changed buf type from u_short* to char*, breaking device manufacturer
& card number retrieval. Due to this my modem stopped from being
recognized as special case.

Code will work much better if we'll rely on first_tuple's parser
instead of doing parse ourselves. Code also looks simpler after
change.
Thanks,
Petr Vandrovec

Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz>


Apply directly on top of RC4. You'll have to redo my other serial_cs
changes you have in the tree so you end up with state in second patch
below after applying them... I have no quilt exprience...

--- linux-2.6.12-rc4/drivers/serial/serial_cs.c 2005-05-07 04:21:33.000000000 +0200
+++ linux-2.6.12-rc4/drivers/serial/serial_cs.c 2005-05-16 15:34:27.000000000 +0200
@@ -661,10 +661,10 @@
/* Is this a multiport card? */
tuple->DesiredTuple = CISTPL_MANFID;
if (first_tuple(handle, tuple, parse) == CS_SUCCESS) {
- info->manfid = le16_to_cpu(buf[0]);
+ info->manfid = parse->manfid.manf;
for (i = 0; i < MULTI_COUNT; i++)
if ((info->manfid == multi_id[i].manfid) &&
- (le16_to_cpu(buf[1]) == multi_id[i].prodid))
+ (parse->manfid.card == multi_id[i].prodid))
break;
if (i < MULTI_COUNT)
info->multi = multi_id[i].multi;

Apply on top of MM2:
--- linux-2.6.12-rc4-mm2/drivers/serial/serial_cs.c 2005-05-16 13:19:29.000000000 +0200
+++ linux-2.6.12-rc4-mm2/drivers/serial/serial_cs.c 2005-05-16 13:28:08.000000000 +0200
@@ -700,8 +700,8 @@
/* Is this a multiport card? */
tuple->DesiredTuple = CISTPL_MANFID;
if (first_tuple(handle, tuple, parse) == CS_SUCCESS) {
- info->manfid = le16_to_cpu(buf[0]);
- info->prodid = le16_to_cpu(buf[1]);
+ info->manfid = parse->manfid.manf;
+ info->prodid = parse->manfid.card;
for (i = 0; i < MULTI_COUNT; i++)
if ((info->manfid == multi_id[i].manfid) &&
(info->prodid == multi_id[i].prodid))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-05-16 15:59    [W:0.064 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site