From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756825AbcEFChI (ORCPT ); Thu, 5 May 2016 22:37:08 -0400 Received: from nat-hk.nvidia.com ([203.18.50.4]:54994 "EHLO hkmmgate102.nvidia.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755385AbcEFChG convert rfc822-to-8bit (ORCPT ); Thu, 5 May 2016 22:37:06 -0400 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Thu, 05 May 2016 19:37:03 -0700 Subject: Re: [PATCH] usb: gadget: f_fs: Fix kernel panic for SuperSpeed To: Felipe Balbi References: <1461321780-3226-1-git-send-email-jilin@nvidia.com> <87bn51uagb.fsf@intel.com> <571E0058.6020007@nvidia.com> <87r3dtrj7b.fsf@intel.com> <571F2BA3.6040209@nvidia.com> <871t5plya5.fsf@intel.com> <57234522.9000607@nvidia.com> <87bn4siq5c.fsf@intel.com> <5729ADC9.3030704@nvidia.com> <87shxyds7o.fsf@intel.com> CC: "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Jim Lin Message-ID: <572C034C.1090805@nvidia.com> Date: Fri, 6 May 2016 10:37:00 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <87shxyds7o.fsf@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8BIT X-Originating-IP: [10.19.108.174] X-ClientProxiedBy: DRBGMAIL103.nvidia.com (10.18.16.22) To HKMAIL103.nvidia.com (10.18.16.12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年05月04日 18:37, Felipe Balbi wrote: > * PGP Signed by an unknown key > > > Hi, > > Jim Lin writes: > > > >>>> In f_fs.c >>>> " >>>> static int __ffs_data_do_os_desc(enum ffs_os_desc_type type, >>>> struct usb_os_desc_header *h, void *data, >>>> unsigned len, void *priv) >>>> { >>>> struct ffs_data *ffs = priv; >>>> u8 length; >>>> >>>> ENTER(); >>>> >>>> switch (type) { >>>> case FFS_OS_DESC_EXT_COMPAT: { >>>> struct usb_ext_compat_desc *d = data; >>>> int i; >>>> >>>> if (len < sizeof(*d) || >>>> d->bFirstInterfaceNumber >= ffs->interfaces_count || >>>> d->Reserved1) >>>> return -EINVAL; >>>> " >>> that's fine, but this is only failing because something else is >>> returning the wrong set of descriptors (SS vs HS). That's the bug we >>> want to fix, not work around it. >>> >> Thanks. > you're welcome, but to fix that bug we need more information. Why is > composite.c using the wrong set of descriptors ? What is your setup ? > > Are you using an in-kernel gadget ? which one ? Using configfs or legacy > gadgets ? gadgetfs ? f_fs ? How to trigger this ? Can you provide > instructions and (in case of gadgetfs/ffs) code to create a gadget that > hits this problem ? > For some reason I have to put this patch on hold. Thanks, --nvpublic