svn commit: r317673 - stable/11/sys/dev/ahci
Alexander Motin
mav at FreeBSD.org
Tue May 2 06:27:48 UTC 2017
Author: mav
Date: Tue May 2 06:27:46 2017
New Revision: 317673
URL: https://svnweb.freebsd.org/changeset/base/317673
Log:
MFC r317080: Block FPDMA TRIM for ASMedia HBAs.
Experiments show FPDMA TRIM command timeouts on ASMedia HBAs, while the
same SSDs working fine on Intel HBAs.
Modified:
stable/11/sys/dev/ahci/ahci.c
stable/11/sys/dev/ahci/ahci.h
stable/11/sys/dev/ahci/ahci_pci.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/ahci/ahci.c
==============================================================================
--- stable/11/sys/dev/ahci/ahci.c Tue May 2 06:16:35 2017 (r317672)
+++ stable/11/sys/dev/ahci/ahci.c Tue May 2 06:27:46 2017 (r317673)
@@ -2684,7 +2684,9 @@ ahciaction(struct cam_sim *sim, union cc
if (ch->caps & AHCI_CAP_SPM)
cpi->hba_inquiry |= PI_SATAPM;
cpi->target_sprt = 0;
- cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED | PIM_ATA_EXT;
+ cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED;
+ if ((ch->quirks & AHCI_Q_NOAUX) == 0)
+ cpi->hba_misc |= PIM_ATA_EXT;
cpi->hba_eng_cnt = 0;
if (ch->caps & AHCI_CAP_SPM)
cpi->max_target = 15;
Modified: stable/11/sys/dev/ahci/ahci.h
==============================================================================
--- stable/11/sys/dev/ahci/ahci.h Tue May 2 06:16:35 2017 (r317672)
+++ stable/11/sys/dev/ahci/ahci.h Tue May 2 06:27:46 2017 (r317673)
@@ -599,6 +599,7 @@ enum ahci_err_type {
#define AHCI_Q_RESTORE_CAP 0x00080000
#define AHCI_Q_NOMSIX 0x00100000
#define AHCI_Q_NOCCS 0x00400000
+#define AHCI_Q_NOAUX 0x00800000
#define AHCI_Q_BIT_STRING \
"\020" \
@@ -623,7 +624,8 @@ enum ahci_err_type {
"\023FORCE_PI" \
"\024RESTORE_CAP" \
"\025NOMSIX" \
- "\027NOCCS"
+ "\027NOCCS" \
+ "\030NOAUX"
int ahci_attach(device_t dev);
int ahci_detach(device_t dev);
Modified: stable/11/sys/dev/ahci/ahci_pci.c
==============================================================================
--- stable/11/sys/dev/ahci/ahci_pci.c Tue May 2 06:16:35 2017 (r317672)
+++ stable/11/sys/dev/ahci/ahci_pci.c Tue May 2 06:27:46 2017 (r317673)
@@ -73,15 +73,15 @@ static const struct {
{0x78021022, 0x00, "AMD Hudson-2", 0},
{0x78031022, 0x00, "AMD Hudson-2", 0},
{0x78041022, 0x00, "AMD Hudson-2", 0},
- {0x06011b21, 0x00, "ASMedia ASM1060", AHCI_Q_NOCCS},
- {0x06021b21, 0x00, "ASMedia ASM1060", AHCI_Q_NOCCS},
- {0x06111b21, 0x00, "ASMedia ASM1061", AHCI_Q_NOCCS},
- {0x06121b21, 0x00, "ASMedia ASM1062", AHCI_Q_NOCCS},
- {0x06201b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS},
- {0x06211b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS},
- {0x06221b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS},
- {0x06241b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS},
- {0x06251b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS},
+ {0x06011b21, 0x00, "ASMedia ASM1060", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
+ {0x06021b21, 0x00, "ASMedia ASM1060", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
+ {0x06111b21, 0x00, "ASMedia ASM1061", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
+ {0x06121b21, 0x00, "ASMedia ASM1062", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
+ {0x06201b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
+ {0x06211b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
+ {0x06221b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
+ {0x06241b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
+ {0x06251b21, 0x00, "ASMedia ASM106x", AHCI_Q_NOCCS|AHCI_Q_NOAUX},
{0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE},
{0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE},
{0x26818086, 0x00, "Intel ESB2", 0},
More information about the svn-src-stable-11
mailing list