Page MenuHomeFreeBSD

ata_kauai: Fix support for "shasta" controllers.
ClosedPublic

Authored by jhb on Apr 12 2022, 6:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 19, 3:16 PM
Unknown Object (File)
Oct 18 2024, 8:42 AM
Unknown Object (File)
Oct 18 2024, 2:13 AM
Unknown Object (File)
Oct 2 2024, 8:05 PM
Unknown Object (File)
Oct 1 2024, 1:59 PM
Unknown Object (File)
Sep 30 2024, 2:28 PM
Unknown Object (File)
Sep 30 2024, 4:00 AM
Unknown Object (File)
Sep 23 2024, 11:09 PM
Subscribers

Details

Summary

The probe routine was setting a value in the softc, but since the
probe routine was not returning zero, this value was lost since the
softc was reallocated (and re-zeroed) when the device was attached.
This is similar in nature to the fixes from
965205eb66cae3fd5de75a70a3aef2f014f98020.

To fix, move the code to set the 'shasta' flag to the start of attach
along with related code to set an IRQ resource on some non-shasta
devices. The IRQ resource still "worked" being in the probe routine
as the IRQ resource persisted after probe returned, but it is cleaner
to go ahead and move it to attach after setting the 'shasta' flag.

I have no way to test this, but noticed this while reading the code.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45131
Build 42019: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Apr 12 2022, 6:46 PM
jhibbits added inline comments.
sys/powerpc/powermac/ata_kauai.c
246

Since this is only used if USE_DBDMA_IRQ is defined, you can guard this block with that as well.

This revision is now accepted and ready to land.Apr 12 2022, 7:59 PM
sys/powerpc/powermac/ata_kauai.c
246

Hmm, I wonder since this adds an IRQ resource for rid 0, but the IRQ for DBDMA uses rid 1, I think this IRQ resource is likely not used at all and might just be dead code now?

Added @nwhitehorn since he added the IRQ quirk here.

This revision was automatically updated to reflect the committed changes.