drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c- Extension
.c- Size
- 10062 bytes
- Lines
- 496
- Domain
- Driver Families
- Bucket
- drivers/staging
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drv_types.h
Detected Declarations
function Copyrightfunction rtw_sdio_set_irq_thdfunction _sd_cmd52_readfunction sd_cmd52_readfunction _sd_cmd52_writefunction sd_cmd52_writefunction sd_read8function sd_read32function sd_write8function sd_write32function sdio_claim_hostfunction sd_readfunction sdio_claim_hostfunction sd_write
Annotated Snippet
if (*err == 0) {
rtw_reset_continual_io_error(psdiodev);
break;
}
if ((-ESHUTDOWN == *err) || (-ENODEV == *err))
padapter->bSurpriseRemoved = true;
if (rtw_inc_and_chk_continual_io_error(psdiodev) == true) {
padapter->bSurpriseRemoved = true;
break;
}
}
}
return v;
}
void sd_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err)
{
struct adapter *padapter;
struct dvobj_priv *psdiodev;
struct sdio_data *psdio;
struct sdio_func *func;
bool claim_needed;
padapter = pintfhdl->padapter;
psdiodev = pintfhdl->pintf_dev;
psdio = &psdiodev->intf_data;
if (padapter->bSurpriseRemoved)
return;
func = psdio->func;
claim_needed = rtw_sdio_claim_host_needed(func);
if (claim_needed)
sdio_claim_host(func);
sdio_writeb(func, v, addr, err);
if (claim_needed)
sdio_release_host(func);
}
void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err)
{
struct adapter *padapter;
struct dvobj_priv *psdiodev;
struct sdio_data *psdio;
struct sdio_func *func;
bool claim_needed;
padapter = pintfhdl->padapter;
psdiodev = pintfhdl->pintf_dev;
psdio = &psdiodev->intf_data;
if (padapter->bSurpriseRemoved)
return;
func = psdio->func;
claim_needed = rtw_sdio_claim_host_needed(func);
if (claim_needed)
sdio_claim_host(func);
sdio_writel(func, v, addr, err);
if (claim_needed)
sdio_release_host(func);
if (err && *err) {
int i;
*err = 0;
for (i = 0; i < SD_IO_TRY_CNT; i++) {
if (claim_needed)
sdio_claim_host(func);
sdio_writel(func, v, addr, err);
if (claim_needed)
sdio_release_host(func);
if (*err == 0) {
rtw_reset_continual_io_error(psdiodev);
break;
}
if ((-ESHUTDOWN == *err) || (-ENODEV == *err))
padapter->bSurpriseRemoved = true;
if (rtw_inc_and_chk_continual_io_error(psdiodev) == true) {
padapter->bSurpriseRemoved = true;
break;
}
}
}
Annotation
- Immediate include surface: `drv_types.h`.
- Detected declarations: `function Copyright`, `function rtw_sdio_set_irq_thd`, `function _sd_cmd52_read`, `function sd_cmd52_read`, `function _sd_cmd52_write`, `function sd_cmd52_write`, `function sd_read8`, `function sd_read32`, `function sd_write8`, `function sd_write32`.
- Atlas domain: Driver Families / drivers/staging.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.