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)
Jan 14 2024, 8:38 AM
Unknown Object (File)
Dec 23 2023, 10:18 AM
Unknown Object (File)
Aug 7 2023, 7:47 PM
Unknown Object (File)
Aug 7 2023, 7:46 PM
Unknown Object (File)
Aug 7 2023, 7:45 PM
Unknown Object (File)
Aug 4 2023, 8:15 AM
Unknown Object (File)
Apr 21 2023, 1:53 AM
Unknown Object (File)
Feb 17 2023, 2:48 AM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.