Hi Felix

> +static void lio_sync_octeon_time(struct work_struct *work)
> +{
> +     struct cavium_wk *wk = (struct cavium_wk *)work;
> +     struct lio *lio = (struct lio *)wk->ctxptr;
> +     struct octeon_device *oct = lio->oct_dev;
> +     struct octeon_soft_command *sc;
> +     struct timespec64 ts;
> +     struct lio_time *lt;
> +     int ret;
> +
> +     sc = octeon_alloc_soft_command(oct, sizeof(struct lio_time), 0, 0);
> +     if (!sc) {
> +             dev_err(&oct->pci_dev->dev,
> +                     "Failed to sync time to octeon: soft command allocation 
> failed\n");
> +             return;
> +     }
> +
> +     lt = (struct lio_time *)sc->virtdptr;
> +
> +     /* Get time of the day */
> +     getnstimeofday64(&ts);


> @@ -890,11 +894,29 @@ int octeon_download_firmware(struct octeon_device *oct, 
> const u8 *data,
>                       load_addr += size;
>               }
>       }
> +
> +     /* Get time of the day */
> +     do_gettimeofday(&time);
> +     time_to_tm(time.tv_sec, (-sys_tz.tz_minuteswest) * 60,  &tm_val);

So here, you correct for the timezone the machine is in. However,
lio_sync_octeon_time() uses getnstimeofday64(), which as far as i
know, does not adjust for the time zone.

Maybe put your machine into Pacific/Kiritimati and see what happens?

      Andrew

Reply via email to