linux/drivers/pci/pci-driver.c
<<
>>
Prefs
   1/*
   2 * drivers/pci/pci-driver.c
   3 *
   4 * (C) Copyright 2002-2004, 2007 Greg Kroah-Hartman <greg@kroah.com>
   5 * (C) Copyright 2007 Novell Inc.
   6 *
   7 * Released under the GPL v2 only.
   8 *
   9 */
  10
  11#include <linux/pci.h>
  12#include <linux/module.h>
  13#include <linux/init.h>
  14#include <linux/device.h>
  15#include <linux/mempolicy.h>
  16#include <linux/string.h>
  17#include <linux/slab.h>
  18#include <linux/sched.h>
  19#include <linux/cpu.h>
  20#include <linux/pm_runtime.h>
  21#include <linux/suspend.h>
  22#include "pci.h"
  23
  24struct pci_dynid {
  25        struct list_head node;
  26        struct pci_device_id id;
  27};
  28
  29/**
  30 * pci_add_dynid - add a new PCI device ID to this driver and re-probe devices
  31 * @drv: target pci driver
  32 * @vendor: PCI vendor ID
  33 * @device: PCI device ID
  34 * @subvendor: PCI subvendor ID
  35 * @subdevice: PCI subdevice ID
  36 * @class: PCI class
  37 * @class_mask: PCI class mask
  38 * @driver_data: private driver data
  39 *
  40 * Adds a new dynamic pci device ID to this driver and causes the
  41 * driver to probe for all devices again.  @drv must have been
  42 * registered prior to calling this function.
  43 *
  44 * CONTEXT:
  45 * Does GFP_KERNEL allocation.
  46 *
  47 * RETURNS:
  48 * 0 on success, -errno on failure.
  49 */
  50int pci_add_dynid(struct pci_driver *drv,
  51                  unsigned int vendor, unsigned int device,
  52                  unsigned int subvendor, unsigned int subdevice,
  53                  unsigned int class, unsigned int class_mask,
  54                  unsigned long driver_data)
  55{
  56        struct pci_dynid *dynid;
  57        int retval;
  58
  59        dynid = kzalloc(sizeof(*dynid), GFP_KERNEL);
  60        if (!dynid)
  61                return -ENOMEM;
  62
  63        dynid->id.vendor = vendor;
  64        dynid->id.device = device;
  65        dynid->id.subvendor = subvendor;
  66        dynid->id.subdevice = subdevice;
  67        dynid->id.class = class;
  68        dynid->id.class_mask = class_mask;
  69        dynid->id.driver_data = driver_data;
  70
  71        spin_lock(&drv->dynids.lock);
  72        list_add_tail(&dynid->node, &drv->dynids.list);
  73        spin_unlock(&drv->dynids.lock);
  74
  75        retval = driver_attach(&drv->driver);
  76
  77        return retval;
  78}
  79
  80static void pci_free_dynids(struct pci_driver *drv)
  81{
  82        struct pci_dynid *dynid, *n;
  83
  84        spin_lock(&drv->dynids.lock);
  85        list_for_each_entry_safe(dynid, n, &drv->dynids.list, node) {
  86                list_del(&dynid->node);
  87                kfree(dynid);
  88        }
  89        spin_unlock(&drv->dynids.lock);
  90}
  91
  92/**
  93 * store_new_id - sysfs frontend to pci_add_dynid()
  94 * @driver: target device driver
  95 * @buf: buffer for scanning device ID data
  96 * @count: input size
  97 *
  98 * Allow PCI IDs to be added to an existing driver via sysfs.
  99 */
 100static ssize_t
 101store_new_id(struct device_driver *driver, const char *buf, size_t count)
 102{
 103        struct pci_driver *pdrv = to_pci_driver(driver);
 104        const struct pci_device_id *ids = pdrv->id_table;
 105        __u32 vendor, device, subvendor=PCI_ANY_ID,
 106                subdevice=PCI_ANY_ID, class=0, class_mask=0;
 107        unsigned long driver_data=0;
 108        int fields=0;
 109        int retval;
 110
 111        fields = sscanf(buf, "%x %x %x %x %x %x %lx",
 112                        &vendor, &device, &subvendor, &subdevice,
 113                        &class, &class_mask, &driver_data);
 114        if (fields < 2)
 115                return -EINVAL;
 116
 117        /* Only accept driver_data values that match an existing id_table
 118           entry */
 119        if (ids) {
 120                retval = -EINVAL;
 121                while (ids->vendor || ids->subvendor || ids->class_mask) {
 122                        if (driver_data == ids->driver_data) {
 123                                retval = 0;
 124                                break;
 125                        }
 126                        ids++;
 127                }
 128                if (retval)     /* No match */
 129                        return retval;
 130        }
 131
 132        retval = pci_add_dynid(pdrv, vendor, device, subvendor, subdevice,
 133                               class, class_mask, driver_data);
 134        if (retval)
 135                return retval;
 136        return count;
 137}
 138
 139/**
 140 * store_remove_id - remove a PCI device ID from this driver
 141 * @driver: target device driver
 142 * @buf: buffer for scanning device ID data
 143 * @count: input size
 144 *
 145 * Removes a dynamic pci device ID to this driver.
 146 */
 147static ssize_t
 148store_remove_id(struct device_driver *driver, const char *buf, size_t count)
 149{
 150        struct pci_dynid *dynid, *n;
 151        struct pci_driver *pdrv = to_pci_driver(driver);
 152        __u32 vendor, device, subvendor = PCI_ANY_ID,
 153                subdevice = PCI_ANY_ID, class = 0, class_mask = 0;
 154        int fields = 0;
 155        int retval = -ENODEV;
 156
 157        fields = sscanf(buf, "%x %x %x %x %x %x",
 158                        &vendor, &device, &subvendor, &subdevice,
 159                        &class, &class_mask);
 160        if (fields < 2)
 161                return -EINVAL;
 162
 163        spin_lock(&pdrv->dynids.lock);
 164        list_for_each_entry_safe(dynid, n, &pdrv->dynids.list, node) {
 165                struct pci_device_id *id = &dynid->id;
 166                if ((id->vendor == vendor) &&
 167                    (id->device == device) &&
 168                    (subvendor == PCI_ANY_ID || id->subvendor == subvendor) &&
 169                    (subdevice == PCI_ANY_ID || id->subdevice == subdevice) &&
 170                    !((id->class ^ class) & class_mask)) {
 171                        list_del(&dynid->node);
 172                        kfree(dynid);
 173                        retval = 0;
 174                        break;
 175                }
 176        }
 177        spin_unlock(&pdrv->dynids.lock);
 178
 179        if (retval)
 180                return retval;
 181        return count;
 182}
 183
 184static struct driver_attribute pci_drv_attrs[] = {
 185        __ATTR(new_id, S_IWUSR, NULL, store_new_id),
 186        __ATTR(remove_id, S_IWUSR, NULL, store_remove_id),
 187        __ATTR_NULL,
 188};
 189
 190/**
 191 * pci_match_id - See if a pci device matches a given pci_id table
 192 * @ids: array of PCI device id structures to search in
 193 * @dev: the PCI device structure to match against.
 194 *
 195 * Used by a driver to check whether a PCI device present in the
 196 * system is in its list of supported devices.  Returns the matching
 197 * pci_device_id structure or %NULL if there is no match.
 198 *
 199 * Deprecated, don't use this as it will not catch any dynamic ids
 200 * that a driver might want to check for.
 201 */
 202const struct pci_device_id *pci_match_id(const struct pci_device_id *ids,
 203                                         struct pci_dev *dev)
 204{
 205        if (ids) {
 206                while (ids->vendor || ids->subvendor || ids->class_mask) {
 207                        if (pci_match_one_device(ids, dev))
 208                                return ids;
 209                        ids++;
 210                }
 211        }
 212        return NULL;
 213}
 214
 215/**
 216 * pci_match_device - Tell if a PCI device structure has a matching PCI device id structure
 217 * @drv: the PCI driver to match against
 218 * @dev: the PCI device structure to match against
 219 *
 220 * Used by a driver to check whether a PCI device present in the
 221 * system is in its list of supported devices.  Returns the matching
 222 * pci_device_id structure or %NULL if there is no match.
 223 */
 224static const struct pci_device_id *pci_match_device(struct pci_driver *drv,
 225                                                    struct pci_dev *dev)
 226{
 227        struct pci_dynid *dynid;
 228
 229        /* Look at the dynamic ids first, before the static ones */
 230        spin_lock(&drv->dynids.lock);
 231        list_for_each_entry(dynid, &drv->dynids.list, node) {
 232                if (pci_match_one_device(&dynid->id, dev)) {
 233                        spin_unlock(&drv->dynids.lock);
 234                        return &dynid->id;
 235                }
 236        }
 237        spin_unlock(&drv->dynids.lock);
 238
 239        return pci_match_id(drv->id_table, dev);
 240}
 241
 242struct drv_dev_and_id {
 243        struct pci_driver *drv;
 244        struct pci_dev *dev;
 245        const struct pci_device_id *id;
 246};
 247
 248static long local_pci_probe(void *_ddi)
 249{
 250        struct drv_dev_and_id *ddi = _ddi;
 251        struct pci_dev *pci_dev = ddi->dev;
 252        struct pci_driver *pci_drv = ddi->drv;
 253        struct device *dev = &pci_dev->dev;
 254        int rc;
 255
 256        /*
 257         * Unbound PCI devices are always put in D0, regardless of
 258         * runtime PM status.  During probe, the device is set to
 259         * active and the usage count is incremented.  If the driver
 260         * supports runtime PM, it should call pm_runtime_put_noidle()
 261         * in its probe routine and pm_runtime_get_noresume() in its
 262         * remove routine.
 263         */
 264        pm_runtime_get_sync(dev);
 265        pci_dev->driver = pci_drv;
 266        rc = pci_drv->probe(pci_dev, ddi->id);
 267        if (rc) {
 268                pci_dev->driver = NULL;
 269                pm_runtime_put_sync(dev);
 270        }
 271        return rc;
 272}
 273
 274static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
 275                          const struct pci_device_id *id)
 276{
 277        int error, node;
 278        struct drv_dev_and_id ddi = { drv, dev, id };
 279
 280        /* Execute driver initialization on node where the device's
 281           bus is attached to.  This way the driver likely allocates
 282           its local memory on the right node without any need to
 283           change it. */
 284        node = dev_to_node(&dev->dev);
 285        if (node >= 0) {
 286                int cpu;
 287
 288                get_online_cpus();
 289                cpu = cpumask_any_and(cpumask_of_node(node), cpu_online_mask);
 290                if (cpu < nr_cpu_ids)
 291                        error = work_on_cpu(cpu, local_pci_probe, &ddi);
 292                else
 293                        error = local_pci_probe(&ddi);
 294                put_online_cpus();
 295        } else
 296                error = local_pci_probe(&ddi);
 297        return error;
 298}
 299
 300/**
 301 * __pci_device_probe - check if a driver wants to claim a specific PCI device
 302 * @drv: driver to call to check if it wants the PCI device
 303 * @pci_dev: PCI device being probed
 304 * 
 305 * returns 0 on success, else error.
 306 * side-effect: pci_dev->driver is set to drv when drv claims pci_dev.
 307 */
 308static int
 309__pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)
 310{
 311        const struct pci_device_id *id;
 312        int error = 0;
 313
 314        if (!pci_dev->driver && drv->probe) {
 315                error = -ENODEV;
 316
 317                id = pci_match_device(drv, pci_dev);
 318                if (id)
 319                        error = pci_call_probe(drv, pci_dev, id);
 320                if (error >= 0)
 321                        error = 0;
 322        }
 323        return error;
 324}
 325
 326static int pci_device_probe(struct device * dev)
 327{
 328        int error = 0;
 329        struct pci_driver *drv;
 330        struct pci_dev *pci_dev;
 331
 332        drv = to_pci_driver(dev->driver);
 333        pci_dev = to_pci_dev(dev);
 334        pci_dev_get(pci_dev);
 335        error = __pci_device_probe(drv, pci_dev);
 336        if (error)
 337                pci_dev_put(pci_dev);
 338
 339        return error;
 340}
 341
 342static int pci_device_remove(struct device * dev)
 343{
 344        struct pci_dev * pci_dev = to_pci_dev(dev);
 345        struct pci_driver * drv = pci_dev->driver;
 346
 347        if (drv) {
 348                if (drv->remove) {
 349                        pm_runtime_get_sync(dev);
 350                        drv->remove(pci_dev);
 351                        pm_runtime_put_noidle(dev);
 352                }
 353                pci_dev->driver = NULL;
 354        }
 355
 356        /* Undo the runtime PM settings in local_pci_probe() */
 357        pm_runtime_put_sync(dev);
 358
 359        /*
 360         * If the device is still on, set the power state as "unknown",
 361         * since it might change by the next time we load the driver.
 362         */
 363        if (pci_dev->current_state == PCI_D0)
 364                pci_dev->current_state = PCI_UNKNOWN;
 365
 366        /*
 367         * We would love to complain here if pci_dev->is_enabled is set, that
 368         * the driver should have called pci_disable_device(), but the
 369         * unfortunate fact is there are too many odd BIOS and bridge setups
 370         * that don't like drivers doing that all of the time.  
 371         * Oh well, we can dream of sane hardware when we sleep, no matter how
 372         * horrible the crap we have to deal with is when we are awake...
 373         */
 374
 375        pci_dev_put(pci_dev);
 376        return 0;
 377}
 378
 379static void pci_device_shutdown(struct device *dev)
 380{
 381        struct pci_dev *pci_dev = to_pci_dev(dev);
 382        struct pci_driver *drv = pci_dev->driver;
 383
 384        pm_runtime_resume(dev);
 385
 386        if (drv && drv->shutdown)
 387                drv->shutdown(pci_dev);
 388        pci_msi_shutdown(pci_dev);
 389        pci_msix_shutdown(pci_dev);
 390
 391        /*
 392         * Turn off Bus Master bit on the device to tell it to not
 393         * continue to do DMA. Don't touch devices in D3cold or unknown states.
 394         */
 395        if (pci_dev->current_state <= PCI_D3hot)
 396                pci_clear_master(pci_dev);
 397}
 398
 399#ifdef CONFIG_PM
 400
 401/* Auxiliary functions used for system resume and run-time resume. */
 402
 403/**
 404 * pci_restore_standard_config - restore standard config registers of PCI device
 405 * @pci_dev: PCI device to handle
 406 */
 407static int pci_restore_standard_config(struct pci_dev *pci_dev)
 408{
 409        pci_update_current_state(pci_dev, PCI_UNKNOWN);
 410
 411        if (pci_dev->current_state != PCI_D0) {
 412                int error = pci_set_power_state(pci_dev, PCI_D0);
 413                if (error)
 414                        return error;
 415        }
 416
 417        pci_restore_state(pci_dev);
 418        return 0;
 419}
 420
 421#endif
 422
 423#ifdef CONFIG_PM_SLEEP
 424
 425static void pci_pm_default_resume_early(struct pci_dev *pci_dev)
 426{
 427        pci_power_up(pci_dev);
 428        pci_restore_state(pci_dev);
 429        pci_fixup_device(pci_fixup_resume_early, pci_dev);
 430}
 431
 432/*
 433 * Default "suspend" method for devices that have no driver provided suspend,
 434 * or not even a driver at all (second part).
 435 */
 436static void pci_pm_set_unknown_state(struct pci_dev *pci_dev)
 437{
 438        /*
 439         * mark its power state as "unknown", since we don't know if
 440         * e.g. the BIOS will change its device state when we suspend.
 441         */
 442        if (pci_dev->current_state == PCI_D0)
 443                pci_dev->current_state = PCI_UNKNOWN;
 444}
 445
 446/*
 447 * Default "resume" method for devices that have no driver provided resume,
 448 * or not even a driver at all (second part).
 449 */
 450static int pci_pm_reenable_device(struct pci_dev *pci_dev)
 451{
 452        int retval;
 453
 454        /* if the device was enabled before suspend, reenable */
 455        retval = pci_reenable_device(pci_dev);
 456        /*
 457         * if the device was busmaster before the suspend, make it busmaster
 458         * again
 459         */
 460        if (pci_dev->is_busmaster)
 461                pci_set_master(pci_dev);
 462
 463        return retval;
 464}
 465
 466static int pci_legacy_suspend(struct device *dev, pm_message_t state)
 467{
 468        struct pci_dev * pci_dev = to_pci_dev(dev);
 469        struct pci_driver * drv = pci_dev->driver;
 470
 47"4"drivL           4        * Oh well, we ca4 drea47!=  374
 468 ref">PCI_D0)
 443drv = );nt">         * horrible 4he cr47a>, PCI_D0) {
