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:	Thu, 19 Mar 2015 11:26:28 +0100
From:	David Herrmann <dh.herrmann@...il.com>
To:	Lauri Kasanen <cand@....com>
Cc:	Antonio Ospite <ao2@....it>,
	"open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
	Jiri Kosina <jkosina@...e.cz>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	AndrewD207@....com,
	Benjamin Tissoires <benjamin.tissoires@...il.com>
Subject: Re: [PATCH] HID: sony: Enable Gasia third-party PS3 controllers

Hi

On Sat, Feb 7, 2015 at 10:48 PM, Lauri Kasanen <cand@....com> wrote:
> Hi,
>
> On Sat, 7 Feb 2015 17:31:33 +0100
> Antonio Ospite <ao2@....it> wrote:
>> > > +#include <linux/usb/input.h>
>> >
>> > Please don't.
>> > HID should be transport agnostic, so please refrain from directly call usb.
>> >
>>
>> I agree with Benjamin here.
>>
>> > > +
>> > > +       ret = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x02),
>> > > +                               buf2, sizeof(buf2),
>> > > +                               &transfered, USB_CTRL_SET_TIMEOUT);
>> >
>> > Can't you simply use a hid_hw_output_report request instead of hard
>> > coding the device specific endpoint?
>> > And I'd also prefer it to be guarded against your specific controller.
>> >
>>
>> usb_interrupt_msg() is called in usbhid_output_report() indeed, so it
>> should be possible to use the generic HID interface.
>
> Regarding the USB. This is a comment from Andrew's patch:
>
> // doesn't work. gets sent as a SET_REPORT Request intstead of a
> // URB_INTERRUPT out. I guess usbhid->urbout is null
> //if ( hdev->hid_output_raw_report(hdev, buf2, sizeof(buf2),
>
> I took his word for it, and did not attempt it. Do you think it would
> work with the current kernel? If so, I can test later. Had quite an
> enjoyable evening playing some FF7 once I had the controller working ;)

Yes, hid_hw_request() and hid_hw_raw_request() send
SET_REPORT/GET_REPORT in the ctrl line. If you want output-reports on
the intr line, you have to use hid_hw_output_report(). So according to
your quote, hid_hw_output_report() should work.

Background: Documentation/hid/hid-transport.txt

Thanks
David
--
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