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] Don't use old-EH ->eng_timeout() hook when not needed
  [libata] sata_mv: fix oops by filling in missing hook
  [libata] One more s/15/ATA_SECONDARY_IRQ/ substitution
  [libata] pata_serverworks: fill in ->irq_clear hook
  [PATCH] pata_serverworks: correct PCI ID in cable detection table
  [PATCH] libata-sff: use our IRQ defines
  [PATCH] libata-eh: Remove layering violation and duplication when handling absent ports
  [PATCH] libata: tighten rules for legacy dependancies
  [PATCH] libata: refuse to register IRQless ports
  • Loading branch information
Linus Torvalds committed Sep 27, 2006
2 parents 1f9bd4c + bda3028 commit ac7f6b5
Show file tree
Hide file tree
Showing 43 changed files with 138 additions and 188 deletions.
3 changes: 2 additions & 1 deletion drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ config PATA_JMICRON

config PATA_LEGACY
tristate "Legacy ISA PATA support (Experimental)"
depends on PCI && EXPERIMENTAL
depends on ISA && EXPERIMENTAL
help
This option enables support for ISA/VLB bus legacy PATA
ports and allows them to be accessed via the new ATA layer.
Expand Down Expand Up @@ -400,6 +400,7 @@ config PATA_PDC_OLD

config PATA_QDI
tristate "QDI VLB PATA support"
depends on ISA
help
Support for QDI 6500 and 6580 PATA controllers on VESA local bus.

Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/ata_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static struct ata_port_operations generic_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.irq_handler = ata_interrupt,
.irq_clear = ata_bmdma_irq_clear,

Expand Down
8 changes: 3 additions & 5 deletions drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,9 @@ static int piix_pata_prereset(struct ata_port *ap)
{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);

if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no])) {
ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n");
ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
return 0;
}
if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no]))
return -ENOENT;

ap->cbl = ATA_CBL_PATA40;
return ata_std_prereset(ap);
}
Expand Down
5 changes: 5 additions & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5453,6 +5453,11 @@ int ata_device_add(const struct ata_probe_ent *ent)
int rc;

DPRINTK("ENTER\n");

if (ent->irq == 0) {
dev_printk(KERN_ERR, dev, "is not available: No interrupt assigned.\n");
return 0;
}
/* alloc a container for our list of ATA ports (buses) */
host = kzalloc(sizeof(struct ata_host) +
(ent->n_ports * sizeof(void *)), GFP_KERNEL);
Expand Down
6 changes: 5 additions & 1 deletion drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,11 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
if (prereset) {
rc = prereset(ap);
if (rc) {
ata_port_printk(ap, KERN_ERR,
if (rc == -ENOENT) {
ata_port_printk(ap, KERN_DEBUG, "port disabled. ignoring.\n");
ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
} else
ata_port_printk(ap, KERN_ERR,
"prereset failed (errno=%d)\n", rc);
return rc;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev,
probe_ent->private_data = port[0]->private_data;

if (port_mask & ATA_PORT_PRIMARY) {
probe_ent->irq = 14;
probe_ent->irq = ATA_PRIMARY_IRQ;
probe_ent->port[0].cmd_addr = ATA_PRIMARY_CMD;
probe_ent->port[0].altstatus_addr =
probe_ent->port[0].ctl_addr = ATA_PRIMARY_CTL;
Expand All @@ -896,9 +896,9 @@ static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev,

if (port_mask & ATA_PORT_SECONDARY) {
if (probe_ent->irq)
probe_ent->irq2 = 15;
probe_ent->irq2 = ATA_SECONDARY_IRQ;
else
probe_ent->irq = 15;
probe_ent->irq = ATA_SECONDARY_IRQ;
probe_ent->port[1].cmd_addr = ATA_SECONDARY_CMD;
probe_ent->port[1].altstatus_addr =
probe_ent->port[1].ctl_addr = ATA_SECONDARY_CTL;
Expand Down
8 changes: 4 additions & 4 deletions drivers/ata/pata_ali.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ static struct ata_port_operations ali_early_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -410,7 +410,7 @@ static struct ata_port_operations ali_20_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -448,7 +448,7 @@ static struct ata_port_operations ali_c2_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -485,7 +485,7 @@ static struct ata_port_operations ali_c5_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down
37 changes: 14 additions & 23 deletions drivers/ata/pata_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_amd"
#define DRV_VERSION "0.2.3"
#define DRV_VERSION "0.2.4"

/**
* timing_setup - shared timing computation and load
Expand Down Expand Up @@ -137,11 +137,8 @@ static int amd_pre_reset(struct ata_port *ap)
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u8 ata66;

if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no])) {
ata_port_disable(ap);
printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
return 0;
}
if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no]))
return -ENOENT;

pci_read_config_byte(pdev, 0x42, &ata66);
if (ata66 & bitmask[ap->port_no])
Expand All @@ -167,11 +164,9 @@ static int amd_early_pre_reset(struct ata_port *ap)
{ 0x40, 1, 0x01, 0x01 }
};

if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no])) {
ata_port_disable(ap);
printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
return 0;
}
if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no]))
return -ENOENT;

/* No host side cable detection */
ap->cbl = ATA_CBL_PATA80;
return ata_std_prereset(ap);
Expand Down Expand Up @@ -262,12 +257,8 @@ static int nv_pre_reset(struct ata_port *ap) {
u8 ata66;
u16 udma;

if (!pci_test_config_bits(pdev, &nv_enable_bits[ap->port_no])) {
ata_port_disable(ap);
printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
return 0;
}

if (!pci_test_config_bits(pdev, &nv_enable_bits[ap->port_no]))
return -ENOENT;

pci_read_config_byte(pdev, 0x52, &ata66);
if (ata66 & bitmask[ap->port_no])
Expand Down Expand Up @@ -368,7 +359,7 @@ static struct ata_port_operations amd33_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -402,7 +393,7 @@ static struct ata_port_operations amd66_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -436,7 +427,7 @@ static struct ata_port_operations amd100_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -470,7 +461,7 @@ static struct ata_port_operations amd133_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -504,7 +495,7 @@ static struct ata_port_operations nv100_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -538,7 +529,7 @@ static struct ata_port_operations nv133_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down
22 changes: 8 additions & 14 deletions drivers/ata/pata_artop.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <linux/ata.h>

#define DRV_NAME "pata_artop"
#define DRV_VERSION "0.4.1"
#define DRV_VERSION "0.4.2"

/*
* The ARTOP has 33 Mhz and "over clocked" timing tables. Until we
Expand All @@ -47,11 +47,9 @@ static int artop6210_pre_reset(struct ata_port *ap)
{ 0x4AU, 1U, 0x04UL, 0x04UL }, /* port 1 */
};

if (!pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) {
ata_port_disable(ap);
printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
return 0;
}
if (!pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no]))
return -ENOENT;

ap->cbl = ATA_CBL_PATA40;
return ata_std_prereset(ap);
}
Expand Down Expand Up @@ -90,11 +88,9 @@ static int artop6260_pre_reset(struct ata_port *ap)
u8 tmp;

/* Odd numbered device ids are the units with enable bits (the -R cards) */
if (pdev->device % 1 && !pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) {
ata_port_disable(ap);
printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
return 0;
}
if (pdev->device % 1 && !pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no]))
return -ENOENT;

