forked from luck/tmp_suning_uos_patched
Merge branch 'libata/for-3.10-fixes' into libata/for-3.11
libata/for-3.10-fixes never got submitted during v3.10 cycle. Merge
it into for-3.11 so that it can be routed together with other changes
scheduled for v3.11.
Three trivial conflicts in drivers/ata/sata_rcar.c. All are caused by
1b20f6a9ad
("sata_rcar: add 'base' local variable to some functions")
conflicting with logic updates in for-3.10-fixes. The offending
commit simply adds local variable @base on functions which
dereferences sata_rcar_priv->base multiple times. The resolutions are
trivial - applying s/priv->base/base/ in the conflicting logic
updates.
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
commit
5a0a6a4f17
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* acard-ahci.c - ACard AHCI SATA support
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* ahci.c - AHCI SATA support
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
@ -291,6 +291,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
|||
{ PCI_VDEVICE(INTEL, 0x8d64), board_ahci }, /* Wellsburg RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x8d66), board_ahci }, /* Wellsburg RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x8d6e), board_ahci }, /* Wellsburg RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x23a3), board_ahci }, /* Coleto Creek AHCI */
|
||||
|
||||
/* JMicron 360/1/3/5/6, match class to avoid IDE function */
|
||||
{ PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
|
||||
|
@ -423,6 +424,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
|||
.driver_data = board_ahci_yes_fbs }, /* 88se9125 */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a),
|
||||
.driver_data = board_ahci_yes_fbs }, /* 88se9172 */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172),
|
||||
.driver_data = board_ahci_yes_fbs }, /* 88se9172 */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9192),
|
||||
.driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* ahci.h - Common AHCI SATA definitions and declarations
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* ata_piix.c - Intel PATA/SATA controllers
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
@ -151,6 +151,7 @@ enum piix_controller_ids {
|
|||
piix_pata_vmw, /* PIIX4 for VMware, spurious DMA_ERR */
|
||||
ich8_sata_snb,
|
||||
ich8_2port_sata_snb,
|
||||
ich8_2port_sata_byt,
|
||||
};
|
||||
|
||||
struct piix_map_db {
|
||||
|
@ -334,6 +335,11 @@ static const struct pci_device_id piix_pci_tbl[] = {
|
|||
{ 0x8086, 0x8d60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
|
||||
/* SATA Controller IDE (Wellsburg) */
|
||||
{ 0x8086, 0x8d68, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
|
||||
/* SATA Controller IDE (BayTrail) */
|
||||
{ 0x8086, 0x0F20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt },
|
||||
{ 0x8086, 0x0F21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt },
|
||||
/* SATA Controller IDE (Coleto Creek) */
|
||||
{ 0x8086, 0x23a6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
|
||||
|
||||
{ } /* terminate list */
|
||||
};
|
||||
|
@ -441,6 +447,7 @@ static const struct piix_map_db *piix_map_db_table[] = {
|
|||
[tolapai_sata] = &tolapai_map_db,
|
||||
[ich8_sata_snb] = &ich8_map_db,
|
||||
[ich8_2port_sata_snb] = &ich8_2port_map_db,
|
||||
[ich8_2port_sata_byt] = &ich8_2port_map_db,
|
||||
};
|
||||
|
||||
static struct pci_bits piix_enable_bits[] = {
|
||||
|
@ -1254,6 +1261,16 @@ static struct ata_port_info piix_port_info[] = {
|
|||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &piix_sata_ops,
|
||||
},
|
||||
|
||||
[ich8_2port_sata_byt] =
|
||||
{
|
||||
.flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR | PIIX_FLAG_PIO16,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.mwdma_mask = ATA_MWDMA2,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &piix_sata_ops,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
#define AHCI_PCI_BAR 5
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libahci.c - Common AHCI SATA low-level routines
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
@ -1561,8 +1561,7 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
|
|||
u32 fbs = readl(port_mmio + PORT_FBS);
|
||||
int pmp = fbs >> PORT_FBS_DWE_OFFSET;
|
||||
|
||||
if ((fbs & PORT_FBS_SDE) && (pmp < ap->nr_pmp_links) &&
|
||||
ata_link_online(&ap->pmp_link[pmp])) {
|
||||
if ((fbs & PORT_FBS_SDE) && (pmp < ap->nr_pmp_links)) {
|
||||
link = &ap->pmp_link[pmp];
|
||||
fbs_need_dec = true;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libata-core.c - helper library for ATA
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
@ -1602,6 +1602,12 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
|
|||
qc->tf = *tf;
|
||||
if (cdb)
|
||||
memcpy(qc->cdb, cdb, ATAPI_CDB_LEN);
|
||||
|
||||
/* some SATA bridges need us to indicate data xfer direction */
|
||||
if (tf->protocol == ATAPI_PROT_DMA && (dev->flags & ATA_DFLAG_DMADIR) &&
|
||||
dma_dir == DMA_FROM_DEVICE)
|
||||
qc->tf.feature |= ATAPI_DMADIR;
|
||||
|
||||
qc->flags |= ATA_QCFLAG_RESULT_TF;
|
||||
qc->dma_dir = dma_dir;
|
||||
if (dma_dir != DMA_NONE) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libata-eh.c - libata error handling
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
|
|
@ -389,9 +389,13 @@ static void sata_pmp_quirks(struct ata_port *ap)
|
|||
/* link reports offline after LPM */
|
||||
link->flags |= ATA_LFLAG_NO_LPM;
|
||||
|
||||
/* Class code report is unreliable. */
|
||||
/*
|
||||
* Class code report is unreliable and SRST times
|
||||
* out under certain configurations.
|
||||
*/
|
||||
if (link->pmp < 5)
|
||||
link->flags |= ATA_LFLAG_ASSUME_ATA;
|
||||
link->flags |= ATA_LFLAG_NO_SRST |
|
||||
ATA_LFLAG_ASSUME_ATA;
|
||||
|
||||
/* port 5 is for SEMB device and it doesn't like SRST */
|
||||
if (link->pmp == 5)
|
||||
|
@ -399,20 +403,17 @@ static void sata_pmp_quirks(struct ata_port *ap)
|
|||
ATA_LFLAG_ASSUME_SEMB;
|
||||
}
|
||||
} else if (vendor == 0x1095 && devid == 0x4723) {
|
||||
/* sil4723 quirks */
|
||||
ata_for_each_link(link, ap, EDGE) {
|
||||
/* link reports offline after LPM */
|
||||
link->flags |= ATA_LFLAG_NO_LPM;
|
||||
|
||||
/* class code report is unreliable */
|
||||
if (link->pmp < 2)
|
||||
link->flags |= ATA_LFLAG_ASSUME_ATA;
|
||||
|
||||
/* the config device at port 2 locks up on SRST */
|
||||
if (link->pmp == 2)
|
||||
link->flags |= ATA_LFLAG_NO_SRST |
|
||||
ATA_LFLAG_ASSUME_ATA;
|
||||
}
|
||||
/*
|
||||
* sil4723 quirks
|
||||
*
|
||||
* Link reports offline after LPM. Class code report is
|
||||
* unreliable. SIMG PMPs never got SRST reliable and the
|
||||
* config device at port 2 locks up on SRST.
|
||||
*/
|
||||
ata_for_each_link(link, ap, EDGE)
|
||||
link->flags |= ATA_LFLAG_NO_LPM |
|
||||
ATA_LFLAG_NO_SRST |
|
||||
ATA_LFLAG_ASSUME_ATA;
|
||||
} else if (vendor == 0x1095 && devid == 0x4726) {
|
||||
/* sil4726 quirks */
|
||||
ata_for_each_link(link, ap, EDGE) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libata-scsi.c - helper library for ATA
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libata-sff.c - helper library for PCI IDE BMDMA
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* pdc_adma.c - Pacific Digital Corporation ADMA
|
||||
*
|
||||
* Maintained by: Mark Lord <mlord@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
*
|
||||
* Copyright 2005 Mark Lord
|
||||
*
|
||||
|
|
|
@ -339,10 +339,26 @@ static int highbank_initialize_phys(struct device *dev, void __iomem *addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The Calxeda SATA phy intermittently fails to bring up a link with Gen3
|
||||
* Retrying the phy hard reset can work around the issue, but the drive
|
||||
* may fail again. In less than 150 out of 15000 test runs, it took more
|
||||
* than 10 tries for the link to be established (but never more than 35).
|
||||
* Triple the maximum observed retry count to provide plenty of margin for
|
||||
* rare events and to guarantee that the link is established.
|
||||
*
|
||||
* Also, the default 2 second time-out on a failed drive is too long in
|
||||
* this situation. The uboot implementation of the same driver function
|
||||
* uses a much shorter time-out period and never experiences a time out
|
||||
* issue. Reducing the time-out to 500ms improves the responsiveness.
|
||||
* The other timing constants were kept the same as the stock AHCI driver.
|
||||
* This change was also tested 15000 times on 24 drives and none of them
|
||||
* experienced a time out.
|
||||
*/
|
||||
static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class,
|
||||
unsigned long deadline)
|
||||
{
|
||||
const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context);
|
||||
static const unsigned long timing[] = { 5, 100, 500};
|
||||
struct ata_port *ap = link->ap;
|
||||
struct ahci_port_priv *pp = ap->private_data;
|
||||
u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
|
||||
|
@ -350,7 +366,7 @@ static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class,
|
|||
bool online;
|
||||
u32 sstatus;
|
||||
int rc;
|
||||
int retry = 10;
|
||||
int retry = 100;
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* sata_promise.c - Promise SATA
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Mikael Pettersson <mikpe@it.uu.se>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
|
|
|
@ -186,7 +186,7 @@ static void sata_rcar_thaw(struct ata_port *ap)
|
|||
void __iomem *base = priv->base;
|
||||
|
||||
/* ack */
|
||||
iowrite32(~SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG);
|
||||
iowrite32(~(u32)SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG);
|
||||
|
||||
ata_sff_thaw(ap);
|
||||
|
||||
|
@ -545,6 +545,7 @@ static void sata_rcar_bmdma_start(struct ata_queued_cmd *qc)
|
|||
|
||||
/* start host DMA transaction */
|
||||
dmactl = ioread32(base + ATAPI_CONTROL1_REG);
|
||||
dmactl &= ~ATAPI_CONTROL1_STOP;
|
||||
dmactl |= ATAPI_CONTROL1_START;
|
||||
iowrite32(dmactl, base + ATAPI_CONTROL1_REG);
|
||||
}
|
||||
|
@ -622,17 +623,16 @@ static struct ata_port_operations sata_rcar_port_ops = {
|
|||
.bmdma_status = sata_rcar_bmdma_status,
|
||||
};
|
||||
|
||||
static int sata_rcar_serr_interrupt(struct ata_port *ap)
|
||||
static void sata_rcar_serr_interrupt(struct ata_port *ap)
|
||||
{
|
||||
struct sata_rcar_priv *priv = ap->host->private_data;
|
||||
struct ata_eh_info *ehi = &ap->link.eh_info;
|
||||
int freeze = 0;
|
||||
int handled = 0;
|
||||
u32 serror;
|
||||
|
||||
serror = ioread32(priv->base + SCRSERR_REG);
|
||||
if (!serror)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
DPRINTK("SError @host_intr: 0x%x\n", serror);
|
||||
|
||||
|
@ -645,7 +645,6 @@ static int sata_rcar_serr_interrupt(struct ata_port *ap)
|
|||
ata_ehi_push_desc(ehi, "%s", "hotplug");
|
||||
|
||||
freeze = serror & SERR_COMM_WAKE ? 0 : 1;
|
||||
handled = 1;
|
||||
}
|
||||
|
||||
/* freeze or abort */
|
||||
|
@ -653,11 +652,9 @@ static int sata_rcar_serr_interrupt(struct ata_port *ap)
|
|||
ata_port_freeze(ap);
|
||||
else
|
||||
ata_port_abort(ap);
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
static int sata_rcar_ata_interrupt(struct ata_port *ap)
|
||||
static void sata_rcar_ata_interrupt(struct ata_port *ap)
|
||||
{
|
||||
struct ata_queued_cmd *qc;
|
||||
int handled = 0;
|
||||
|
@ -666,7 +663,9 @@ static int sata_rcar_ata_interrupt(struct ata_port *ap)
|
|||
if (qc)
|
||||
handled |= ata_bmdma_port_intr(ap, qc);
|
||||
|
||||
return handled;
|
||||
/* be sure to clear ATA interrupt */
|
||||
if (!handled)
|
||||
sata_rcar_check_status(ap);
|
||||
}
|
||||
|
||||
static irqreturn_t sata_rcar_interrupt(int irq, void *dev_instance)
|
||||
|
@ -682,19 +681,21 @@ static irqreturn_t sata_rcar_interrupt(int irq, void *dev_instance)
|
|||
spin_lock_irqsave(&host->lock, flags);
|
||||
|
||||
sataintstat = ioread32(base + SATAINTSTAT_REG);
|
||||
sataintstat &= SATA_RCAR_INT_MASK;
|
||||
if (!sataintstat)
|
||||
goto done;
|
||||
/* ack */
|
||||
iowrite32(sataintstat & ~SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG);
|
||||
iowrite32(~sataintstat & 0x7ff, base + SATAINTSTAT_REG);
|
||||
|
||||
ap = host->ports[0];
|
||||
|
||||
if (sataintstat & SATAINTSTAT_ATA)
|
||||
handled |= sata_rcar_ata_interrupt(ap);
|
||||
sata_rcar_ata_interrupt(ap);
|
||||
|
||||
if (sataintstat & SATAINTSTAT_SERR)
|
||||
handled |= sata_rcar_serr_interrupt(ap);
|
||||
sata_rcar_serr_interrupt(ap);
|
||||
|
||||
handled = 1;
|
||||
done:
|
||||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* sata_sil.c - Silicon Image SATA
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* sata_sx4.c - Promise SATA
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* sata_via.c - VIA Serial ATA controllers
|
||||
*
|
||||
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
|
||||
* Maintained by: Tejun Heo <tj@kernel.org>
|
||||
* Please ALWAYS copy linux-ide@vger.kernel.org
|
||||
* on emails.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user