diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-03 12:30:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-03 12:30:00 -0400 |
commit | c1de1591d927bc1e55095d642b3c3cc2e54fc1cd (patch) | |
tree | 4386f6b63b65ff799cd1b1ec9a84990a357bb117 | |
parent | 887c8ba753fbe809ba93fa3cfd0cc46db18d37d4 (diff) | |
parent | d312fefea8387503375f728855c9a62de20c9665 (diff) |
Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata fixes from Tejun Heo:
"Nothing too interesting.
Arnd's gcc-7 warning fixes that slipped through the cracks for two
release cycles (my bad), and two minor low level driver updates"
* 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
ahci: don't ignore result code of ahci_reset_controller()
ata_piix: Add Fujitsu-Siemens Lifebook S6120 to short cable IDs
ata: avoid gcc-7 warning in ata_timing_quantize
-rw-r--r-- | drivers/ata/ahci.c | 5 | ||||
-rw-r--r-- | drivers/ata/ata_piix.c | 1 | ||||
-rw-r--r-- | drivers/ata/libata-core.c | 20 |
3 files changed, 15 insertions, 11 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index cb9b0e9090e3..9f78bb03bb76 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -621,8 +621,11 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev, | |||
621 | static int ahci_pci_reset_controller(struct ata_host *host) | 621 | static int ahci_pci_reset_controller(struct ata_host *host) |
622 | { | 622 | { |
623 | struct pci_dev *pdev = to_pci_dev(host->dev); | 623 | struct pci_dev *pdev = to_pci_dev(host->dev); |
624 | int rc; | ||
624 | 625 | ||
625 | ahci_reset_controller(host); | 626 | rc = ahci_reset_controller(host); |
627 | if (rc) | ||
628 | return rc; | ||
626 | 629 | ||
627 | if (pdev->vendor == PCI_VENDOR_ID_INTEL) { | 630 | if (pdev->vendor == PCI_VENDOR_ID_INTEL) { |
628 | struct ahci_host_priv *hpriv = host->private_data; | 631 | struct ahci_host_priv *hpriv = host->private_data; |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 8401c3b5be92..b702c20fbc2b 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -492,6 +492,7 @@ static const struct ich_laptop ich_laptop[] = { | |||
492 | { 0x27DF, 0x152D, 0x0778 }, /* ICH7 on unknown Intel */ | 492 | { 0x27DF, 0x152D, 0x0778 }, /* ICH7 on unknown Intel */ |
493 | { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */ | 493 | { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */ |
494 | { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */ | 494 | { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */ |
495 | { 0x24CA, 0x10CF, 0x11AB }, /* ICH4M on Fujitsu-Siemens Lifebook S6120 */ | ||
495 | { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */ | 496 | { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */ |
496 | { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ | 497 | { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ |
497 | { 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */ | 498 | { 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */ |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 1945a8ea2099..ee4c1ec9dca0 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -3234,19 +3234,19 @@ static const struct ata_timing ata_timing[] = { | |||
3234 | }; | 3234 | }; |
3235 | 3235 | ||
3236 | #define ENOUGH(v, unit) (((v)-1)/(unit)+1) | 3236 | #define ENOUGH(v, unit) (((v)-1)/(unit)+1) |
3237 | #define EZ(v, unit) ((v)?ENOUGH(v, unit):0) | 3237 | #define EZ(v, unit) ((v)?ENOUGH(((v) * 1000), unit):0) |
3238 | 3238 | ||
3239 | static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT) | 3239 | static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT) |
3240 | { | 3240 | { |
3241 | q->setup = EZ(t->setup * 1000, T); | 3241 | q->setup = EZ(t->setup, T); |
3242 | q->act8b = EZ(t->act8b * 1000, T); | 3242 | q->act8b = EZ(t->act8b, T); |
3243 | q->rec8b = EZ(t->rec8b * 1000, T); | 3243 | q->rec8b = EZ(t->rec8b, T); |
3244 | q->cyc8b = EZ(t->cyc8b * 1000, T); | 3244 | q->cyc8b = EZ(t->cyc8b, T); |
3245 | q->active = EZ(t->active * 1000, T); | 3245 | q->active = EZ(t->active, T); |
3246 | q->recover = EZ(t->recover * 1000, T); | 3246 | q->recover = EZ(t->recover, T); |
3247 | q->dmack_hold = EZ(t->dmack_hold * 1000, T); | 3247 | q->dmack_hold = EZ(t->dmack_hold, T); |
3248 | q->cycle = EZ(t->cycle * 1000, T); | 3248 | q->cycle = EZ(t->cycle, T); |
3249 | q->udma = EZ(t->udma * 1000, UT); | 3249 | q->udma = EZ(t->udma, UT); |
3250 | } | 3250 | } |
3251 | 3251 | ||
3252 | void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b, | 3252 | void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b, |