diff options
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r-- | drivers/ata/sata_mv.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 207c400c64df..d15caf32045e 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -449,6 +449,7 @@ static void mv_error_handler(struct ata_port *ap); | |||
449 | static void mv_post_int_cmd(struct ata_queued_cmd *qc); | 449 | static void mv_post_int_cmd(struct ata_queued_cmd *qc); |
450 | static void mv_eh_freeze(struct ata_port *ap); | 450 | static void mv_eh_freeze(struct ata_port *ap); |
451 | static void mv_eh_thaw(struct ata_port *ap); | 451 | static void mv_eh_thaw(struct ata_port *ap); |
452 | static void mv6_dev_config(struct ata_device *dev); | ||
452 | static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); | 453 | static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); |
453 | 454 | ||
454 | static void mv5_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | 455 | static void mv5_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, |
@@ -541,6 +542,7 @@ static const struct ata_port_operations mv5_ops = { | |||
541 | }; | 542 | }; |
542 | 543 | ||
543 | static const struct ata_port_operations mv6_ops = { | 544 | static const struct ata_port_operations mv6_ops = { |
545 | .dev_config = mv6_dev_config, | ||
544 | .tf_load = ata_tf_load, | 546 | .tf_load = ata_tf_load, |
545 | .tf_read = ata_tf_read, | 547 | .tf_read = ata_tf_read, |
546 | .check_status = ata_check_status, | 548 | .check_status = ata_check_status, |
@@ -1054,6 +1056,17 @@ static int mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val) | |||
1054 | return -EINVAL; | 1056 | return -EINVAL; |
1055 | } | 1057 | } |
1056 | 1058 | ||
1059 | static void mv6_dev_config(struct ata_device *adev) | ||
1060 | { | ||
1061 | /* | ||
1062 | * We don't have hob_nsect when doing NCQ commands on Gen-II. | ||
1063 | * See mv_qc_prep() for more info. | ||
1064 | */ | ||
1065 | if (adev->flags & ATA_DFLAG_NCQ) | ||
1066 | if (adev->max_sectors > ATA_MAX_SECTORS) | ||
1067 | adev->max_sectors = ATA_MAX_SECTORS; | ||
1068 | } | ||
1069 | |||
1057 | static void mv_edma_cfg(struct mv_port_priv *pp, struct mv_host_priv *hpriv, | 1070 | static void mv_edma_cfg(struct mv_port_priv *pp, struct mv_host_priv *hpriv, |
1058 | void __iomem *port_mmio, int want_ncq) | 1071 | void __iomem *port_mmio, int want_ncq) |
1059 | { | 1072 | { |