drv =  373       4 */ 47"4"drivL           error = device *drv = }put" class="sref">pci_de4_put<4a>( 374
pci_dc#L471" id="L471" class="line" name="L471"> 47"4"drivL           drv = PCI_D0);
) {
drv = ,  313
PCI_D0)
 443        if ((PCI_D0)
 443        if (pci_ue=pci_set_master"32ui0ohref="+code=currhref="+co4e=to_pci_dev" class="sre4">to_48!= er/pci/pci-driver.c#L443" id="L443" class="line" name="L443"> 443        if (pci4dev 292n>
 47"4"drivL           drv = pm_r4ntime48.c#L374" id="code=PCIre>dev)4
re>ode=pm_mede=drv" class="sref">drv4/a>-&4t;re>eturn 0;4utdown" class="sref">shu4down<4a>(pci_dev);
 465
 465pci_l1" class="line" name="L461"> 461                pci_msi_shu4down<48c#L298" id="L298" class="line" name="L2984hutdown" 4lass="sref">pci_msix_shu4down<49ci_dev, pci_dev);
)4
rever.c#L394" id="L391" class="line"4name=49>(pcispan clas4="comment">         * Tu4n off4Bus Ma65" id="L465" class="line" name="L465"> 465<_l 465<_l 466static int pci_legacy_suspend(struct device *dev,      4   * continue to do DMA.4Don1t to=pci_set_master"32ui0ohref="+code=currer.c#L3944 id="L394" class="line" 4ame="4394"> 394<467" class="line" name="L467"> 467{
 468        struct pci_dev * pci_dev = current_state4<=4dev);
 469        struct pci_driver * drv = pci_clear_m4ster<49;redev);4 470
 47"4"dr_l 465<_l 3974
 374
 468 ref">PCI_D0)
 443drv =  399, PCI_D0) {
drv = /* Auxiliary fun5tions50!=  47"4"dr_l 465<_lerror = device *drv =  374
pci_dc#L471" id="L471" class="line" name="L471"> 47"4"dr_l 465<_l = );
drv = PCI_D0);
 *5pci_restore_standard_con5ig - 50.c#L374" id="code=PCIv, PCI_D0) {
drv =  *5psref">current_state5an cl50id="L415" class="line" name="L415"> 415 313
PCI_D0)
 443        if (pc5_dev<50     if (PCI_D0)
 443        if (pci_ue=pci_set_master"32ui0ohref="+code=cur5_dev)5removWARN_ONCErrent_state" clWARN_ONCE"+co        int er/pci/pci-driver.c#L443" id="L443" class="line" name="L443"> 443        if (pci_dev5 (n>
(remov.c#L471" id="L471" class="line" name="L471"> 47"4"dr_l 465<_ldrv = current_st5tepci_dev);
p5i_dev5/a>, r5s="line" 5ame="L413"> 413     5     5    if (r5sment"> *5 414                5     51c#L464" id="L464" class="line" name="L4645;
 313
        5
eruode=drv" class="sref">drv = pci_restore_5tate<51c#L397" id="L397" class="line" name="L3975f="driver5/pci/pci-driver.c#L418" 5d="L451>( */
eruode=drv" class="sref">drv = (pci_dev);

r5#endi5
5e" name="5423"> 423#ifdef  429e="L465ass="line" ner.c#L466" id="L466" class="line" name="L466"> 466static int pc5_dev<52a href="+codehref="+code=dev" class="sre7"> 467{
 468        struct pci_dev * pci_dev = )5dev);
 469        struct pci_driver * drv = pci_pow5r_up<52c#L397" id="L397" class="line" name="L3975e_state" 5lass="sref">pci_restore_5tate<5a>(Pname="L470"> 470
 ass="line" name="L429"> 429ass="line" ner.c ?7" id="L397" class="line" name="L3975y" class=5sref">pci_fixup_resume_e5rly(dev);
 429ass="line" ner.c3       int eru :i_dev" class="sref">pci_dev);
);5r5> 4305
pc5/pci-driv5r.c#L432" id="L432" clas5="lin53us Ma65" id="L465" class="line" name="L465383"> 383
 er.c#L466" id="L466" class="line" name="L466"> 466static int  434 394<467" class="line" name="L467"> 467{
 468        struct pci_dev * pci_dev = dev);
 469        struct pci_driver * drv = pc5_dev<53;r5_dev)5pci_dev);
 383
 nd" class="sref">pci_lef="+code=error" class="sref">eruode=drv" class="sref">drv =     5    * mark its power sta5e as 54ci_dev, Pname="L470"> 470
 ass="lame="L429"> 429ass="ler.c ?7" id="L397" class="line" name="L3975 class="c5mment">         * e.g. t5e BIO54>( ass="lame="L429"> 429ass="ler.c3       int eru :iode=pci_dev" class=mennt"> */
pci_lef="+code=error" class="sref">eruode=drv" class="sref">drv = r5rrent_sta5e" class="sref">current_5tate<54 int 5te" class5"sref">current_state5=  400

managedriv frte
 435 467{
pci_lef="+code=error" class="sref">eru4" id="L444" class="line" name="L4445>f="+code5r.c#L446" id="L446" clas5="lin54_t 5"> * Defa5lt "resume" me5hod f54>(pci_dev);
 383
 nd" class="sref">pci_lef="+code=error" class="sref">eruode=drv" class="sref">drv =  448 459pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4445ef="+code5pci_dev" class="sref">pc5_dev<55="+code=is_busmaster" class="sref">is_bu-driverid="ode=error" class="s-driverid="er.c        int error = eruode=drv" class="sref">drv = )5r5" class="5ine" name="L452"> 4525etval5
 435 465
 465 467{
pci_lef="+code=error" class="sref">eru4" id="L444" class="line" name="L4445>        5span class="comment">/* 5f the55.c#L4=pci_set_master"32ui0ohref="+code=cur5evice" cl5ss="sref">pci_reenable_d5vice<5a>( 459pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4445e> * Defa5>         * if the devic5 was 55     if (pci_lef="is.c#Ls-drived">pci_dev);
pci_d0" idass="sref">pci_lef="+code=error" class="sref">eruode=drv" class="sref">drv =  418       5er.c#L4595 id="L459" class="line" 5ame="56c#L419" id="L419" class="line" name="L4195_dev" cla5s="sref">pci_dev->5ass="sref">pci_boo62"> 462
pci_lef=hasme="L465ci-dupporLode=error" class="shasme="L465ci-dupporLer.c#L466" id="L466" class=="L467"> 467{
pci_lef="+code=error" class="sref">eru4" id="L444" class="line" name="L4445set_maste5" class="sref">pci_set_m5ster<5a>(dev);
 382        struct pci_driver *drv =  463  5     56.c#L383" id="L383" class="liboo62"> 462
pci_reLode=error" clasreLne" name="L382"> 382 470
pci_dc#L471" id="L471" class="line" name="L471"> 47"4"drivL           remov.c#L471" id="L471" class="line" name="L471"> 47"4"dr_l 465<_lremov.c#L471" id="L471" class="line" name="L471"> ass="lame="L429"> 429ass="ler.cde=drv" class="sref">drv = remov.c#L471" id="L471" class="line" name="L471"> ass="line" name="L429"> 429ass="line" ner.cuode=drv" class="sref">drv =  4645
 415pm5messa56c#L426" id="L4de=pci_dev" class="sref">pci_dev);
/*rsw/frtepci_dev);
to_56438"> 438        /">pci_dev);
pci5dev/*l
 ver.ci/pci-driver.c#L448" id="L448" class="line"5river5
5        * Oh well, we ca5 drea57!=  WARName="L429"> 429WARN0" idass="sref">pci_reLode=error" clasreLne" nef="drivers/pci/pci-driver.c#L471" id="L471" class="line" name="L471"> ef">pci_driver * 382n>
         * horrible 5he cr57a>,  rribL471" id="L471"rribnd" class="sref">pci_lef="+code=error" class="sref">er"line" name="L471"> v65) {
pci_lef="+code=error" class="sref">er"line" name="L471"> "line" name="L466"> 466statuode=drv" class="sref">drv =  373       5 */drv = 5put" class="sref">pci_de5_put<5a>( 418       5fode=pm_m5/pci/pci-driver.c#L376" 5d="L357;r5return 0;5 449 466static int 5pc5href="+co5e=to_pci_dev" class="sre5">to_58!= dev);
depci/pci-driver.c#L382" id="L382" class="line" name="L382"> 382pci_driver *drv = )5ci_dev" class="sref">pci5devPCI_D0) {
pci_dev);
 373       5_runtime_5esume" class="sref">pm_r5ntime58.c#L374" id="4de=pci_dev" class="sref">pci_dev);

pci_dev);
drv5/a>-&58456"> 456        pci_dev);
shu5down<58smaster before the suspend, make it busystcm 40" id="  Nf">ly,ment">/*ispcippo>
/">pci_dev);
pci_msi_shu5down<58438"> 438        is">pci_dev);
pci_msix_shu5down<59uot;unknown", since we don't purpo>
"  In v2" ,ment">/*ispidedsippo>
/">pci_dev);
pci_dev);
         * Tu5n off59 name="L432"> 432
     5   * continue to do DMA.5Don;.c#L383" id="L383" class="lii/pcunver.l383"> 383
 0" idass="sref">pci_dev * pci_dev = current_state5<=5 470
 am   struct  am   struct  arepas//a>
pci_clear_m5ster<59   if ( am   struct  arepas//a>
pci_dev * pci_dev = (PCI_D0) {
drv =  399pci6FIG_PM/* Auxiliary fun6tions60!=  435plea er.c#L466" id="L466" class="line" name="L466"> 466static int pc6pci-drive6.c#L403" id="L403" class6"line60   if (dev);
depci/pci-driver.c#L382" id="L382" class="line" name="L382"> 382pci_driver *drv =  *6pci_restore_standard_con6ig - 60c#L444" id="L444" class="line" name="L4446F6ent"> *6psref">current_state6an cl60a href="+code3470" class="line" name="L470"> 470
 am   struct  am   struct  /a>plea href="drivers/p/a>plea er.c/pci/pci-driver.c#L413" id="L413" cla6 7ent"> *6plass="sref">pci_clear_m6"line60; am   struct  /a>plea href="drivers/p/a>plea er.cdass="sref">pci_dev * pci_dev = pc6_dev<60     href="+code=pci_dev" class="sref">pci6F9="+code6ppci_dev6 )6
current_st6tec9
p6i_dev6/a>, <#def">c9plea er.cd/pci/pci-driverNULL/a>
 413     6     6173"> 373       6sment"> *6 414                6     61c#L46#end347ode=pci_dev" class="sref !CONFIG_PM_SLEEPe suspend.
 *6"drivers/pci/pci-driver.6#L41561id="L415" class="line" name="L415"> 415        6
 415f="+code6lass="sref">pci_restore_6tate<61c#L397" id="L397" class="line" name="L3976f="driver6/pci/pci-driver.c#L418" 6d="L461>( 449 465
 466static int pc6> 4196
 467{
pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = 
pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev = 6e" name="6423"> 423#ifdef   hasme="L465ci-dupporLode=error" class="shasme="L465ci-dupporLer.c#ass="sref">pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4446_SLEEPPpcame="L465"> 465
 382 = 
pci_dev =  *6pci_dev" class="sref">pc6_dev<62id="L415" class="line" name="L415"> 415)6 459pci_pow6r_up<62     if (pci_lef=menver.c#L4"> 465
 465pci_lef="+code=error" class="sref">eruci_dev" class="sref">pci_dev = pci_restore_6tate<62gt;pci_F9" code=error" clasF9" c#L43ci_dev" class="sref">pci_dev = pci_fixup_resume_e6rly(pci6dev);6 lef="+code=error" class="sref">erers/pci/pci-driver.cef="+_saverivL            382erci_dev" class="sref">pci_dev =  47"4"drivL           pci_lef=mme="LL374"> 374
 468 ref">PCI_D0)
 443drv =  434PCI_D0) {
drv =  415pc6_dev<63   if ( 47"4"drivL           pci_dev * pci_dev = )6pci_a href=" nporL425" lL374"> 374
pci_"m   struct  47"4"drivL           drv = PCI_D0);
    6    * mark its power sta6e as 64_sync(PCI_D0) {
drv =          * e.g. t6e BIO64c#L430" id="L430" class="line" name="L4306er.c#L4416 id="L441" class="line" 6ame="64!=  313
PCI_D0)
 443        if (current_6tate<64lass="line" name="L292"> ef="drivers/pci/pci-driverref">PCI_D0)
 443        if (pci_ue=pci_set_master"32ui0ohref="+code=cur6te" class6"sref">current_state6=         if (er/pci/pci-driver.c#L443" id="L443" class="line" name="L443"> 443        if (n>
idedsaverf="d%pF\pci-dri* again,pci_set_master"32ui0ohref="+code=cur6> 4446
 47"4"drivL           drv = pci6"> * Defa6lt "resume" me6hod f64>(pci6"er.c#L436"> 448 4ass="sref">pci_F9" code=error" clasF9" c#L43:8" id="L298" class="line" name="L2986pclass="c6pci_dev" class="sref">pc6_dev<65="+code=is_bu       int pci_dev);
 465
 465pci_l1" class="line" name="L461"> 461                (pc6" class="6ine" name="L452"> 452pci_dev);
6
pci6>        6span class="comment">/* 6f the65c#L444" id="L444" class="line" name="L4446evice" cl6ss="sref">pci_reenable_d6vice<65name="L435"> 449 465<_noirq/a>
 466static int  6e> * Defa6>         * if the devic6 was 65     if ( 467{
pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev = pci_dev->6  hasme="L465ci-dupporLode=error" class="shasme="L465ci-dupporLer.c#ass="sref">pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4446set_maste6" class="sref">pci_set_m6ster<66!= Ppcame="L465"> 465<_l 465<_l 382 = 
pci_dev = )6
6lass="lin6" name="L463"> 463  6     66   if (Ppcamsave2" class="line" name="L412ave2" cla"+co        int eruode=drv" class="sref">drv =  4646
pci_dev);
pm6messa66c#L426" id="Lhref="+code=pci_dev" class="sref">pci6tate)6to_669"+code=is_buspan class="comment"m   struct  47"4"dr_noirq/a>
pci6dev(pci_lef=mme="LL374"> 374
 468 ref">PCI_D0)
 443drv = 6
PCI_D0) {
drv = 6        * Oh well, we ca6 drea67>(pc6fdev)6nt">         * horrible 6he cr67a>,  47"4"dr_noirq/a>
pci_dev * pci_dev = pci_a href=" nporL425" lL374"> 374
pci_"m   struct  47"4"dr_noirq/a>
drv = PCI_D0);
6put" class="sref">pci_de6_put<676c#L374" id="code=PCIv, PCI_D0) {
drv = r6return 0;6 313
PCI_D0)
 443        if (PCI_D0)
 443        if (pci_ue=pci_set_master"32ui0ohref="+code=cur6ruct (dWARN_ONCErrent_state" clWARN_ONCE"+co        int er/pci/pci-driver.c#L443" id="L443" class="line" name="L443"> 443        if ((n>
idedsaverf="d%pF\pci-dri* again,pci_set_master"32ui0ohref="+code=cur6href="+co6e=to_pci_dev" class="sre6">to_68!= d"m   struct  47"4"dr_noirq/a>
drv = )6ci_dev" class="sref">pci6dev     ode=pci_dev" class="sref">pci_dev);
pci6_runtime_6esume" class="sref">pm_r6ntime68.c#L374" id="href="+code=pci_dev" class="sref">pci6_ 4646
 415ode=pm_m6de=drv" class="sref">drv6/a>-&6879"> 459 313
shu6down<68     if (pci_lef=save2" class="line" name="L412ave2" cla"+co        int eruode=drv" class="sref">drv = pci_msi_shu6down<68gt;pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4446hutdown" 6lass="sref">pci_msix_shu6down<69_sync(da hrarepas/_to_-leep374"> 374
eruode=drv" class="sref">drv = )6
pci6_ref="+co6" id="L391" class="line"6name=69>(pc6span clas6="comment">         * Tu6n off69lass="line" n */
eruode=drv" class="sref">drv =      6   * continue to do DMA.6Donᬽ"> 373       6er.c#L3946 id="L394" class="line" 6ame="69.c#L374" id="4de=pci_dev" class="sref">pci_dev);
current_state6<=69.c#L445" id="L445" class="l don't Some BIOSesifrompci_dev);
pci_clear_m6ster<69456"> 456        
pci_dev);
pci_dev);
 438        is c8
