Source-Changes-D archive

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

Re: CVS commit: src/sys/dev/ata



Hi,

Jonathan A. Kollasch schrieb:
On Wed, Oct 05, 2011 at 10:25:52AM +0200, Manuel Bouyer wrote:
On Wed, Oct 05, 2011 at 03:40:18AM +0000, Jonathan A. Kollasch wrote:
Module Name:    src
Committed By:   jakllsch
Date:           Wed Oct  5 03:40:18 UTC 2011

Modified Files:
        src/sys/dev/ata: wd.c

Log Message:
Limit wd(4) transfers to 128 (512-byte) logical sectors, as the traditional
MAXPHYS value has for at least the past decade.

We should be able to go safely up to 256 sectors. Anything larger requires
LBA48, which is not supported by some controllers.

Do we know how a real ST506 or similar ancient drive would respond
to such a command?

The ST506 was only a disk drive with no embedded controller logic.
So it wouldn't respond to such a command at all, as it doesn't even see it.
The command interface, after which the original ATA interface was modelled,
was that of the WD1010 disk controller, to which this and similar drives
would attach.  You would tell the controller the cylinder/head/sector
of the first sector you wanted to read, and when multiple sectors were
requested, the controller would increment only the sector number.
Since the controller wouldn't even know the number of sectors on a track,
it wouldn't be able to cross a track boundary.

> Then again, maybe we shouldn't care until someone
reports it doesn't work.

Given that the ST506 had a capacity of 5 MB (yes, megabytes!), this
is most likely reasonable.

> Currently we limit transfers to 255 sectors.
Presumably we're assuming that the register value of 0 used for 256
might be mishandled.

IIRC there were some early IDE drives that had this problem.

Ciao,
Wolfgang
--
Wolfgang%Solfrank.net@localhost                         Wolfgang Solfrank


Home | Main Index | Thread Index | Old Index