ubuntu kernel does not support gadgetfs

Bug #1073089 reported by James Hunt
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

The Ubuntu kernel does not appear to support gadgetfs:

$ sudo modprobe g_mass_storage file=/tmp/fake_usb_disk
FATAL: Error inserting g_mass_storage (/lib/modules/3.5.0-17-generic/kernel/drivers/usb/gadget/g_mass_storage.ko): No such device
$ ll /lib/modules/3.5.0-17-generic/kernel/drivers/usb/gadget/g_mass_storage.ko
-rw-r--r-- 1 root root 56436 oct 9 21:06 /lib/modules/3.5.0-17-generic/kernel/drivers/usb/gadget/g_mass_storage.ko
$

This seems to have been resolved in Igloo (see bug 923674) so is presumably a case of a cherry-pick?
---
ApportVersion: 2.6.1-0ubuntu6
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: james 3464 F.... pulseaudio
 /dev/snd/controlC0: james 3464 F.... pulseaudio
DistroRelease: Ubuntu 12.10
HibernationDevice: RESUME=UUID=67e3cd44-242b-4bbf-918b-28fff81e0312
InstallationDate: Installed on 2010-10-21 (740 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
MachineType: LENOVO 2516CTO
MarkForUpload: True
NonfreeKernelModules: nvidia
Package: linux-image-generic-pae 3.5.0.17.19
PackageArchitecture: i386
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-17-generic root=UUID=7ad192e9-7b26-49d1-8e1c-fefc7dc495cb ro quiet splash
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
RelatedPackageVersions:
 linux-restricted-modules-3.5.0-17-generic N/A
 linux-backports-modules-3.5.0-17-generic N/A
 linux-firmware 1.95
Tags: quantal running-unity
Uname: Linux 3.5.0-17-generic i686
UpgradeStatus: Upgraded to quantal on 2012-09-30 (29 days ago)
UserGroups: adm admin cdrom dialout kvm libvirtd lpadmin plugdev sambashare sbuild vboxusers
dmi.bios.date: 08/27/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 6IET72WW (1.32 )
dmi.board.name: 2516CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6IET72WW(1.32):bd08/27/2010:svnLENOVO:pn2516CTO:pvrThinkPadT410:rvnLENOVO:rn2516CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 2516CTO
dmi.product.version: ThinkPad T410
dmi.sys.vendor: LENOVO

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1073089

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: quantal
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Do you happen to have the linux-kernel-extras package installed?

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: bot-stop-nagging kernel-da-key
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
James Hunt (jamesodhunt) wrote :

Hi Joseph - no I don't have that package installed.

tags: added: apport-collected running-unity
description: updated
Revision history for this message
James Hunt (jamesodhunt) wrote : AlsaInfo.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : BootDmesg.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : CRDA.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : CurrentDmesg.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : Dependencies.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : IwConfig.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : Lspci.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : Lsusb.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : ProcEnviron.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : ProcInterrupts.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : ProcModules.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : PulseList.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : RfKill.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : UdevDb.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : UdevLog.txt

apport information

Revision history for this message
James Hunt (jamesodhunt) wrote : WifiSyslog.txt

apport information

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The linux-kernel-extras package may be required for this driver. Can you install the extras package and see if it resolves this bug?

Revision history for this message
Nicolas Delvaux (malizor) wrote :

I have the same problem on Precise, and I can't find any extra package for my kernel (3.2.0-34-generic, amd64)

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Assuming you meant "linux-image-extra-<version>-generic" - this does resolve the problem. (there is no package linux-kernel-extras).

Additionally, although the gadgetfs module is present, mounting it fails:

al@al-desktop:~$ sudo mount -t gadgetfs none /dev/gadget
mount: unknown filesystem type 'gadgetfs'

I believe this is happening because the module dummy_hcd is missing. This module is required for gadget_fs to function on x86 platforms which do not have any real gadget capable hardware.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Oh, and btw, this stuff used to work on older releases - maverick worked I think. I used to use it for USB development and now my old code won't work any more on new releases.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Still broken in 14.04

Revision history for this message
Radoslav Gerganov (rgerganov) wrote :

I have resolved this by installing the dummy_hcd module first. It is not included in Ubuntu and needs to be compiled from source. There are few easy steps for this described here: http://wiki.openmoko.org/wiki/Building_Gadget_USB_Module

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Still broken in 16.04. gadgetfs has been replaced by functionfs, which is also available in the standard kernel packages, but still does not work because it too relies on dummy_hcd on x86 platforms.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Still broken in 18.04

Brad Figg (brad-figg)
tags: added: cscc
Revision history for this message
Doug Brown (macg3) wrote :

This is still an issue all the way up to 21.04. Debian finally turned on dummy_hcd in their kernel fairly recently:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868771
https://salsa.debian.org/kernel-team/linux/-/commit/1ae90a1f1c938c83abadfb80733a07a1e314a0b5

Revision history for this message
roland aus köln (devzero-c) wrote :

is there a reason why ubuntu still has no dummy_hcd module, i.e. is building kernel without CONFIG_USB_DUMMY_HCD=m ?

this sucks , and other distributions inherit this

https://bugzilla.proxmox.com/show_bug.cgi?id=4879

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.