nmemoryicorrup 400ci/pci-driver.c#L448" id="L448" class="line"7" class="7ine" name="L399"> 399 432
  "+code=error" class="sref">er/pci/pci-driver.c#L44=err class="line" naass=vers/p        if ( *7pci_restore_standard_con7ig - 70.c#L374" id="code=PCI class="sref">Ppcamwri"+_d="L40_wor
error = erro0uode=drv" class="sref">drv =  *7psref">current_state7an cl70id="L415" class="line" name="L415"> 415 *7plass="sref">pci_clear_m7"line70;pci_dev);
pc7_dev<70     href="+code=pci_dev" class="sref">pci7F9="+code7ppci_dev7  449
 466static int )7
pc7ent_state7 class="sref">current_st7teers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = p7i_dev71.c#L462" id="href="+code=dev" class"line"ref">dev);
depci/pci-driver.c#L382" id="L382" class="line" name="L382"> 382pci_driver *drv =  413     7     71   if (PCI_D0) {
pci_dev);
 *7 414                7     71c#L444" id="L444" class="line" name="L4447N6ent"> *7"drivers/pci/pci-driver.7#L41571>( 429="commever.c#L425" idine" n="L43       int eruode=drv" class="sref">drv =         7
r7>f="+code7lass="sref">pci_restore_7tate<71     if (  hasme="L465ci-dupporLode=error" class="shasme="L465ci-dupporLer.c#ass="sref">pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447f="driver7/pci/pci-driver.c#L418" 7d="L471gt;Ppcame="L46525" idine" name="L429"> 429="coe="L46525" idine" nv" class="sref">pci_dev * pci_dev =  470
 am   struct  am   struct  ass="linoirq/a>
 am   struct  ass="linoirq/a>
