drivers/ssb/bridge_pcmcia_80211.c
Source file repositories/reference/linux-study-clean/drivers/ssb/bridge_pcmcia_80211.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/ssb/bridge_pcmcia_80211.c- Extension
.c- Size
- 2827 bytes
- Lines
- 134
- Domain
- Driver Families
- Bucket
- drivers/ssb
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ssb_private.hlinux/ssb/ssb.hlinux/slab.hlinux/module.hpcmcia/cistpl.hpcmcia/ciscode.hpcmcia/ds.hpcmcia/cisreg.h
Detected Declarations
function ssb_host_pcmcia_probefunction ssb_host_pcmcia_removefunction ssb_host_pcmcia_suspendfunction ssb_host_pcmcia_resumefunction module_pcmcia_driverfunction ssb_host_pcmcia_exit
Annotated Snippet
#include "ssb_private.h"
#include <linux/ssb/ssb.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ciscode.h>
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
static const struct pcmcia_device_id ssb_host_pcmcia_tbl[] = {
PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x448),
PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x476),
PCMCIA_DEVICE_NULL,
};
MODULE_DEVICE_TABLE(pcmcia, ssb_host_pcmcia_tbl);
static int ssb_host_pcmcia_probe(struct pcmcia_device *dev)
{
struct ssb_bus *ssb;
int err = -ENOMEM;
int res = 0;
ssb = kzalloc_obj(*ssb);
if (!ssb)
goto out_error;
err = -ENODEV;
dev->config_flags |= CONF_ENABLE_IRQ;
dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 |
WIN_USE_WAIT;
dev->resource[2]->start = 0;
dev->resource[2]->end = SSB_CORE_SIZE;
res = pcmcia_request_window(dev, dev->resource[2], 250);
if (res != 0)
goto err_kfree_ssb;
res = pcmcia_map_mem_page(dev, dev->resource[2], 0);
if (res != 0)
goto err_disable;
if (!dev->irq)
goto err_disable;
res = pcmcia_enable_device(dev);
if (res != 0)
goto err_disable;
err = ssb_bus_pcmciabus_register(ssb, dev, dev->resource[2]->start);
if (err)
goto err_disable;
dev->priv = ssb;
return 0;
err_disable:
pcmcia_disable_device(dev);
err_kfree_ssb:
kfree(ssb);
out_error:
dev_err(&dev->dev, "Initialization failed (%d, %d)\n", res, err);
return err;
}
static void ssb_host_pcmcia_remove(struct pcmcia_device *dev)
{
struct ssb_bus *ssb = dev->priv;
ssb_bus_unregister(ssb);
pcmcia_disable_device(dev);
kfree(ssb);
dev->priv = NULL;
}
#ifdef CONFIG_PM
static int ssb_host_pcmcia_suspend(struct pcmcia_device *dev)
{
struct ssb_bus *ssb = dev->priv;
return ssb_bus_suspend(ssb);
}
static int ssb_host_pcmcia_resume(struct pcmcia_device *dev)
{
struct ssb_bus *ssb = dev->priv;
Annotation
- Immediate include surface: `ssb_private.h`, `linux/ssb/ssb.h`, `linux/slab.h`, `linux/module.h`, `pcmcia/cistpl.h`, `pcmcia/ciscode.h`, `pcmcia/ds.h`, `pcmcia/cisreg.h`.
- Detected declarations: `function ssb_host_pcmcia_probe`, `function ssb_host_pcmcia_remove`, `function ssb_host_pcmcia_suspend`, `function ssb_host_pcmcia_resume`, `function module_pcmcia_driver`, `function ssb_host_pcmcia_exit`.
- Atlas domain: Driver Families / drivers/ssb.
- 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.