• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:reset +full:- +full:on +full:- +full:init

2 Devres - Managed Device Resource
20 --------
23 iomapped address should be kept and unmapped on driver detach. For
29 sufficient bugs in ->remove and ->probe failure path. Well, yes,
32 day fiddling with braindamaged hardware with no document or
36 attention or testing as core code, and bugs on driver detach or
38 Init failure path is worse because it's much less travelled while
41 So, many low level drivers end up leaking resources on driver detach
42 and having half broken failure path implementation in ->probe() which
48 ---------
52 a release function. A devres can be released in several ways. No
53 matter what, all devres entries are released on driver detach. On
62 automatically released on driver detach. Implementation looks like
75 dma_free_coherent(dev, this->size, this->vaddr, this->dma_handle);
91 dr->vaddr = vaddr;
100 freed whether initialization fails half-way or the device gets
102 driver can have much simpler init and exit code. Init path basically
111 return -ENOMEM;
113 d->ring = dmam_alloc_coherent(...);
114 if (!d->ring)
115 return -ENOMEM;
118 return -EINVAL;
134 to better maintained higher layer. Also, as init failure path is
140 freeing of these resources *only* - all other checks needed are still
141 on you. In some cases this may mean introducing checks that were not
146 ---------------
151 resources on failure. For example::
154 return -ENOMEM;
174 layer) where interface function shouldn't have side effect on failure.
190 return -ENOMEM;
205 ----------
207 Lifetime of a devres entry begins on devres allocation and finishes
208 when it is released or destroyed (removed and freed) - no reference
212 has support for single-instance devres types (atomic
213 lookup-and-add-if-not-found). Other than that, synchronizing
215 responsibility. This is usually non-issue because bus ops and
218 For an example of single-instance devres type, read pcim_iomap_table()
226 -----------
230 bytes on 32bit machines and 24 bytes on 64bit (three pointers rounded
232 reduced to two pointers (8 bytes on 32bit, 16 bytes on 64bit).
237 Memory space overhead on ahci controller with two ports is between 300
238 and 400 bytes on 32bit machine after naive conversion (we can
243 -----------------------------
385 PER-CPU MEM
395 pcim_iomap() : do iomap() on a single BAR
396 pcim_iomap_regions() : do request_region() and iomap() on multiple BARs
397 pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs
399 pcim_iounmap() : do iounmap() on a single BAR
400 pcim_iounmap_regions() : do iounmap() and release_region() on multiple BARs
402 pcim_set_mwi() : enable Memory-Write-Invalidate PCI transaction
447 RESET