pci_dev * pci_dev = 7e" name="7423"> 423#ifdef PCI_D0) {
drv = pci7<6ent"> *7pci_dev" class="sref">pc7_dev<72id="L415" class="line" name="L415"> 415)7 "L449"> 449
 466static int pci_pow7r_up<72      href="+code=pci_dev" class="sref">pc7<="driver7lass="sref">pci_restore_7tate<72gt;ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = pci_fixup_resume_e7rly(pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev = );7PCI_D0) {
pci_dev);
 4307
pc7y*/pci_dev);
/*-driver ="dri pathn_D whichlass="l is">pci_dev);
 434/*-tandard d="L40 odgistersiof*/pc 66ci/pci-driver.c#L448" id="L448" class="line"7pci-drive7.c#L435" id="L435" class7"line73.c#L445" id="L445" class="l don'tsuspend.
pc7_dev<7379"> 459 313
pci_ hreasstoee2" cndard_d="L4013"> 313
eruode=drv" class="sref">drv =     7    * mark its power sta7e as 74_sync(  hasme="L465ci-dupporLode=error" class="shasme="L465ci-dupporLer.c#ass="sref">pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447 class="c7mment">         * e.g. t7e BIO74>(Ppcame="L46525" idame="L429"> 429="coe="L46525" idv" class="sref">pci_dev * pci_dev = pc7rrent_sta7e" class="sref">current_7tate<74lass="line" n 429="commever.c#L425" id="L43       int eruode=drv" class="sref">drv = current_state7=  373       7NOWN;7 25" idame="L429"> 42925" id="L4u4" id="L444" class="line" name="L4447 f="+code7r.c#L446" id="L446" clas7="lin74   if () {
 25" idame="L429"> 42925" id="L4lass="sref">pci_dev * pci_dev = ( 448pci_d="L43       int eruode=drv" class="sref">drv = (pci7pclass="c7pci_dev" class="sref">pc7_dev<75c#L430" id="L430" class="line" name="L4307_dev)7PCI_D0) {
drv =  452pci7pe" class7
 373       7>        7span class="comment">/* 7f the75c#L46#elsecode=pci_dev" class="sref !CONFIG_SUSPEND;tsuspend.
pci_reenable_d7vice<75id="L415" class="line" name="L415"> 415c9 465

c9 465<_noirq/a>
c9
c9

pci_dev->7pci_set_m7ster<76!= )7
7lass="lin7" name="L463"> 463  7     76   if#ifdefd/pci/pci-driverCONFIG_HIBERNATE_CALLBACKS/a>
7l        7 449 466static int pm7messa76_t 7tate)7 467{
pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = to_76gt;pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev = pci7dev7
  hasme="L465ci-dupporLode=error" class="shasme="L465ci-dupporLer.c#ass="sref">pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447comment">7        * Oh well, we ca7 drea77!= Ppcame="L465"> 465 429="coe="L465ci-driver.c#e="L382"> 382 = pci_dev = )7nt">         * horrible 7he cr77 int 7fass="lin7 id="L373" class="line" 7ame="77   if ( 465
 465pci_lef="+code=error" class="sref">eruci_dev" class="sref">pci_dev = 7put" class="sref">pci_de7_put<776c#L374" id="code=PCIode=pci_dev" class="sref">pci_dev);
pci7return 0;7 313
 382erci_dev" class="sref">pci_dev = ( fasezl/a>
(PCI_D0) {
drv = to_78>(pc7hdev)7ci_dev" class="sref">pci7dev) {
 fasezl/a>
pci_dev * pci_dev =  374
pci_"m   struct  fasezl/a>
drv = pm_r7ntime78.c#L374" id="code=PCI+_D0" class="sref">PCI_D0);
7
PCI_D0) {
drv = ode=pm_m7de=drv" class="sref">drv7/a>-&78c#L426" id="Lhref="+code=pci_dev" class="sref">pci7return 0;7utdown" class="sref">shu7down<78c#L397" id="L397" class="line" name="L3977shutdown"7class="sref">pci_msi_shu7down<78gt;pci_dev);
pci_msix_shu7down<79_synchref="+code=pci_dev" class="sref">pci7_dev)7
( 449 466static int          * Tu7n off79lass==pci_set_master"32ui0ohref="+code=cur7nt">     7   * continue to do DMA.7DonO   if ( 467{
pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = dev);
depci/pci-driver.c#L382" id="L382" class="line" name="L382"> 382pci_driver *drv = current_state7<=79id="L415" class="line" name="L415"> 415pci_clear_m7ster<7979"> 459pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447return 0;7Ppcame="L465"> 465<_l 465<_l 382 = pci_dev =  399( 470
 am   struct  am   struct  fasezlinoirq/a>
(PCI_D0) {
drv = (pc8 */ am   struct  fasezlinoirq/a>
pci_dev * pci_dev =  374
pci_.c#L471" id="L471" class="line" name="L471"> am   struct  fasezlinoirq/a>
drv =  *8pci_restore_standard_con8ig - 80.c#L374" id="code=PCI+_D0" class="sref">PCI_D0);
 *8psref">current_state8an cl806c#L374" id="code=PCIv, PCI_D0) {
drv =  *8plass="sref">pci_clear_m8"line80c#L426" id="Lhref="+code=pci_dev" class="sref">pci8ef="+code8pci_dev" class="sref">pc8_dev<80c#L397" id="L397" class="line" name="L3978F9="+code8p 313
pci_dev8 (pci_lef=save2" class="line" name="L412ave2" cla"+co        int eruode=drv" class="sref">drv = )8
current_st8te */
eruode=drv" class="sref">drv = p8i_dev81 int 8eci-drive8ame="L413"> 413     8     81   if (pci_dev);
 *8 414                8     81.c#L3href="+code=pci_dev" class="sref">pci8N6ent"> *8"drivers/pci/pci-driver.8#L41581id="L415" class="line" name="L415"> 415        8
 "L449"> 449 466static int f="+code8lass="sref">pci_restore_8tate<81      href="+code=pci_dev" class="sref">pc8f="driver8/pci/pci-driver.c#L418" 8d="L481gt;ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = dev);
depci/pci-driver.c#L382" id="L382" class="line" name="L382"> 382pci_driver *drv =  4198
PCI_D0) {
pci_dev);

pc8r*/pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4448e" name="8423"> 423#ifdef Ppcame="L46525" idine" name="L429"> 429="coe="L46525" idine" nv" class="sref">pci_dev * pci_dev =  *8pci_dev" class="sref">pc8_dev<82>(pci_lef="+code=error" class="sref">error = pci_dev = r8pci_power8up" class="sref">pci_pow8r_up<82     if ( 470
 am   struct  am   struct  thawinoirq/a>
pci_restore_8tate<82gt; am   struct  thawinoirq/a>
pci_dev * pci_dev = pci_fixup_resume_e8rly);8PCI_D0) {
drv =  4308
pci8y*/8 * Defaul8 "suspend" met8od fo83   if"L449"> 449 466static int  434pc8pci-drive8.c#L435" id="L435" class8"line83>(ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = pc8_dev<8379"> 459pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev = PCI_D0) {
pci_dev);

  8 7    * m8rk its power sta7e as 748sync<8a>(  hasme="L465ci-dupporLode=error" class="shasme="L465ci-dupporLer.c#ass="sref">pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447 class=8c7mment">8        * e.g. t7e BIO748(Ppcame="L46525" idame="L429"> 429="coe="L46525" idv" class="sref">pci_dev * pci_dev = pc7rrent_s8a7e" clas8="sref">current_7tate<748ass="84is_buspan class="line" name=hasmect 8urrent_state7=  384a href="+codeode=pci ss="comment"m   struct  fasezl/a 434) {
 fasezl/apci_dev * pci_dev = pci_d="L43       int eruode=drv" class="sref">drv = drv =   8e7.c#L4498 id="L449" class7"line758sync<8a>( 313
 382erci_dev" class="sref">pci_dev = pc7_dev<758#L4308 id="L430" class="line" name="L4307_devPCI_D0) {
drv =  452pci7pe" cla8s7
 383       7>      8 7span cl8ss="comment">/* 7f the758#L46#8lsecod449 466static int pci_reenable_d7vice<758d="L485" cla_master"32ui0ohref="+code=cur7>er.c#L857" id="L856" class="line"7name=758ters/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev =       8  * if the devic7 was 758    #85f="+ch elsec=66" id="L466" class="lirmenops * pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev =   897 id="L489" class="line" 7ame="768#L41#86>(  hasme="L465ci-dupporLode=error" class="shasme="L465ci-dupporLer.c#ass="sref">pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447 class=8c7s="sref8>pci_dev->7Ppcame="L46525" idamme="L429"> 429="coe="L465ci-driver.c#e="L382"> 382 = pci_dev = pci_set_m7ster<768= pc7rrent_s8)7
 463  7     768  if#86a href="+codeci/pci-driver.ce href="pr.c#L4"> 465
 465pci_lef="+code=error" class="sref">eruci_dev" class="sref">pci_dev = pci_dev = 7
pci_dev = 7" id="L8 class="sref">pm7messa768t86ref="+code=retval" class="sref">r8pci_powe)7 313
 382erci_dev" class="sref">pci_dev = to_768t; fasezl/a=devioff
pci7dev(PCI_D0) {
drv = 7
) {
 fasezl/a=devioff
pci_dev * pci_dev =    8     * horrible 7he cr778int <87ne" name="L29 374
pci_"m   struct  fasezl/a=devioff
);
drv =  n7 id="L383" class="line" 7ame="778  if 87a href="+codeode=pci ss="comment"m   stra>);
 n7
PCI_D0) {
drv = 7put" cl8ss="sref">pci_de7_put<778c#L3787 id="code=PCIplass="sref">pci_dev = r8pci_powe;7
r8pci_powe;7e=to_pc8="drivers/pci/pc7-driv778t; fixu7v);
pci_lef="+code=efixu7va>
eruci_dev" class="sref">pci_dev = pci_dev);

to_788(pci8y*/pci7dev8 * Defaun7
 449
 466static int pm_r7ntime788c#L3788ef="+code=pci_dev" class="sref">pc8pci-driv>7
ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = drv7/a>-&788#L42688a href="+code="L466" class=ref="+cof">dev);
depci/pci-driver.c#L382" id="L382" class="line" name="L382"> 382pci_driver *drv =  419shu7down<788#L3978 id="L397" class="line" name="L3977shutdow8"7class="8ref">pci_msi_shu7down<788t;pci_lef="+cotruct pci_dev * pci_msix_shu7down<798synch89>(Ppcame="L465"> 465<_l 465<_l 382 = pci_dev =  am   struct          * Tu7n off798ass==89ne" name="L29pci_dev);

       7>      847 id="L384" class="line" 7ame="798c#L378" id="href="+css="commentname="L470"> 470
 am   struct  thawinoisdevioff>
8urrent_state7<=798d="L489 id="code=PCIspan class="sref">PCI_D0) {
drv = pci_clear_m7ster<7989"> 489ref="+code=retval" class="sref">r8pci_powe;7 470
 am   struct  thawinoisdevioff>
pci_dev * pci_dev =  374
pci_.c#L471" id="L471" class="line" name="L471"> am   struct  fasezlinsdevioff>
);
drv = 9"8ine" na9e="L399"> 399();
9"8iPpcame="L>) {
drv = pci8y*/8 * Defa9e8.c#L4039 id="L403" class8"line809  if 90a hrespan" class="line" nam   stru"> 313
 is_bridgrivers/pci/pe="L465"is_bridgr="sref">pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447 class=9*8pci_res9ore_standard_con8ig - 809c#L379" id="code=PCI+_D0" cln class="commethaw/a5" are_devslee74
pci_lef="+code=error" class="sref">eruci_dev" class="sref">pci_dev = 9urrent_state8an cl809c#L3790" class="line" name="L415"> 415      9*8plass="9ref">pci_clear_m8"line809#L4269 id="Lhref="+cdev" class="sref">pci_dev);
pc8_dev<809#L3979 id="LL431" class="le when we mT>is ipci_dev8 (  hasme="L313


