libsas: fix usage of ata_tf_to_fis
authorDan Williams <dan.j.williams@intel.com>
Wed, 23 Oct 2013 01:35:19 +0000 (18:35 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 3 Jan 2014 04:33:26 +0000 (04:33 +0000)
commit8525fdf426fd4ad935f7f38c0d4663bc55504440
treeadc609bb4cb9f8a211a3a92f3ccb4072c92160c4
parente8a972ca97341ac335425551e7611380937639db
libsas: fix usage of ata_tf_to_fis

commit ae5fbae0ccd982dfca0ce363036ed92f5b13f150 upstream.

Since commit 110dd8f19df5 "[SCSI] libsas: fix scr_read/write users and
update the libata documentation" we have been passing pmp=1 and is_cmd=0
to ata_tf_to_fis().  Praveen reports that eSATA attached drives do not
discover correctly.  His investigation found that the BIOS was passing
pmp=0 while Linux was passing pmp=1 and failing to discover the drives.
Update libsas to follow the libata example of pulling the pmp setting
from the ata_link and correct is_cmd to be 1 since all tf's submitted
through ->qc_issue are commands.  Presumably libsas lldds do not care
about is_cmd as they have sideband mechanisms to perform link
management.

http://marc.info/?l=linux-scsi&m=138179681726990

[jejb: checkpatch fix]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reported-by: Praveen Murali <pmurali@logicube.com>
Tested-by: Praveen Murali <pmurali@logicube.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/scsi/libsas/sas_ata.c