mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, rmk+serial@arm.linux.org.uk
Subject: [PATCH] serial_cs broken on 2.6.12-rc4/2.6.12-rc4-mm2
Date: Mon, 16 May 2005 15:49:10 +0200	[thread overview]
Message-ID: <20050516134910.GA8565@vana.vc.cvut.cz> (raw)

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

                 reply	other threads:[~2005-05-16 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050516134910.GA8565@vana.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+serial@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®