9e8 class=9sref">current_st8tepci_lef="+code=error" class="sref">eruci_dev"= pci_dev = p8i_dev819int <9 href="+code=retval" class="sref">8eci-dri9e8ame="L493"> 413     8     819  if 9pci_dev);
9*8 414pci8N6ent">9*8"driver9/pci/pci-driver.8#L415819d="L495" class="line" name="L415"> 415      9 8
 "9449"> 449 466static int pci_restore_8tate<819     9ref="+code=pci_dev" class="sref">pc8f="driv9r8/pci/pc9-driver.c#L418" 8d="L4819t;ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = dev);
depci/pci-driver.c#L382" id="L382" class="line" name="L382"> 382pci_driver *drv =  4198
PCI_D0) {
pci_dev);

pc8r*/ 429="coe="L4652#L425" idame="L42e="L42="sref">pci_lef="+code=error" class="sref">eruci_dev" class="sref">pci_dev =  493#ifdef        7>      9a8
pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447 class=9*8pci_dev9 class="sref">pc8_dev<829(Ppcame="L46525" idine" name="L429"> 429="coe="L46525" idine" nv" class="sref">pci_dev * pci_dev = r8pci_pow9r8up" cla9s="sref">pci_pow8r_up<829    i9 ( 470
 am   struct  am   struct  am   str" cndard
pci_restore_8tate<829t; am   struct  thawinoi" cndard
pci_dev * pci_dev = p9i_fixup_resume_e8rly9;8PCI_D0) {
drv =  4308
pci8y*/8 * Defa9l8 "9uspend" met8od fo839  if"9449"> 449 466static int  434<9a>pc8pci-dri9e8.c#L4359 id="L435" class8"line839(ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = pc8_dev<8399"> 499pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev = PCI_D0) {
pci_dev);

  9 7    * m9rk its power sta7e as 749sync<9a>(pci_dev);
9        * e.g. t7e BIO749(current_7tate<749ass="94is_buL445" class="l don'tsuspend.
9urrent_state7=  394a hrespan" class=line" nam   stru"> 313
 434<9"drivers/pci/pci7drive749c#L3794 id="code=PCI+_D0" clline" nam   stru"> oirndard="andard"L43   
pci_lef="+code=error" class="sref">eruci_dev" class="sref">pci_dev =  415      9e7r.c#L449" id="L446" clas7="lin749  if 94pci_lef="+code=error" class="sref">eruu4" id="L444" class="line" name="L4447return 9r7lt &quo9;resume" me7hod f749(Ppcame="L465"> 465<_e="L429"> 429="coe="L46525" idv" class="sref">pci_dev * pci_dev =   9e7.c#L4499 id="L449" class7"line759sync<9a>( #L425" idame="L429"> 429="coe="L4652#L425" idame="L42="sref">pci_lef="+code=error" class="sref">eruci_dev" class="sref">pci_dev = pc7_dev<759#L4309 id="L430" class="line" name="L4307_dev am   struct  452 fasezl/aoirndarref="drivermenaoirndar6" iL444" class="line" name="L4447return 9s7
 395a href="+codeode=pci href="+cline" name="L31>) {
 fasezl/aoirndarref="drivermenaoirndar6" ief">pci_dev * pci_dev = /* 7f the759#L46#95 id="code=PCIpci_set_master"32ui0ohref="+code=cur7>er.c#L9l7ss="sre9">pci_reenable_d7vice<759d="L495 id="code=PCIspan clan class="commethaw/a>
oipci_dev);
eruode=drv" class="sref">drv = pci8ef="+co9a7>      9  * if the devic7 was 759    #95id="L397" class="line" name="L3977shutdow937L458" c9ass="line" name=7L458"759t;PCI_D0) {
drv =  430pci7_devpci_dev->7pci_set_m7ster<769= pci_de !CONFIrrE_CALLBAC_CALLBACKSd.
8 * Defa9n7" name=9L463"> 463  7     769  if#96a hre#25"a> an class="commefasezlinoirq/a
8 * Defa9n7span cl9"drivers/pci/pci7drive769#L44496 id="#25"a> an class="commefasezlinoirq/a>
8 * Defa9n7ss="sre9="drivers/pci/pc7-driv769ame="96 id="#25"a> an class="commefasezlin8 * Defa9n7" id="L9 class="sref">pm7messa769t96ref="#25"a> an class="commefasezlin
8 * Defa9n7>      9"drivers/pci/pci7drive769    i9 ( an class="commefasezlin=devioff
8 * Defa9n7L458" c9_dev" class="sre7">to_769t; an class="commefasezlin=devioff>
8 * Defa9=7ci_dev"9class="sref">pci7dev( an class="commefasezlinoirndarref="drivermenass="linoirndar6" iCIspan clan class="commet8 * Defa9>7
 an class="commefasezlinoirndard
8 * Defa9>7" class9* Oh well, we ca7 drea779= pc8r*/   9     * horrible 7he cr779int <97ne" n#endassdev" class="sref">pci_de !CONFIrrE_CALLBAC_CALLBACKSd.
       7>      9n7
       7>      9n7ss="sre9ss="sref">pci_de7_put<779c#L3797" class="line" name="L415"> 415      9m7/pci/pc9-driver.c#L376" 7d="L3779#L4269749"> 449

 466static int pc8f="driv9;7e=to_pc9="drivers/pci/pc7-driv779t;ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = (pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev = 7r"L468"> 468        su"> 313
pci_dev = 7" class9_dev" class="sre7">to_789(PCI_D0) {
drv = pci7dev8 * Defa9n7
pci_dev);
pm_r7ntime789c#L3798ef="+L431" class="le when we mT>is i);
drv7/a>-&789#L42698a hreL445" class="l don'tsuspend.
shu7down<789#L39798( 313
 *pci_msi_shu7down<789t;pci_dev);
9 7lass="s9ef">pci_msix_shu7down<799synch99id="L298" class="line" name="L2988dev9)7
 fasezl/aountime/a>

 fasezl/aENOSYSref="drivermenvENOSYSdrv" class="sref">drv =          * Tu7n off799ass==99href="+code=retval" class="sref">8 * Defa9 7   * co9tinue to do DMA.7Don̟  if 994s_buode=pci n class="commethawi313
 382erci_dev" class="sref">pci_dev =  382erci_dev" class="sref">pci_dev =  fasezl/aountime/a>

pci_dev * pci_dev = pci_clear_m7ster<7999"> 4997id="code=PCIline" name="L31 nporL425" lL374"> 374
pci_"m   struct  fasezl/aountime/a>

);
drv = 9;7);
9"7
PCI_D0) {
drv =  43010"8 313
<>r"ef="drivdo/pc7e" n6e/30/0b22eb3f6d5d51ee8f8efb936d95c09cba79_3/10"8i>lass="sref">drv =  43010"f="+code=pci_+D0" clan class="commethawi313
 382etruodrv" class="sref">drv =  43010"f="+code=pci_dev" class="sref">pc8r*/         * Tu7n off7910"">>10"ne" n);="sref">pci_lef="+code=efixu7va>
eruci_dev" class="sref">pci_dev = 10"       7>      10"5ine" na10"" class="line" 7ame="7910"" >10" id="span class=""line" nam   stru"> 313
 313
       7>      10"6ine" na10"rrent_state7<=7910"rr>10" id="code=PCIspaners/pci/pci68        su"> 313
pci_clear_m7ster<7910"ef>10"a href="+code"line" nn class="commetWARN_ONCCpci_dev" class=WARN_ONCC="sref">pci_lef="+code=e313
r"L468",master"32ui0ohref="+code=cur7>er.c#L10"8ine" na10"drivers/pci/pci7drive7910"dr>10"(""sp PM: S#ass ofnatic i noid=u7"  by %pF\n"/span>
,master"32ui0ohref="+code=cur7>er.c#L10"9ine" na10""drivers/pci/pc7-driv7910""d>10"ef="+code=rem fasezl/aountime/a>

pci_dev = pci_dev8 10ref="+code=rempci_dev);
10r1ine" na10="drivers/pci/pc8-driv8110="d>10rf="+code=pci_ode=pci_dev" class="sref">pci7_devcurrent_st8te10rf="+code=pci_dev" class="sref">pc8r*/p8i_dev8110" c>10ris_buspan class=""line" nam   stru"> 313
 413     8     81103">>10ra href="+codeci/pci-driver.ce href="pr.chu7"lass="line" n="coupd=pr.chu7"lass="="sref">pci_lef="+code=e313
pci_dev = 10r id="code=PCI+_D0" clline" nam   stru"> finishi"untime/a>

pci_lef="+code=e313
pci_dev = 10r id="code=PCIplass="sref">pci_dev = 10rref="+code=retval" class="sref">r8pci_pow10r8ine" na10ef">pci_restore_8tate<8110ef">10r(pci_dev);
10r9ine" na10-driver.c#L418" 8d="L48110-dr>10ref="+plass="sref">pci_dev = 10"def="+code=retval" class="sref">r8pci_pow1021ine" na10="drivers/pci/pc8-driv8210="d>10"19"> 449 429="coe="L4652#L4"untime/e="L426" id="L466" class="line" name="L466"> 466static int 10"2f="+code=pci_dev" class="sref">pc8f="driv10"3ine" na10="drivers/pci/pc8-driv8210="d>10"is_buspan classpan class="commetrcref="drivermenv"cdrv" class="sref">drv =  430#ifdef ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = 10" id="code=PCI66" id="L466" class="lirmenops * pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev = pc8_dev<8210 cl>10"" class="line" name="L415"> 415      10"7ine" na10"drivers/pci/pci8drive8210"dr>10"id="Lhref="+cdev" class="sref">pci_dev);
pci_pow8r_up<8210s=">10"id="LL431" class="le when we mT>is i);
pci_restore_8tate<8210ef">10"is_buL431" class="le when we mT>is i10i_ hreL445" class="l don'tsuspend.
10iis_buspan class=""line" nam   stru"> 313
 *10ief="+code=PCIode=pci dev" class="sref">pci_dev);
