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:   Wed, 14 Mar 2018 16:18:55 +0800
From:   Chunfeng Yun <chunfeng.yun@...iatek.com>
To:     Matthew Dharm <mdharm-usb@...-eyed-alien.net>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Serge Semin <fancer.lancer@...il.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Alan Stern" <stern@...land.harvard.edu>,
        <linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH] Add Apple Carplay driver

On Tue, 2018-03-13 at 23:53 -0700, Matthew Dharm wrote:
> Why is this a kernel-level driver, rather than a userspace application
> that uses libusb to send the single vendor-specific command required?
> Since this command would be applicable to many CarPlay devices, with
> many different VID/PIDs, it would seem to make more sense as a
> userspace app that took a reference to a USB device or VID/PID.
Sorry, I'm not familiar with libusb.
But after I roughly read a simple example using libusb, it indeed can be
realized by a userspace driver.

Thanks for your useful comments

> 
> Matt
> 
> On Tue, Mar 13, 2018 at 11:02 PM, Chunfeng Yun
> <chunfeng.yun@...iatek.com> wrote:
> > From bf48dcd9cb254576cfea373c9a5d2ab996408895 Mon Sep 17 00:00:00 2001
> > From: Chunfeng Yun <chunfeng.yun@...iatek.com>
> > Date: Tue, 13 Mar 2018 11:47:38 +0800
> > Subject: [PATCH] Add Apple Carplay driver
> >
> > Some Apple devices which support Carplay can enter USB Host Mode from USB
> > Device Mode after receiving a specific USB Vendor Request. There is a
> > requirement apply to accesssories that support the USB dual role switch
> > feature, and must have a USB-A receptacle that is capable of functioning
> > in both USB Host and USB Device roles.
> > It means that the driver should supports manual Dual-Role switch, due to
> > no IDDIG pin is avaliable.
> >
> > There is no suitable place to add this spicific USB Vendor Request, so
> > here I extract a single driver which allow user force to send it by a debug
> > interface when need it, and keep it independent on USB Dual-Role Controller
> > Drivers.
> > But to implement carplay feature, there are some requirments for USB Dual-Role
> > Driver:
> > 1. supports manual dual-role switch, such as, by a debug interface;
> > 2. keep vbus alive even when switch host into device mode;
> >
> > More information please refer to "Chapter 46. USB Role Switch" in
> > MFI Accessroy Interface Specification.pdf
> >
> > Chunfeng Yun (1):
> >   usb: misc: supports Apple Carplay driver
> >
> >  drivers/usb/misc/Kconfig   |    9 +++
> >  drivers/usb/misc/Makefile  |    1 +
> >  drivers/usb/misc/carplay.c |  193 ++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 203 insertions(+)
> >  create mode 100644 drivers/usb/misc/carplay.c
> >
> > --
> > 1.7.9.5
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> > the body of a message to majordomo@...r.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