public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Neil Horman <nhorman@redhat.com>
Cc: "Marc Strämke" <marcstraemke.work@gmx.net>, linux-kernel@vger.kernel.org
Subject: Re: Problem accessing Sandisk CompactFlash Cards (Connected to the IDE bus)
Date: Sun, 29 Aug 2004 22:07:12 -0300	[thread overview]
Message-ID: <20040830010712.GC12313@logos.cnet> (raw)
In-Reply-To: <41326FE1.2050508@redhat.com>

On Sun, Aug 29, 2004 at 08:08:01PM -0400, Neil Horman wrote:
> Marc Strämke wrote:
> 
> >Neil Horman wrote:
> >
> >>Its been awhile, but the last time that I looked at the relevant 
> >>code, there was a table of drive vendor/device strings that were used 
> >>to identify CFA devices and differentiate them from regular ide 
> >>devices.  If this particular device isn't a match in that table, it 
> >>would be mis-identified, and that could be leading to your above 
> >>problem.
> >>Neil
> >>
> >
> >Thx for the suggestion. The only table i could find is in 
> >drive_is_flashcard, which is only checked if drive->removable is set, 
> >which is not the case with the newer card (but is with the old one).
> >Another thing which is weird is that the old card returns an 
> >id->config value of 0x848a which according to manuals from SanDisk is 
> >for a Compactflash card NOT running in True Ide mode, but instead in 
> >memory mapped IO mode (iam no expert for Compactflash, so i dont even 
> >know the exact difference), but as far as i can tell are both cards 
> >wired by the IDE adapter so that they should run in True IDE mode, and 
> >if i understand the Compactflash specification correctly, this is the 
> >only mode of operation which is electrically compatible with the 
> >IDE/ATA bus, isnt it?
> >I tried forcing both the drive->removable and drive->is_flash flags to 
> >the true, my dmesg output then shows me the card as a CFA DISK drive, 
> >but i still get the same errors when reading or writing from/to the 
> >device.
> >
> >TIA for any further hints,
> >Marc
> >
> >-
> >To unsubscribe from this list: send the line "unsubscribe 
> >linux-kernel" in
> >the body of a message to majordomo@vger.kernel.org
> >More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >Please read the FAQ at  http://www.tux.org/lkml/
> 
> What kernel are you looking at?  I'm looking at 2.4.21, and it seems to 
> get checked more-or-less universally.  Also, I noticed this:
> || !strncmp(id->model, "SunDisk SDCFB", 13)    /* SunDisk */
> I've not heard of SunDisk.  SunDisk->SanDisk == Typo?
> Are you using a SanDisk CFA card?  Could this perhaps be part of your issue?

Indeed this is a typo but has been fixed on 2.4.26:

        if (drive->removable && id != NULL) {
                if (id->config == 0x848a) return 1;     /* CompactFlash */
                if (!strncmp(id->model, "KODAK ATA_FLASH", 15)  /* Kodak */
                 || !strncmp(id->model, "Hitachi CV", 10)       /* Hitachi */
                 || !strncmp(id->model, "SunDisk SDCFB", 13)    /* old SanDisk */
                 || !strncmp(id->model, "SanDisk SDCFB", 13)    /* SanDisk */
                 || !strncmp(id->model, "HAGIWARA HPC", 12)     /* Hagiwara */
                 || !strncmp(id->model, "LEXAR ATA_FLASH", 15)  /* Lexar */
                 || !strncmp(id->model, "ATA_FLASH", 9))        /* Simple Tech */
                {

I haven't got much of a clue about IDE, but I can see the newer card supports
DMA, and the older doesnt, but you are probably not using DMA on that? whats
the output of "hdparm /dev/hda".

Also can you show us dmesg from both old and new cards.


  reply	other threads:[~2004-08-30  2:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-29  8:01 Problem accessing Sandisk CompactFlash Cards (Connected to the IDE bus) Marc Strämke
2004-08-29 13:38 ` Neil Horman
2004-08-29 16:06   ` Marc Strämke
2004-08-30  0:08     ` Neil Horman
2004-08-30  1:07       ` Marcelo Tosatti [this message]
2004-08-30  7:01         ` Marc Strämke
2004-08-30 14:23           ` Neil Horman
2004-08-30 15:49             ` Marc Strämke
2004-08-30 15:23               ` Alan Cox
2004-08-30 17:10               ` Neil Horman
2004-08-30 17:31                 ` Marc Strämke
2004-08-30 13:04         ` Alan Cox
2004-08-30  7:12       ` Meelis Roos

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=20040830010712.GC12313@logos.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcstraemke.work@gmx.net \
    --cc=nhorman@redhat.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