[Sony Xperia 10 III] wirespot:
It looks like that all the time, even without anything plugged into the connector.

That feature is actually my prime suspect. :) I reckon it got triggered at some point a few days ago. When that happens it disables the USB port exactly like this, but usually puts up a notification (now there's none) and eventually re-enables the port when it dries. I'm guessing something went wrong and this feature left the port permanently disabled.

The Sony help page I linked above suggests they were aware of this possibility and on some devices they offered a way to re-enable the port detection manually. That option does not seem to be available under Device connection > Connection preferences > USB Connectivity on my Xperia 10 III.

There's no "functions" under /config/usb_gadget/g1/configs/b.1/. There's a dir called /config/usb_gadget/g1/functions and it has a ffs.adb subdir which is empty.

Here's the output of find /config/usb_gadget:

/config/usb_gadget/
/config/usb_gadget/g1
/config/usb_gadget/g1/UDC
/config/usb_gadget/g1/bDeviceClass
/config/usb_gadget/g1/bDeviceProtocol
/config/usb_gadget/g1/bDeviceSubClass
/config/usb_gadget/g1/bMaxPacketSize0
/config/usb_gadget/g1/bcdDevice
/config/usb_gadget/g1/bcdUSB
/config/usb_gadget/g1/configs
/config/usb_gadget/g1/configs/b.1
/config/usb_gadget/g1/configs/b.1/MaxPower
/config/usb_gadget/g1/configs/b.1/bmAttributes
/config/usb_gadget/g1/configs/b.1/f1
/config/usb_gadget/g1/configs/b.1/f2
/config/usb_gadget/g1/configs/b.1/strings
/config/usb_gadget/g1/configs/b.1/strings/0x409
/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration
/config/usb_gadget/g1/functions
/config/usb_gadget/g1/functions/accessory.gs2
/config/usb_gadget/g1/functions/audio_source.gs3
/config/usb_gadget/g1/functions/ccid.ccid
/config/usb_gadget/g1/functions/cser.dun.0
/config/usb_gadget/g1/functions/cser.dun.0/status
/config/usb_gadget/g1/functions/cser.dun.2
/config/usb_gadget/g1/functions/cser.dun.2/status
/config/usb_gadget/g1/functions/cser.nmea.1
/config/usb_gadget/g1/functions/cser.nmea.1/status
/config/usb_gadget/g1/functions/diag.diag
/config/usb_gadget/g1/functions/diag.diag_mdm
/config/usb_gadget/g1/functions/diag.diag_mdm2
/config/usb_gadget/g1/functions/ffs.adb
/config/usb_gadget/g1/functions/ffs.diag
/config/usb_gadget/g1/functions/ffs.diag_mdm
/config/usb_gadget/g1/functions/ffs.diag_mdm2
/config/usb_gadget/g1/functions/gsi.dpl
/config/usb_gadget/g1/functions/gsi.dpl/info
/config/usb_gadget/g1/functions/gsi.rmnet
/config/usb_gadget/g1/functions/gsi.rmnet/info
/config/usb_gadget/g1/functions/gsi.rndis
/config/usb_gadget/g1/functions/gsi.rndis/info
/config/usb_gadget/g1/functions/gsi.rndis/linux_support
/config/usb_gadget/g1/functions/gsi.rndis/rndis_class_id
/config/usb_gadget/g1/functions/mass_storage.0
/config/usb_gadget/g1/functions/mass_storage.0/lun.0
/config/usb_gadget/g1/functions/mass_storage.0/lun.0/cdrom
/config/usb_gadget/g1/functions/mass_storage.0/lun.0/file
/config/usb_gadget/g1/functions/mass_storage.0/lun.0/inquiry_string
/config/usb_gadget/g1/functions/mass_storage.0/lun.0/nofua
/config/usb_gadget/g1/functions/mass_storage.0/lun.0/removable
/config/usb_gadget/g1/functions/mass_storage.0/lun.0/ro
/config/usb_gadget/g1/functions/mass_storage.0/stall
/config/usb_gadget/g1/functions/midi.gs5
/config/usb_gadget/g1/functions/midi.gs5/buflen
/config/usb_gadget/g1/functions/midi.gs5/id
/config/usb_gadget/g1/functions/midi.gs5/in_ports
/config/usb_gadget/g1/functions/midi.gs5/index
/config/usb_gadget/g1/functions/midi.gs5/out_ports
/config/usb_gadget/g1/functions/midi.gs5/qlen
/config/usb_gadget/g1/functions/mtp.gs0
/config/usb_gadget/g1/functions/mtp.gs0/os_desc
/config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP
/config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id
/config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/sub_compatible_id
/config/usb_gadget/g1/functions/ptp.gs1
/config/usb_gadget/g1/functions/ptp.gs1/os_desc
/config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP
/config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id
/config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/sub_compatible_id
/config/usb_gadget/g1/functions/qdss.qdss
/config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface
/config/usb_gadget/g1/functions/qdss.qdss_mdm
/config/usb_gadget/g1/functions/qdss.qdss_mdm/enable_debug_inface
/config/usb_gadget/g1/idProduct
/config/usb_gadget/g1/idVendor
/config/usb_gadget/g1/isMSOSDesc
/config/usb_gadget/g1/os_desc
/config/usb_gadget/g1/os_desc/b.1
/config/usb_gadget/g1/os_desc/b_vendor_code
/config/usb_gadget/g1/os_desc/qw_sign
/config/usb_gadget/g1/os_desc/use
/config/usb_gadget/g1/strings
/config/usb_gadget/g1/strings/0x409
/config/usb_gadget/g1/strings/0x409/manufacturer
/config/usb_gadget/g1/strings/0x409/product
/config/usb_gadget/g1/strings/0x409/serialnumber
/config/usb_gadget/g2
/config/usb_gadget/g2/UDC
/config/usb_gadget/g2/bDeviceClass
/config/usb_gadget/g2/bDeviceProtocol
/config/usb_gadget/g2/bDeviceSubClass
/config/usb_gadget/g2/bMaxPacketSize0
/config/usb_gadget/g2/bcdDevice
/config/usb_gadget/g2/bcdUSB
/config/usb_gadget/g2/configs
/config/usb_gadget/g2/configs/b.1
/config/usb_gadget/g2/configs/b.1/MaxPower
/config/usb_gadget/g2/configs/b.1/bmAttributes
/config/usb_gadget/g2/configs/b.1/strings
/config/usb_gadget/g2/configs/b.1/strings/0x409
/config/usb_gadget/g2/configs/b.1/strings/0x409/configuration
/config/usb_gadget/g2/functions
/config/usb_gadget/g2/idProduct
/config/usb_gadget/g2/idVendor
/config/usb_gadget/g2/isMSOSDesc
/config/usb_gadget/g2/os_desc
/config/usb_gadget/g2/os_desc/b_vendor_code
/config/usb_gadget/g2/os_desc/qw_sign
/config/usb_gadget/g2/os_desc/use
/config/usb_gadget/g2/strings
/config/usb_gadget/g2/strings/0x409
/config/usb_gadget/g2/strings/0x409/manufacturer
/config/usb_gadget/g2/strings/0x409/product
/config/usb_gadget/g2/strings/0x409/serialnumber