Lines 93-103
Link Here
|
93 |
typedef enum { |
93 |
typedef enum { |
94 |
ADA_Q_NONE = 0x00, |
94 |
ADA_Q_NONE = 0x00, |
95 |
ADA_Q_4K = 0x01, |
95 |
ADA_Q_4K = 0x01, |
|
|
96 |
ADA_Q_NO_TRIM = 0x02, |
96 |
} ada_quirks; |
97 |
} ada_quirks; |
97 |
|
98 |
|
98 |
#define ADA_Q_BIT_STRING \ |
99 |
#define ADA_Q_BIT_STRING \ |
99 |
"\020" \ |
100 |
"\020" \ |
100 |
"\0014K" |
101 |
"\0014K" \ |
|
|
102 |
"\002NO_TRIM" |
101 |
|
103 |
|
102 |
typedef enum { |
104 |
typedef enum { |
103 |
ADA_CCB_RAHEAD = 0x01, |
105 |
ADA_CCB_RAHEAD = 0x01, |
Lines 378-383
Link Here
|
378 |
}, |
380 |
}, |
379 |
{ |
381 |
{ |
380 |
/* |
382 |
/* |
|
|
383 |
* KingDian S200 60GB P0921B |
384 |
* Trimming crash the SSD |
385 |
*/ |
386 |
{ T_DIRECT, SIP_MEDIA_FIXED, "*", "KingDian S200 *", "*" }, |
387 |
/*quirks*/ADA_Q_NO_TRIM |
388 |
}, |
389 |
{ |
390 |
/* |
381 |
* Kingston E100 Series SSDs |
391 |
* Kingston E100 Series SSDs |
382 |
* 4k optimised & trim only works in 4k requests + 4k aligned |
392 |
* 4k optimised & trim only works in 4k requests + 4k aligned |
383 |
*/ |
393 |
*/ |
Lines 1291-1296
Link Here
|
1291 |
softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION; |
1301 |
softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION; |
1292 |
if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) |
1302 |
if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) |
1293 |
softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; |
1303 |
softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; |
|
|
1304 |
/* Device lies about TRIM capability. */ |
1305 |
if ((softc->quirks & ADA_Q_NO_TRIM) && |
1306 |
(softc->flags & ADA_FLAG_CAN_TRIM)) |
1307 |
softc->flags &= ~ADA_FLAG_CAN_TRIM; |
1294 |
if (softc->flags & ADA_FLAG_CAN_TRIM) { |
1308 |
if (softc->flags & ADA_FLAG_CAN_TRIM) { |
1295 |
softc->disk->d_flags |= DISKFLAG_CANDELETE; |
1309 |
softc->disk->d_flags |= DISKFLAG_CANDELETE; |
1296 |
softc->disk->d_delmaxsize = softc->params.secsize * |
1310 |
softc->disk->d_delmaxsize = softc->params.secsize * |