Skip to content

Commit c1de159

Browse files
committed
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
2 parents 887c8ba + d312fef commit c1de159

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

drivers/ata/ahci.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,11 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev,
621621
static int ahci_pci_reset_controller(struct ata_host *host)
622622
{
623623
struct pci_dev *pdev = to_pci_dev(host->dev);
624+
int rc;
624625

625-
ahci_reset_controller(host);
626+
rc = ahci_reset_controller(host);
627+
if (rc)
628+
return rc;
626629

627630
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
628631
struct ahci_host_priv *hpriv = host->private_data;

drivers/ata/ata_piix.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ static const struct ich_laptop ich_laptop[] = {
492492
{ 0x27DF, 0x152D, 0x0778 }, /* ICH7 on unknown Intel */
493493
{ 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */
494494
{ 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */
495+
{ 0x24CA, 0x10CF, 0x11AB }, /* ICH4M on Fujitsu-Siemens Lifebook S6120 */
495496
{ 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */
496497
{ 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */
497498
{ 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */

drivers/ata/libata-core.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3234,19 +3234,19 @@ static const struct ata_timing ata_timing[] = {
32343234
};
32353235

32363236
#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)
32383238

32393239
static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT)
32403240
{
3241-
q->setup = EZ(t->setup * 1000, T);
3242-
q->act8b = EZ(t->act8b * 1000, T);
3243-
q->rec8b = EZ(t->rec8b * 1000, T);
3244-
q->cyc8b = EZ(t->cyc8b * 1000, T);
3245-
q->active = EZ(t->active * 1000, T);
3246-
q->recover = EZ(t->recover * 1000, T);
3247-
q->dmack_hold = EZ(t->dmack_hold * 1000, T);
3248-
q->cycle = EZ(t->cycle * 1000, T);
3249-
q->udma = EZ(t->udma * 1000, UT);
3241+
q->setup = EZ(t->setup, T);
3242+
q->act8b = EZ(t->act8b, T);
3243+
q->rec8b = EZ(t->rec8b, T);
3244+
q->cyc8b = EZ(t->cyc8b, T);
3245+
q->active = EZ(t->active, T);
3246+
q->recover = EZ(t->recover, T);
3247+
q->dmack_hold = EZ(t->dmack_hold, T);
3248+
q->cycle = EZ(t->cycle, T);
3249+
q->udma = EZ(t->udma, UT);
32503250
}
32513251

32523252
void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b,

0 commit comments

Comments
 (0)