1033ine" na10" id="L432" clas8="lin8310" i>10ihref="+code=retval" class="sref">8 * Defa10i4ine" na10uspend" met8od fo8310usp>10ia hrespan" class="line" nam   struct  fasezl/aountime/e="L429"> 429="coe="L"untime/e="L426" i-driver.c#L413" id="L413" cla8name="L10i5ine" na10a> fasezl/aENOSYSref="drivermenvENOSYSdrv" class="sref">drv = 10i" class="line" name="L415"> 415      1037ine" na10 class="sref">pc8_dev<8310 cl>10i7id="code=PCIline" name="L31p"> oirndard="andard"L43   
pci_lef="+code=error" class="sref">eruci_dev" class="sref">pci_dev = 10i( fixu7v);
pci_lef="+code=efixu7ve" name="L429"> 429="coe="L4652fixu7ve" name="L426" i= eruci_dev" class="sref">pci_dev = pci_lef="+code=error" class="sref">eruci_dev"= etruodrv"= erci_dev"  class="sref">pci_dev = 10rk fixu7v);
pci_lef="+code=efixu7ve" nam9"> 429="coe="L4652fixu7ve" nam6" i= eruci_dev" class="sref">pci_dev = 10rid="L430" class="line" name="L4307_dev10r2 fasezl/aountime/e="L429"> 429="coe="L"untime/e="L426" ief">pci_dev * pci_dev = current_7tate<7410="s>10rhref="+code=retval" class="sref">8 * Defa1044ine" na10urrent_state7= 10r4s_buode=pci n class="commethawi313
erci_dev" class="sref">pci_dev = 10r5ref="+code=retval" class="sref">8 * Defa1046ine" na10="drivers/pci/pc7-driv7410="d>10r id="code=PCIdev" clsref">PCI_D0drv =  43010r7f="+plass="sref">pci_dev = 10rid="L397" class="line" name="L3977shutdow10r9ine" na10a> 449 429="coe="L4652#L4"untime/idle6" id="L466" class="line" name="L466"> 466static int 10 if="+code=pci_dev" class="sref">pc8f="driv1051ine" na10 class="sref">pc7_dev<7510 cl>10 is_buspan cla="L466" class=ref="+code=error" class="sref">ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = 10 2pci_lm   struct  382pci_driver * 382pci_driver * am   struct 
pci_dev =  4528 * Defa1054ine" na10="drivers/pci/pc7-driv7510="d>10 a href="+codedev" class="sref">pci_dev);
/* 7f the7510ss=>10 ef="+L431" class="le when we mT>is i);
pci_reenable_d7vice<7510">p>10  id="L431" class="le when we mT>is i10 a hreL445" class="l don'tsuspend.
10 ( 313
 *10 ef="+code=rem
ou74
pci_dev = 109"ref="+code=retval" class="sref">8 * Defa1061ine" na10>pci_dev->7pc>109is_buspan class=""line" nam   struct pci_set_m7ster<7610"sr>109ef="+code=PCIode=pci dev" cl-L471"> fasezl/aENOSYSref="drivermenvENOSYSdrv" class="sref">drv = 109href="+code=retval" class="sref">8 * Defa1064ine" na10L463"> 463  7     7610L46>109a hrespan" class=line" nam   struct  fasezl/aountime/idle9"> 429="coe="L"untime/idle6" i-t_master"32ui0ohref="+code=cur7>er.c#L1065ine" na10"drivers/pci/pci7drive7610"dr>109 id="code=PCI+_D0" clsspan class="commetre74
 fasezl/aountime/idle9"> 429="coe="L"untime/idle6" ief">pci_dev * pci_dev = 109 id="code=PCIspan classs=line" nam   strre74
pm7messa7610 cl>109a href="+code"line" node=pci dev" clline" nam   strre74
pci_dev = 109(pci_dev = to_7610_de>109id="L298" class="line" name="L2987ent">  1078ine" na10class="sref">pci7dev10cl hreLev" clNULL/a>
ou74
  1071ine" na10="drivers/pci/pc7-driv7710="d>10cis_buode=pci n class="commethoi"untime/a>

pci_dev * pci_dev = 10cef="+code=PCIdev" class="sref">pci_dev);
1073ine" na10     * horrible 7he cr7710   >10c3f="+plass="sref">pci_dev = 10c       7>      1075ine" na10="drivers/pci/pc7-driv7710="d>10c id="#i_setdev" class="sref">pci_de !CONFIrrPM_RUNTIMCd.
pci_de7_put<7710ss=>10c" class="line" name="L415"> 415      1077ine" na10-driver.c#L376" 7d="L37710-dr>10cref="#25"a> an class="commefasezlin"untime/a>

8 * Defa10c8ine" na10"drivers/pci/pci7drive7710"dr>10c( an class="commefasezlin"untime/e="L429"> 429="coe="L4652#L4"untime/e="L426" ici n class="commet8 * Defa10c9ine" na10="drivers/pci/pc7-driv7710="d>10cis_bu#25"a> an class="commefasezlin"untime/idle9"> 429="coe="L4652#L4"untime/idle6" i=pci n class="commet8 * Defa1088ine" na10e=device" class=7sref"7810e=d>10e=ev" "+code=retval" class="sref">8 * Defa1081ine" na10"drivers/pci/pci7drive7810"dr>10eid="L#endassdev" class="sref">pci_de !CONFIrrPM_RUNTIMCd.
to_7810_de>10ef="+code=pci_dev" class="sref">pc8r*/pci7dev10ene" n#if25"an class="commetCONFIrrPMref="drNULL#L43CONFIrrPM="+code=pci_dev" class="sref">pc8r*/10e       7>      1085ine" na10lass="sref">pm_r7ntime7810las>10e id="66" id="L466" class="lirmenops *  313/a> *  313/a> * er.c#L1086ine" na10="drivers/pci/pc7-driv7810="d>10e id="code=PCI.line" nam   stru5" area href="+crmenou5" aredrv"-driver.c#.c#L471"uawinois5" area href="+crmenouawinois5" are6" i=master"32ui0ohref="+code=cur7>er.c#L1087ine" na10class="sref">drv7/a>-&7810cla>10e7id="code=PCI.line" nam   strrefple="line" n="coupd=Lefple="drv"-driver.c#.c#L471"uawinoirefple="line" n="coupd=uawinoirefple="6" i=master"32ui0ohref="+code=cur7>er.c#L1088ine" na10class="sref">shu7down<7810cla>10e8id="code=PCI.line" nam   stra>

er.c#L1089ine" na10ref">pci_msi_shu7down<7810ref>10e9id="code=PCI.line" nam   stre="L429"> 429="coe="L"="L426" icdriver.c#.c#L471"uawinoie="L429"> 429="coe="L4652#L4"" nam6" i=master"32ui0ohref="+code=cur7>er.c#L1098ine" na10ef">pci_msix_shu7down<7910ef">10efid="code=PCI.line" nam   stroirq/a
10e1id="code=PCI.line" nam   strer.c#L1092ine" na1091" class="line"7name=791091">10e2id="code=PCI.line" nam   strudevioff
er.c#L1093ine" na10t">         * Tu7n off7910t">>10e3id="code=PCI.line" nam   stre="ndarref="drivermenaoirndar6" icdriver.c#.c#L471"uawinoie="ndarref="drivermenass="linoirndar6" i=master"32ui0ohref="+code=cur7>er.c#L1094ine" na10tinue to do DMA.7DonỦtin>10e4id="code=PCI.line" nam   stra>


er.c#L1095ine" na104" class="line" 7ame="79104" >10e5id="code=PCI.line" nam   stre="L42d
er.c#L1096ine" na10urrent_state7<=7910urr>10e id="code=PCI.line" nam   stroirq/a>

er.c#L1097ine" na10ref">pci_clear_m7ster<7910ref>10e7id="code=PCI.line" nam   str

er.c#L1098ine" na10"drivers/pci/pci7drive7910"dr>10e8id="code=PCI.line" nam   str=devioff>

er.c#L1099ine" na10="drivers/pci/pc7-driv7910="d>10e9id="code=PCI.line" nam   stre="ndard
er.c#L11"8ine" na11"8inivers/pci/pc7-driv7911"8i>110fid="code=PCI.line" nam   strountime/a>



er.c#L11"1ine" na11""drivers/pci/pc7-driv7911""d>1101id="code=PCI.line" nam   strountime/e="L429"> 429="coe="L"untime/e="L426" icdriver.c#.c#L471"uawinoieuntime/e="L429"> 429="coe="L4652#L4"untime/e="L426" i=master"32ui0ohref="+code=cur7>er.c#L11"2ine" na11"1" class="line"7name=7911"1">1102id="code=PCI.line" nam   strountime/idle9"> 429="coe="L"untime/idle6" icdriver.c#.c#L471"uawinoieuntime/idle9"> 429="coe="L4652#L4"untime/idle6" i=master"32ui0ohref="+code=cur7>er.c#L11"3ine" na11"">         * Tu7n off7911"">>11"ne" n}ss="sref">pci_dev);
11"4ine" na11"inue to do DMA.7Donủ"in>11"       7>      11"5ine" na11"" class="line" 7ame="7911"" >110 id="#25"a> an class="commef"spcPM_OPS_PTR9"> 429="coe="L"spcPM_OPS_PTRid="co(ci/pcline" nam   stru"> 313/a> *  313/a> * 7<=7911"rr>110" class="line" name="L415"> 415      11"7ine" na11"ef">pci_clear_m7ster<7911"ef>11"a hre#i_setdev" class="sref">pci_de !COMFIrrPM_OPSd.
110id="L397" class="line" name="L3977shutdow11"9ine" na11""drivers/pci/pc7-driv7911""d>110is_bu#25"a> an class="commef"spcPM_OPS_PTR9"> 429="coe="L"spcPM_OPS_PTRid="con class="commet8 * Defa1118ine" na11ref">pci_dev8 111=ev" "+code=retval" class="sref">8 * Defa11r1ine" na11="drivers/pci/pc8-driv8111="d>111id="L#endassdev" class="sref">pci_de !COMFIrrPM_OPSd.
current_st8te11rf="+code=pci_dev" class="sref">pc8r*/p8i_dev8111" c>111is_buL445" class="l don'/*ev);
 413     8     81113">>11ra hreL445" class="l don'* _v" cloigister_dr7 * _- oigister a new riv +c"line"/a>);
111ef="+L431" class="le when we* @drv:ndaedar7 * _="L466ure to oigistere"/a>);
111 id="L431" class="le when we* @owner: owner moduls ofnarve"/a>);
111a hreL445" class="l don'* @mod_-dri: moduls -dri sta-tae"/a>);
pci_restore_8tate<8111ef">111id="LL431" class="le when we* e"/a>);
112_ hreL445" class="l don'* Rev" cs a negat7pc valus on s/pc_, odaerwiset0. e"/a>);
112f="+cL431" class="le when we);
112f="+cL431" class="le when we* no atic i was claimeddaua-tanoigistr9112is_buL445" class="l don'.
#ifdef er.c#L11"5ine" na11="drivers/pci/pc8-driv8211="d>112 id="code=PCI+_D0" clllllllllll66" idcharc href="+code=pcimod_-dria href="+code=pmod_-dridrv"-driver.c#L413" id="L413" cla8name="L11"6ine" na11 class="sref">pc8_dev<8211 cl>11"" cla_master"32ui0ohref="+code=cur7>er.c#L11"7ine" na11"drivers/pci/pci8drive8211"dr>11"id="Lhref="+cdev" class="sref">pci_de initialize ref"on ar7 * _fieldsn.
pci_pow8r_up<8211s=">112( * 382pci_dev);
11"9ine" na11ef">pci_restore_8tate<8211ef">112ef="+ class="line" name="L31_r bu<_type9"> 429="coe="L4652bu<_typedrv"ss="sref">pci_dev);
1138ine" na11i_fixup_resume_e8rly113k *
 382
pci_dev);
1131ine" na11"drivers/pci/pci8drive8311"dr>113is_buode=pci n class="commet_r 382pci_dev);
1132ine" na11="drivers/pci/pc8-driv8311="d>113f="+code=pci_dev" class="sref">pc8r*/113ne" npci_dev);
1134ine" na11uspend" met8od fo8311usp>1134s_buode=pci n class="commetINIT_LIST_HEADa href="+crmenoINIT_LIST_HEAD6" idci/pcline" nam   str_rpci_dev);
1135ine" na11a>8 * Defa11i6ine" na11 id="L435" class8"line8311 id>113 id="code=PCIlev" class="sref">pci_de oigister with rere .
pc8_dev<8311 cl>11i7id="code=PCIdev" clline" nam   strri7ef=loigister *pci_dev);
1138ine" na11"drivers/pci/pci8drive8311"dr>11i(pci_dev =   1148ine" na11rk its power sta7e as 7411rk >114_ hreL445" class="l don'/*ev);
114f="+cL431" class="le when we);
114f="+cL431" class="le when we* @drv:ndaedar7 * _="L466ure to unoigistere"/a>);
current_7tate<7411="s>114is_buL445" class="l don'.se"/a>);
7= 114a hreL445" class="l don'* Dele="sndaedar7 * _="L466ure from daedlist ofnoigisteredd"sp drivers,e"/a>);
114ef="+L431" class="le when we* g7 *s it a chance to cle1" up by call-tanits remove() func);
114 id="L431" class="le when we* each atic i it was resp6" ible for, and marksndaosedatic is aev);
114a hreL445" class="l don'* dr7 * lessriver.c#L448" id="L448" class="line"7pci-dri1r48ine" na11;resume" me7hod f7411;re>114id="LL431" class="le when we*
  1158ine" na11 id="L449" class7"line7511 id>11 if="+void298" class="line" name="L2987ent">  1151ine" na11 class="sref">pc7_dev<7511 cl>11 is_buline" nam   stru"> unoigister_dr7 * 9"> 429="coe="L4652unoigister_dr7 * 6" id="L466" class=ref="+code=err7 * ref="drNULL#L43de=err7 * id="c href="+code=pci_r1152f="+code=pci_dev" class="sref">pc8f="driv1153ine" na11e="L452"> 452 *pci_dev);
