HomeFreeBSD

Supply SAT layer with valid transfer sizes.

Description

Supply SAT layer with valid transfer sizes.

This is a rework of r344701, that noticed that number of bytes passes to
8 bit sector count field gets truncated. First decision was to not pass
anything, since ATA specs define the field as N/A. But it appeared to be a
problem for some SAT devices, that require information about data transfer
to operate properly. Some additional investigation shown that it is quite
a common practice to set unused fields of ATA commands (fortunately ATA
specs formally allow it) to supply the information to SAT layer. I have
found SAS-SATA interposer that does not allow pass-through without it.

As side effect, reduce code duplication by removing ata_do_28bit_cmd()
function, replacing it with more universal ata_do_cmd().

Details

Provenance
mavAuthored on
Parents
rS352285: MFC r352011: Supply SAT layer with valid transfer sizes.
Branches
Unknown
Tags
Unknown