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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023061951-taekwondo-unsoiled-faf2@gregkh>
Date:   Mon, 19 Jun 2023 07:46:17 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Anne Macedo <retpolanne@...teo.net>
Cc:     Mathias Nyman <mathias.nyman@...el.com>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        Vinod Koul <vkoul@...nel.org>,
        Christian Lamparter <chunkeey@...glemail.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: host: xhci: parameterize Renesas delay/retry

On Sun, Jun 18, 2023 at 10:46:57PM +0000, Anne Macedo wrote:
> Cards based on Renesas uPD720202 have their firmware downloaded during
> boot by xhci-pci. At this step, the status of the firmware is read and
> it takes a while for this read to happen (up to a few seconds). The
> macros RENESAS_RETRY and RENESAS_DELAY are used to retry reading this
> status byte from PCI a few times. If it can't read the status byte in
> RENESAS_RETRY tries, it times out.
> 
> However, since this may vary from card to card, these retry and delay
> values need to be tweaked. In order to avoid having to patch the code to
> change these values, CONFIG_USB_XHCI_PCI_RENESAS_RETRY and
> CONFIG_USB_XHCI_PCI_RENESAS_DELAY are introduced.

No, a build-time option that affects all devices controlled by this
driver is not how you handle this, sorry.

Make this a dynamic value, either determined automatically by the device
itself (as you know what device is being controlled), or worst case, a
sysfs attribute that you can modify if things are not working properly.

But a build-time option will never work, as it will never be changed,
and it would not allow for multiple devices in the system that are
different.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