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]
Message-ID: <CADB-GoLncGoXmJsxXPUZocz1fJe9uUBX+mtgBVkuUR1SqbOBEQ@mail.gmail.com>
Date:	Wed, 20 Mar 2013 21:24:14 +0800
From:	Yuan-Hsin Chen <yuanlmm@...il.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Felipe Balbi <balbi@...com>, gregkh@...uxfoundation.org,
	sarah.a.sharp@...ux.intel.com, Julia.Lawall@...6.fr,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Yuan-Hsin Chen <yhchen@...aday-tech.com>,
	john453@...aday-tech.com
Subject: Re: [PATCH] usb host: Faraday FUSBH200 HCD driver.

Hi,

On Tue, Mar 19, 2013 at 11:48 PM, Alan Stern <stern@...land.harvard.edu> wrote:
> On Tue, 19 Mar 2013, Yuan-Hsin Chen wrote:
>
>> > What about the port_status registers?  They're not between command and
>> > async_next.  If they aren't consistent with EHCI, it makes things a lot
>> > more complicated.
>>
>> fusbh200 has only one port_status register with different offset,
>> 0x30, and the position of some bits are different from EHCI.

How about adding kernel configuration to adjust offset for FUSBH200 in
ehci_def.h? So port_status would be in offset 0x20 from ehci_regs.

For example,

        /* ASYNCLISTADDR: offset 0x18 */
        u32             async_next;     /* address of next async queue head */

#ifndef CONFIG_USB_EHCI_HCD_FUSBH200
        u32             reserved1[2];

        /* TXFILLTUNING: offset 0x24 */
        u32             txfill_tuning;  /* TX FIFO Tuning register */
#define TXFIFO_DEFAULT  (8<<16)         /* FIFO burst threshold 8 */

        u32             reserved2[6];

        /* CONFIGFLAG: offset 0x40 */
        u32             configured_flag;
#define FLAG_CF         (1<<0)          /* true: we'll support "high speed" */

#else
        u32             reserved1;
#endif
        /* PORTSC: offset 0x44 */
        u32             port_status[0]; /* up to N_PORTS */


Furthermore, there are PORT_POWER, PORT_OWNER, PORT_LED_XXX,
PORT_TEST, PORT_WKCONN_E, PORT_WKDISC_E, PORT_WKOC_E absent in
port_status of FUSBH200. Also PORT_OC and PORT_OCC are in another
register. Is it ok to use quirk flag also?

>
> That's pretty nasty.  Integrating that with the standard EHCI driver
> would be considerably more difficult.
>
> Why was the FUSBH200 designed in this strange way?  Why doesn't it use
> the standard EHCI register layout?  Were the engineers at Faraday
> deliberately trying to make life harder for driver writers?
>
>> Also, usbmode_ex, hostpc, and txfill_tuning other than configured_flag
>> are non-existent in fusbh200. They are used in both ehci-hcd.c and
>> ehci-hub.c for several times.
>
> They are used only if the hardware supports them, that is, only if the
> ehci->has_hostpc flag is set.
>
> Alan Stern
>

Thank you for your help.

Yuan-Hsin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