aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-07 16:35:17 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-07 16:35:17 -0500
commit21b4e736922f546e0f1aa7b9d6c442f309a2444a (patch)
treee1be8645297f8ebe87445251743ebcc52081a20d /drivers/ide
parent34161db6b14d984fb9b06c735b7b42f8803f6851 (diff)
parent68380b581383c028830f79ec2670f4a193854aa6 (diff)
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linus
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/Kconfig16
-rw-r--r--drivers/ide/ide.c19
-rw-r--r--drivers/ide/pci/via82cxxx.c21
3 files changed, 39 insertions, 17 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index 0c68d0f0d8e5..e23bc0d62159 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -389,14 +389,6 @@ config BLK_DEV_RZ1000
389 Linux. This may slow disk throughput by a few percent, but at least 389 Linux. This may slow disk throughput by a few percent, but at least
390 things will operate 100% reliably. 390 things will operate 100% reliably.
391 391
392config BLK_DEV_SL82C105
393 tristate "Winbond SL82c105 support"
394 depends on PCI && (PPC || ARM) && BLK_DEV_IDEPCI
395 help
396 If you have a Winbond SL82c105 IDE controller, say Y here to enable
397 special configuration for this chip. This is common on various CHRP
398 motherboards, but could be used elsewhere. If in doubt, say Y.
399
400config BLK_DEV_IDEDMA_PCI 392config BLK_DEV_IDEDMA_PCI
401 bool "Generic PCI bus-master DMA support" 393 bool "Generic PCI bus-master DMA support"
402 depends on PCI && BLK_DEV_IDEPCI 394 depends on PCI && BLK_DEV_IDEPCI
@@ -712,6 +704,14 @@ config BLK_DEV_SIS5513
712 704
713 Please read the comments at the top of <file:drivers/ide/pci/sis5513.c>. 705 Please read the comments at the top of <file:drivers/ide/pci/sis5513.c>.
714 706
707config BLK_DEV_SL82C105
708 tristate "Winbond SL82c105 support"
709 depends on (PPC || ARM)
710 help
711 If you have a Winbond SL82c105 IDE controller, say Y here to enable
712 special configuration for this chip. This is common on various CHRP
713 motherboards, but could be used elsewhere. If in doubt, say Y.
714
715config BLK_DEV_SLC90E66 715config BLK_DEV_SLC90E66
716 tristate "SLC90E66 chipset support" 716 tristate "SLC90E66 chipset support"
717 help 717 help
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 287a66201150..16890769dca6 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -973,8 +973,8 @@ ide_settings_t *ide_find_setting_by_name (ide_drive_t *drive, char *name)
973 * @drive: drive 973 * @drive: drive
974 * 974 *
975 * Automatically remove all the driver specific settings for this 975 * Automatically remove all the driver specific settings for this
976 * drive. This function may sleep and must not be called from IRQ 976 * drive. This function may not be called from IRQ context. The
977 * context. The caller must hold ide_setting_sem. 977 * caller must hold ide_setting_sem.
978 */ 978 */
979 979
980static void auto_remove_settings (ide_drive_t *drive) 980static void auto_remove_settings (ide_drive_t *drive)
@@ -1874,11 +1874,22 @@ void ide_unregister_subdriver(ide_drive_t *drive, ide_driver_t *driver)
1874{ 1874{
1875 unsigned long flags; 1875 unsigned long flags;
1876 1876
1877 down(&ide_setting_sem);
1878 spin_lock_irqsave(&ide_lock, flags);
1879#ifdef CONFIG_PROC_FS 1877#ifdef CONFIG_PROC_FS
1880 ide_remove_proc_entries(drive->proc, driver->proc); 1878 ide_remove_proc_entries(drive->proc, driver->proc);
1881#endif 1879#endif
1880 down(&ide_setting_sem);
1881 spin_lock_irqsave(&ide_lock, flags);
1882 /*
1883 * ide_setting_sem protects the settings list
1884 * ide_lock protects the use of settings
1885 *
1886 * so we need to hold both, ide_settings_sem because we want to
1887 * modify the settings list, and ide_lock because we cannot take
1888 * a setting out that is being used.
1889 *
1890 * OTOH both ide_{read,write}_setting are only ever used under
1891 * ide_setting_sem.
1892 */
1882 auto_remove_settings(drive); 1893 auto_remove_settings(drive);
1883 spin_unlock_irqrestore(&ide_lock, flags); 1894 spin_unlock_irqrestore(&ide_lock, flags);
1884 up(&ide_setting_sem); 1895 up(&ide_setting_sem);
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index eb7ab112c050..61f1a9665a7f 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -282,11 +282,11 @@ static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const
282 * Find the ISA bridge to see how good the IDE is. 282 * Find the ISA bridge to see how good the IDE is.
283 */ 283 */
284 via_config = via_config_find(&isa); 284 via_config = via_config_find(&isa);
285 if (!via_config->id) { 285
286 printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); 286 /* We checked this earlier so if it fails here deeep badness
287 pci_dev_put(isa); 287 is involved */
288 return -ENODEV; 288
289 } 289 BUG_ON(!via_config->id);
290 290
291 /* 291 /*
292 * Setup or disable Clk66 if appropriate 292 * Setup or disable Clk66 if appropriate
@@ -494,6 +494,17 @@ static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
494 494
495static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) 495static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
496{ 496{
497 struct pci_dev *isa = NULL;
498 struct via_isa_bridge *via_config;
499 /*
500 * Find the ISA bridge and check we know what it is.
501 */
502 via_config = via_config_find(&isa);
503 pci_dev_put(isa);
504 if (!via_config->id) {
505 printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n");
506 return -ENODEV;
507 }
497 return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]); 508 return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]);
498} 509}
499 510