Skip to content

Commit

Permalink
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: adjust libata to ignore errors after spinup
  ata_piix: add TECRA M7 to broken suspend list
  pata_hpt{37x|3x2n}: fix clock reporting (take 2)
  pata_hpt37x: actually clock HPT374 with 50 MHz DPLL (take 2)
  pata_artop: fix UDMA5 for AEC6280[R] and UDMA6 for AEC6880[R]
  ata_piix: update map 10b for ich8m
  sata_mv: PCI IDs for Hightpoint RocketRaid 1740/1742
  [libata] pata_isapnp: replace missing module device table
  • Loading branch information
Linus Torvalds committed Aug 18, 2007
2 parents b2d597c + fb0582f commit 0894910
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 21 deletions.
9 changes: 8 additions & 1 deletion drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ static const struct piix_map_db ich8_map_db = {
/* PM PS SM SS MAP */
{ P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */
{ RV, RV, RV, RV },
{ IDE, IDE, NA, NA }, /* 10b (IDE mode) */
{ P0, P2, IDE, IDE }, /* 10b (IDE mode) */
{ RV, RV, RV, RV },
},
};
Expand Down Expand Up @@ -900,6 +900,13 @@ static int piix_broken_suspend(void)
DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"),
},
},
{
.ident = "TECRA M7",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M7"),
},
},
{
.ident = "Satellite U205",
.matches = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
tf.protocol = ATA_PROT_NODATA;
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
if (err_mask) {
if (err_mask && id[2] != 0x738c) {
rc = -EIO;
reason = "SPINUP failed";
goto err_out;
Expand Down
19 changes: 14 additions & 5 deletions drivers/ata/pata_artop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* pata_artop.c - ARTOP ATA controller driver
*
* (C) 2006 Red Hat <alan@redhat.com>
* (C) 2007 Bartlomiej Zolnierkiewicz
*
* Based in part on drivers/ide/pci/aec62xx.c
* Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
Expand All @@ -28,7 +29,7 @@
#include <linux/ata.h>

#define DRV_NAME "pata_artop"
#define DRV_VERSION "0.4.3"
#define DRV_VERSION "0.4.4"

/*
* The ARTOP has 33 Mhz and "over clocked" timing tables. Until we
Expand Down Expand Up @@ -430,14 +431,22 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
.udma_mask = ATA_UDMA4,
.port_ops = &artop6260_ops,
};
static const struct ata_port_info info_626x_fast = {
static const struct ata_port_info info_628x = {
.sht = &artop_sht,
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA5,
.port_ops = &artop6260_ops,
};
static const struct ata_port_info info_628x_fast = {
.sht = &artop_sht,
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
.port_ops = &artop6260_ops,
};
const struct ata_port_info *ppi[] = { NULL, NULL };

if (!printed_version++)
Expand All @@ -455,13 +464,13 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
}
else if (id->driver_data == 1) /* 6260 */
ppi[0] = &info_626x;
else if (id->driver_data == 2) { /* 6260 or 6260 + fast */
else if (id->driver_data == 2) { /* 6280 or 6280 + fast */
unsigned long io = pci_resource_start(pdev, 4);
u8 reg;

ppi[0] = &info_626x;
ppi[0] = &info_628x;
if (inb(io) & 0x10)
ppi[0] = &info_626x_fast;
ppi[0] = &info_628x_fast;
/* Mac systems come up with some registers not set as we
will need them */

Expand Down
20 changes: 9 additions & 11 deletions drivers/ata/pata_hpt37x.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
* Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org>
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
* Portions Copyright (C) 2003 Red Hat Inc
* Portions Copyright (C) 2005-2006 MontaVista Software, Inc.
* Portions Copyright (C) 2005-2007 MontaVista Software, Inc.
*
* TODO
* PLL mode
* Look into engine reset on timeout errors. Should not be
* required.
* Look into engine reset on timeout errors. Should not be required.
*/

#include <linux/kernel.h>
Expand All @@ -26,7 +24,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_hpt37x"
#define DRV_VERSION "0.6.7"
#define DRV_VERSION "0.6.9"

struct hpt_clock {
u8 xfer_speed;
Expand Down Expand Up @@ -1092,9 +1090,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
int dpll, adjust;

/* Compute DPLL */
dpll = 2;
if (port->udma_mask & 0xE0)
dpll = 3;
dpll = (port->udma_mask & 0xC0) ? 3 : 2;

f_low = (MHz[clock_slot] * 48) / MHz[dpll];
f_high = f_low + 2;
Expand All @@ -1116,15 +1112,16 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low | 0x100);
}
if (adjust == 8) {
printk(KERN_WARNING "hpt37x: DPLL did not stabilize.\n");
printk(KERN_ERR "pata_hpt37x: DPLL did not stabilize!\n");
return -ENODEV;
}
if (dpll == 3)
private_data = (void *)hpt37x_timings_66;
else
private_data = (void *)hpt37x_timings_50;

printk(KERN_INFO "hpt37x: Bus clock %dMHz, using DPLL.\n", MHz[dpll]);
printk(KERN_INFO "pata_hpt37x: bus clock %dMHz, using %dMHz DPLL.\n",
MHz[clock_slot], MHz[dpll]);
} else {
private_data = (void *)chip_table->clocks[clock_slot];
/*
Expand All @@ -1137,7 +1134,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
port = &info_hpt370_33;
if (clock_slot < 2 && port == &info_hpt370a)
port = &info_hpt370a_33;
printk(KERN_INFO "hpt37x: %s: Bus clock %dMHz.\n", chip_table->name, MHz[clock_slot]);
printk(KERN_INFO "pata_hpt37x: %s using %dMHz bus clock.\n",
chip_table->name, MHz[clock_slot]);
}

/* Now kick off ATA set up */
Expand Down
8 changes: 5 additions & 3 deletions drivers/ata/pata_hpt3x2n.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org>
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
* Portions Copyright (C) 2003 Red Hat Inc
* Portions Copyright (C) 2005-2006 MontaVista Software, Inc.
* Portions Copyright (C) 2005-2007 MontaVista Software, Inc.
*
*
* TODO
Expand All @@ -25,7 +25,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_hpt3x2n"
#define DRV_VERSION "0.3.3"
#define DRV_VERSION "0.3.4"

enum {
HPT_PCI_FAST = (1 << 31),
Expand Down Expand Up @@ -579,10 +579,12 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low);
}
if (adjust == 8) {
printk(KERN_WARNING "hpt3x2n: DPLL did not stabilize.\n");
printk(KERN_ERR "pata_hpt3x2n: DPLL did not stabilize!\n");
return -ENODEV;
}

printk(KERN_INFO "pata_hpt37x: bus clock %dMHz, using 66MHz DPLL.\n",
pci_mhz);
/* Set our private data up. We only need a few flags so we use
it directly */
port.private_data = NULL;
Expand Down
2 changes: 2 additions & 0 deletions drivers/ata/pata_isapnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ static struct pnp_device_id isapnp_devices[] = {
{.id = ""}
};

MODULE_DEVICE_TABLE(pnp, isapnp_devices);

static struct pnp_driver isapnp_driver = {
.name = DRV_NAME,
.id_table = isapnp_devices,
Expand Down
3 changes: 3 additions & 0 deletions drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ static const struct pci_device_id mv_pci_tbl[] = {
{ PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
{ PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
/* RocketRAID 1740/174x have different identifiers */
{ PCI_VDEVICE(TTI, 0x1740), chip_508x },
{ PCI_VDEVICE(TTI, 0x1742), chip_508x },

{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
Expand Down

0 comments on commit 0894910

Please sign in to comment.