aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
commit1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch)
tree47da3feee8e263e8c9352c85cf518e624be3c211 /drivers/ata/libata-core.c
parent750b1a6894ecc9b178c6e3d0a1170122971b2036 (diff)
parent8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff)
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c20
1 files changed, 10 insertions, 10 deletions
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
3239static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT) 3239static 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
3252void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b, 3252void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b,