info-mtools
[Top][All Lists]
Advanced

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

Re: [mtools] Mtools support for media with >512 byte sectors


From: Alain Knaff
Subject: Re: [mtools] Mtools support for media with >512 byte sectors
Date: Thu, 25 May 2006 23:10:42 +0200
User-agent: Thunderbird 1.5.0.2 (X11/20060420)

Peter Jeremy wrote:
My wife got a MP3 player for mother's day.  Whilst I managed to
confirm that it was a standard USB mass storage device before buying
it, it doesn't have 512-byte sectors and as a result, mtools on
FreeBSD (6.1-RELEASE) doesn't like it.  I did my testing on
mtools-3.9.9+mtools-3.9.9-20050228.diff but a visual check of the
changes in mtools-3.9.10+mtools-3.9.10-20060228b.diff shows the
problem is still present.

The player identifies as:
umass0: EM706S EM706S MP3 Player, rev 1.10/10.01, addr 2
umass0: SCSI over Bulk-Only; quirks = 0x0000
umass0:2:0:-1: Attached to scbus2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <EM706S MP3 Player 0100> Removable Direct Access SCSI-4 device da0: 1.000MB/s transfers
da0: 491MB (251456 2048 byte sectors: 64H 32S/T 122C)

usbdevs reports:
 port 3 addr 2: full speed, power 100 mA, config 1, EM706S MP3 Player(0x0706), 
EM706S(0x067f), rev 10.01

The problem is the "2048 byte sectors".  mtools is incompatible with
media with anything other than 512-byte sectors.  Whilst there is a
"blocksize" configuration directive, it is over-ridden or ignored in a
number of places in the code.  The first location I found was in
init.c::read_boot() where the read size is limited to 1KB.  After
fixing that, I found that init.c::get_media_type() has 512 bytes
hard coded.  At this point I decided it's not a trivial fix.

Has anyone else looked into fixing this problem?


I've made a new patch today, which is meant to address the issue.

http://mtools.linux.lu/mtools-3.9.10-20060525.diff.gz

Regards,

Alain
_______________________________________________
mtools mailing list
address@hidden
http://www.tux.org/mailman/listinfo/mtools


reply via email to

[Prev in Thread] Current Thread [Next in Thread]