Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Braswell support? #2

Open
rloomans opened this issue Feb 16, 2024 · 9 comments
Open

Braswell support? #2

rloomans opened this issue Feb 16, 2024 · 9 comments

Comments

@rloomans
Copy link

Description of the problem

Is there any chance of a build of this for the Braswell chips?

I have a DS916+ and it's got an Pentium N3710.

Description of your products

DS916+
Linux ds916 3.10.108 #64570 SMP Fri Jul 14 01:09:00 CST 2023 x86_64 GNU/Linux synology_braswell_916+
DSM 7.2

Description of your environment

2 x Seagate Expansion Portable 2.5" 5TB drives

  • /dev/sdr
  • /dev/sdq

1 x Seagate Expansion Desktop 3.5" 10TB drive

  • /dev/sds

Output of dmesg command

dmesg.txt

Output of lsusb command

Bus 003 Device 001: ID 1d6b:0002 Linux 3.10.108 etxhci_hcd-170202 Etron xHCI Host Controller
Bus 004 Device 077: ID 0bc2:2037 Seagate Expansion HDD
Bus 004 Device 076: ID 0bc2:2037 Seagate Expansion HDD
Bus 004 Device 001: ID 1d6b:0003 Linux 3.10.108 etxhci_hcd-170202 Etron xHCI Host Controller
Bus 002 Device 013: ID 0bc2:331a Seagate Expansion Desk
Bus 002 Device 001: ID 1d6b:0003 Linux 3.10.108 xhci_hcd xHCI Host Controller
Bus 001 Device 002: ID f400:f400 Synology DiskStation
Bus 001 Device 001: ID 1d6b:0002 Linux 3.10.108 xhci_hcd xHCI Host Controller
@bb-qq
Copy link
Owner

bb-qq commented Feb 25, 2024

I create a package for braswell.
https://github.com/bb-qq/uas/releases/download/0.1/uas-braswell-0.1_7.2.spk

However, the braswell platform is an older version of the Linux kernel, and Etron is treated in the kernel as a problematic device, so it may not work well on this platform.

@rloomans
Copy link
Author

Thank you.

Does this mean you recommend not to use it?

@bb-qq
Copy link
Owner

bb-qq commented Feb 25, 2024

I wrote in the sense that it is unlikely that the device will be recognized in UAS mode.
If it doesn't work well, it is unlikely to corrupt your data. If it works, performance will improve, so I think it is worth a try.

@ChaG06
Copy link

ChaG06 commented Mar 4, 2024

Hello,
Is a Denverton build possible ? (for my DS1618+)

@bb-qq
Copy link
Owner

bb-qq commented Jun 15, 2024

I built the driver for Denverton.
https://github.com/bb-qq/uas/releases/download/0.1/uas-denverton-0.1_7.2.spk

It would be great if you could let me know if it worked.

@ChaG06
Copy link

ChaG06 commented Jun 15, 2024

I tried several things (reboot, re-install), but it always mounted my external drive with usb-storage driver.
At some point, the drive seemed to be frozen, I switched it off, and that corrupted the EFI partition (this is my fault I should have wait for the disk to respond...). Then the main partition was mounted as read-only. I had to repair it with my Mac and terminal (fsck on EFI partition).
For now, I'll uninstall this and stay with usb-storage driver.

@bb-qq
Copy link
Owner

bb-qq commented Jun 15, 2024

For future reference, what is the name of the enclosure you used?

@ChaG06
Copy link

ChaG06 commented Jun 15, 2024

Trademark "Connectand"

From Synology:
|__usb2 1d6b:0003:0404 09 3.00 5000MBit/s 0mA 1IF (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:00:15.0) hub
|__2-2 0bda:0411:0104 09 3.00 5000MBit/s 0mA 1IF (Generic 4-Port USB 3.0 Hub syno.ext.hub) hub
|__2-2.1 174c:55aa:0100 00 3.00 5000MBit/s 0mA 1IF (asmedia 1153 xxxxxxxx)
2-2.1:1.0 (IF) 08:06:50 2EPs () usb-storage host10 (sdu)

From MacOs :
1153:
Identifiant du produit : 0x55aa
Identifiant du fournisseur : 0x174c (ASMedia Technology Inc.)
Version : 1.00
Numéro de série : xxxxxxxxxx
Vitesse : Jusqu’à 5 Gb/s
Fabricant : asmedia
Identifiant de l’emplacement : 0x00200000 / 1
Courant disponible (mA) : 900
Courant requis (mA) : 0
Exploitation supplémentaire actuelle (mA) : 0

@bb-qq
Copy link
Owner

bb-qq commented Jun 16, 2024

I've examined the source code. Assuming your device is using ASM1153, the device is expected to work fine in UAS mode.
Are you explicitly unmounting the USB storage before starting the driver?

	/*
	 * ASMedia has a number of usb3 to sata bridge chips, at the time of
	 * this writing the following versions exist:
	 * ASM1051 - no uas support version
	 * ASM1051 - with broken (*) uas support
	 * ASM1053 - with working uas support, but problems with large xfers
	 * ASM1153 - with working uas support
	 *
	 * Devices with these chips re-use a number of device-ids over the
	 * entire line, so the device-id is useless to determine if we're
	 * dealing with an ASM1051 (which we want to avoid).
	 *
	 * The ASM1153 can be identified by config.MaxPower == 0,
	 * where as the ASM105x models have config.MaxPower == 36.
	 *
	 * Differentiating between the ASM1053 and ASM1051 is trickier, when
	 * connected over USB-3 we can look at the number of streams supported,
	 * ASM1051 supports 32 streams, where as early ASM1053 versions support
	 * 16 streams, newer ASM1053-s also support 32 streams, but have a
	 * different prod-id.
	 *
	 * (*) ASM1051 chips do work with UAS with some disks (with the
	 *     US_FL_NO_REPORT_OPCODES quirk), but are broken with other disks
	 */
	if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c &&
			(le16_to_cpu(udev->descriptor.idProduct) == 0x5106 ||
			 le16_to_cpu(udev->descriptor.idProduct) == 0x55aa)) {
		if (udev->actconfig->desc.bMaxPower == 0) {
			/* ASM1153, do nothing */
		} else if (udev->speed < USB_SPEED_SUPER) {
			/* No streams info, assume ASM1051 */
			flags |= US_FL_IGNORE_UAS;
		} else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) {
			/* Possibly an ASM1051, disable uas */
			flags |= US_FL_IGNORE_UAS;
		} else {
			/* ASM1053, these have issues with large transfers */
			flags |= US_FL_MAX_SECTORS_240;
		}
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants