diff options
author | Hans de Goede <hdegoede@redhat.com> | 2017-12-11 11:52:16 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-12-11 11:53:33 -0500 |
commit | ebb82e3c79d2a956366d0848304a53648bd6350b (patch) | |
tree | 3894ee6113c2d3beeebb1b71b61284c988935f18 /drivers/ata/ahci.c | |
parent | 998008b779e424bd7513c434d0ab9c1268459009 (diff) |
ahci: Allow setting a default LPM policy for mobile chipsets
On many laptops setting a different LPM policy then unknown /
max_performance can lead to power-savings of 1.0 - 1.5 Watts (when idle).
Modern ultrabooks idle around 6W (at 50% screen brightness), 1.0 - 1.5W
is a significant chunk of this.
There are some performance / latency costs to enabling LPM by default,
so it is desirable to make it possible to set a different LPM policy
for mobile / laptop variants of chipsets / "South Bridges" vs their
desktop / server counterparts. Also enabling LPM by default is not
entirely without risk of regressions. At least min_power is known to
cause issues with some disks, including some reports of data corruption.
This commits adds a new ahci.mobile_lpm_policy kernel cmdline option,
which defaults to a new SATA_MOBILE_LPM_POLICY Kconfig option so that
Linux distributions can choose to set a LPM policy for mobile chipsets
by default.
The reason to have both a kernel cmdline option and a Kconfig default
value for it, is to allow easy overriding of the default to allow
trouble-shooting without needing to rebuild the kernel.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 97 |
1 files changed, 56 insertions, 41 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 844f697bedbf..8e910fae8892 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -65,6 +65,7 @@ enum board_ids { | |||
65 | /* board IDs by feature in alphabetical order */ | 65 | /* board IDs by feature in alphabetical order */ |
66 | board_ahci, | 66 | board_ahci, |
67 | board_ahci_ign_iferr, | 67 | board_ahci_ign_iferr, |
68 | board_ahci_mobile, | ||
68 | board_ahci_nomsi, | 69 | board_ahci_nomsi, |
69 | board_ahci_noncq, | 70 | board_ahci_noncq, |
70 | board_ahci_nosntf, | 71 | board_ahci_nosntf, |
@@ -140,6 +141,13 @@ static const struct ata_port_info ahci_port_info[] = { | |||
140 | .udma_mask = ATA_UDMA6, | 141 | .udma_mask = ATA_UDMA6, |
141 | .port_ops = &ahci_ops, | 142 | .port_ops = &ahci_ops, |
142 | }, | 143 | }, |
144 | [board_ahci_mobile] = { | ||
145 | AHCI_HFLAGS (AHCI_HFLAG_IS_MOBILE), | ||
146 | .flags = AHCI_FLAG_COMMON, | ||
147 | .pio_mask = ATA_PIO4, | ||
148 | .udma_mask = ATA_UDMA6, | ||
149 | .port_ops = &ahci_ops, | ||
150 | }, | ||
143 | [board_ahci_nomsi] = { | 151 | [board_ahci_nomsi] = { |
144 | AHCI_HFLAGS (AHCI_HFLAG_NO_MSI), | 152 | AHCI_HFLAGS (AHCI_HFLAG_NO_MSI), |
145 | .flags = AHCI_FLAG_COMMON, | 153 | .flags = AHCI_FLAG_COMMON, |
@@ -252,13 +260,13 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
252 | { PCI_VDEVICE(INTEL, 0x2924), board_ahci }, /* ICH9 */ | 260 | { PCI_VDEVICE(INTEL, 0x2924), board_ahci }, /* ICH9 */ |
253 | { PCI_VDEVICE(INTEL, 0x2925), board_ahci }, /* ICH9 */ | 261 | { PCI_VDEVICE(INTEL, 0x2925), board_ahci }, /* ICH9 */ |
254 | { PCI_VDEVICE(INTEL, 0x2927), board_ahci }, /* ICH9 */ | 262 | { PCI_VDEVICE(INTEL, 0x2927), board_ahci }, /* ICH9 */ |
255 | { PCI_VDEVICE(INTEL, 0x2929), board_ahci }, /* ICH9M */ | 263 | { PCI_VDEVICE(INTEL, 0x2929), board_ahci_mobile }, /* ICH9M */ |
256 | { PCI_VDEVICE(INTEL, 0x292a), board_ahci }, /* ICH9M */ | 264 | { PCI_VDEVICE(INTEL, 0x292a), board_ahci_mobile }, /* ICH9M */ |
257 | { PCI_VDEVICE(INTEL, 0x292b), board_ahci }, /* ICH9M */ | 265 | { PCI_VDEVICE(INTEL, 0x292b), board_ahci_mobile }, /* ICH9M */ |
258 | { PCI_VDEVICE(INTEL, 0x292c), board_ahci }, /* ICH9M */ | 266 | { PCI_VDEVICE(INTEL, 0x292c), board_ahci_mobile }, /* ICH9M */ |
259 | { PCI_VDEVICE(INTEL, 0x292f), board_ahci }, /* ICH9M */ | 267 | { PCI_VDEVICE(INTEL, 0x292f), board_ahci_mobile }, /* ICH9M */ |
260 | { PCI_VDEVICE(INTEL, 0x294d), board_ahci }, /* ICH9 */ | 268 | { PCI_VDEVICE(INTEL, 0x294d), board_ahci }, /* ICH9 */ |
261 | { PCI_VDEVICE(INTEL, 0x294e), board_ahci }, /* ICH9M */ | 269 | { PCI_VDEVICE(INTEL, 0x294e), board_ahci_mobile }, /* ICH9M */ |
262 | { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */ | 270 | { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */ |
263 | { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ | 271 | { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ |
264 | { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ | 272 | { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ |
@@ -268,9 +276,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
268 | { PCI_VDEVICE(INTEL, 0x3b23), board_ahci }, /* PCH AHCI */ | 276 | { PCI_VDEVICE(INTEL, 0x3b23), board_ahci }, /* PCH AHCI */ |
269 | { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ | 277 | { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ |
270 | { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ | 278 | { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ |
271 | { PCI_VDEVICE(INTEL, 0x3b29), board_ahci }, /* PCH M AHCI */ | 279 | { PCI_VDEVICE(INTEL, 0x3b29), board_ahci_mobile }, /* PCH M AHCI */ |
272 | { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ | 280 | { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ |
273 | { PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH M RAID */ | 281 | { PCI_VDEVICE(INTEL, 0x3b2c), board_ahci_mobile }, /* PCH M RAID */ |
274 | { PCI_VDEVICE(INTEL, 0x3b2f), board_ahci }, /* PCH AHCI */ | 282 | { PCI_VDEVICE(INTEL, 0x3b2f), board_ahci }, /* PCH AHCI */ |
275 | { PCI_VDEVICE(INTEL, 0x19b0), board_ahci }, /* DNV AHCI */ | 283 | { PCI_VDEVICE(INTEL, 0x19b0), board_ahci }, /* DNV AHCI */ |
276 | { PCI_VDEVICE(INTEL, 0x19b1), board_ahci }, /* DNV AHCI */ | 284 | { PCI_VDEVICE(INTEL, 0x19b1), board_ahci }, /* DNV AHCI */ |
@@ -293,9 +301,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
293 | { PCI_VDEVICE(INTEL, 0x19cE), board_ahci }, /* DNV AHCI */ | 301 | { PCI_VDEVICE(INTEL, 0x19cE), board_ahci }, /* DNV AHCI */ |
294 | { PCI_VDEVICE(INTEL, 0x19cF), board_ahci }, /* DNV AHCI */ | 302 | { PCI_VDEVICE(INTEL, 0x19cF), board_ahci }, /* DNV AHCI */ |
295 | { PCI_VDEVICE(INTEL, 0x1c02), board_ahci }, /* CPT AHCI */ | 303 | { PCI_VDEVICE(INTEL, 0x1c02), board_ahci }, /* CPT AHCI */ |
296 | { PCI_VDEVICE(INTEL, 0x1c03), board_ahci }, /* CPT M AHCI */ | 304 | { PCI_VDEVICE(INTEL, 0x1c03), board_ahci_mobile }, /* CPT M AHCI */ |
297 | { PCI_VDEVICE(INTEL, 0x1c04), board_ahci }, /* CPT RAID */ | 305 | { PCI_VDEVICE(INTEL, 0x1c04), board_ahci }, /* CPT RAID */ |
298 | { PCI_VDEVICE(INTEL, 0x1c05), board_ahci }, /* CPT M RAID */ | 306 | { PCI_VDEVICE(INTEL, 0x1c05), board_ahci_mobile }, /* CPT M RAID */ |
299 | { PCI_VDEVICE(INTEL, 0x1c06), board_ahci }, /* CPT RAID */ | 307 | { PCI_VDEVICE(INTEL, 0x1c06), board_ahci }, /* CPT RAID */ |
300 | { PCI_VDEVICE(INTEL, 0x1c07), board_ahci }, /* CPT RAID */ | 308 | { PCI_VDEVICE(INTEL, 0x1c07), board_ahci }, /* CPT RAID */ |
301 | { PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */ | 309 | { PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */ |
@@ -304,28 +312,28 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
304 | { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */ | 312 | { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */ |
305 | { PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */ | 313 | { PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */ |
306 | { PCI_VDEVICE(INTEL, 0x1e02), board_ahci }, /* Panther Point AHCI */ | 314 | { PCI_VDEVICE(INTEL, 0x1e02), board_ahci }, /* Panther Point AHCI */ |
307 | { PCI_VDEVICE(INTEL, 0x1e03), board_ahci }, /* Panther Point M AHCI */ | 315 | { PCI_VDEVICE(INTEL, 0x1e03), board_ahci_mobile }, /* Panther M AHCI */ |
308 | { PCI_VDEVICE(INTEL, 0x1e04), board_ahci }, /* Panther Point RAID */ | 316 | { PCI_VDEVICE(INTEL, 0x1e04), board_ahci }, /* Panther Point RAID */ |
309 | { PCI_VDEVICE(INTEL, 0x1e05), board_ahci }, /* Panther Point RAID */ | 317 | { PCI_VDEVICE(INTEL, 0x1e05), board_ahci }, /* Panther Point RAID */ |
310 | { PCI_VDEVICE(INTEL, 0x1e06), board_ahci }, /* Panther Point RAID */ | 318 | { PCI_VDEVICE(INTEL, 0x1e06), board_ahci }, /* Panther Point RAID */ |
311 | { PCI_VDEVICE(INTEL, 0x1e07), board_ahci }, /* Panther Point M RAID */ | 319 | { PCI_VDEVICE(INTEL, 0x1e07), board_ahci_mobile }, /* Panther M RAID */ |
312 | { PCI_VDEVICE(INTEL, 0x1e0e), board_ahci }, /* Panther Point RAID */ | 320 | { PCI_VDEVICE(INTEL, 0x1e0e), board_ahci }, /* Panther Point RAID */ |
313 | { PCI_VDEVICE(INTEL, 0x8c02), board_ahci }, /* Lynx Point AHCI */ | 321 | { PCI_VDEVICE(INTEL, 0x8c02), board_ahci }, /* Lynx Point AHCI */ |
314 | { PCI_VDEVICE(INTEL, 0x8c03), board_ahci }, /* Lynx Point M AHCI */ | 322 | { PCI_VDEVICE(INTEL, 0x8c03), board_ahci_mobile }, /* Lynx M AHCI */ |
315 | { PCI_VDEVICE(INTEL, 0x8c04), board_ahci }, /* Lynx Point RAID */ | 323 | { PCI_VDEVICE(INTEL, 0x8c04), board_ahci }, /* Lynx Point RAID */ |
316 | { PCI_VDEVICE(INTEL, 0x8c05), board_ahci }, /* Lynx Point M RAID */ | 324 | { PCI_VDEVICE(INTEL, 0x8c05), board_ahci_mobile }, /* Lynx M RAID */ |
317 | { PCI_VDEVICE(INTEL, 0x8c06), board_ahci }, /* Lynx Point RAID */ | 325 | { PCI_VDEVICE(INTEL, 0x8c06), board_ahci }, /* Lynx Point RAID */ |
318 | { PCI_VDEVICE(INTEL, 0x8c07), board_ahci }, /* Lynx Point M RAID */ | 326 | { PCI_VDEVICE(INTEL, 0x8c07), board_ahci_mobile }, /* Lynx M RAID */ |
319 | { PCI_VDEVICE(INTEL, 0x8c0e), board_ahci }, /* Lynx Point RAID */ | 327 | { PCI_VDEVICE(INTEL, 0x8c0e), board_ahci }, /* Lynx Point RAID */ |
320 | { PCI_VDEVICE(INTEL, 0x8c0f), board_ahci }, /* Lynx Point M RAID */ | 328 | { PCI_VDEVICE(INTEL, 0x8c0f), board_ahci_mobile }, /* Lynx M RAID */ |
321 | { PCI_VDEVICE(INTEL, 0x9c02), board_ahci }, /* Lynx Point-LP AHCI */ | 329 | { PCI_VDEVICE(INTEL, 0x9c02), board_ahci_mobile }, /* Lynx LP AHCI */ |
322 | { PCI_VDEVICE(INTEL, 0x9c03), board_ahci }, /* Lynx Point-LP AHCI */ | 330 | { PCI_VDEVICE(INTEL, 0x9c03), board_ahci_mobile }, /* Lynx LP AHCI */ |
323 | { PCI_VDEVICE(INTEL, 0x9c04), board_ahci }, /* Lynx Point-LP RAID */ | 331 | { PCI_VDEVICE(INTEL, 0x9c04), board_ahci_mobile }, /* Lynx LP RAID */ |
324 | { PCI_VDEVICE(INTEL, 0x9c05), board_ahci }, /* Lynx Point-LP RAID */ | 332 | { PCI_VDEVICE(INTEL, 0x9c05), board_ahci_mobile }, /* Lynx LP RAID */ |
325 | { PCI_VDEVICE(INTEL, 0x9c06), board_ahci }, /* Lynx Point-LP RAID */ | 333 | { PCI_VDEVICE(INTEL, 0x9c06), board_ahci_mobile }, /* Lynx LP RAID */ |
326 | { PCI_VDEVICE(INTEL, 0x9c07), board_ahci }, /* Lynx Point-LP RAID */ | 334 | { PCI_VDEVICE(INTEL, 0x9c07), board_ahci_mobile }, /* Lynx LP RAID */ |
327 | { PCI_VDEVICE(INTEL, 0x9c0e), board_ahci }, /* Lynx Point-LP RAID */ | 335 | { PCI_VDEVICE(INTEL, 0x9c0e), board_ahci_mobile }, /* Lynx LP RAID */ |
328 | { PCI_VDEVICE(INTEL, 0x9c0f), board_ahci }, /* Lynx Point-LP RAID */ | 336 | { PCI_VDEVICE(INTEL, 0x9c0f), board_ahci_mobile }, /* Lynx LP RAID */ |
329 | { PCI_VDEVICE(INTEL, 0x1f22), board_ahci }, /* Avoton AHCI */ | 337 | { PCI_VDEVICE(INTEL, 0x1f22), board_ahci }, /* Avoton AHCI */ |
330 | { PCI_VDEVICE(INTEL, 0x1f23), board_ahci }, /* Avoton AHCI */ | 338 | { PCI_VDEVICE(INTEL, 0x1f23), board_ahci }, /* Avoton AHCI */ |
331 | { PCI_VDEVICE(INTEL, 0x1f24), board_ahci }, /* Avoton RAID */ | 339 | { PCI_VDEVICE(INTEL, 0x1f24), board_ahci }, /* Avoton RAID */ |
@@ -353,26 +361,26 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
353 | { PCI_VDEVICE(INTEL, 0x8d66), board_ahci }, /* Wellsburg RAID */ | 361 | { PCI_VDEVICE(INTEL, 0x8d66), board_ahci }, /* Wellsburg RAID */ |
354 | { PCI_VDEVICE(INTEL, 0x8d6e), board_ahci }, /* Wellsburg RAID */ | 362 | { PCI_VDEVICE(INTEL, 0x8d6e), board_ahci }, /* Wellsburg RAID */ |
355 | { PCI_VDEVICE(INTEL, 0x23a3), board_ahci }, /* Coleto Creek AHCI */ | 363 | { PCI_VDEVICE(INTEL, 0x23a3), board_ahci }, /* Coleto Creek AHCI */ |
356 | { PCI_VDEVICE(INTEL, 0x9c83), board_ahci }, /* Wildcat Point-LP AHCI */ | 364 | { PCI_VDEVICE(INTEL, 0x9c83), board_ahci_mobile }, /* Wildcat LP AHCI */ |
357 | { PCI_VDEVICE(INTEL, 0x9c85), board_ahci }, /* Wildcat Point-LP RAID */ | 365 | { PCI_VDEVICE(INTEL, 0x9c85), board_ahci_mobile }, /* Wildcat LP RAID */ |
358 | { PCI_VDEVICE(INTEL, 0x9c87), board_ahci }, /* Wildcat Point-LP RAID */ | 366 | { PCI_VDEVICE(INTEL, 0x9c87), board_ahci_mobile }, /* Wildcat LP RAID */ |
359 | { PCI_VDEVICE(INTEL, 0x9c8f), board_ahci }, /* Wildcat Point-LP RAID */ | 367 | { PCI_VDEVICE(INTEL, 0x9c8f), board_ahci_mobile }, /* Wildcat LP RAID */ |
360 | { PCI_VDEVICE(INTEL, 0x8c82), board_ahci }, /* 9 Series AHCI */ | 368 | { PCI_VDEVICE(INTEL, 0x8c82), board_ahci }, /* 9 Series AHCI */ |
361 | { PCI_VDEVICE(INTEL, 0x8c83), board_ahci }, /* 9 Series M AHCI */ | 369 | { PCI_VDEVICE(INTEL, 0x8c83), board_ahci_mobile }, /* 9 Series M AHCI */ |
362 | { PCI_VDEVICE(INTEL, 0x8c84), board_ahci }, /* 9 Series RAID */ | 370 | { PCI_VDEVICE(INTEL, 0x8c84), board_ahci }, /* 9 Series RAID */ |
363 | { PCI_VDEVICE(INTEL, 0x8c85), board_ahci }, /* 9 Series M RAID */ | 371 | { PCI_VDEVICE(INTEL, 0x8c85), board_ahci_mobile }, /* 9 Series M RAID */ |
364 | { PCI_VDEVICE(INTEL, 0x8c86), board_ahci }, /* 9 Series RAID */ | 372 | { PCI_VDEVICE(INTEL, 0x8c86), board_ahci }, /* 9 Series RAID */ |
365 | { PCI_VDEVICE(INTEL, 0x8c87), board_ahci }, /* 9 Series M RAID */ | 373 | { PCI_VDEVICE(INTEL, 0x8c87), board_ahci_mobile }, /* 9 Series M RAID */ |
366 | { PCI_VDEVICE(INTEL, 0x8c8e), board_ahci }, /* 9 Series RAID */ | 374 | { PCI_VDEVICE(INTEL, 0x8c8e), board_ahci }, /* 9 Series RAID */ |
367 | { PCI_VDEVICE(INTEL, 0x8c8f), board_ahci }, /* 9 Series M RAID */ | 375 | { PCI_VDEVICE(INTEL, 0x8c8f), board_ahci_mobile }, /* 9 Series M RAID */ |
368 | { PCI_VDEVICE(INTEL, 0x9d03), board_ahci }, /* Sunrise Point-LP AHCI */ | 376 | { PCI_VDEVICE(INTEL, 0x9d03), board_ahci_mobile }, /* Sunrise LP AHCI */ |
369 | { PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */ | 377 | { PCI_VDEVICE(INTEL, 0x9d05), board_ahci_mobile }, /* Sunrise LP RAID */ |
370 | { PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */ | 378 | { PCI_VDEVICE(INTEL, 0x9d07), board_ahci_mobile }, /* Sunrise LP RAID */ |
371 | { PCI_VDEVICE(INTEL, 0xa102), board_ahci }, /* Sunrise Point-H AHCI */ | 379 | { PCI_VDEVICE(INTEL, 0xa102), board_ahci }, /* Sunrise Point-H AHCI */ |
372 | { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H M AHCI */ | 380 | { PCI_VDEVICE(INTEL, 0xa103), board_ahci_mobile }, /* Sunrise M AHCI */ |
373 | { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */ | 381 | { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */ |
374 | { PCI_VDEVICE(INTEL, 0xa106), board_ahci }, /* Sunrise Point-H RAID */ | 382 | { PCI_VDEVICE(INTEL, 0xa106), board_ahci }, /* Sunrise Point-H RAID */ |
375 | { PCI_VDEVICE(INTEL, 0xa107), board_ahci }, /* Sunrise Point-H M RAID */ | 383 | { PCI_VDEVICE(INTEL, 0xa107), board_ahci_mobile }, /* Sunrise M RAID */ |
376 | { PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */ | 384 | { PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */ |
377 | { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/ | 385 | { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/ |
378 | { PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Lewisburg AHCI*/ | 386 | { PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Lewisburg AHCI*/ |
@@ -386,10 +394,10 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
386 | { PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/ | 394 | { PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/ |
387 | { PCI_VDEVICE(INTEL, 0xa252), board_ahci }, /* Lewisburg RAID*/ | 395 | { PCI_VDEVICE(INTEL, 0xa252), board_ahci }, /* Lewisburg RAID*/ |
388 | { PCI_VDEVICE(INTEL, 0xa256), board_ahci }, /* Lewisburg RAID*/ | 396 | { PCI_VDEVICE(INTEL, 0xa256), board_ahci }, /* Lewisburg RAID*/ |
389 | { PCI_VDEVICE(INTEL, 0x0f22), board_ahci }, /* Bay Trail AHCI */ | 397 | { PCI_VDEVICE(INTEL, 0x0f22), board_ahci_mobile }, /* Bay Trail AHCI */ |
390 | { PCI_VDEVICE(INTEL, 0x0f23), board_ahci }, /* Bay Trail AHCI */ | 398 | { PCI_VDEVICE(INTEL, 0x0f23), board_ahci_mobile }, /* Bay Trail AHCI */ |
391 | { PCI_VDEVICE(INTEL, 0x22a3), board_ahci }, /* Cherry Trail AHCI */ | 399 | { PCI_VDEVICE(INTEL, 0x22a3), board_ahci_mobile }, /* Cherry Tr. AHCI */ |
392 | { PCI_VDEVICE(INTEL, 0x5ae3), board_ahci }, /* Apollo Lake AHCI */ | 400 | { PCI_VDEVICE(INTEL, 0x5ae3), board_ahci_mobile }, /* ApolloLake AHCI */ |
393 | 401 | ||
394 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ | 402 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ |
395 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 403 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
@@ -597,6 +605,9 @@ static int marvell_enable = 1; | |||
597 | module_param(marvell_enable, int, 0644); | 605 | module_param(marvell_enable, int, 0644); |
598 | MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)"); | 606 | MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)"); |
599 | 607 | ||
608 | static int mobile_lpm_policy = CONFIG_SATA_MOBILE_LPM_POLICY; | ||
609 | module_param(mobile_lpm_policy, int, 0644); | ||
610 | MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets"); | ||
600 | 611 | ||
601 | static void ahci_pci_save_initial_config(struct pci_dev *pdev, | 612 | static void ahci_pci_save_initial_config(struct pci_dev *pdev, |
602 | struct ahci_host_priv *hpriv) | 613 | struct ahci_host_priv *hpriv) |
@@ -1732,6 +1743,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1732 | if (ap->flags & ATA_FLAG_EM) | 1743 | if (ap->flags & ATA_FLAG_EM) |
1733 | ap->em_message_type = hpriv->em_msg_type; | 1744 | ap->em_message_type = hpriv->em_msg_type; |
1734 | 1745 | ||
1746 | if ((hpriv->flags & AHCI_HFLAG_IS_MOBILE) && | ||
1747 | mobile_lpm_policy >= ATA_LPM_UNKNOWN && | ||
1748 | mobile_lpm_policy <= ATA_LPM_MIN_POWER) | ||
1749 | ap->target_lpm_policy = mobile_lpm_policy; | ||
1735 | 1750 | ||
1736 | /* disabled/not-implemented port */ | 1751 | /* disabled/not-implemented port */ |
1737 | if (!(hpriv->port_map & (1 << i))) | 1752 | if (!(hpriv->port_map & (1 << i))) |