View previous topic :: View next topic |
Author |
Message |
janos666 n00b
Joined: 15 Nov 2015 Posts: 31
|
Posted: Wed Aug 29, 2018 10:48 pm Post subject: gentoo-sources 2500_Jmicron_enclosure patch |
|
|
I have some cheap 2.5" HDD enclosures (USB3 <> SATA3) which are recognized by the 2500_usb-storage-Disable-UAS-on-JMicron-SATA-enclosure patch as faulty and forced to mass-storage mode instead of UAS.
What's the easiest way of disabling this single patch (at least for testing)? Why isn't there a menuconfig option to begin with?
I don't remember having any issues before this patch (and I was too lazy to figure out how to selectively disable it --- or even just decide if I really wanted to) but I started to have some problems after upgrading to kernel 4.18: My old io-scheduler settings were tailored to the UAS mode. Later they were silently "clipped" to the reduced functionality. But now the kernel started throwing warnings and the system wide I/O performance often become slow, sometimes I had to hard-reset at the end. It took some time before I figured out that these problems are related to the custom scheduler tuning values and the capability-reduced devices.
The other irony (besides this patch indirectly triggering some kernel bug and making my system sluggish and crash) is that I replaced my old similar enclosures with these just to have UAS. |
|
Back to top |
|
|
russK l33t
Joined: 27 Jun 2006 Posts: 665
|
Posted: Thu Aug 30, 2018 12:24 am Post subject: |
|
|
When I read the comments of the redhat bugzilla that generated the patch, it suggests the patch is no longer necessary. https://bugzilla.redhat.com/show_bug.cgi?id=1315013
If you agree, maybe submit a gentoo bug report.
Regards |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6170 Location: Dallas area
|
Posted: Thu Aug 30, 2018 12:49 am Post subject: |
|
|
what's the usb number of the enclosure "lsusb" _________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
janos666 n00b
Joined: 15 Nov 2015 Posts: 31
|
Posted: Thu Aug 30, 2018 1:13 pm Post subject: |
|
|
Thanks. I probably will open a case on gentoo's bugzilla and attach the link you provided.
Edit: done https://bugs.gentoo.org/664884
Anon-E-moose wrote: | what's the usb number of the enclosure "lsusb" |
Code: | Bus 002 Device 002: ID 2537:1068
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x2537
idProduct 0x1068
bcdDevice 1.00
iManufacturer 1 Norelsys
iProduct 2 NS1068
iSerial 3 0123456789ABCDE
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0079
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 8mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 4
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 98
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
MaxStreams 8
Status pipe (0x02)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Command pipe (0x01)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
MaxStreams 8
Data-in pipe (0x03)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
MaxStreams 8
Data-out pipe (0x04)
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x0016
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
HIRD Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 2047 micro seconds
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x000d
Self Powered
U1 Enabled
U2 Enabled |
[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu] |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6170 Location: Dallas area
|
Posted: Thu Aug 30, 2018 2:08 pm Post subject: |
|
|
That's the problem with some vendors they reuse the same id even with different enclosures, I've run into that before. (looking at bug report)
It's looked at in 2 places in the src code
drivers/usb/storage/unusual_uas.h and drivers/usb/storage/uas.mod.c
Edit to add: I'm not sure the referenced patch would work, the code is much different than it was for that patch.
If you want to play with it, then edit the 2 files I mention above and comment out the two places that match the id for your device, recompile and see what it does.
No guarantee that it will work though.
It could be that things will work because those UAS quirks have been in the code for a long time, and I doubt anyone has tested with newer kernels. _________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
janos666 n00b
Joined: 15 Nov 2015 Posts: 31
|
Posted: Thu Aug 30, 2018 4:13 pm Post subject: |
|
|
Anon-E-moose wrote: | It's looked at in 2 places in the src code
drivers/usb/storage/unusual_uas.h and drivers/usb/storage/uas.mod.c
Edit to add: I'm not sure the referenced patch would work, the code is much different than it was for that patch.
If you want to play with it, then edit the 2 files I mention above and comment out the two places that match the id for your device, recompile and see what it does.
No guarantee that it will work though. |
It looks like there might be some misunderstanding here.
I assumed my enclosures are force to mass-storage mode by the referenced patch: gentoo-sources patchset / 2500_usb-storage-Disable-UAS-on-JMicron-SATA-enclosure
and thus I wanted to disable that patch.
Your reply suggests my enclosures are treated as faulty by the mainline kernel code (not the gentoo-sources patch).
I tried to look at the files you suggested but I am not sure if the controller in question is on those lists. But I could be lost between all the different IDs and names. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6170 Location: Dallas area
|
Posted: Thu Aug 30, 2018 4:17 pm Post subject: |
|
|
Code: | uas.mod.c:MODULE_ALIAS("usb:v2537p1068d*dc*dsc*dp*ic*isc*ip*in*");
unusual_uas.h:UNUSUAL_DEV(0x2537, 0x1068, 0x0000, 0x9999, |
and the lines pertaining to those. they match the id 2537:1068
They set certain things because they recognize those id's produce quirky results in UAS mode. (doesn't mean they won't work, but might not be reliable) _________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
janos666 n00b
Joined: 15 Nov 2015 Posts: 31
|
Posted: Thu Aug 30, 2018 5:07 pm Post subject: |
|
|
Anon-E-moose wrote: | Code: | uas.mod.c:MODULE_ALIAS("usb:v2537p1068d*dc*dsc*dp*ic*isc*ip*in*");
unusual_uas.h:UNUSUAL_DEV(0x2537, 0x1068, 0x0000, 0x9999, |
and the lines pertaining to those. they match the id 2537:1068
They set certain things because they recognize those id's produce quirky results in UAS mode. (doesn't mean they won't work, but might not be reliable) |
Ah. Thanks. So it's mainline code, not related to gentoo patches. Sorry, may bad (including the false bugreport).
I don't have the uas.mod.c file in gentoo-sources-4.18.5 but found the line in unusual_uas.h and will test the recompiled kernel when I can afford to reboot. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6170 Location: Dallas area
|
Posted: Thu Aug 30, 2018 5:58 pm Post subject: |
|
|
janos666 wrote: | Anon-E-moose wrote: | Code: | uas.mod.c:MODULE_ALIAS("usb:v2537p1068d*dc*dsc*dp*ic*isc*ip*in*");
unusual_uas.h:UNUSUAL_DEV(0x2537, 0x1068, 0x0000, 0x9999, |
and the lines pertaining to those. they match the id 2537:1068
They set certain things because they recognize those id's produce quirky results in UAS mode. (doesn't mean they won't work, but might not be reliable) |
Ah. Thanks. So it's mainline code, not related to gentoo patches. Sorry, may bad (including the false bugreport).
I don't have the uas.mod.c file in gentoo-sources-4.18.5 but found the line in unusual_uas.h and will test the recompiled kernel when I can afford to reboot. |
I just did a grep on 2357 in that directory and those 2 files showed up (4.14.62), it may be in another file or that file might have disappeared, if there is more than one hit from grep then make sure the second half of the id 1068 shows up with it. otherwise, commit it out and see what happens. And let us know what happens. Good luck. _________________ UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|