Comment 80 for bug 61235

Revision history for this message
Reynaldo Cordero (reynaldo-cordero) wrote :

Look at this example
~$ cat /sys/block/sdb/device/max_sectors
240
[ Hmm. probably this is the problem. More info:
http://eliduc.berlios.de/index.php/Grabar_datos_en_un_pendrive
http://eliduc.berlios.de/index.php/Grabar_datos_en_un_pendrive#Caso_especial_-_Soluci.C3.B3n
]

~$ mount
[...]
/dev/sdb on /media/disk type vfat (rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077)

~$ sudo bash -c "echo 128 >/sys/block/sdb/device/max_sectors"

if that works, you can:

~$ udevinfo -a -p /sys/block/sdb
[...]
~$ udevinfo -a -p /sys/block/sdb | grep vendor
    ATTRS{vendor}=="RockChip"
    ATTRS{subsystem_vendor}=="0x1071"
    ATTRS{vendor}=="0x8086"
~$ sudo gedit /etc/udev/rules.d/80-programs.rules
BUS=="scsi", SYSFS{vendor}=="RockChip", RUN+="/bin/sh -c '/bin/echo 128 > /sys/block/%k/device/max_sectors'"