[Bug 204521] [new driver] [request] Port rtsx from OpenBSD to FreeBSD
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Jun 23 17:53:38 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204521
--- Comment #265 from Henri Hennebert <hlh at restart.be> ---
(In reply to gnikl from comment #264)
First thank you for your test!
The RTSX_REVERSE_SOCKET is of no use here because it is only set in vendor
settings.
The important diff are:
diff --git a/rtsx.c b/rtsx.c
index d22f912..ae599ee 100644
--- a/rtsx.c
+++ b/rtsx.c
@@ -776,8 +776,9 @@ rtsx_init(struct rtsx_softc *sc)
/* Some magic numbers from linux driver */
error = rtsx_write_phy(sc, 0x00, 0xB966);
} else if (sc->rtsx_flags & RTSX_F_5227) {
- /*!!!*/
- RTSX_CLR(sc, RTSX_PM_CTRL3, RTSX_D3_DELINK_MODE_EN);
+ /*!!! added */
+// RTSX_CLR(sc, RTSX_PM_CTRL3, RTSX_D3_DELINK_MODE_EN);
+
/* Optimize RX sensitivity */
error = rtsx_write_phy(sc, 0x00, 0xBA42);
} else if (sc->rtsx_flags & RTSX_F_5229) {
@@ -832,6 +833,7 @@ rtsx_init(struct rtsx_softc *sc)
RTSX_FORCE_RST_CORE_EN | RTSX_NON_STICKY_RST_N_DBG);
/* Card driving select */
+ /*!!! added */
RTSX_WRITE(sc, RTSX_CARD_DRIVE_SEL, sc->rtsx_card_drive_sel);
/* Enable SSC clock. */
@@ -855,7 +857,7 @@ rtsx_init(struct rtsx_softc *sc)
/* Request clock by driving CLKREQ pin to zero. */
/*!!!*/
-// RTSX_SET(sc, RTSX_PETXCFG, RTSX_PETXCFG_CLKREQ_PIN);
+ RTSX_SET(sc, RTSX_PETXCFG, RTSX_PETXCFG_CLKREQ_PIN);
/* Specific extra init */
if (sc->rtsx_flags & RTSX_F_5227) {
It would be useful if you can retest 2 cases:
1. uniquely adding back RTSX_CLR(sc, RTSX_PM_CTRL3, RTSX_D3_DELINK_MODE_EN);
2. uniquely removing RTSX_SET(sc, RTSX_PETXCFG, RTSX_PETXCFG_CLKREQ_PIN);
For the lspci output, it is just for a better understanding in case vendor
settings must be reintroduce.
To be honest I don't think I will reintroduce it because all go awry when,
after wading through the linux source, I try to introduce vendor settings.
As we say in french "Le mieux est l'ennemi du bien". ;-)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list