aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-09 14:07:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-09 14:07:45 -0500
commit861d75d098e2d0a2d7692c9d6a30b6fd2c81387c (patch)
tree8b3a917988572ded2e3d60e09c19e86326d7caae
parentaf9468db44989f995ec98c5cc63c99b16b78ee66 (diff)
parente185934ff94466b4a449165e5f1c164a44d005f2 (diff)
Merge branch 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata fixes from Tejun Heo: "This is quite late but SCT Write Same support added during this cycle is broken subtly but seriously and it'd be best to disable it before v4.9 gets released. This contains two commits - one low impact sata_mv fix and the mentioned disabling of SCT Write Same" * 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata-scsi: disable SCT Write Same for the moment ata: sata_mv: check for errors when parsing nr-ports from dt
-rw-r--r--drivers/ata/libata-scsi.c1
-rw-r--r--drivers/ata/sata_mv.c15
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index c4eb4ae9c3aa..8e575fbdf31d 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1159,6 +1159,7 @@ static void ata_scsi_sdev_config(struct scsi_device *sdev)
1159{ 1159{
1160 sdev->use_10_for_rw = 1; 1160 sdev->use_10_for_rw = 1;
1161 sdev->use_10_for_ms = 1; 1161 sdev->use_10_for_ms = 1;
1162 sdev->no_write_same = 1;
1162 1163
1163 /* Schedule policy is determined by ->qc_defer() callback and 1164 /* Schedule policy is determined by ->qc_defer() callback and
1164 * it needs to see every deferred qc. Set dev_blocked to 1 to 1165 * it needs to see every deferred qc. Set dev_blocked to 1 to
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index efc48bf89d51..823e938c9a78 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4090,7 +4090,20 @@ static int mv_platform_probe(struct platform_device *pdev)
4090 4090
4091 /* allocate host */ 4091 /* allocate host */
4092 if (pdev->dev.of_node) { 4092 if (pdev->dev.of_node) {
4093 of_property_read_u32(pdev->dev.of_node, "nr-ports", &n_ports); 4093 rc = of_property_read_u32(pdev->dev.of_node, "nr-ports",
4094 &n_ports);
4095 if (rc) {
4096 dev_err(&pdev->dev,
4097 "error parsing nr-ports property: %d\n", rc);
4098 return rc;
4099 }
4100
4101 if (n_ports <= 0) {
4102 dev_err(&pdev->dev, "nr-ports must be positive: %d\n",
4103 n_ports);
4104 return -EINVAL;
4105 }
4106
4094 irq = irq_of_parse_and_map(pdev->dev.of_node, 0); 4107 irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
4095 } else { 4108 } else {
4096 mv_platform_data = dev_get_platdata(&pdev->dev); 4109 mv_platform_data = dev_get_platdata(&pdev->dev);