2009-04-20 09:29:47

by Maxim Levitsky

[permalink] [raw]
Subject: SDHCI driver runnining in aspire one, allows to write to R/O SD cards

Hi,

I am an owner of aspire one, and it has a card reader.
when I take a sd card, and pull down the protection tab, it still allows
to write to the card (I tested with my main notebook that indeed, it did
write there).

My main notebook, acer aspire 5720, doesn't have this problem.
Kernel version in use is 2.6.28 vanilla, but this did happen in former
version as well.


Attached lspci, on acer one.



Attachments:
tmpfile.txt (6.00 kB)

2009-04-20 23:42:46

by Robert Hancock

[permalink] [raw]
Subject: Re: SDHCI driver runnining in aspire one, allows to write to R/O SD cards

Maxim Levitsky wrote:
> Hi,
>
> I am an owner of aspire one, and it has a card reader.
> when I take a sd card, and pull down the protection tab, it still allows
> to write to the card (I tested with my main notebook that indeed, it did
> write there).
>
> My main notebook, acer aspire 5720, doesn't have this problem.
> Kernel version in use is 2.6.28 vanilla, but this did happen in former
> version as well.
>
>
> Attached lspci, on acer one.

Do you know if it worked in any kernel version or OS? It's known that
some SD card readers are too cheap to actually implement the
write-protect detection.

2009-04-23 22:10:57

by Maxim Levitsky

[permalink] [raw]
Subject: Re: SDHCI driver runnining in aspire one, allows to write to R/O SD cards

On Mon, 2009-04-20 at 17:42 -0600, Robert Hancock wrote:
> Maxim Levitsky wrote:
> > Hi,
> >
> > I am an owner of aspire one, and it has a card reader.
> > when I take a sd card, and pull down the protection tab, it still allows
> > to write to the card (I tested with my main notebook that indeed, it did
> > write there).
> >
> > My main notebook, acer aspire 5720, doesn't have this problem.
> > Kernel version in use is 2.6.28 vanilla, but this did happen in former
> > version as well.
> >
> >
> > Attached lspci, on acer one.
>
> Do you know if it worked in any kernel version or OS? It's known that
> some SD card readers are too cheap to actually implement the
> write-protect detection.

I'll test in windows, but in linux it never did work.

Best regards,
Maxim Levitsky

2009-04-26 15:21:32

by Maxim Levitsky

[permalink] [raw]
Subject: Re: SDHCI driver runnining in aspire one, allows to write to R/O SD cards

On Fri, 2009-04-24 at 01:10 +0300, Maxim Levitsky wrote:
> On Mon, 2009-04-20 at 17:42 -0600, Robert Hancock wrote:
> > Maxim Levitsky wrote:
> > > Hi,
> > >
> > > I am an owner of aspire one, and it has a card reader.
> > > when I take a sd card, and pull down the protection tab, it still allows
> > > to write to the card (I tested with my main notebook that indeed, it did
> > > write there).
> > >
> > > My main notebook, acer aspire 5720, doesn't have this problem.
> > > Kernel version in use is 2.6.28 vanilla, but this did happen in former
> > > version as well.
> > >
> > >
> > > Attached lspci, on acer one.
> >
> > Do you know if it worked in any kernel version or OS? It's known that
> > some SD card readers are too cheap to actually implement the
> > write-protect detection.
>
> I'll test in windows, but in linux it never did work.
>
> Best regards,
> Maxim Levitsky
>
Yep, works fine in windows.
Tested with and without lock tab.


Best regards,
Maxim Levitsky

2009-04-27 18:22:30

by Garrett D'Amore

[permalink] [raw]
Subject: Re: [Sdhci-devel] SDHCI driver runnining in aspire one, allows to write to R/O SD cards

As an extra data point, my sdhost driver in OpenSolaris works fine on
the AA1.. it does see that the cards are locked, and refuses to allow
them to be mounted read/write.

This leads me to believe that the original linux problem is one of two
things:

* either a bug in the linux code, or
* busted circuit/hardware on a specific unit (i.e. a damaged unit)

I believe that if the Linux code was buggy here, the problem would be
reproducible on all platforms, not just the AA1. So my inclination,
barring independent confirmation, is that most likely there are one ore
more defective units out there.

Note that the AA1 also has buggy BIOS -- OpenSolaris can't "see" the
cards (registers aren't properly initialized) unless they are present
when the unit first powers up.

-- Garrett

Maxim Levitsky wrote:
> On Fri, 2009-04-24 at 01:10 +0300, Maxim Levitsky wrote:
>
>> On Mon, 2009-04-20 at 17:42 -0600, Robert Hancock wrote:
>>
>>> Maxim Levitsky wrote:
>>>
>>>> Hi,
>>>>
>>>> I am an owner of aspire one, and it has a card reader.
>>>> when I take a sd card, and pull down the protection tab, it still allows
>>>> to write to the card (I tested with my main notebook that indeed, it did
>>>> write there).
>>>>
>>>> My main notebook, acer aspire 5720, doesn't have this problem.
>>>> Kernel version in use is 2.6.28 vanilla, but this did happen in former
>>>> version as well.
>>>>
>>>>
>>>> Attached lspci, on acer one.
>>>>
>>> Do you know if it worked in any kernel version or OS? It's known that
>>> some SD card readers are too cheap to actually implement the
>>> write-protect detection.
>>>
>> I'll test in windows, but in linux it never did work.
>>
>> Best regards,
>> Maxim Levitsky
>>
>>
> Yep, works fine in windows.
> Tested with and without lock tab.
>
>
> Best regards,
> Maxim Levitsky
>
> _______________________________________________
> sdhci-devel mailing list
> [email protected]
> http://list.drzeus.cx/mailman/listinfo/sdhci-devel
>

2009-04-27 19:08:56

by Maxim Levitsky

[permalink] [raw]
Subject: Re: [Sdhci-devel] SDHCI driver runnining in aspire one, allows to write to R/O SD cards

On Mon, 2009-04-27 at 11:12 -0700, Garrett D'Amore wrote:
> As an extra data point, my sdhost driver in OpenSolaris works fine on
> the AA1.. it does see that the cards are locked, and refuses to allow
> them to be mounted read/write.
>
> This leads me to believe that the original linux problem is one of two
> things:
>
> * either a bug in the linux code, or
> * busted circuit/hardware on a specific unit (i.e. a damaged unit)
>
> I believe that if the Linux code was buggy here, the problem would be
> reproducible on all platforms, not just the AA1. So my inclination,
> barring independent confirmation, is that most likely there are one ore
> more defective units out there.
>
> Note that the AA1 also has buggy BIOS -- OpenSolaris can't "see" the
> cards (registers aren't properly initialized) unless they are present
> when the unit first powers up.

But, why it works in windows?

Regards,
Maxim Levitsky

2009-04-27 22:19:59

by Garrett D'Amore

[permalink] [raw]
Subject: Re: [Sdhci-devel] SDHCI driver runnining in aspire one, allows to write to R/O SD cards

Maxim Levitsky wrote:
> On Mon, 2009-04-27 at 11:12 -0700, Garrett D'Amore wrote:
>
>> As an extra data point, my sdhost driver in OpenSolaris works fine on
>> the AA1.. it does see that the cards are locked, and refuses to allow
>> them to be mounted read/write.
>>
>> This leads me to believe that the original linux problem is one of two
>> things:
>>
>> * either a bug in the linux code, or
>> * busted circuit/hardware on a specific unit (i.e. a damaged unit)
>>
>> I believe that if the Linux code was buggy here, the problem would be
>> reproducible on all platforms, not just the AA1. So my inclination,
>> barring independent confirmation, is that most likely there are one ore
>> more defective units out there.
>>
>> Note that the AA1 also has buggy BIOS -- OpenSolaris can't "see" the
>> cards (registers aren't properly initialized) unless they are present
>> when the unit first powers up.
>>
>
> But, why it works in windows?
>

The Microsoft PCI code base probably is more willing to "work around"
BIOSes that don't properly configure PCI configuration registers... this
is an outstanding RFE for Solaris.

The Windows code base also has some other unrelated quirks in it -- it
uses DAT3 for card presence detection instead of the card detect bit in
the sdhci controller, for example. (It also doesn't support MMC, which
is to blame for some of the bastardized controller hacks that mfgrs like
Ricoh have done to separate their MMC and SDcard handling into separate
PCI functions. Yes, that's a hardware workaround for a software bug!
Go figure -- its what happens when one software company has a virtual
monopoly...)

-- Garrett
> Regards,
> Maxim Levitsky
>
>