1154ine" na11="drivers/pci/pc7-driv7511="d>1154s_buode=pci n class="commethawioirq_dynidpci_dev);
1155ine" na11ss="comment">/* 7f the7511ss=>11 ef="+plass="sref">pci_dev = pci_reenable_d7vice<7511">p>115" class="line" name="L415"> 415      11 7ine" na1156" class="line"7name=751156">11549"> 449="L466" class=ref="+code=err7 * ref="drNULL#L43de=err7 * id="c class=ref="+code=erefpaterr7 * ref="drNULL#L43de=erefpaterr7 * drv"82"code=pci_dev" class="sref">pc8f="driv1158ine" na11  * if the devic7 was 7511  *>1158id="code=PCI.line" nam   str-dria href="+code=p-dridrv"82">445" class="sta-ta">"refpat"/span>
ode=pci_dev" class="sref">pc8f="driv1159ine" na11ass="line" name=7L458"7511ass>11 ef="+}ss="sref">pci_dev);
1168ine" na119" class="line" 7ame="76119" >119"ref="+code=retval" class="sref">8 * Defa1161ine" na11>pci_dev->7pc>116f="+cL431" class="le when w/*ev);
pci_set_m7ster<7611"sr>116f="+cL431" class="le when we* p"> 313/dr7 * _- get daedde=err7 *  ofna atic int/a>);
116is_buL445" class="l don'.s@ati:ndaedatic i to querynt/a>);
 463  7     7611L46>116a hreL445" class="l don'*nt/a>);
116ef="+L431" class="le when we* Rev" cs daedappropriass de=err7 *  ="L466ure or %ci_dasssdaere_dennose"/a>);
116 id="L431" class="le when we* oigistereddar7 *  forndaedatic iriver.c#L448" id="L448" class="line"7pci-dri1r67ine" na11 class="sref">pm7messa7611 cl>116a hreL445" class="l don'*
119(to_7611_de>119id="Lline" nam   stru"> 313/rr7 * ref="drNULL#L43de=er13/rr7 * e" id66" id="L466" class="lirmenope=error" class="sref">ers/ass="sref">pci_lef="+co_legacy_suspend" /pci/pci-driver.c#L413" id="L413" cla8name="L1178ine" na11class="sref">pci7dev117if="+code=pci_dev" class="sref">pc8f="driv1171ine" na11="drivers/pci/pc7-driv7711="d>117is_buspan class="f">pci_lef="+co_legacy_suspend" /pci/pcipci-driver.cef="+_sadriver *11cef="+code=PCIcode=PCIdev" clline" nam   strrlegacy_suspend" /pci/pcipci-driver.cef="+_sadriver *pci_dev);
1173ine" na11     * horrible 7he cr7711   >117ne" npc8f="driv1174ine" na113" class="line" 7ame="77113" >117a href="+codeci/pci-dsspan class="commeti *pci_dev);
1175ine" na11="drivers/pci/pc7-driv7711="d>117 id="code=PCI+_D0" clfor"f">pci_lef="+coi *        si *        si *pci_de7_put<7711ss=>117 id="code=PCIspan claspan class="f">pci_lef="+co_legacy_suspend" /pci/pcipci-driver.cef="+_saresour"L466"> 466stresour"L/pci[68        si *        sIORESOURCC_BUSYa href="+crmenoIORESOURCC_BUSYe" n-driver.c#L413" id="L413" cla8name="L1177ine" na11-driver.c#L376" 7d="L37711-dr>117a href="+code"line" node=pci code=PCIdev" clci/pcline" nam   stru"> refpaterr7 * ref="drNULL#L43de=erefpaterr7 * drv"ss="sref">pci_dev);
1178ine" na11"drivers/pci/pci7drive7711"dr>117(pci_dev = 117ef="+ class="dev" clline" nam   strpci_dev = 11e=ev" plass="sref">pci_dev = 118id="L430" class="line" name="L4307_devto_7811_de>118f="+cL431" class="le when w/*ev);
pci7dev118is_buL445" class="l don'.sp652bu<_match_- Tellass=ad"sp dtic i s"L466ure has a match-tan"sp dtic i id s"L466urev);
118a hreL445" class="l don'* @ati:ndaed"sp dtic i s"L466ure to match_againstv);
pm_r7ntime7811las>118ef="+L431" class="le when we* @drv:ndaedatic i ar7 *  to search_fornmatch-tan"sp dtic i id s"L466ureev);
118 id="L431" class="le when we* v);
drv7/a>-&7811cla>118a hreL445" class="l don'* Us"  by a ar7 *  to check whedaer=ad"sp dtic i preen&#/in daev);
shu7down<7811cla>118id="LL431" class="le when we* system_denin/itsdlist ofnsupporteddatic is. Rev" cs daedmatch-tav);
pci_msi_shu7down<7811ref>118is_buL431" class="le when we* >ers/asc i_id s"L466ure or %ci_dasssdaere_dennosmatchriver.c#L448" id="L448" class="line"7pci-dri1r98ine" na11ef">pci_msix_shu7down<7911ef">119_ hreL445" class="l don'*
11919"> 449 429="coe="L4652bu<_match6" id="L466" class=ref="+coame="L466"> 466static int  *1192f="+code=pci_dev" class="sref">pc8f="driv1193ine" na11t">         * Tu7n off7911t">>11e3id="code=PCI="L466" class=ref="+code=error" class="sref">ers/ass="sref">pci_lef="+code=error" class="sref">ere="L468"> 468        struct pci_dev * pci_dev = 11e4id="code=PCI="L466" class=ref="+code=err7 * ref="drNULL#L43de=err7 * id="c href="+code=pcide=error" class="sref">ere=r_dev"class="sref">pci_dev = 11e5id="code=PCI66" id="L466" class="lirmenope=erroc i_idr" class="sref">ere="Lc i_idid="c href="+code=pcifound_idr" class="sref"found_iddev"class="sref">pci_dev = 7<=7911urr>119" class="line" name="L415"> 415      1197ine" na11ref">pci_clear_m7ster<7911ref>11e7id="code=PCIss=""line" nam   stru"> 313
119(pci_dev);
1199ine" na11="drivers/pci/pc7-driv7911="d>119id="L298" class="line" name="L2987ent">  12"8ine" na12"8inivers/pci/pc7-driv7912"8i>120k rror" class="sref">ere=r_dev"> 468        struct pci_dev);
12"1ine" na12""drivers/pci/pc7-driv7912""d>120is_buode=pci n class="commetfound_idr" class="sref"found_iddev"cdriver.c#.c#L471"uawimatcher/a>);
 rror" class="sref">ere=r_dev"= eruci_dev" class="sref">pci_dev = 1202id="code=PCIss="f">pci_lef="+cofound_idr" class="sref"found_iddev"-driver.c#L413" id="L413" cla8name="L12"3ine" na12"">         * Tu7n off7912"">>1203pci_dev = 12"       7>      12"5ine" na12"" class="line" 7ame="7912"" >1205id="code=PCIdev" class="sref">pci_dev);
12"6ine" na12"rrent_state7<=7912"rr>120" claplass="sref">pci_dev = pci_clear_m7ster<7912"ef>120ref="+code=retval" class="sref">r8pci_pow12"8ine" na12"drivers/pci/pci7drive7912"dr>120id="LL431" class="le when w/*ev);
120is_buL431" class="le when we* >ers/as_get ->);
pci_dev8 121_ hreL445" class="l don'* @ati:ndaedatic i be-tanoiferencedv);
121f="+cL431" class="le when we);
current_st8te121f="+cL431" class="le when we* Each l7 *dreference tona atic i should bedrefcountedriver.c#L448" id="L448" class="line"7pci-dri1213ine" na12" class="sref">p8i_dev8112" c>121is_buL445" class="l don'e);
 413     8     81123">>12ra hreL445" class="l don'* Drivers_forn"sp dtic is should normallydrecord such referenceeninv);
121ef="+L431" class="le when we* daeir probe() methods, when daey bind tona atic i, and releasev);
121 id="L431" class="le when we* daem by call-tan>ers/as_put(),/in daeir dis66"nect() methodsriver.c#L448" id="L448" class="line"7pci-dri1217ine" na12="drivers/pci/pc8-driv8112="d>121a hreL445" class="l don'*iver.c#L448" id="L448" class="line"7pci-dri1218ine" na12ef">pci_restore_8tate<8112ef">121id="LL431" class="le when we* A point*  to daedatic i with daed122_ hre="L466" class=ref="+code=error" class="sref">ers/ass="sref">pci_lef="+code=erro_getref="drNULL#L43de=er13/ge7drv"d="L466" class=ref="+code=error" class="sref">ers/ass="sref">pci_lef="+co_legacy_suspend" /pci/pci-driver.c#L413" id="L413" cla8name="L1221ine" na12="drivers/pci/pc8-driv8212="d>122f="+ccode=pci_dev" class="sref">pc8f="driv1222ine" na12ers/pci/pci-driv8r.c#L8212ers>1222id="code=PCIss="f">pci_lef="+co_legacy_suspend" /pci/pci-driver.c#L413" id="L413" cla8name="L1223ine" na12="drivers/pci/pc8-driv8212="d>1223pci_lef="+coge7er/a>);
pci_dev = #ifdef pci_dev = 122ef="+plass="sref">pci_dev = pc8_dev<8212 cl>122" class="line" name="L415"> 415      12"7ine" na12"drivers/pci/pci8drive8212"dr>122a hreL445" class="l don'/*ev);
pci_pow8r_up<8212s=">122id="LL431" class="le when we* >ers/as_put_- oileasena use ofndaedpiv +tic i s"L466urev);
pci_restore_8tate<8212ef">122is_buL431" class="le when we* @ati:natic i that's been dis66"nectedv);
123_ hreL445" class="l don'*v);
123f="+cL431" class="le when we);
123f="+cL431" class="le when we* use  ofndaedatic i calls dadenfunc123is_buL445" class="l don'.
1234s_buvoidrline" nam   stru"> 313/au74
 313/au7drv"d="L466" class=ref="+code=error" class="sref">ers/ass="sref">pci_lef="+co_legacy_suspend" /pci/pci-driver.c#L413" id="L413" cla8name="L1235ine" na12a>pc8f="driv12i6ine" na12 id="L435" class8"line8312 id>123 id="code=PCIss="f">pci_lef="+co_legacy_suspend" /pci/pci-driver.c#L413" id="L413" cla8name="L1237ine" na12 class="sref">pc8_dev<8312 cl>123a href="+code"line" n class=ref="+codu7er/a>);
pci_dev = 12i(pci_dev =   1248ine" na12rk its power sta7e as 7412rk >12409"> 449 ueven76" id="L466" class=ref="+coame="L466"> 466static int 124f="+ccode=pci_dev" class="sref">pc8f="driv12r2ine" na121" class="line" 7ame="74121" >1242id="code=PCI="L466" class=ref="+code=error" class="sref">ers/ass="sref">pci_lef="+codrror" class="sref">ci_dev"class="sref">pci_dev = current_7tate<7412="s>124href="+code=retval" class="sref">8 * Defa1244ine" na12urrent_state7= 124a hrespan" class="line" nam   str_legacy_suspend" /pci/pci-driver.c#L413" id="L413" cla8name="L1245ine" na12"drivers/pci/pci7drive7412"dr>124 id="code=PCI+_D0" cldev" cl-L471"> fasezl/aENODEVgacy_suspend" /ENODEVdev"class="sref">pci_dev = 124" class="line" name="L415"> 415      1247ine" na12" id="L446" clas7="lin7412" i>124id="Lhref="+cd">pci_lef="+codrror" class="sref">ci_dev"> 468        struct pci_dev * pci_dev = 124(ci_dev"-driver.c#L413" id="L413" cla8name="L1249ine" na12a> fasezl/aENODEVgacy_suspend" /ENODEVdev"class="sref">pci_dev = 125"ref="+code=retval" class="sref">8 * Defa1251ine" na12 class="sref">pc7_dev<7512 cl>125is_buspan class="f">pci_lef="+coadd ueven7_va ref="drNULL#L43add ueven7_va ="sref">pci_dev enegacy_suspend" /enent <,">445" class="sta-ta">""spcCLASS=%04X"/span>
= ci_dev"pci-driver.cef="+_sa clasr" class="sref" clasdev"--driver.c#L413" id="L413" cla8name="L1252ine" na12"drivers/pci/pci7drive7512"dr>125ef="+code=PCIode=pci dev" cl-L471"> fasezl/aENOMEMref="drNULL#L43ENOMEMdev"class="sref">pci_dev =  4528 * Defa1254ine" na12="drivers/pci/pc7-driv7512="d>125a hrespan" class=f">pci_lef="+coadd ueven7_va ref="drNULL#L43add ueven7_va ="sref">pci_dev enegacy_suspend" /enent <,">445" class="sta-ta">""spcID=%04X:%04X"/span>
= ci_dev"pci-driver.cef="+_savendo ref="drNULL#L43vendo dev"= ci_dev"pci-driver.cef="+_saame="L466"> 466static int <--driver.c#L413" id="L413" cla8name="L1255ine" na12ss="comment">/* 7f the7512ss=>125 id="code=PCI+_D0" cldev" cl-L471"> fasezl/aENOMEMref="drNULL#L43ENOMEMdev"class="sref">pci_dev = pci_reenable_d7vice<7512">p>125" class="line" name="L415"> 415      12 7ine" na1256" class="line"7name=751256">1257id="code=PCIss="f">pci_lef="+coadd ueven7_va ref="drNULL#L43add ueven7_va ="sref">pci_dev enegacy_suspend" /enent <,">445" class="sta-ta">""spcSUBSYScID=%04X:%04X"/span>
= ci_dev"pci-driver.cef="+_sasubsystem_vendo ref="drNULL#L43subsystem_vendo nt <,ss="line" name="L415"> 415      12 8ine" na12  * if the devic7 was 7512  *>125(ci_dev"pci-driver.cef="+_sasubsystem_ame="L466"> 466stsubsystem_ame="Lnt <--driver.c#L413" id="L413" cla8name="L1259ine" na12ass="line" name=7L458"7512ass>125ef="+code=rem fasezl/aENOMEMref="drNULL#L43ENOMEMdev"class="sref">pci_dev = 129"ref="+code=retval" class="sref">8 * Defa1261ine" na12>pci_dev->7pc>126is_buspan class="f">pci_lef="+coadd ueven7_va ref="drNULL#L43add ueven7_va ="sref">pci_dev enegacy_suspend" /enent <,">445" class="sta-ta">""spcSLOT_NAME=%s"/span>
= ci_dev"---driver.c#L413" id="L413" cla8name="L1262ine" na12"sref">pci_set_m7ster<7612"sr>126ef="+code=PCIode=pci dev" cl-L471"> fasezl/aENOMEMref="drNULL#L43ENOMEMdev"class="sref">pci_dev = 126href="+code=retval" class="sref">8 * Defa1264ine" na12L463"> 463  7     7612L46>126a hrespan" class=f">pci_lef="+coadd ueven7_va ref="drNULL#L43add ueven7_va ="sref">pci_dev enegacy_suspend" /enent <,">445" class="sta-ta">"MODALIAS/d c:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x"/span>
="+code=retval" class="sref">8 * Defa1265ine" na12"drivers/pci/pci7drive7612"dr>126 id="code=PCI+_D0" clllllllllll ci_dev"pci-driver.cef="+_savendo ref="drNULL#L43vendo dev"= ci_dev"pci-driver.cef="+_saame="L466"> 466static int <="+code=retval" class="sref">8 * Defa1266ine" na12="drivers/pci/pc7-driv7612="d>126 id="code=PCIspan claspan cla" n class=ref="+codrror" class="sref">ci_dev"pci-driver.cef="+_sasubsystem_vendo ref="drNULL#L43subsystem_vendo nt <,n class=ref="+codrror" class="sref">ci_dev"pci-driver.cef="+_sasubsystem_ame="L466"> 466stsubsystem_ame="Lnt <="+code=retval" class="sref">8 * Defa1267ine" na12 class="sref">pm7messa7612 cl>126a href="+code"line" node=pci codef">pci_dev u8466"> 466stu(ci_dev"pci-driver.cef="+_sa clasr" class="sref" clasdev" ci-dci-d 16),def">pci_dev u8466"> 466stu(ci_dev"pci-driver.cef="+_sa clasr" class="sref" clasdev" ci-dci-d 8)="+code=retval" class="sref">8 * Defa1268ine" na12"drivers/pci/pci7drive7612"dr>126(pci_dev u8466"> 466stu(ci_dev"pci-driver.cef="+_sa clasr" class="sref" clasdev"---driver.c#L413" id="L413" cla8name="L1269ine" na12_dev" class="sre7">to_7612_de>126ef="+code=rem fasezl/aENOMEMref="drNULL#L43ENOMEMdev"class="sref">pci_dev = pci7dev127kpci_dev);
1271ine" na12="drivers/pci/pc7-driv7712="d>127is_buplass="sref">pci_dev = 127f="+code=pci_dev" class="sref">pc8r*/127ne" n="L466" class=ref="+cobu<_type9"> 429="coe="Lbu<_typedrv"an class="commethawibu<_type9"> 429="coe="L4652bu<_typedrv"82"code=pci_dev" class="sref">pc8f="driv1274ine" na123" class="line" 7ame="77123" >127a href="+code.line" nam   str-dria href="+code=p-dridrv"888888888882">445" class="sta-ta">"ef""/span>
="+code=retval" class="sref">8 * Defa1275ine" na12="drivers/pci/pc7-driv7712="d>127 id="code=PCI.line" nam   strmatch9"> 429="coe="Lmatch6" i88888888882"> class="commethawibu<_match9"> 429="coe="L4652bu<_match6" i="+code=retval" class="sref">8 * Defa1276ine" na12ss="sref">pci_de7_put<7712ss=>127 id="code=PCI.line" nam   strueven74
 class="commethawiueven74
 ueven76" i="+code=retval" class="sref">8 * Defa1277ine" na12-driver.c#L376" 7d="L37712-dr>1277id="code=PCI.line" nam   strprobe4
 class="commethawi="Lc i_probe4
8 * Defa1278ine" na12"drivers/pci/pci7drive7712"dr>1278id="code=PCI.line" nam   strremove4
 class="commethawi="Lc i_remove4
8 * Defa1279ine" na12="drivers/pci/pc7-driv7712="d>1279id="code=PCI.line" nam   strshutdown466"> 466stshutdownid="code=PC2"> class="commethawi="Lc i_shutdown466"> 466sthawi="Lc i_shutdown6" i="+code=retval" class="sref">8 * Defa1288ine" na12e=device" class=7sref"7812e=d>128fid="code=PCI.line" nam   str313/attr class="commethawi="L/attr8 * Defa1281ine" na12"drivers/pci/pci7drive7812"dr>1281id="code=PCI.line" nam   strbu<_attr class="commethawibu<_attr8 * Defa1282ine" na12_dev" class="sre7">to_7812_de>1282id="code=PCI.line" nam   strdr3/attr class="commethawi=r3/attr8 * Defa1283ine" na12class="sref">pci7dev1283id="code=PCI.line" nam   strpma href="+crmenohmf="+code=rem<2"> class="commet"spcPM_OPS_PTR9"> 429="coe="L"spcPM_OPS_PTRid="="+code=retval" class="sref">8 * Defa1284ine" na12="drivers/pci/pc7-driv7812="d>128a hre}ss="sref">pci_dev);
1285ine" na12lass="sref">pm_r7ntime7812las>1285ref="+code=retval" class="sref">8 * Defa1286ine" na12="drivers/pci/pc7-driv7812="d>128 id="449drv7/a>-&7812cla>128a hrecode=pci_dev" class="sref">pc8f="driv1288ine" na12class="sref">shu7down<7812cla>1288id="code=PCIdev" clriver.cef="+_sabu<_oigister * bu<_type9"> 429="coe="L4652bu<_typedrv" class="sref">pci_dev = pci_msi_shu7down<7812ref>128is_buplass="sref">pci_dev = pci_msix_shu7down<7912ef">129"ref="+code=retval" class="sref">8 * Defa1291ine" na12="drivers/pci/pc7-driv7912="d>129is_buline" nam   struostrere_initcall9"> 429="coe="L4ostrere_initcalle" idhref="+code=pci3e=err7 * _initref="drivermenade=err7 * _init="sr class="sref">pci_dev = 129f="+code=pci_dev" class="sref">pc8r*/         * Tu7n off7912t">>12e3id="L471"> fasezl/aEXPORT_SYMBOL_GPhref="drNULL#L43EXPORT_SYMBOL_GPhe" idhref="+code=pci3e=eadd dynidref="drivermenade=eadd dynid="sr class="sref">pci_dev = 12e4id="L471"> fasezl/aEXPORT_SYMBOLref="drNULL#L43EXPORT_SYMBOLe" idhref="+code=pci3e=ematcheidref="drivermenade=ematcheid="sr class="sref">pci_dev = 12e5id="L471"> fasezl/aEXPORT_SYMBOLref="drNULL#L43EXPORT_SYMBOLe" idhref="+code=pci_v" cloigister_dr7 * ref="drNULL#L43_v" cloigister_dr7 * 6" i class="sref">pci_dev = 7<=7912urr>129" claL471"> fasezl/aEXPORT_SYMBOLref="drNULL#L43EXPORT_SYMBOLe" idhref="+code=pci3e=eunoigister_dr7 * 9"> 429="coe="L4652unoigister_dr7 * 6" i class="sref">pci_dev = pci_clear_m7ster<7912ref>12e7id="L471"> fasezl/aEXPORT_SYMBOLref="drNULL#L43EXPORT_SYMBOLe" idhref="+code=pci3e=ed13/rr7 * ref="drNULL#L43de=er13/rr7 * e" i class="sref">pci_dev = 129( fasezl/aEXPORT_SYMBOLref="drNULL#L43EXPORT_SYMBOLe" idhref="+code=pci3e=ebu<_type9"> 429="coe="L4652bu<_typedrv" class="sref">pci_dev = 129id="Lline" nam   strEXPORT_SYMBOLref="drNULL#L43EXPORT_SYMBOLe" idhref="+code=pci3e=ed13/getref="drNULL#L43de=er13/ge7drv" class="sref">pci_dev = 130k 313/au7drv" class="sref">pci_dev = 130is_bu


The original LXR software by daedass="srefhttp://sour"Lforge.net/projects/lxr<>LXR l dounitynt <,ndadenexperion&#al ci_d/on by ass="srefmailto:lxr@ci/ux.no">lxr@ci/ux.nont <.
lxr.ci/ux.no kindly host" by ass="srefhttp://www.redpill-ci/pro.no">Redpill Li/pro ASnt <,nprovide ofnLi/uxI66" ult-tanand oper9