pci_read_config_byte(pdev, 0x49, &tmp);
if (tmp & (1 >> ap->port_no))
ap->cbl = ATA_CBL_PATA40;
Expand Down Expand Up @@ -344,7 +340,7 @@ static const struct ata_port_operations artop6210_ops = {
.bmdma_status = ata_bmdma_status,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -379,8 +375,6 @@ static const struct ata_port_operations artop6260_ops = {
.qc_issue = ata_qc_issue_prot,
.data_xfer = ata_pio_data_xfer,

.eng_timeout = ata_eng_timeout,

.irq_handler = ata_interrupt,
.irq_clear = ata_bmdma_irq_clear,

Expand Down
12 changes: 5 additions & 7 deletions drivers/ata/pata_atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_atiixp"
#define DRV_VERSION "0.4.2"
#define DRV_VERSION "0.4.3"

enum {
ATIIXP_IDE_PIO_TIMING = 0x40,
Expand All @@ -41,11 +41,9 @@ static int atiixp_pre_reset(struct ata_port *ap)
{ 0x48, 1, 0x08, 0x00 }
};

if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no])) {
ata_port_disable(ap);
printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
return 0;
}
if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no]))
return -ENOENT;

ap->cbl = ATA_CBL_PATA80;
return ata_std_prereset(ap);
}
Expand Down Expand Up @@ -244,7 +242,7 @@ static struct ata_port_operations atiixp_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down
6 changes: 3 additions & 3 deletions drivers/ata/pata_cmd64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ static struct ata_port_operations cmd64x_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -335,7 +335,7 @@ static struct ata_port_operations cmd646r1_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down Expand Up @@ -369,7 +369,7 @@ static struct ata_port_operations cmd648_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down
2 changes: 0 additions & 2 deletions drivers/ata/pata_cs5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ static struct ata_port_operations cs5520_port_ops = {
.qc_issue = ata_qc_issue_prot,
.data_xfer = ata_pio_data_xfer,

.eng_timeout = ata_eng_timeout,

.irq_handler = ata_interrupt,
.irq_clear = ata_bmdma_irq_clear,

Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/pata_cs5530.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static struct ata_port_operations cs5530_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = cs5530_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/pata_cs5535.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static struct ata_port_operations cs5535_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/pata_cypress.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static struct ata_port_operations cy82c693_port_ops = {

.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,
.eng_timeout = ata_eng_timeout,

.data_xfer = ata_pio_data_xfer,

.irq_handler = ata_interrupt,
Expand Down
Loading

0 comments on commit ac7f6b5

Please sign in to comment.