What is a "Asking for cache data failed" warning?

I'm installing Ubuntu server 12.04 on Dell laptop and I frequently get an message as below:

3256.362200] sd 5:0:0:0: [sdb] Asking for cache data failed
[3256.362200] sd 5:0:0:0: [sdb] Assuming drive cache : write through

What does this message means and how can it be removed?


Solution 1:

What do the Asking for cache data failed and Assuming Drive Cache: write-through messages mean?

  • Hard disks have a small amount of RAM cache to speed up write operations. The system can write a chunk of data to the disk cache without actually waiting for it to be written to the disk. This is sometimes called "write-back" mode.

    • If there is no cache on the disk, data is directly written to it in "write-through" mode.
  • The Asking for cache data failed warning usually occurs with devices such as USB flash drives, USB card readers, etc. which present themselves as SCSI devices to the system (sdX), but have no cache.

    • The system asks the device: "Do you have a cache?" and gets no response. So it assumes there is no cache and puts it in "write-through" mode.

Solution 2:

Bug Circumvention

The bug seems to be related to the flash card readers many computers have. If you have such a reader and aren't using it you may be able to use the circumvention contributed by Neal McBurnett here, from the bug report Matthew Kaulfers kindly included in his answer.

sudo rmmod ums_realtek

This circumvention works for my laptop.

Solution 3:

This is a reported bug and you need to go here to find it.

Solution 4:

I have the same problem in 13.10 Saucy Salamander. However, the above answers did not help me. I did the following:

sudo rmmod ums_realtek
sudo sh -c 'echo "options ums_realtek ss_en=0" > /etc/modprobe.d/ums-realtek.conf'
sudo modprobe ums_realtek

What this does, is remove the module, update the module load parameters. Then loads the ums_realtek module again.

No reboot required.

Solution 5:

This was also asked and answered in an earlier Ask Ubuntu question in May: Errors in dmesg - Test WP failed, assume Write Enabled

If initially unloading the driver and then reloading it each time you require the reader is not a suitable solution, I would suggest to specify the ss_en=0 option to the driver as I originally did in this answer.

To summarise that answer:

  • either load the module manually after it has been rmmod with: sudo modprobe ums_realtek ss_en=0
  • or specify it in /etc/modules with ums_realtek ss_en=0 to make this change permanent.