public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: OSDL <torvalds@osdl.org>
To: linux-kernel@vger.kernel.org
Subject: Re: [2.6.0-test1] yenta_socket.c:yenta_get_status returns bad value compared to 2.4
Date: Sat, 26 Jul 2003 12:17:01 -0700	[thread overview]
Message-ID: <bfuk3d$llp$1@build.pdx.osdl.net> (raw)
In-Reply-To: 1059244318.3400.17.camel@localhost

Stefan Jones wrote:
>
> I added
> 
> printk(KERN_DEBUG "yenta_get_status: status=%04x\n",state);
> 
> after the call
> u32 state = cb_readl(socket, CB_SOCKET_STATE);
> in
> static int yenta_get_status(struct pcmcia_socket *sock, unsigned int
> *value)
> in drivers/pcmcia/yenta_socket.c
> 
> in both 2.4.21 and 2.6.0-test1
> 
> 2.6.0-test1 gives: 30000411
> 2.4.21 gives:      30000419
> 
> I wonder why the values are different, and yet fairly close. It is
> enough to give hard lockups ( I debugged this one with printk's and
> commenting out code )
> 
> I have added
> 
> state |= CB_CBCARD;

The difference between 2.4 and 2.6 is not CB_CBCARD (0x0020), but
CB_PWRCYCLE (0x0008).

For some reason 2.6.x hasn't powered up the 16-bit card.

However, the whole CB_POWERCYCLE thing is ignored for 16-bit cards,
and what you end up doing by marking the card as a 32-bit cardbus card
(that's what the CB_CBCARD define means) is to basically force the
wrong code to be run, at which point the 32-bit code decides that
the card isn't powered.

The real question is why the card isn't powered up. Also, it sounds
like the 16-bit status (from I365_STATUS) doesn't agree with the 32-bit
status (from CB_SOCKET_STATE), so when you _do_ force trusting of the
32-bit status, then things work.

Which is interesting in itself. It's entirely possible that we should
just ignore the 16-bit status when it comes to the SS_POWERON logic.

Does the card actually _work_ when you do your hack? Or does it just
stop the hang?

                Linus

  reply	other threads:[~2003-07-26 19:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-26 18:31 [2.6.0-test1] yenta_socket.c:yenta_get_status returns bad value compared to 2.4 Stefan Jones
2003-07-26 19:17 ` OSDL [this message]
2003-07-27  9:46 ` Stefan Jones
2003-08-02 17:08 ` Russell King
2003-08-03 11:07   ` Stefan Jones
2003-08-03 12:50     ` Russell King
2003-08-03 13:34       ` Stefan Jones

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='bfuk3d$llp$1@build.pdx.osdl.net' \
    --to=torvalds@osdl.org \
    --cc=linux-kernel@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