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: (51 commits)
  [libata] bump versions
  [libata] Trim trailing whitespace.
  [libata] sata_mv: Fix 50xx irq mask
  [libata] sata_mv: don't touch reserved bits in EDMA config register
  libata: Use new id_to_dma_mode function to tidy reporting in more drivers (minimally tested)
  pata_pcmcia: Fix oops in 2.6.21-rc1
  Add id_to_dma_mode function for printing DMA modes
  sata_promise: simplify port setup
  sata_promise: fix 20619 new EH merge error
  [libata] ACPI: remove needless ->qc_issue hook existence test
  sata_vsc: refactor vsc_sata_interrupt and hook up error handling
  sata_sil: ignore and clear spurious IRQs while executing commands by polling
  sata_mv: fix pci_enable_msi() error handling
  pata_amd: fix an obvious bug in cable detection
  [libata] ata_piix: remove duplicate PCI IDs
  sata_nv: complain on spurious completion notifiers
  libata: test major version in ata_id_is_sata()
  sata_nv: kill old private BMDMA helper functions
  libata: fix remaining ap->id
  ahci: consider SDB FIS containing spurious NCQ completions HSM violation (regenerated)
  ...
  • Loading branch information
Linus Torvalds committed Feb 26, 2007
2 parents 221dee2 + cb48cab commit 6f366c1
Show file tree
Hide file tree
Showing 53 changed files with 2,014 additions and 558 deletions.
9 changes: 9 additions & 0 deletions drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,15 @@ config PATA_IXP4XX_CF

If unsure, say N.

config PATA_SCC
tristate "Toshiba's Cell Reference Set IDE support"
depends on PCI && PPC_IBM_CELL_BLADE
help
This option enables support for the built-in IDE controller on
Toshiba Cell Reference Board.

If unsure, say N.

endif
endmenu

1 change: 1 addition & 0 deletions drivers/ata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ obj-$(CONFIG_PATA_WINBOND_VLB) += pata_winbond.o
obj-$(CONFIG_PATA_SIS) += pata_sis.o
obj-$(CONFIG_PATA_TRIFLEX) += pata_triflex.o
obj-$(CONFIG_PATA_IXP4XX_CF) += pata_ixp4xx_cf.o
obj-$(CONFIG_PATA_SCC) += pata_scc.o
obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o
# Should be last but one libata driver
obj-$(CONFIG_ATA_GENERIC) += ata_generic.o
Expand Down
30 changes: 15 additions & 15 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include <linux/libata.h>

#define DRV_NAME "ahci"
#define DRV_VERSION "2.0"
#define DRV_VERSION "2.1"


enum {
Expand Down Expand Up @@ -198,7 +198,6 @@ struct ahci_port_priv {
void *rx_fis;
dma_addr_t rx_fis_dma;
/* for NCQ spurious interrupt analysis */
int ncq_saw_spurious_sdb_cnt;
unsigned int ncq_saw_d2h:1;
unsigned int ncq_saw_dmas:1;
};
Expand Down Expand Up @@ -1160,23 +1159,24 @@ static void ahci_host_intr(struct ata_port *ap)
known_irq = 1;
}

