Commit 6e21ce9d authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  pdc202xx_new: PLL detection fix
  via82cxxx: add Arima W730-K8 and other rebadgings to short cables list
  pmac: build fix
  pata_ali/alim15x3: override 80-wire cable detection for Toshiba S1800-814
  hpt366: UltraDMA filter for SATA cards (take 2)
  ide: add ide_dev_is_sata() helper (take 2)
  hpt366: fix PCI clock detection for HPT374 (take 4)
  pdc202xx_new: fix PCI refcounting
  ide: fix PCI refcounting
  mpc8xx: Only build mpc8xx on arch/ppc
parents 01a6a779 56fe23d5
...@@ -48,6 +48,13 @@ static struct dmi_system_id cable_dmi_table[] = { ...@@ -48,6 +48,13 @@ static struct dmi_system_id cable_dmi_table[] = {
DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"), DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
}, },
}, },
{
.ident = "Toshiba Satelite S1800-814",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
},
},
{ } { }
}; };
......
...@@ -781,7 +781,7 @@ endif ...@@ -781,7 +781,7 @@ endif
config BLK_DEV_IDE_PMAC config BLK_DEV_IDE_PMAC
bool "Builtin PowerMac IDE support" bool "Builtin PowerMac IDE support"
depends on PPC_PMAC && IDE=y depends on PPC_PMAC && IDE=y && BLK_DEV_IDE=y
help help
This driver provides support for the built-in IDE controller on This driver provides support for the built-in IDE controller on
most of the recent Apple Power Macintoshes and PowerBooks. most of the recent Apple Power Macintoshes and PowerBooks.
...@@ -946,7 +946,7 @@ config BLK_DEV_Q40IDE ...@@ -946,7 +946,7 @@ config BLK_DEV_Q40IDE
config BLK_DEV_MPC8xx_IDE config BLK_DEV_MPC8xx_IDE
bool "MPC8xx IDE support" bool "MPC8xx IDE support"
depends on 8xx && IDE=y && BLK_DEV_IDE=y depends on 8xx && IDE=y && BLK_DEV_IDE=y && !PPC_MERGE
select IDE_GENERIC select IDE_GENERIC
help help
This option provides support for IDE on Motorola MPC8xx Systems. This option provides support for IDE on Motorola MPC8xx Systems.
......
...@@ -615,8 +615,7 @@ u8 eighty_ninty_three (ide_drive_t *drive) ...@@ -615,8 +615,7 @@ u8 eighty_ninty_three (ide_drive_t *drive)
if (hwif->cbl != ATA_CBL_PATA80 && !ivb) if (hwif->cbl != ATA_CBL_PATA80 && !ivb)
goto no_80w; goto no_80w;
/* Check for SATA but only if we are ATA5 or higher */ if (ide_dev_is_sata(id))
if (id->hw_config == 0 && (id->major_rev_num & 0x7FE0))
return 1; return 1;
/* /*
......
...@@ -596,6 +596,13 @@ static struct dmi_system_id cable_dmi_table[] = { ...@@ -596,6 +596,13 @@ static struct dmi_system_id cable_dmi_table[] = {
DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"), DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
}, },
}, },
{
.ident = "Toshiba Satellite S1800-814",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
},
},
{ } { }
}; };
......
This diff is collapsed.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Split from: * Split from:
* linux/drivers/ide/pdc202xx.c Version 0.35 Mar. 30, 2002 * linux/drivers/ide/pdc202xx.c Version 0.35 Mar. 30, 2002
* Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>
* Copyright (C) 2005-2006 MontaVista Software, Inc. * Copyright (C) 2005-2007 MontaVista Software, Inc.
* Portions Copyright (C) 1999 Promise Technology, Inc. * Portions Copyright (C) 1999 Promise Technology, Inc.
* Author: Frank Tiernan (frankt@promise.com) * Author: Frank Tiernan (frankt@promise.com)
* Released under terms of General Public License * Released under terms of General Public License
...@@ -341,7 +341,7 @@ static long __devinit detect_pll_input_clock(unsigned long dma_base) ...@@ -341,7 +341,7 @@ static long __devinit detect_pll_input_clock(unsigned long dma_base)
*/ */
usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 + usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 +
(end_time.tv_usec - start_time.tv_usec); (end_time.tv_usec - start_time.tv_usec);
pll_input = ((start_count - end_count) & 0x3ffffff) / 10 * pll_input = ((start_count - end_count) & 0x3fffffff) / 10 *
(10000000 / usec_elapsed); (10000000 / usec_elapsed);
DBG("start[%ld] end[%ld]\n", start_count, end_count); DBG("start[%ld] end[%ld]\n", start_count, end_count);
...@@ -535,7 +535,7 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev, ...@@ -535,7 +535,7 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev,
(dev->bus->self->device == PCI_DEVICE_ID_DEC_21150)) { (dev->bus->self->device == PCI_DEVICE_ID_DEC_21150)) {
if (PCI_SLOT(dev->devfn) & 2) if (PCI_SLOT(dev->devfn) & 2)
return -ENODEV; return -ENODEV;
d->extra = 0;
while ((findev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) { while ((findev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) {
if ((findev->vendor == dev->vendor) && if ((findev->vendor == dev->vendor) &&
(findev->device == dev->device) && (findev->device == dev->device) &&
...@@ -544,7 +544,8 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev, ...@@ -544,7 +544,8 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev,
findev->irq = dev->irq; findev->irq = dev->irq;
} }
ret = ide_setup_pci_devices(dev, findev, d); ret = ide_setup_pci_devices(dev, findev, d);
pci_dev_put(findev); if (ret < 0)
pci_dev_put(findev);
return ret; return ret;
} }
} }
......
/* /*
* *
* Version 3.46 * Version 3.47
* *
* VIA IDE driver for Linux. Supported southbridges: * VIA IDE driver for Linux. Supported southbridges:
* *
...@@ -430,19 +430,26 @@ static struct dmi_system_id cable_dmi_table[] = { ...@@ -430,19 +430,26 @@ static struct dmi_system_id cable_dmi_table[] = {
{ } { }
}; };
static int via_cable_override(void) static int via_cable_override(struct pci_dev *pdev)
{ {
/* Systems by DMI */ /* Systems by DMI */
if (dmi_check_system(cable_dmi_table)) if (dmi_check_system(cable_dmi_table))
return 1; return 1;
/* Arima W730-K8/Targa Visionary 811/... */
if (pdev->subsystem_vendor == 0x161F &&
pdev->subsystem_device == 0x2032)
return 1;
return 0; return 0;
} }
static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif) static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif)
{ {
struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev); struct pci_dev *pdev = hwif->pci_dev;
struct via82cxxx_dev *vdev = pci_get_drvdata(pdev);
if (via_cable_override()) if (via_cable_override(pdev))
return ATA_CBL_PATA40_SHORT; return ATA_CBL_PATA40_SHORT;
if ((vdev->via_80w >> hwif->channel) & 1) if ((vdev->via_80w >> hwif->channel) & 1)
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <asm/mpc8xx.h> #include <asm/mpc8xx.h>
#include <asm/mmu.h> #include <asm/mmu.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/residual.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/ide.h> #include <asm/ide.h>
......
...@@ -816,19 +816,15 @@ static int __init ide_scan_pcidev(struct pci_dev *dev) ...@@ -816,19 +816,15 @@ static int __init ide_scan_pcidev(struct pci_dev *dev)
struct list_head *l; struct list_head *l;
struct pci_driver *d; struct pci_driver *d;
list_for_each(l, &ide_pci_drivers) list_for_each(l, &ide_pci_drivers) {
{
d = list_entry(l, struct pci_driver, node); d = list_entry(l, struct pci_driver, node);
if(d->id_table) if (d->id_table) {
{ const struct pci_device_id *id = pci_match_id(d->id_table,
const struct pci_device_id *id = pci_match_id(d->id_table, dev); dev);
if(id != NULL) if (id != NULL && d->probe(dev, id) >= 0) {
{ dev->driver = d;
if(d->probe(dev, id) >= 0) pci_dev_get(dev);
{ return 1;
dev->driver = d;
return 1;
}
} }
} }
} }
...@@ -851,15 +847,13 @@ void __init ide_scan_pcibus (int scan_direction) ...@@ -851,15 +847,13 @@ void __init ide_scan_pcibus (int scan_direction)
struct list_head *l, *n; struct list_head *l, *n;
pre_init = 0; pre_init = 0;
if (!scan_direction) { if (!scan_direction)
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
ide_scan_pcidev(dev); ide_scan_pcidev(dev);
} else
} else { while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev))
while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { != NULL)
ide_scan_pcidev(dev); ide_scan_pcidev(dev);
}
}
/* /*
* Hand the drivers over to the PCI layer now we * Hand the drivers over to the PCI layer now we
...@@ -869,12 +863,9 @@ void __init ide_scan_pcibus (int scan_direction) ...@@ -869,12 +863,9 @@ void __init ide_scan_pcibus (int scan_direction)
list_for_each_safe(l, n, &ide_pci_drivers) { list_for_each_safe(l, n, &ide_pci_drivers) {
list_del(l); list_del(l);
d = list_entry(l, struct pci_driver, node); d = list_entry(l, struct pci_driver, node);
if (__pci_register_driver(d, d->driver.owner, if (__pci_register_driver(d, d->driver.owner, d->driver.mod_name))
d->driver.mod_name)) { printk(KERN_ERR "%s: failed to register driver for %s\n",
printk(KERN_ERR "%s: failed to register driver " __FUNCTION__, d->driver.mod_name);
"for %s\n", __FUNCTION__,
d->driver.mod_name);
}
} }
} }
#endif #endif
...@@ -1378,6 +1378,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id) ...@@ -1378,6 +1378,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id)
return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0;
} }
static inline int ide_dev_is_sata(struct hd_driveid *id)
{
/*
* See if word 93 is 0 AND drive is at least ATA-5 compatible
* verifying that word 80 by casting it to a signed type --
* this trick allows us to filter out the reserved values of
* 0x0000 and 0xffff along with the earlier ATA revisions...
*/
if (id->hw_config == 0 && (short)id->major_rev_num >= 0x0020)
return 1;
return 0;
}
u8 ide_dump_status(ide_drive_t *, const char *, u8); u8 ide_dump_status(ide_drive_t *, const char *, u8);
typedef struct ide_pio_timings_s { typedef struct ide_pio_timings_s {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment