From: Daniel Ritz <daniel.ritz@gmx.ch>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.4] fix yenta card detection on some setups
Date: Sun, 7 Mar 2004 16:50:59 +0100 [thread overview]
Message-ID: <200403071650.59701.daniel.ritz@gmx.ch> (raw)
hello
this patch fixes card detection on some chips:
the current code that redoes voltage interrogation has it's check wrong.
both CB_CDETECT1 and CB_CDETECT2 needs to be _zero_ for a card to be deteced
correctly. also, more importantly, always redo when none of the voltage bits are set.
same applies to yenta_get_status().
the patch also adds the TI1510 and 1520 chips to yenta's override table as they
need the additional init code (ie. the part that enables PCI CSC interrupts).
it fixes at least silla rizzoli's IBM R40 2681-BDG, my toshba works just fine
w/ or w/o it.
against 2.4.26-pre2. please apply.
rgds
-daniel
--- 1.15/drivers/pcmcia/yenta.c Tue Jan 6 05:55:05 2004
+++ edited/drivers/pcmcia/yenta.c Sat Mar 6 10:38:26 2004
@@ -135,8 +135,8 @@
val = (state & CB_3VCARD) ? SS_3VCARD : 0;
val |= (state & CB_XVCARD) ? SS_XVCARD : 0;
- val |= (state & (CB_CDETECT1 | CB_CDETECT2 | CB_5VCARD | CB_3VCARD
- | CB_XVCARD | CB_YVCARD)) ? 0 : SS_PENDING;
+ val |= (state & (CB_5VCARD | CB_3VCARD | CB_XVCARD | CB_YVCARD)) ? 0 : SS_PENDING;
+ val |= (state & (CB_CDETECT1 | CB_CDETECT2)) ? SS_PENDING : 0;
if (state & CB_CBCARD) {
val |= SS_CARDBUS;
@@ -677,10 +677,9 @@
/* Redo card voltage interrogation */
state = cb_readl(socket, CB_SOCKET_STATE);
- if (!(state & (CB_CDETECT1 | CB_CDETECT2 | CB_5VCARD |
- CB_3VCARD | CB_XVCARD | CB_YVCARD)))
-
- cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST);
+ if (!(state & (CB_5VCARD | CB_3VCARD | CB_XVCARD | CB_YVCARD)) ||
+ (state & (CB_CDETECT1 | CB_CDETECT2)))
+ cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST);
}
/* Called at resume and initialization events */
@@ -870,6 +869,8 @@
{ PD(TI,1420), &ti_ops },
{ PD(TI,4410), &ti_ops },
{ PD(TI,4451), &ti_ops },
+ { PD(TI,1510), &ti_ops },
+ { PD(TI,1520), &ti_ops },
{ PD(RICOH,RL5C465), &ricoh_ops },
{ PD(RICOH,RL5C466), &ricoh_ops },
--- 1.84/include/linux/pci_ids.h Thu Feb 26 07:54:04 2004
+++ edited/include/linux/pci_ids.h Fri Mar 5 12:28:10 2004
@@ -659,6 +659,8 @@
#define PCI_DEVICE_ID_TI_4410 0xac41
#define PCI_DEVICE_ID_TI_4451 0xac42
#define PCI_DEVICE_ID_TI_1420 0xac51
+#define PCI_DEVICE_ID_TI_1520 0xac55
+#define PCI_DEVICE_ID_TI_1510 0xac56
#define PCI_VENDOR_ID_SONY 0x104d
#define PCI_DEVICE_ID_SONY_CXD3222 0x8039
reply other threads:[~2004-03-07 15:53 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=200403071650.59701.daniel.ritz@gmx.ch \
--to=daniel.ritz@gmx.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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®