From: Michael Schmitz <schmitzmic@gmail.com>
To: linux-m68k@vger.kernel.org
Cc: alex@kazik.de, Michael Schmitz <schmitzmic@gmail.com>,
Debian/m68k <debian-68k@lists.debian.org>
Subject: [CFT][PATCH v2] net/8390: apne.c - read out and log PCMCIA cftable entries
Date: Sun, 22 Aug 2021 15:11:06 +1200 [thread overview]
Message-ID: <1629601866-4410-1-git-send-email-schmitzmic@gmail.com> (raw)
Read the card's CISTPL_CFTABLE_ENTRY tuple, and log to the
kernel log buffer. This tuple ought to hold information
about the IO width of the card memory window that can be used
in autoprobing to detect 16 bit datapath cards.
CC: Debian/m68k <debian-68k@lists.debian.org>
Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
---
drivers/net/ethernet/8390/apne.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/ethernet/8390/apne.c b/drivers/net/ethernet/8390/apne.c
index fe6c834..dd71b10 100644
--- a/drivers/net/ethernet/8390/apne.c
+++ b/drivers/net/ethernet/8390/apne.c
@@ -127,6 +127,8 @@ struct net_device * __init apne_probe(int unit)
#ifndef MANUAL_CONFIG
char tuple[8];
+ char cftuple[258];
+ int len_cftuple = 0;
#endif
int err;
@@ -168,6 +170,20 @@ struct net_device * __init apne_probe(int unit)
free_netdev(dev);
return ERR_PTR(-ENODEV);
}
+
+ if ((len_cftuple = pcmcia_copy_tuple(CISTPL_CFTABLE_ENTRY, cftuple, 256)) < 3) {
+ pr_cont("no cftable entry for card\n");
+ /* XXX: shouldn't we re-enable irq here? */
+ } else {
+ int i;
+
+ pr_info("CFTABLE_ENTRY tuple:\n");
+ for (i=0; i<len_cftuple; i++) {
+ pr_cont("%hhx ", cftuple[i]);
+ if (i > 0 && !(i % 10)) pr_cont("\n");
+ }
+ pr_cont("\n");
+ }
#endif
pr_cont("ethernet PCMCIA card inserted\n");
--
2.7.4
next reply other threads:[~2021-08-22 3:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-22 3:11 Michael Schmitz [this message]
2021-08-23 7:36 ` [CFT][PATCH v2] net/8390: apne.c - read out and log PCMCIA cftable entries Geert Uytterhoeven
2021-08-23 21:41 ` Michael Schmitz
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=1629601866-4410-1-git-send-email-schmitzmic@gmail.com \
--to=schmitzmic@gmail.com \
--cc=alex@kazik.de \
--cc=debian-68k@lists.debian.org \
--cc=linux-m68k@vger.kernel.org \
/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