mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: sdio: lock sdio when it is needed
Acquire the SDIO as needed as possible because either MT7663S or MT7921S is a multiple-function device that always includes Bluetooth that would share with the same SDIO bus. So not to avoid breaking Bluetooth pairing, audio, and HID such kind of time critical application on that, we only lock sdio bus when it is necessary in WiFi driver. Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -58,7 +58,10 @@ static int mt7921s_parse_intr(struct mt76_dev *dev, struct mt76s_intr *intr)
|
||||
struct mt7921_sdio_intr *irq_data = sdio->intr_data;
|
||||
int i, err;
|
||||
|
||||
sdio_claim_host(sdio->func);
|
||||
err = sdio_readsb(sdio->func, irq_data, MCR_WHISR, sizeof(*irq_data));
|
||||
sdio_release_host(sdio->func);
|
||||
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user