1ATA_HOST_ALLOC(9)               libata Library               ATA_HOST_ALLOC(9)
2
3
4

NAME

6       ata_host_alloc - allocate and init basic ATA host resources
7

SYNOPSIS

9       struct ata_host * ata_host_alloc(struct device * dev, int max_ports);
10

ARGUMENTS

12       dev
13           generic device this host is associated with
14
15       max_ports
16           maximum number of ATA ports associated with this host
17

DESCRIPTION

19       Allocate and initialize basic ATA host resources. LLD calls this
20       function to allocate a host, initializes it fully and attaches it using
21       ata_host_register.
22
23       max_ports ports are allocated and host->n_ports is initialized to
24       max_ports. The caller is allowed to decrease host->n_ports before
25       calling ata_host_register. The unused ports will be automatically freed
26       on registration.
27

RETURNS

29       Allocate ATA host on success, NULL on failure.
30

LOCKING

32       Inherited from calling layer (may sleep).
33

AUTHOR

35       Jeff Garzik
36           Author.
37
39Kernel Hackers Manual 3.10         June 2019                 ATA_HOST_ALLOC(9)
Impressum