Skip to content

Commit 99bde8f

Browse files
djbwgregkh
authored andcommitted
libata: allow sata_sil24 to opt-out of tag ordered submission
commit 72dd299 upstream. Ronny reports: https://bugzilla.kernel.org/show_bug.cgi?id=87101 "Since commit 8a4aeec "libata/ahci: accommodate tag ordered controllers" the access to the harddisk on the first SATA-port is failing on its first access. The access to the harddisk on the second port is working normal. When reverting the above commit, access to both harddisks is working fine again." Maintain tag ordered submission as the default, but allow sata_sil24 to continue with the old behavior. Cc: Tejun Heo <[email protected]> Reported-by: Ronny Hegewald <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 28de6f3 commit 99bde8f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

drivers/ata/libata-core.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4740,7 +4740,10 @@ static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
47404740
return NULL;
47414741

47424742
for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) {
4743-
tag = tag < max_queue ? tag : 0;
4743+
if (ap->flags & ATA_FLAG_LOWTAG)
4744+
tag = i;
4745+
else
4746+
tag = tag < max_queue ? tag : 0;
47444747

47454748
/* the last tag is reserved for internal command. */
47464749
if (tag == ATA_TAG_INTERNAL)

drivers/ata/sata_sil24.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ enum {
246246
/* host flags */
247247
SIL24_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_PIO_DMA |
248248
ATA_FLAG_NCQ | ATA_FLAG_ACPI_SATA |
249-
ATA_FLAG_AN | ATA_FLAG_PMP,
249+
ATA_FLAG_AN | ATA_FLAG_PMP | ATA_FLAG_LOWTAG,
250250
SIL24_FLAG_PCIX_IRQ_WOC = (1 << 24), /* IRQ loss errata on PCI-X */
251251

252252
IRQ_STAT_4PORTS = 0xf,

include/linux/libata.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ enum {
230230
ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity
231231
* led */
232232
ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */
233+
ATA_FLAG_LOWTAG = (1 << 24), /* host wants lowest available tag */
233234

234235
/* bits 24:31 of ap->flags are reserved for LLD specific flags */
235236

0 commit comments

Comments
 (0)