View | Details | Raw Unified | Return to bug 222802 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/cam/ata/ata_da.c (-2 / +16 lines)
Lines 116-122 Link Here
116
	ADA_Q_4K		= 0x01,
116
	ADA_Q_4K		= 0x01,
117
	ADA_Q_NCQ_TRIM_BROKEN	= 0x02,
117
	ADA_Q_NCQ_TRIM_BROKEN	= 0x02,
118
	ADA_Q_LOG_BROKEN	= 0x04,
118
	ADA_Q_LOG_BROKEN	= 0x04,
119
	ADA_Q_SMR_DM		= 0x08
119
	ADA_Q_SMR_DM		= 0x08,
120
	ADA_Q_NO_TRIM		= 0x10
120
} ada_quirks;
121
} ada_quirks;
121
122
122
#define ADA_Q_BIT_STRING	\
123
#define ADA_Q_BIT_STRING	\
Lines 124-130 Link Here
124
	"\0014K"		\
125
	"\0014K"		\
125
	"\002NCQ_TRIM_BROKEN"	\
126
	"\002NCQ_TRIM_BROKEN"	\
126
	"\003LOG_BROKEN"	\
127
	"\003LOG_BROKEN"	\
127
	"\004SMR_DM"
128
	"\004SMR_DM"		\
129
	"\005NO_TRIM"
128
130
129
typedef enum {
131
typedef enum {
130
	ADA_CCB_RAHEAD		= 0x01,
132
	ADA_CCB_RAHEAD		= 0x01,
Lines 521-526 Link Here
521
	},
523
	},
522
	{
524
	{
523
		/*
525
		/*
526
		 * KingDian S200 60GB P0921B
527
		 * Trimming crash the SSD
528
		 */
529
		{ T_DIRECT, SIP_MEDIA_FIXED, "*", "KingDian S200 *", "*" },
530
		/*quirks*/ADA_Q_NO_TRIM
531
	},
532
	{
533
		/*
524
		 * Kingston E100 Series SSDs
534
		 * Kingston E100 Series SSDs
525
		 * 4k optimised & trim only works in 4k requests + 4k aligned
535
		 * 4k optimised & trim only works in 4k requests + 4k aligned
526
		 */
536
		 */
Lines 1758-1763 Link Here
1758
	softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE;
1768
	softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE;
1759
	if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE)
1769
	if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE)
1760
		softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
1770
		softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
1771
	/* Device lies about TRIM capability. */
1772
	if ((softc->quirks & ADA_Q_NO_TRIM) &&
1773
	    (softc->flags & ADA_FLAG_CAN_TRIM))
1774
		softc->flags &= ~ADA_FLAG_CAN_TRIM;
1761
	if (softc->flags & ADA_FLAG_CAN_TRIM) {
1775
	if (softc->flags & ADA_FLAG_CAN_TRIM) {
1762
		softc->disk->d_flags |= DISKFLAG_CANDELETE;
1776
		softc->disk->d_flags |= DISKFLAG_CANDELETE;
1763
		softc->disk->d_delmaxsize = softc->params.secsize *
1777
		softc->disk->d_delmaxsize = softc->params.secsize *

Return to bug 222802