libata-pmp: clear hob for pmp register accesses

>> Mark Lord wrote:
>>> Tejun, I've added PMP to sata_mv, and am now trying to get it
>>> to work with a Marvell PM attached.
>>>
>>> And the behaviour I see is very bizarre.
>>>
>>> After hard+soft resets, the PM signature is found,
>>> and libata interrogates the PM registers.
>>>
>>> It successfully reads register 0, and then register 1.
>>> But all subsequent registers read out (incorrectly) as zeros.
...

This behavior has been confirmed by Marvell with a SATA analyzer.
The Marvell port-multiplier apparently likes to see clean HOB
information when accessing PMP registers.

Since sata_mv uses PIO shadow register access, this doesn't happen
automatically, as it might in a more purely FIS-based driver (eg. ahci).

One way to fix this is to flag these commands with ATA_TFLAG_LBA48,
forcing libata to write out the HOB fields with known (zero) values.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by Mark Lord and committed by Jeff Garzik 39f25e70 91163006

+2 -2
+2 -2
drivers/ata/libata-pmp.c
··· 35 ata_tf_init(pmp_dev, &tf); 36 tf.command = ATA_CMD_PMP_READ; 37 tf.protocol = ATA_PROT_NODATA; 38 - tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; 39 tf.feature = reg; 40 tf.device = link->pmp; 41 ··· 71 ata_tf_init(pmp_dev, &tf); 72 tf.command = ATA_CMD_PMP_WRITE; 73 tf.protocol = ATA_PROT_NODATA; 74 - tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; 75 tf.feature = reg; 76 tf.device = link->pmp; 77 tf.nsect = val & 0xff;
··· 35 ata_tf_init(pmp_dev, &tf); 36 tf.command = ATA_CMD_PMP_READ; 37 tf.protocol = ATA_PROT_NODATA; 38 + tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48; 39 tf.feature = reg; 40 tf.device = link->pmp; 41 ··· 71 ata_tf_init(pmp_dev, &tf); 72 tf.command = ATA_CMD_PMP_WRITE; 73 tf.protocol = ATA_PROT_NODATA; 74 + tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48; 75 tf.feature = reg; 76 tf.device = link->pmp; 77 tf.nsect = val & 0xff;