lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 2 Jan 2018 11:24:26 +0800
From:   "Ji-Ze Hong (Peter Hong)" <hpeter@...il.com>
To:     Johan Hovold <johan@...nel.org>
Cc:     gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        "Ji-Ze Hong (Peter Hong)" <hpeter+linux_kernel@...il.com>
Subject: Re: [PATCH V1 3/4] usb: serial: f81534: add output pin control

Hi Johan,

>> In this code, I'm only read/write 3 registers of 0x2ae8, 0x2a90, 0x2a80,
>> but some register will read/write more than once. Should I change the
>> code from port_probe() to attach() and re-write it as:
>> 	1: read the 3 register
>> 	2: change them will 12 pin desire value
>> 	3: write it back
>> Is it ok?
> 
> Do you expect these pins to ever be changed after probe? If not, then
> perhaps it can be moved to attach(), but otherwise I guess they should
> be set at port_probe(). By using shadow registers, you should be able to
> reduce the number of device accesses, but perhaps it's not worth the
> complexity.
> 
> Do you have a rough idea about how long these register updates take? I
> was just worried that these changes will add up to really long probe
> times.
> 

I had measured the time of the loop in f81534_set_port_output_pin() via
getnstimeofday() with 685.410 ~ 3681.682us per port, but normally with
600~800us per port. So I prefer remain the current method of
f81534_set_port_output_pin(). Is it ok?

Thanks
-- 
With Best Regards,
Peter Hong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