drivers/ufs/core/ufs_bsg.c

Source file repositories/reference/linux-study-clean/drivers/ufs/core/ufs_bsg.c

File Facts

System
Linux kernel
Corpus path
drivers/ufs/core/ufs_bsg.c
Extension
.c
Size
6654 bytes
Lines
276
Domain
Driver Families
Bucket
drivers/ufs
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.

Dependency Surface

Detected Declarations

Annotated Snippet

ret = device_add(bsg_dev);
	if (ret)
		goto out;

	q = bsg_setup_queue(bsg_dev, dev_name(bsg_dev), NULL, ufs_bsg_request,
			NULL, 0);
	if (IS_ERR(q)) {
		ret = PTR_ERR(q);
		device_del(bsg_dev);
		goto out;
	}

	hba->bsg_queue = q;

	return 0;

out:
	dev_err(bsg_dev, "fail to initialize a bsg dev %d\n", shost->host_no);
	put_device(bsg_dev);
	return ret;
}

Annotation

Implementation Notes