linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial_cs broken on 2.6.12-rc4/2.6.12-rc4-mm2
@ 2005-05-16 13:49 Petr Vandrovec
  0 siblings, 0 replies; only message in thread
From: Petr Vandrovec @ 2005-05-16 13:49 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, rmk+serial

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))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-16 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-16 13:49 [PATCH] serial_cs broken on 2.6.12-rc4/2.6.12-rc4-mm2 Petr Vandrovec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).