Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] i2o: Do not disable pci device when it's in use

When dpt_i2o is loaded first, i2o being loaded would cause it to call
pci_device_disable, thus breaking dpt_i2o's use of the device. Based on
similar usage of pci_disable_device in other drivers.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Ben Collins and committed by
Linus Torvalds
87d47d05 48ea7530

+5 -1
+5 -1
drivers/message/i2o/pci.c
··· 303 303 struct i2o_controller *c; 304 304 int rc; 305 305 struct pci_dev *i960 = NULL; 306 + int pci_dev_busy = 0; 306 307 307 308 printk(KERN_INFO "i2o: Checking for PCI I2O controllers...\n"); 308 309 ··· 396 395 if ((rc = i2o_pci_alloc(c))) { 397 396 printk(KERN_ERR "%s: DMA / IO allocation for I2O controller " 398 397 " failed\n", c->name); 398 + if (rc == -ENODEV) 399 + pci_dev_busy = 1; 399 400 goto free_controller; 400 401 } 401 402 ··· 428 425 i2o_iop_free(c); 429 426 430 427 disable: 431 - pci_disable_device(pdev); 428 + if (!pci_dev_busy) 429 + pci_disable_device(pdev); 432 430 433 431 return rc; 434 432 }