if (status & PORT_IRQ_SDB_FIS &&
pp->ncq_saw_spurious_sdb_cnt < 10) {
if (status & PORT_IRQ_SDB_FIS) {
/* SDB FIS containing spurious completions might be
* dangerous, we need to know more about them. Print
* more of it.
*/
* dangerous, whine and fail commands with HSM
* violation. EH will turn off NCQ after several such
* failures.
*/
const __le32 *f = pp->rx_fis + RX_FIS_SDB;

ata_port_printk(ap, KERN_INFO, "Spurious SDB FIS during NCQ "
"issue=0x%x SAct=0x%x FIS=%08x:%08x%s\n",
readl(port_mmio + PORT_CMD_ISSUE),
readl(port_mmio + PORT_SCR_ACT),
le32_to_cpu(f[0]), le32_to_cpu(f[1]),
pp->ncq_saw_spurious_sdb_cnt < 10 ?
"" : ", shutting up");
ata_ehi_push_desc(ehi, "spurious completion during NCQ "
"issue=0x%x SAct=0x%x FIS=%08x:%08x",
readl(port_mmio + PORT_CMD_ISSUE),
readl(port_mmio + PORT_SCR_ACT),
le32_to_cpu(f[0]), le32_to_cpu(f[1]));

ehi->err_mask |= AC_ERR_HSM;
ehi->action |= ATA_EH_SOFTRESET;
ata_port_freeze(ap);

pp->ncq_saw_spurious_sdb_cnt++;
known_irq = 1;
}

Expand Down
6 changes: 3 additions & 3 deletions drivers/ata/ata_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <linux/libata.h>

#define DRV_NAME "ata_generic"
#define DRV_VERSION "0.2.10"
#define DRV_VERSION "0.2.11"

/*
* A generic parallel ATA driver using libata
Expand Down Expand Up @@ -90,10 +90,10 @@ static int generic_set_mode(struct ata_port *ap, struct ata_device **unused)
/* We do need the right mode information for DMA or PIO
and this comes from the current configuration flags */
if (dma_enabled & (1 << (5 + i))) {
dev->xfer_mode = XFER_MW_DMA_0;
dev->xfer_shift = ATA_SHIFT_MWDMA;
ata_id_to_dma_mode(dev, XFER_MW_DMA_0);
dev->flags &= ~ATA_DFLAG_PIO;
} else {
ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
dev->xfer_mode = XFER_PIO_0;
dev->xfer_shift = ATA_SHIFT_PIO;
dev->flags |= ATA_DFLAG_PIO;
Expand Down
4 changes: 1 addition & 3 deletions drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
#include <linux/libata.h>

#define DRV_NAME "ata_piix"
#define DRV_VERSION "2.00ac7"
#define DRV_VERSION "2.10"

enum {
PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
Expand Down Expand Up @@ -169,8 +169,6 @@ static const struct pci_device_id piix_pci_tbl[] = {
/* Intel PIIX4 for the 430TX/440BX/MX chipset: UDMA 33 */
/* Also PIIX4E (fn3 rev 2) and PIIX4M (fn3 rev 3) */
{ 0x8086, 0x7111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
{ 0x8086, 0x24db, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
{ 0x8086, 0x25a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* Intel PIIX4 */
{ 0x8086, 0x7199, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
/* Intel PIIX4 */
Expand Down
71 changes: 30 additions & 41 deletions drivers/ata/libata-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,8 @@ static int do_drive_get_GTF(struct ata_port *ap, int ix,
return 0;

if (ata_msg_probe(ap))
ata_dev_printk(atadev, KERN_DEBUG,
"%s: ENTER: ap->id: %d, port#: %d\n",
__FUNCTION__, ap->id, ap->port_no);
ata_dev_printk(atadev, KERN_DEBUG, "%s: ENTER: port#: %d\n",
__FUNCTION__, ap->port_no);

if (!ata_dev_enabled(atadev) || (ap->flags & ATA_FLAG_DISABLED)) {
if (ata_msg_probe(ap))
Expand Down Expand Up @@ -456,6 +455,9 @@ static void taskfile_load_raw(struct ata_port *ap,
struct ata_device *atadev,
const struct taskfile_array *gtf)
{
struct ata_taskfile tf;
unsigned int err;

if (ata_msg_probe(ap))
ata_dev_printk(atadev, KERN_DEBUG, "%s: (0x1f1-1f7): hex: "
"%02x %02x %02x %02x %02x %02x %02x\n",
Expand All @@ -468,35 +470,25 @@ static void taskfile_load_raw(struct ata_port *ap,
&& (gtf->tfa[6] == 0))
return;

if (ap->ops->qc_issue) {
struct ata_taskfile tf;
unsigned int err;

ata_tf_init(atadev, &tf);

/* convert gtf to tf */
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */
tf.protocol = atadev->class == ATA_DEV_ATAPI ?
ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA;
tf.feature = gtf->tfa[0]; /* 0x1f1 */
tf.nsect = gtf->tfa[1]; /* 0x1f2 */
tf.lbal = gtf->tfa[2]; /* 0x1f3 */
tf.lbam = gtf->tfa[3]; /* 0x1f4 */
tf.lbah = gtf->tfa[4]; /* 0x1f5 */
tf.device = gtf->tfa[5]; /* 0x1f6 */
tf.command = gtf->tfa[6]; /* 0x1f7 */

err = ata_exec_internal(atadev, &tf, NULL, DMA_NONE, NULL, 0);
if (err && ata_msg_probe(ap))
ata_dev_printk(atadev, KERN_ERR,
"%s: ata_exec_internal failed: %u\n",
__FUNCTION__, err);
} else
if (ata_msg_warn(ap))
ata_dev_printk(atadev, KERN_WARNING,
"%s: SATA driver is missing qc_issue function"
" entry points\n",
__FUNCTION__);
ata_tf_init(atadev, &tf);

/* convert gtf to tf */
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */
tf.protocol = atadev->class == ATA_DEV_ATAPI ?
ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA;
tf.feature = gtf->tfa[0]; /* 0x1f1 */
tf.nsect = gtf->tfa[1]; /* 0x1f2 */
tf.lbal = gtf->tfa[2]; /* 0x1f3 */
tf.lbam = gtf->tfa[3]; /* 0x1f4 */
tf.lbah = gtf->tfa[4]; /* 0x1f5 */
tf.device = gtf->tfa[5]; /* 0x1f6 */
tf.command = gtf->tfa[6]; /* 0x1f7 */

err = ata_exec_internal(atadev, &tf, NULL, DMA_NONE, NULL, 0);
if (err && ata_msg_probe(ap))
ata_dev_printk(atadev, KERN_ERR,
"%s: ata_exec_internal failed: %u\n",
__FUNCTION__, err);
}

/**
Expand All @@ -521,9 +513,8 @@ static int do_drive_set_taskfiles(struct ata_port *ap,
struct taskfile_array *gtf;

if (ata_msg_probe(ap))
ata_dev_printk(atadev, KERN_DEBUG,
"%s: ENTER: ap->id: %d, port#: %d\n",
__FUNCTION__, ap->id, ap->port_no);
ata_dev_printk(atadev, KERN_DEBUG, "%s: ENTER: port#: %d\n",
__FUNCTION__, ap->port_no);

if (noacpi || !(ap->cbl == ATA_CBL_SATA))
return 0;
Expand Down Expand Up @@ -627,9 +618,8 @@ int ata_acpi_push_id(struct ata_port *ap, unsigned int ix)
return 0;

if (ata_msg_probe(ap))
ata_dev_printk(atadev, KERN_DEBUG,
"%s: ap->id: %d, ix = %d, port#: %d\n",
__FUNCTION__, ap->id, ix, ap->port_no);
ata_dev_printk(atadev, KERN_DEBUG, "%s: ix = %d, port#: %d\n",
__FUNCTION__, ix, ap->port_no);

/* Don't continue if not a SATA device. */
if (!(ap->cbl == ATA_CBL_SATA)) {
Expand Down Expand Up @@ -685,9 +675,8 @@ int ata_acpi_push_id(struct ata_port *ap, unsigned int ix)
if (err < 0) {
if (ata_msg_probe(ap))
ata_dev_printk(atadev, KERN_DEBUG,
"ata%u(%u): %s _SDD error: status = 0x%x\n",
ap->id, ap->device->devno,
__FUNCTION__, status);
"%s _SDD error: status = 0x%x\n",
__FUNCTION__, status);
}

/* always return success */
Expand Down
Loading

0 comments on commit 6f366c1

Please sign in to comment.