From: Oliver Neukum <oneukum@suse.de>
To: James Hilliard <james.hilliard1@gmail.com>, linux-usb@vger.kernel.org
Cc: Johan Hovold <johan@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, Russ Dill <Russ.Dill@gmail.com>,
Hector Martin <hector@marcansoft.com>
Subject: Re: [PATCH v2] usb: serial: Repair FTDI FT232R bricked eeprom
Date: Thu, 10 Sep 2020 05:02:34 +0200 [thread overview]
Message-ID: <1599706954.10822.3.camel@suse.de> (raw)
In-Reply-To: <20200909193419.2006744-1-james.hilliard1@gmail.com>
Am Mittwoch, den 09.09.2020, 13:34 -0600 schrieb James Hilliard:
> This patch detects and reverses the effects of the malicious FTDI
> Windows driver version 2.12.00(FTDIgate).
Hi,
this raises questions.
Should we do this unconditionally without asking?
Does this belong into kernel space?
> +static int ftdi_repair_brick(struct usb_serial_port *port)
> +{
> + struct ftdi_private *priv = usb_get_serial_port_data(port);
> + int orig_latency;
> + int rv;
> + u16 *eeprom_data;
> + u16 checksum;
> + int eeprom_size;
> + int result;
> +
> + switch (priv->chip_type) {
> + case FT232RL:
> + eeprom_size = 0x40;
> + break;
> + default:
> + /* Unsupported for brick repair */
> + return 0;
> + }
> +
> + /* Latency timer needs to be 0x77 to unlock EEPROM programming */
> + if (priv->latency != 0x77) {
> + orig_latency = priv->latency;
> + priv->latency = 0x77;
> + rv = write_latency_timer(port);
> + priv->latency = orig_latency;
> + if (rv < 0)
> + return -EIO;
> + }
Do you really want to change this without returning to the original?
Regards
Oliver
next prev parent reply other threads:[~2020-09-10 3:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 19:34 [PATCH v2] usb: serial: Repair FTDI FT232R bricked eeprom James Hilliard
2020-09-10 3:02 ` Oliver Neukum [this message]
2020-09-10 3:17 ` Hector Martin "marcan"
2020-09-10 3:46 ` James Hilliard
2020-09-10 3:49 ` Hector Martin "marcan"
2020-09-10 4:39 ` James Hilliard
2020-09-10 3:40 ` James Hilliard
2020-09-10 3:46 ` Hector Martin "marcan"
2020-09-10 4:07 ` James Hilliard
2020-09-10 5:33 ` Lars Melin
2020-09-10 6:48 ` James Hilliard
2020-09-10 8:01 ` James Hilliard
2020-09-10 8:08 ` Johan Hovold
2020-09-10 8:17 ` James Hilliard
2020-09-10 8:55 ` Greg Kroah-Hartman
2020-09-10 9:52 ` James Hilliard
2020-09-10 9:57 ` Hector Martin
2020-09-10 18:51 ` James Hilliard
2020-09-10 19:54 ` Hector Martin
2020-09-11 6:09 ` Greg Kroah-Hartman
2020-09-10 5:49 ` Greg Kroah-Hartman
2020-09-10 6:45 ` James Hilliard
2020-09-10 8:10 ` Hector Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1599706954.10822.3.camel@suse.de \
--to=oneukum@suse.de \
--cc=Russ.Dill@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hector@marcansoft.com \
--cc=james.hilliard1@gmail.com \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox