  The geometry of the accretion flow around stellar mass and supermassive black
holes depends on the accretion rate. Broad iron emission lines originating from
the irradiation of cool matter can indicate that there is an inner disk below a
hot coronal flow.These emission lines have been detected in X-ray binaries.
Observations with the Chandra X-ray Observatory, XMM Newton and Suzaku have
confirmed the presence of these emission lines also in a large fraction of
Seyfert-1 active galactic nuclei (AGN). We investigate the accretion flow
geometry for which broad iron emission lines can arise in hard and soft
spectral state. We study an ADAF-type coronal flow, where the ions are
viscously heated and electrons receive their heat only by collisions from the
ions and are Compton cooled by photons from an underlying cool disk. For a
strong mass flow in the disk and the resulting strong Compton cooling only a
very weak coronal flow is possible. This limitation allows the formation of
ADAF-type coronae above weak inner disks in the hard state, but almost rules
them out in the soft state. The observed hard X-ray luminosity in the soft
state, of up to 10% or more of the total flux, indicates that there is a
heating process that directly accelerates the electrons. This might point to
the action of magnetic flares of disk magnetic fields reaching into the corona.
Such flares have also been proposed by observations of the spectra of X-ray
black hole binaries without a thermal cut-off around 200 keV.
