What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

1
1
0
0
1
0
0
0
1

Today I pushed a small fix for mtw: the MediaTek MT7601U USB WiFi driver in FreeBSD.

The issue: driver worked perfectly on first boot. Connect the adapter, it initializes, you're online. Great. Then you reboot your machine and... nothing. "timeout waiting for MCU to initialize." The only fix was to physically unplug the adapter and plug it back in, or do a full cold boot (power off completely).

The root cause was a state machine transition problem. When you do a warm reboot, USB devices don't lose power - they just sit there, happily retaining whatever state they were in. The MT7601U's microcontroller still had its "ready" flag set from the previous session. So when the driver came back up and checked "is firmware already running?", the device said "yep!" and the driver said "cool, nothing to do" and returned early.

Except the device wasn't actually ready. It was in a Schrödinger state - simultaneously "ready" and "not ready" until you observe it by trying to actually probe it, at which point the wavefunction collapses into "definitely broken." Technically powered, firmware loaded, flags set, but not actually functional.

The fix was straightforward: if we detect the MCU is already marked ready at attach time, assume it's stale state from a previous session, reset the MCU, clear the ready flag, and do a proper initialization from scratch. Force the cat to be alive.

Also added USB re-enumeration on attach and bumped some timeouts because these devices can be slow after a reset.

What's funny about driver development is that progress isn't linear. You find and fix a bug in hardware revision 1 and 2. Revision 3 ships and works perfectly - they must have fixed it in silicon, you think. Then revision 6 manufactured a year later shows up with the exact same bug. Different fab? Cost reduction? Recycled design from a different product line? Who knows.

You end up maintaining a mental map of "this chip from this date range has this quirk, but the same chip from that date range doesn't, except if it's from this OEM who used a different reference design."

And the datasheets - when they exist - are always for the "ideal" version of the hardware that exists only in the minds of the engineers who wrote them.

Anyway, if you're running FreeBSD with an MT7601U adapter and wondered why you had to unplug it after every reboot, this one's for you.

0
1
0
0
0
1
0
0
0
0
0

캐논 R8을 한 2년 썼는데, 왜 캐논이 많이 쓰이는지, 그만큼 싫어하는 사람들도 많은지 조금은 알 거 같다. 무난하다는 말도 맞고, 초보자와 숙련자 모두에게 잘 대응하고, 편리하고 잘 조율되어 있지만, 유저/외부 솔루션을 지독하게 믿지 않는 메이커. 우리가 마련한 안전한 작업장에서 설정해드린 범위 내에서만 쓰세요, 같은 느낌. 급나누기 심하다는 평가도, 이 정도 유저에게는 이 정도 기능이면 된다는 메이커의 판단을 우선한 것. 답답한 면이 있지만, 시간과 노력을 (돈은 들지만ㅋㅋ) 많이 아낄 수 있기도 하다.

0
1
1
0
0
0
0
1
0
1
2
0
2

Hey! If you’re new here, or you’re looking to follow more people, I’ve been running this in my browser for the last six months or so and it’s been helpful. A simple browser extensions that (privately) keeps a list of the websites you visit that have fediverse accounts to follow.

streetpass.social/

By @tvler

0
0
0
0
0
1
0
0
0
0

Four-year-old loses sight in one eye after sharpnel hits her

Four-year-old Fatima al-Zahra has marked her birthday – the first she has spent blind in one eye after being wounded in the crossfire between SDF fighters and the Syrian army.

Shrapnel from the fighting tore through Fatima’s face as she returned home from kindergarten.

Fatima was leaving kindergarten when a shell landed at the spot where the bus had stopped. Two others who were there with her were killed.


0
0
1
1
0
0

Brussels plots push to pry off
According to the Commission, dependence on foreign vendors makes it harder for Europe to control its digital stack, potentially opening the door to security and resilience issues in sensitive sectors. Open source offers a way out of that bind by underpinning "a diverse portfolio of high-quality and secure digital solutions" that can act as viable alternatives to proprietary platforms, the EC said. go.theregister.com/feed/www.th

0

No 639 Yonge St 1.

Constructed in 1879, No 639 Yonge St in Toronto Canada was home for 51 years to a place where rock stars and wanna be rock stars went to get pampered. The building was designated a Heritage Property by The City of Toronto in 2023.

12 bucks for the guys.
18 for the girls.

Canon EOS 60D 📷
Canon EF 24-105mm f/4L IS USM
Silver EFEX Pro

No 639 Yonge St 1.

Constructed in 1879, No 639 Yonge St in Toronto Canada was home for 51 years to a place where rock stars and wanna be rock stars went to get pampered. The building was designated a Heritage Property by The City of Toronto in 2023.

Photo taken in August 2017 just before HOL closed it's doors for good in October 2017.

12 bucks for the guys.
18 for the girls.

Canon EOS 60D
Canon EF 24-105mm f/4L IS USM
Silver EFEX Pro
0
1