sd card with write-protect switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Following is the behavior of sd card with write-protect switch on/off.
Tested in 4.14.103-rt55 debian.

When a sd card is inserted with unlocked mode (write protect switch off)
/sys/block/sda/ro is 0

When the sd card is removed and inserted with locked mode (write
protect switch on)
/sys/block/sda/ro is 1

Now again when the sd card is removed and inserted in unlocked mode,
/sys/block/sda/ro is still 1

In mmc_sd_setup_card(), after mmc_sd_get_ro() is retrived
mmc_card_set_readonly() is called if the write protect switch is
active(1).
Do we need to reset the read-only status if write protect switch is
not active(0). Any pointers will be helpful. Thanks.

Thanks.

Regards,
Vignesh



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux