Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Problems writing to USB devices
@ 2007-10-17  8:08 Giuseppe Sacco
  2007-10-17 13:14 ` J. Scott Kasten
  0 siblings, 1 reply; 3+ messages in thread
From: Giuseppe Sacco @ 2007-10-17  8:08 UTC (permalink / raw)
  To: linux-mips

Hi all,
I am still testing new kernels on the ip32 platform (and learning kernel structure :-)). Currently I found problems in writing to USB block devices. I may read from a pendrive without problem, but when I try to write the process stop.
This is the last part of a transcript of strace output for "pvcreate /dev/sdc" command:

[...]
open("/dev/sdc", O_RDWR|O_EXCL|O_LARGEFILE|O_NOATIME) = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 32), ...}) = 0
ioctl(4, BLKFLSBUF, 0)                  = 0
close(4)                                = 0
open("/dev/sdc", O_RDONLY|O_LARGEFILE)  = 4
ioctl(4, BLKGETSIZE64, 0x7fbe2260)      = 0
close(4)                                = 0
stat64(0x4e6f00, 0x7fbe2090)            = 0
stat64(0x4e6f00, 0x7fbe2178)            = 0
open("/dev/sdc", O_RDWR|O_LARGEFILE|O_NOATIME) = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 32), ...}) = 0
ioctl(4, BLKFLSBUF, 0)                  = 0
ioctl(4, BLKBSZGET, 0x4e6d18)           = 0
_llseek(4, 524222464, [524222464], SEEK_SET) = 0
read(4, "\307^\277\322\244R\36L\252\362G\\\366\3674\310@`K\374\373"..., 4096) = 4096
close(4)                                = 0
stat64(0x7fbe3edd, 0x7fbe21c8)          = 0
open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 4
read(4, "m\v\205x\374S\374\6\347\222MJGPJ|\"\300\207\376\323r\270"..., 32) = 32
close(4)                                = 0
open("/dev/sdc", O_RDONLY|O_LARGEFILE)  = 4
ioctl(4, BLKGETSIZE64, 0x4efbb8)        = 0
close(4)                                = 0
stat64(0x4e6f00, 0x7fbe0fb0)            = 0
stat64(0x4e6f00, 0x7fbe1098)            = 0
open("/dev/sdc", O_RDWR|O_LARGEFILE|O_NOATIME) = 4
fstat64(4, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 32), ...}) = 0
ioctl(4, BLKFLSBUF, 0)                  = 0
ioctl(4, BLKBSZGET, 0x4e6d18)           = 0
_llseek(4, 4096, [4096], SEEK_SET)      = 0
read(4, "\1\7\2\7\3\7\4\7\5\7\6\7\7\7\10\7\t\7\n\7\v\7\f\7\r\7\16"..., 4096) = 4096
_llseek(4, 4096, [4096], SEEK_SET)      = 0
write(4, "\0\7\2\7\3\7\4\7\5\7\6\7\7\7\10\7\t\7\n\7\v\7\f\7\r\7\16"..., 4096) = 4096
ioctl(4, BLKFLSBUF

The process hung during ioctl(4,BLKFLSBUF,0), but this very ioctl is issued successfully many times during the process. This time the iocl is done just after the first "write()", so I think the problem is in the write() command.

I have the same problem writing a new mbr (with fdisk or cfdisk) on this device: the device will not be changed at all.

Any ideas on what to check?

Thanks (again),
Giuseppe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-17 14:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17  8:08 Problems writing to USB devices Giuseppe Sacco
2007-10-17 13:14 ` J. Scott Kasten
2007-10-17 14:31   ` Giuseppe Sacco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox