Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57546
b: refs/heads/master
c: c3a44a4
h: refs/heads/master
v: v3
  • Loading branch information
Yoichi Yuasa authored and Jeff Garzik committed Jun 10, 2007
1 parent a63da83 commit a416882
Show file tree
Hide file tree
Showing 38 changed files with 293 additions and 559 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b44c0267b7571b449e05f390349c4e4d080f0f4c
refs/heads/master: c3a44a47e8f60e8e4ae58d3a024b9a7ab293e673
1 change: 0 additions & 1 deletion trunk/drivers/ata/pata_isapnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
struct ata_host *host;
struct ata_port *ap;
void __iomem *cmd_addr, *ctl_addr;
int rc;

if (pnp_port_valid(idev, 0) == 0)
return -ENODEV;
Expand Down
12 changes: 0 additions & 12 deletions trunk/drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,17 +1037,6 @@ static void ide_disk_release(struct kref *kref)

static int ide_disk_probe(ide_drive_t *drive);

/*
* On HPA drives the capacity needs to be
* reinitilized on resume otherwise the disk
* can not be used and a hard reset is required
*/
static void ide_disk_resume(ide_drive_t *drive)
{
if (idedisk_supports_hpa(drive->id))
init_idedisk_capacity(drive);
}

static void ide_device_shutdown(ide_drive_t *drive)
{
#ifdef CONFIG_ALPHA
Expand Down Expand Up @@ -1082,7 +1071,6 @@ static ide_driver_t idedisk_driver = {
},
.probe = ide_disk_probe,
.remove = ide_disk_remove,
.resume = ide_disk_resume,
.shutdown = ide_device_shutdown,
.version = IDEDISK_VERSION,
.media = ide_disk,
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ EXPORT_SYMBOL_GPL(ide_undecoded_slave);
* This routine only knows how to look for drive units 0 and 1
* on an interface, so any setting of MAX_DRIVES > 2 won't work here.
*/
static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))
static void probe_hwif(ide_hwif_t *hwif)
{
unsigned int unit;
unsigned long flags;
Expand Down Expand Up @@ -820,9 +820,6 @@ static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))
return;
}

if (fixup)
fixup(hwif);

for (unit = 0; unit < MAX_DRIVES; ++unit) {
ide_drive_t *drive = &hwif->drives[unit];

Expand Down Expand Up @@ -877,7 +874,10 @@ static int hwif_init(ide_hwif_t *hwif);

int probe_hwif_init_with_fixup(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))
{
probe_hwif(hwif, fixup);
probe_hwif(hwif);

if (fixup)
fixup(hwif);

if (!hwif_init(hwif)) {
printk(KERN_INFO "%s: failed to initialize IDE interface\n",
Expand Down Expand Up @@ -1404,7 +1404,7 @@ int ideprobe_init (void)

for (index = 0; index < MAX_HWIFS; ++index)
if (probe[index])
probe_hwif(&ide_hwifs[index], NULL);
probe_hwif(&ide_hwifs[index]);
for (index = 0; index < MAX_HWIFS; ++index)
if (probe[index])
hwif_init(&ide_hwifs[index]);
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,11 +1010,9 @@ static int generic_ide_resume(struct device *dev)
{
ide_drive_t *drive = dev->driver_data;
ide_hwif_t *hwif = HWIF(drive);
ide_driver_t *drv = to_ide_driver(dev->driver);
struct request rq;
struct request_pm_state rqpm;
ide_task_t args;
int err;

/* Call ACPI _STM only once */
if (!(drive->dn % 2))
Expand All @@ -1031,12 +1029,7 @@ static int generic_ide_resume(struct device *dev)
rqpm.pm_step = ide_pm_state_start_resume;
rqpm.pm_state = PM_EVENT_ON;

err = ide_do_drive_cmd(drive, &rq, ide_head_wait);

if (err == 0 && drv && drv->resume)
drv->resume(drive);

return err;
return ide_do_drive_cmd(drive, &rq, ide_head_wait);
}

int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device *bdev,
Expand Down
12 changes: 3 additions & 9 deletions trunk/drivers/ide/pci/amd74xx.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Version 2.15
* Version 2.13
*
* AMD 755/756/766/8111 and nVidia nForce/2/2s/3/3s/CK804/MCP04
* IDE driver for Linux.
Expand Down Expand Up @@ -76,8 +76,6 @@ static struct amd_ide_chip {
{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, 0x50, AMD_UDMA_133 },
{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, 0x50, AMD_UDMA_133 },
{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE, 0x50, AMD_UDMA_133 },
{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE, 0x50, AMD_UDMA_133 },
{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE, 0x50, AMD_UDMA_133 },
{ PCI_DEVICE_ID_AMD_CS5536_IDE, 0x40, AMD_UDMA_100 },
{ 0 }
};
Expand Down Expand Up @@ -496,9 +494,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
/* 17 */ DECLARE_NV_DEV("NFORCE-MCP61"),
/* 18 */ DECLARE_NV_DEV("NFORCE-MCP65"),
/* 19 */ DECLARE_NV_DEV("NFORCE-MCP67"),
/* 20 */ DECLARE_NV_DEV("NFORCE-MCP73"),
/* 21 */ DECLARE_NV_DEV("NFORCE-MCP77"),
/* 22 */ DECLARE_AMD_DEV("AMD5536"),
/* 20 */ DECLARE_AMD_DEV("AMD5536"),
};

static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
Expand Down Expand Up @@ -538,9 +534,7 @@ static struct pci_device_id amd74xx_pci_tbl[] = {
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 },
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18 },
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19 },
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20 },
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 21 },
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 22 },
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20 },
{ 0, },
};
MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl);
Expand Down
37 changes: 14 additions & 23 deletions trunk/drivers/ide/pci/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,41 +198,32 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d = &generic_chipsets[id->driver_data];
u16 command;
int ret = -ENODEV;

/* Don't use the generic entry unless instructed to do so */
if (id->driver_data == 0 && ide_generic_all == 0)
goto out;

switch (dev->vendor) {
case PCI_VENDOR_ID_UMC:
if (dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
!(PCI_FUNC(dev->devfn) & 1))
goto out; /* UM8886A/BF pair */
break;
case PCI_VENDOR_ID_OPTI:
if (dev->device == PCI_DEVICE_ID_OPTI_82C558 &&
!(PCI_FUNC(dev->devfn) & 1))
goto out;
break;
case PCI_VENDOR_ID_JMICRON:
if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 &&
PCI_FUNC(dev->devfn) != 1)
goto out;
break;
case PCI_VENDOR_ID_NS:
if (dev->device == PCI_DEVICE_ID_NS_87410 &&
(dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
if (dev->vendor == PCI_VENDOR_ID_UMC &&
dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
(!(PCI_FUNC(dev->devfn) & 1)))
goto out; /* UM8886A/BF pair */

if (dev->vendor == PCI_VENDOR_ID_OPTI &&
dev->device == PCI_DEVICE_ID_OPTI_82C558 &&
(!(PCI_FUNC(dev->devfn) & 1)))
goto out;

if (dev->vendor == PCI_VENDOR_ID_JMICRON) {
if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 && PCI_FUNC(dev->devfn) != 1)
goto out;
break;
}

if (dev->vendor != PCI_VENDOR_ID_JMICRON) {
u16 command;
pci_read_config_word(dev, PCI_COMMAND, &command);
if (!(command & PCI_COMMAND_IO)) {
printk(KERN_INFO "Skipping disabled %s IDE "
"controller.\n", d->name);
printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
goto out;
}
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/ide/pci/hpt366.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* linux/drivers/ide/pci/hpt366.c Version 1.04 Jun 4, 2007
* linux/drivers/ide/pci/hpt366.c Version 1.03 May 4, 2007
*
* Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org>
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
Expand Down Expand Up @@ -106,8 +106,7 @@
* switch to calculating PCI clock frequency based on the chip's base DPLL
* frequency
* - switch to using the DPLL clock and enable UltraATA/133 mode by default on
* anything newer than HPT370/A (except HPT374 that is not capable of this
* mode according to the manual)
* anything newer than HPT370/A
* - fold PCI clock detection and DPLL setup code into init_chipset_hpt366(),
* also fixing the interchanged 25/40 MHz PCI clock cases for HPT36x chips;
* unify HPT36x/37x timing setup code and the speedproc handlers by joining
Expand Down Expand Up @@ -366,6 +365,7 @@ static u32 sixty_six_base_hpt37x[] = {
};

#define HPT366_DEBUG_DRIVE_INFO 0
#define HPT374_ALLOW_ATA133_6 1
#define HPT371_ALLOW_ATA133_6 1
#define HPT302_ALLOW_ATA133_6 1
#define HPT372_ALLOW_ATA133_6 1
Expand Down Expand Up @@ -450,7 +450,7 @@ static struct hpt_info hpt370a __devinitdata = {

static struct hpt_info hpt374 __devinitdata = {
.chip_type = HPT374,
.max_mode = 3,
.max_mode = HPT374_ALLOW_ATA133_6 ? 4 : 3,
.dpll_clk = 48,
.settings = hpt37x_settings
};
Expand Down
34 changes: 16 additions & 18 deletions trunk/drivers/ide/pci/it821x.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*
* linux/drivers/ide/pci/it821x.c Version 0.15 Jun 2 2007
* linux/drivers/ide/pci/it821x.c Version 0.10 Mar 10 2007
*
* Copyright (C) 2004 Red Hat <alan@redhat.com>
* Copyright (C) 2007 Bartlomiej Zolnierkiewicz
Expand Down Expand Up @@ -262,7 +262,7 @@ static int it821x_tunepio(ide_drive_t *drive, u8 set_pio)
}

if (itdev->smart)
return 0;
goto set_drive_speed;

/* We prefer 66Mhz clock for PIO 0-3, don't care for PIO4 */
itdev->want[unit][1] = pio_want[set_pio];
Expand All @@ -271,6 +271,7 @@ static int it821x_tunepio(ide_drive_t *drive, u8 set_pio)
it821x_clock_strategy(drive);
it821x_program(drive, itdev->pio[unit]);

set_drive_speed:
return ide_config_drive_speed(drive, XFER_PIO_0 + set_pio);
}

Expand Down Expand Up @@ -454,12 +455,12 @@ static int it821x_tune_chipset (ide_drive_t *drive, byte xferspeed)
default:
return 1;
}

return ide_config_drive_speed(drive, speed);
}

/* don't touch anything in the smart mode */
return 0;
/*
* In smart mode the clocking is done by the host controller
* snooping the mode we picked. The rest of it is not our problem
*/
return ide_config_drive_speed(drive, speed);
}

/**
Expand Down Expand Up @@ -558,10 +559,17 @@ static void __devinit it821x_fixups(ide_hwif_t *hwif)
if(idbits[129] != 1)
printk("(%dK stripe)", idbits[146]);
printk(".\n");
/* Now the core code will have wrongly decided no DMA
so we need to fix this */
hwif->dma_off_quietly(drive);
#ifdef CONFIG_IDEDMA_ONLYDISK
if (drive->media == ide_disk)
#endif
ide_set_dma(drive);
} else {
/* Non RAID volume. Fixups to stop the core code
doing unsupported things */
id->field_valid &= 3;
id->field_valid &= 1;
id->queue_depth = 0;
id->command_set_1 = 0;
id->command_set_2 &= 0xC400;
Expand All @@ -576,16 +584,6 @@ static void __devinit it821x_fixups(ide_hwif_t *hwif)
printk(KERN_INFO "%s: Performing identify fixups.\n",
drive->name);
}

/*
* Set MWDMA0 mode as enabled/support - just to tell
* IDE core that DMA is supported (it821x hardware
* takes care of DMA mode programming).
*/
if (id->capability & 1) {
id->dma_mword |= 0x0101;
drive->current_speed = XFER_MW_DMA_0;
}
}

}
Expand Down
Loading

0 comments on commit a416882

Please sign in to comment.