diff options
-rw-r--r-- | MAINTAINERS | 10 | ||||
-rw-r--r-- | drivers/ata/ahci.c | 1 | ||||
-rw-r--r-- | drivers/ata/libata-core.c | 22 | ||||
-rw-r--r-- | drivers/ata/libata-eh.c | 9 | ||||
-rw-r--r-- | drivers/ata/pata_ep93xx.c | 2 |
5 files changed, 36 insertions, 8 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 61a8f486306b..d76e07798e05 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -8019,6 +8019,16 @@ F: drivers/ata/ | |||
8019 | F: include/linux/ata.h | 8019 | F: include/linux/ata.h |
8020 | F: include/linux/libata.h | 8020 | F: include/linux/libata.h |
8021 | 8021 | ||
8022 | SERIAL ATA AHCI PLATFORM devices support | ||
8023 | M: Hans de Goede <hdegoede@redhat.com> | ||
8024 | M: Tejun Heo <tj@kernel.org> | ||
8025 | L: linux-ide@vger.kernel.org | ||
8026 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
8027 | S: Supported | ||
8028 | F: drivers/ata/ahci_platform.c | ||
8029 | F: drivers/ata/libahci_platform.c | ||
8030 | F: include/linux/ahci_platform.h | ||
8031 | |||
8022 | SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER | 8032 | SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER |
8023 | M: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> | 8033 | M: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> |
8024 | L: linux-scsi@vger.kernel.org | 8034 | L: linux-scsi@vger.kernel.org |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index dae5607e1115..4cd52a4541a9 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -456,6 +456,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
456 | 456 | ||
457 | /* Promise */ | 457 | /* Promise */ |
458 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ | 458 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ |
459 | { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */ | ||
459 | 460 | ||
460 | /* Asmedia */ | 461 | /* Asmedia */ |
461 | { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */ | 462 | { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */ |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 18d97d5c7d90..d19c37a7abc9 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4787,6 +4787,10 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) | |||
4787 | * ata_qc_new - Request an available ATA command, for queueing | 4787 | * ata_qc_new - Request an available ATA command, for queueing |
4788 | * @ap: target port | 4788 | * @ap: target port |
4789 | * | 4789 | * |
4790 | * Some ATA host controllers may implement a queue depth which is less | ||
4791 | * than ATA_MAX_QUEUE. So we shouldn't allocate a tag which is beyond | ||
4792 | * the hardware limitation. | ||
4793 | * | ||
4790 | * LOCKING: | 4794 | * LOCKING: |
4791 | * None. | 4795 | * None. |
4792 | */ | 4796 | */ |
@@ -4794,14 +4798,16 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) | |||
4794 | static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap) | 4798 | static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap) |
4795 | { | 4799 | { |
4796 | struct ata_queued_cmd *qc = NULL; | 4800 | struct ata_queued_cmd *qc = NULL; |
4797 | unsigned int i, tag; | 4801 | unsigned int i, tag, max_queue; |
4802 | |||
4803 | max_queue = ap->scsi_host->can_queue; | ||
4798 | 4804 | ||
4799 | /* no command while frozen */ | 4805 | /* no command while frozen */ |
4800 | if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) | 4806 | if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) |
4801 | return NULL; | 4807 | return NULL; |
4802 | 4808 | ||
4803 | for (i = 0; i < ATA_MAX_QUEUE; i++) { | 4809 | for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) { |
4804 | tag = (i + ap->last_tag + 1) % ATA_MAX_QUEUE; | 4810 | tag = tag < max_queue ? tag : 0; |
4805 | 4811 | ||
4806 | /* the last tag is reserved for internal command. */ | 4812 | /* the last tag is reserved for internal command. */ |
4807 | if (tag == ATA_TAG_INTERNAL) | 4813 | if (tag == ATA_TAG_INTERNAL) |
@@ -6169,6 +6175,16 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) | |||
6169 | { | 6175 | { |
6170 | int i, rc; | 6176 | int i, rc; |
6171 | 6177 | ||
6178 | /* | ||
6179 | * The max queue supported by hardware must not be greater than | ||
6180 | * ATA_MAX_QUEUE. | ||
6181 | */ | ||
6182 | if (sht->can_queue > ATA_MAX_QUEUE) { | ||
6183 | dev_err(host->dev, "BUG: the hardware max queue is too large\n"); | ||
6184 | WARN_ON(1); | ||
6185 | return -EINVAL; | ||
6186 | } | ||
6187 | |||
6172 | /* host must have been started */ | 6188 | /* host must have been started */ |
6173 | if (!(host->flags & ATA_HOST_STARTED)) { | 6189 | if (!(host->flags & ATA_HOST_STARTED)) { |
6174 | dev_err(host->dev, "BUG: trying to register unstarted host\n"); | 6190 | dev_err(host->dev, "BUG: trying to register unstarted host\n"); |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 6760fc4e85b8..dad83df555c4 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1811,7 +1811,7 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc, | |||
1811 | case ATA_DEV_ATA: | 1811 | case ATA_DEV_ATA: |
1812 | if (err & ATA_ICRC) | 1812 | if (err & ATA_ICRC) |
1813 | qc->err_mask |= AC_ERR_ATA_BUS; | 1813 | qc->err_mask |= AC_ERR_ATA_BUS; |
1814 | if (err & ATA_UNC) | 1814 | if (err & (ATA_UNC | ATA_AMNF)) |
1815 | qc->err_mask |= AC_ERR_MEDIA; | 1815 | qc->err_mask |= AC_ERR_MEDIA; |
1816 | if (err & ATA_IDNF) | 1816 | if (err & ATA_IDNF) |
1817 | qc->err_mask |= AC_ERR_INVALID; | 1817 | qc->err_mask |= AC_ERR_INVALID; |
@@ -2556,11 +2556,12 @@ static void ata_eh_link_report(struct ata_link *link) | |||
2556 | } | 2556 | } |
2557 | 2557 | ||
2558 | if (cmd->command != ATA_CMD_PACKET && | 2558 | if (cmd->command != ATA_CMD_PACKET && |
2559 | (res->feature & (ATA_ICRC | ATA_UNC | ATA_IDNF | | 2559 | (res->feature & (ATA_ICRC | ATA_UNC | ATA_AMNF | |
2560 | ATA_ABORTED))) | 2560 | ATA_IDNF | ATA_ABORTED))) |
2561 | ata_dev_err(qc->dev, "error: { %s%s%s%s}\n", | 2561 | ata_dev_err(qc->dev, "error: { %s%s%s%s%s}\n", |
2562 | res->feature & ATA_ICRC ? "ICRC " : "", | 2562 | res->feature & ATA_ICRC ? "ICRC " : "", |
2563 | res->feature & ATA_UNC ? "UNC " : "", | 2563 | res->feature & ATA_UNC ? "UNC " : "", |
2564 | res->feature & ATA_AMNF ? "AMNF " : "", | ||
2564 | res->feature & ATA_IDNF ? "IDNF " : "", | 2565 | res->feature & ATA_IDNF ? "IDNF " : "", |
2565 | res->feature & ATA_ABORTED ? "ABRT " : ""); | 2566 | res->feature & ATA_ABORTED ? "ABRT " : ""); |
2566 | #endif | 2567 | #endif |
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 6ad5c072ce34..4d37c5415fc7 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c | |||
@@ -915,7 +915,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev) | |||
915 | struct ep93xx_pata_data *drv_data; | 915 | struct ep93xx_pata_data *drv_data; |
916 | struct ata_host *host; | 916 | struct ata_host *host; |
917 | struct ata_port *ap; | 917 | struct ata_port *ap; |
918 | unsigned int irq; | 918 | int irq; |
919 | struct resource *mem_res; | 919 | struct resource *mem_res; |
920 | void __iomem *ide_base; | 920 | void __iomem *ide_base; |
921 | int err; | 921 | int err; |