diff options
author | Mark Lord <liml@rtr.ca> | 2009-01-19 18:06:28 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-01-26 06:37:00 -0500 |
commit | cd12e1f7a2c28917c89d65c0d4a52d3919b4c125 (patch) | |
tree | ef292f2e4ac25682297ce2da4258fe867ec07c23 /drivers/ata/sata_mv.c | |
parent | cae6edc3b5a536119374a5439d9b253cb26f05e1 (diff) |
sata_mv: remove bogus nsect restriction
Remove unneeded nsect restriction from GenII NCQ path,
and improve comments to explain why this is not a problem.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r-- | drivers/ata/sata_mv.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 68096289074b..874b60b2e20f 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -349,8 +349,6 @@ enum { | |||
349 | 349 | ||
350 | EDMA_HALTCOND_OFS = 0x60, /* GenIIe halt conditions */ | 350 | EDMA_HALTCOND_OFS = 0x60, /* GenIIe halt conditions */ |
351 | 351 | ||
352 | GEN_II_NCQ_MAX_SECTORS = 256, /* max sects/io on Gen2 w/NCQ */ | ||
353 | |||
354 | /* Host private flags (hp_flags) */ | 352 | /* Host private flags (hp_flags) */ |
355 | MV_HP_FLAG_MSI = (1 << 0), | 353 | MV_HP_FLAG_MSI = (1 << 0), |
356 | MV_HP_ERRATA_50XXB0 = (1 << 1), | 354 | MV_HP_ERRATA_50XXB0 = (1 << 1), |
@@ -1093,20 +1091,12 @@ static void mv6_dev_config(struct ata_device *adev) | |||
1093 | * | 1091 | * |
1094 | * Gen-II does not support NCQ over a port multiplier | 1092 | * Gen-II does not support NCQ over a port multiplier |
1095 | * (no FIS-based switching). | 1093 | * (no FIS-based switching). |
1096 | * | ||
1097 | * We don't have hob_nsect when doing NCQ commands on Gen-II. | ||
1098 | * See mv_qc_prep() for more info. | ||
1099 | */ | 1094 | */ |
1100 | if (adev->flags & ATA_DFLAG_NCQ) { | 1095 | if (adev->flags & ATA_DFLAG_NCQ) { |
1101 | if (sata_pmp_attached(adev->link->ap)) { | 1096 | if (sata_pmp_attached(adev->link->ap)) { |
1102 | adev->flags &= ~ATA_DFLAG_NCQ; | 1097 | adev->flags &= ~ATA_DFLAG_NCQ; |
1103 | ata_dev_printk(adev, KERN_INFO, | 1098 | ata_dev_printk(adev, KERN_INFO, |
1104 | "NCQ disabled for command-based switching\n"); | 1099 | "NCQ disabled for command-based switching\n"); |
1105 | } else if (adev->max_sectors > GEN_II_NCQ_MAX_SECTORS) { | ||
1106 | adev->max_sectors = GEN_II_NCQ_MAX_SECTORS; | ||
1107 | ata_dev_printk(adev, KERN_INFO, | ||
1108 | "max_sectors limited to %u for NCQ\n", | ||
1109 | adev->max_sectors); | ||
1110 | } | 1100 | } |
1111 | } | 1101 | } |
1112 | } | 1102 | } |
@@ -1444,7 +1434,8 @@ static void mv_qc_prep(struct ata_queued_cmd *qc) | |||
1444 | * only 11 bytes...so we must pick and choose required | 1434 | * only 11 bytes...so we must pick and choose required |
1445 | * registers based on the command. So, we drop feature and | 1435 | * registers based on the command. So, we drop feature and |
1446 | * hob_feature for [RW] DMA commands, but they are needed for | 1436 | * hob_feature for [RW] DMA commands, but they are needed for |
1447 | * NCQ. NCQ will drop hob_nsect. | 1437 | * NCQ. NCQ will drop hob_nsect, which is not needed there |
1438 | * (nsect is used only for the tag; feat/hob_feat hold true nsect). | ||
1448 | */ | 1439 | */ |
1449 | switch (tf->command) { | 1440 | switch (tf->command) { |
1450 | case ATA_CMD_READ: | 1441 | case ATA_CMD_READ: |