* [PATCH 01/12] ata/sata_fsl: Update for ata_link introduction
@ 2007-10-31 11:27 Li Yang
2007-10-31 11:27 ` [PATCH 02/12] ata/sata_fsl: Remove deprecated hooks Li Yang
2007-11-03 12:48 ` [PATCH 01/12] ata/sata_fsl: Update for ata_link introduction Jeff Garzik
0 siblings, 2 replies; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:27 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Li Yang
Update the driver to use the newly added ata_link structure.
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 31 ++++++++++++++++++-------------
1 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index b4c37b9..8a8ce9d 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -34,7 +34,8 @@ enum {
SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
- ATA_FLAG_NCQ | ATA_FLAG_SKIP_D2H_BSY),
+ ATA_FLAG_NCQ),
+ SATA_FSL_HOST_LFLAGS = ATA_LFLAG_SKIP_D2H_BSY,
SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH,
SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */
@@ -728,9 +729,10 @@ static unsigned int sata_fsl_dev_classify(struct ata_port *ap)
return ata_dev_classify(&tf);
}
-static int sata_fsl_softreset(struct ata_port *ap, unsigned int *class,
+static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
unsigned long deadline)
{
+ struct ata_port *ap = link->ap;
struct sata_fsl_port_priv *pp = ap->private_data;
struct sata_fsl_host_priv *host_priv = ap->host->private_data;
void __iomem *hcr_base = host_priv->hcr_base;
@@ -811,7 +813,7 @@ try_offline_again:
*/
temp = ata_wait_register(hcr_base + HSTATUS, 0xFF, 0, 1, 500);
- if ((!(temp & 0x10)) || ata_port_offline(ap)) {
+ if ((!(temp & 0x10)) || ata_link_offline(link)) {
ata_port_printk(ap, KERN_WARNING,
"No Device OR PHYRDY change,Hstatus = 0x%x\n",
ioread32(hcr_base + HSTATUS));
@@ -842,12 +844,12 @@ try_offline_again:
* reached here, we can send a command to the target device
*/
- if (ap->sactive)
+ if (link->sactive)
goto skip_srst_do_ncq_error_handling;
DPRINTK("Sending SRST/device reset\n");
- ata_tf_init(ap->device, &tf);
+ ata_tf_init(link->device, &tf);
cfis = (u8 *) & pp->cmdentry->cfis;
/* device reset/SRST is a control register update FIS, uses tag0 */
@@ -919,7 +921,7 @@ skip_srst_do_ncq_error_handling:
VPRINTK("Sending read log ext(10h) command\n");
memset(&qc, 0, sizeof(struct ata_queued_cmd));
- ata_tf_init(ap->device, &tf);
+ ata_tf_init(link->device, &tf);
tf.command = ATA_CMD_READ_LOG_EXT;
tf.lbal = ATA_LOG_SATA_NCQ;
@@ -931,7 +933,7 @@ skip_srst_do_ncq_error_handling:
qc.tag = ATA_TAG_INTERNAL;
qc.scsicmd = NULL;
qc.ap = ap;
- qc.dev = ap->device;
+ qc.dev = link->device;
qc.tf = tf;
qc.flags |= ATA_QCFLAG_RESULT_TF;
@@ -981,7 +983,7 @@ skip_srst_do_ncq_error_handling:
*class = ATA_DEV_NONE;
/* Verify if SStatus indicates device presence */
- if (ata_port_online(ap)) {
+ if (ata_link_online(link)) {
/*
* if we are here, device presence has been detected,
* 1st D2H FIS would have been received, but sfis in
@@ -1042,7 +1044,8 @@ static void sata_fsl_irq_clear(struct ata_port *ap)
static void sata_fsl_error_intr(struct ata_port *ap)
{
- struct ata_eh_info *ehi = &ap->eh_info;
+ struct ata_link *link = &ap->link;
+ struct ata_eh_info *ehi = &link->eh_info;
struct sata_fsl_host_priv *host_priv = ap->host->private_data;
void __iomem *hcr_base = host_priv->hcr_base;
u32 hstatus, dereg, cereg = 0, SError = 0;
@@ -1111,7 +1114,7 @@ static void sata_fsl_error_intr(struct ata_port *ap)
}
/* record error info */
- qc = ata_qc_from_tag(ap, ap->active_tag);
+ qc = ata_qc_from_tag(ap, link->active_tag);
if (qc) {
sata_fsl_cache_taskfile_from_d2h_fis(qc, qc->ap);
@@ -1139,6 +1142,7 @@ static void sata_fsl_qc_complete(struct ata_queued_cmd *qc)
static void sata_fsl_host_intr(struct ata_port *ap)
{
+ struct ata_link *link = &ap->link;
struct sata_fsl_host_priv *host_priv = ap->host->private_data;
void __iomem *hcr_base = host_priv->hcr_base;
u32 hstatus, qc_active = 0;
@@ -1161,7 +1165,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
return;
}
- if (ap->sactive) { /* only true for NCQ commands */
+ if (link->sactive) { /* only true for NCQ commands */
int i;
/* Read command completed register */
qc_active = ioread32(hcr_base + CC);
@@ -1190,10 +1194,10 @@ static void sata_fsl_host_intr(struct ata_port *ap)
} else if (ap->qc_active) {
iowrite32(1, hcr_base + CC);
- qc = ata_qc_from_tag(ap, ap->active_tag);
+ qc = ata_qc_from_tag(ap, link->active_tag);
DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n",
- ap->active_tag, ioread32(hcr_base + CC));
+ link->active_tag, ioread32(hcr_base + CC));
if (qc) {
sata_fsl_qc_complete(qc);
@@ -1348,6 +1352,7 @@ static const struct ata_port_operations sata_fsl_ops = {
static const struct ata_port_info sata_fsl_port_info[] = {
{
.flags = SATA_FSL_HOST_FLAGS,
+ .link_flags = SATA_FSL_HOST_LFLAGS,
.pio_mask = 0x1f, /* pio 0-4 */
.udma_mask = 0x7f, /* udma 0-6 */
.port_ops = &sata_fsl_ops,
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 02/12] ata/sata_fsl: Remove deprecated hooks
2007-10-31 11:27 [PATCH 01/12] ata/sata_fsl: Update for ata_link introduction Li Yang
@ 2007-10-31 11:27 ` Li Yang
2007-10-31 11:27 ` [PATCH 03/12] ata/sata_fsl: save irq in private data for irq unmapping Li Yang
2007-11-03 12:48 ` [PATCH 01/12] ata/sata_fsl: Update for ata_link introduction Jeff Garzik
1 sibling, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:27 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Li Yang
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 8a8ce9d..4c8c820 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1323,8 +1323,6 @@ static struct scsi_host_template sata_fsl_sht = {
};
static const struct ata_port_operations sata_fsl_ops = {
- .port_disable = ata_port_disable,
-
.check_status = sata_fsl_check_status,
.check_altstatus = sata_fsl_check_status,
.dev_select = ata_noop_dev_select,
@@ -1334,8 +1332,6 @@ static const struct ata_port_operations sata_fsl_ops = {
.qc_prep = sata_fsl_qc_prep,
.qc_issue = sata_fsl_qc_issue,
.irq_clear = sata_fsl_irq_clear,
- .irq_on = ata_dummy_irq_on,
- .irq_ack = ata_dummy_irq_ack,
.scr_read = sata_fsl_scr_read,
.scr_write = sata_fsl_scr_write,
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 03/12] ata/sata_fsl: save irq in private data for irq unmapping
2007-10-31 11:27 ` [PATCH 02/12] ata/sata_fsl: Remove deprecated hooks Li Yang
@ 2007-10-31 11:27 ` Li Yang
2007-10-31 11:27 ` [PATCH 04/12] ata/sata_fsl: Kill ata_sg_is_last() Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:27 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Li Yang
Powerpc uses virtual irq which has to be unmapped.
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 4c8c820..f8d8614 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -265,6 +265,7 @@ struct sata_fsl_host_priv {
void __iomem *hcr_base;
void __iomem *ssr_base;
void __iomem *csr_base;
+ int irq;
};
static inline unsigned int sata_fsl_tag(unsigned int tag,
@@ -1399,6 +1400,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n");
goto error_exit_with_cleanup;
}
+ host_priv->irq = irq;
/* allocate host structure */
host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_FSL_MAX_PORTS);
@@ -1445,7 +1447,7 @@ static int sata_fsl_remove(struct of_device *ofdev)
dev_set_drvdata(&ofdev->dev, NULL);
- irq_dispose_mapping(host->irq);
+ irq_dispose_mapping(host_priv->irq);
iounmap(host_priv->hcr_base);
kfree(host_priv);
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 04/12] ata/sata_fsl: Kill ata_sg_is_last()
2007-10-31 11:27 ` [PATCH 03/12] ata/sata_fsl: save irq in private data for irq unmapping Li Yang
@ 2007-10-31 11:27 ` Li Yang
2007-10-31 11:27 ` [PATCH 05/12] ata/sata_fsl: Remove unnecessary SCR cases Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:27 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Li Yang
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index f8d8614..9e99cc8 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -355,7 +355,7 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
"s/g len unaligned : 0x%x\n", sg_len);
if ((num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1)) &&
- !ata_sg_is_last(sg, qc)) {
+ (qc->n_iter + 1 != qc->n_elem)) {
VPRINTK("setting indirect prde\n");
prd_ptr_to_indirect_ext = prd;
prd->dba = cpu_to_le32(indirect_ext_segment_paddr);
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 05/12] ata/sata_fsl: Remove unnecessary SCR cases
2007-10-31 11:27 ` [PATCH 04/12] ata/sata_fsl: Kill ata_sg_is_last() Li Yang
@ 2007-10-31 11:27 ` Li Yang
2007-10-31 11:27 ` [PATCH 06/12] ata/sata_fsl: cleanup needless casts to/from void __iomem * Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:27 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Jeff Garzik, Li Yang
From: Jeff Garzik <jeff@garzik.org>
SCRs in the driver map to the standard values found in include/linux/ata.h,
so no need for individual scr_read/scr_write case statements duplicating
the natural value.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 9e99cc8..e04fb75 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -472,16 +472,10 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in,
switch (sc_reg_in) {
case SCR_STATUS:
- sc_reg = 0;
- break;
case SCR_ERROR:
- sc_reg = 1;
- break;
case SCR_CONTROL:
- sc_reg = 2;
- break;
case SCR_ACTIVE:
- sc_reg = 3;
+ sc_reg = sc_reg_in;
break;
default:
return -EINVAL;
@@ -502,16 +496,10 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in,
switch (sc_reg_in) {
case SCR_STATUS:
- sc_reg = 0;
- break;
case SCR_ERROR:
- sc_reg = 1;
- break;
case SCR_CONTROL:
- sc_reg = 2;
- break;
case SCR_ACTIVE:
- sc_reg = 3;
+ sc_reg = sc_reg_in;
break;
default:
return -EINVAL;
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 06/12] ata/sata_fsl: cleanup needless casts to/from void __iomem *
2007-10-31 11:27 ` [PATCH 05/12] ata/sata_fsl: Remove unnecessary SCR cases Li Yang
@ 2007-10-31 11:27 ` Li Yang
2007-10-31 11:27 ` [PATCH 07/12] ata/sata_fsl: remove unneeded on-stack copy of FIS Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:27 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Jeff Garzik, Li Yang
From: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index e04fb75..e3bf954 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -483,7 +483,7 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in,
VPRINTK("xx_scr_write, reg_in = %d\n", sc_reg);
- iowrite32(val, (void __iomem *)ssr_base + (sc_reg * 4));
+ iowrite32(val, ssr_base + (sc_reg * 4));
return 0;
}
@@ -507,7 +507,7 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in,
VPRINTK("xx_scr_read, reg_in = %d\n", sc_reg);
- *val = ioread32((void __iomem *)ssr_base + (sc_reg * 4));
+ *val = ioread32(ssr_base + (sc_reg * 4));
return 0;
}
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 07/12] ata/sata_fsl: remove unneeded on-stack copy of FIS
2007-10-31 11:27 ` [PATCH 06/12] ata/sata_fsl: cleanup needless casts to/from void __iomem * Li Yang
@ 2007-10-31 11:27 ` Li Yang
2007-10-31 11:28 ` [PATCH 08/12] ata/sata_fsl: remove unneeded sata_fsl_hardreset() Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:27 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Jeff Garzik, Li Yang
From: Jeff Garzik <jeff@garzik.org>
Remove unneeded on-stack copy of FIS
in sata_fsl_cache_taskfile_from_d2h_fis().
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index e3bf954..c47f2d4 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -561,7 +561,6 @@ static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd
struct ata_port *ap)
{
struct sata_fsl_port_priv *pp = ap->private_data;
- u8 fis[6 * 4];
struct sata_fsl_host_priv *host_priv = ap->host->private_data;
void __iomem *hcr_base = host_priv->hcr_base;
unsigned int tag = sata_fsl_tag(qc->tag, hcr_base);
@@ -569,8 +568,7 @@ static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd
cd = pp->cmdentry + tag;
- memcpy(fis, &cd->sfis, 6 * 4); /* should we use memcpy_from_io() */
- ata_tf_from_fis(fis, &pp->tf);
+ ata_tf_from_fis(cd->sfis, &pp->tf);
}
static u8 sata_fsl_check_status(struct ata_port *ap)
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 08/12] ata/sata_fsl: remove unneeded sata_fsl_hardreset()
2007-10-31 11:27 ` [PATCH 07/12] ata/sata_fsl: remove unneeded on-stack copy of FIS Li Yang
@ 2007-10-31 11:28 ` Li Yang
2007-10-31 11:28 ` [PATCH 09/12] ata/sata_fsl: cleanup style problem Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:28 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Jeff Garzik, Li Yang
From: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index c47f2d4..03629b6 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -991,25 +991,13 @@ err:
return -EIO;
}
-static int sata_fsl_hardreset(struct ata_port *ap, unsigned int *class,
- unsigned long deadline)
-{
- int retval;
-
- retval = sata_std_hardreset(ap, class, deadline);
-
- DPRINTK("SATA FSL : in xx_hardreset, retval = 0x%d\n", retval);
-
- return retval;
-}
-
static void sata_fsl_error_handler(struct ata_port *ap)
{
DPRINTK("in xx_error_handler\n");
/* perform recovery */
- ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_fsl_hardreset,
+ ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_std_hardreset,
ata_std_postreset);
}
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 09/12] ata/sata_fsl: cleanup style problem
2007-10-31 11:28 ` [PATCH 08/12] ata/sata_fsl: remove unneeded sata_fsl_hardreset() Li Yang
@ 2007-10-31 11:28 ` Li Yang
2007-10-31 11:28 ` [PATCH 10/12] ata/sata_fsl: Move MPC8315DS link speed limit workaround to specific ifdef Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:28 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: Li Yang
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 03629b6..5892472 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -269,7 +269,7 @@ struct sata_fsl_host_priv {
};
static inline unsigned int sata_fsl_tag(unsigned int tag,
- void __iomem * hcr_base)
+ void __iomem *hcr_base)
{
/* We let libATA core do actual (queue) tag allocation */
@@ -308,7 +308,7 @@ static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp,
pp->cmdslot[tag].prde_fis_len =
cpu_to_le32((num_prde << 16) | (fis_len << 2));
pp->cmdslot[tag].ttl = cpu_to_le32(data_xfer_len & ~0x03);
- pp->cmdslot[tag].desc_info = cpu_to_le32((desc_info | (tag & 0x1F)));
+ pp->cmdslot[tag].desc_info = cpu_to_le32(desc_info | (tag & 0x1F));
VPRINTK("cda=0x%x, prde_fis_len=0x%x, ttl=0x%x, di=0x%x\n",
pp->cmdslot[tag].cda,
@@ -318,7 +318,7 @@ static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp,
}
static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
- u32 * ttl, dma_addr_t cmd_desc_paddr)
+ u32 *ttl, dma_addr_t cmd_desc_paddr)
{
struct scatterlist *sg;
unsigned int num_prde = 0;
@@ -406,7 +406,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc)
cd = (struct command_desc *)pp->cmdentry + tag;
cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE;
- ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) & cd->cfis);
+ ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis);
VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n",
cd->cfis[0], cd->cfis[1], cd->cfis[2]);
@@ -837,7 +837,7 @@ try_offline_again:
DPRINTK("Sending SRST/device reset\n");
ata_tf_init(link->device, &tf);
- cfis = (u8 *) & pp->cmdentry->cfis;
+ cfis = (u8 *) &pp->cmdentry->cfis;
/* device reset/SRST is a control register update FIS, uses tag0 */
sata_fsl_setup_cmd_hdr_entry(pp, 0,
@@ -963,7 +963,7 @@ skip_srst_do_ncq_error_handling:
iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
- check_device_signature:
+check_device_signature:
DPRINTK("SATA FSL : Now checking device signature\n");
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 10/12] ata/sata_fsl: Move MPC8315DS link speed limit workaround to specific ifdef
2007-10-31 11:28 ` [PATCH 09/12] ata/sata_fsl: cleanup style problem Li Yang
@ 2007-10-31 11:28 ` Li Yang
2007-10-31 11:28 ` [PATCH 11/12] ata/sata_fsl: Remove sending LOG EXT command in sata_fsl_softreset() Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:28 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: ashish kalra, Li Yang
From: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 5892472..e076e1f 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -652,6 +652,7 @@ static int sata_fsl_port_start(struct ata_port *ap)
VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
VPRINTK("CHBA = 0x%x\n", ioread32(hcr_base + CHBA));
+#ifdef CONFIG_MPC8315_DS
/*
* Workaround for 8315DS board 3gbps link-up issue,
* currently limit SATA port to GEN1 speed
@@ -664,6 +665,7 @@ static int sata_fsl_port_start(struct ata_port *ap)
sata_fsl_scr_read(ap, SCR_CONTROL, &temp);
dev_printk(KERN_WARNING, dev, "scr_control, speed limited to %x\n",
temp);
+#endif
return 0;
}
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 11/12] ata/sata_fsl: Remove sending LOG EXT command in sata_fsl_softreset()
2007-10-31 11:28 ` [PATCH 10/12] ata/sata_fsl: Move MPC8315DS link speed limit workaround to specific ifdef Li Yang
@ 2007-10-31 11:28 ` Li Yang
2007-10-31 11:28 ` [PATCH 12/12] ata/sata_fsl: Remove ata_scsi_suspend/resume callbacks Li Yang
0 siblings, 1 reply; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:28 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: ashish kalra, Li Yang
From: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 70 ------------------------------------------------
1 files changed, 0 insertions(+), 70 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index e076e1f..c3b0360 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -730,10 +730,6 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
u8 *cfis;
u32 Serror;
int i = 0;
- struct ata_queued_cmd qc;
- u8 *buf;
- dma_addr_t dma_address;
- struct scatterlist *sg;
unsigned long start_jiffies;
DPRINTK("in xx_softreset\n");
@@ -833,9 +829,6 @@ try_offline_again:
* reached here, we can send a command to the target device
*/
- if (link->sactive)
- goto skip_srst_do_ncq_error_handling;
-
DPRINTK("Sending SRST/device reset\n");
ata_tf_init(link->device, &tf);
@@ -903,69 +896,6 @@ try_offline_again:
* command bit of the CCreg
*/
iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
- goto check_device_signature;
-
-skip_srst_do_ncq_error_handling:
-
- VPRINTK("Sending read log ext(10h) command\n");
-
- memset(&qc, 0, sizeof(struct ata_queued_cmd));
- ata_tf_init(link->device, &tf);
-
- tf.command = ATA_CMD_READ_LOG_EXT;
- tf.lbal = ATA_LOG_SATA_NCQ;
- tf.nsect = 1;
- tf.hob_nsect = 0;
- tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_LBA48 | ATA_TFLAG_DEVICE;
- tf.protocol = ATA_PROT_PIO;
-
- qc.tag = ATA_TAG_INTERNAL;
- qc.scsicmd = NULL;
- qc.ap = ap;
- qc.dev = link->device;
-
- qc.tf = tf;
- qc.flags |= ATA_QCFLAG_RESULT_TF;
- qc.dma_dir = DMA_FROM_DEVICE;
-
- buf = ap->sector_buf;
- ata_sg_init_one(&qc, buf, 1 * ATA_SECT_SIZE);
-
- /*
- * Need to DMA-map the memory buffer associated with the command
- */
-
- sg = qc.__sg;
- dma_address = dma_map_single(ap->dev, qc.buf_virt,
- sg->length, DMA_FROM_DEVICE);
-
- sg_dma_address(sg) = dma_address;
- sg_dma_len(sg) = sg->length;
-
- VPRINTK("EH, addr = 0x%x, len = 0x%x\n", dma_address, sg->length);
-
- sata_fsl_qc_prep(&qc);
- sata_fsl_qc_issue(&qc);
-
- temp = ata_wait_register(CQ + hcr_base, 0x1, 0x1, 1, 5000);
- if (temp & 0x1) {
- VPRINTK("READ_LOG_EXT_10H issue failed\n");
-
- VPRINTK("READ_LOG@5000,CQ=0x%x,CA=0x%x,CC=0x%x\n",
- ioread32(CQ + hcr_base),
- ioread32(CA + hcr_base), ioread32(CC + hcr_base));
-
- sata_fsl_scr_read(ap, SCR_ERROR, &Serror);
-
- VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS));
- VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
- VPRINTK("Serror = 0x%x\n", Serror);
- goto err;
- }
-
- iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
-
-check_device_signature:
DPRINTK("SATA FSL : Now checking device signature\n");
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 12/12] ata/sata_fsl: Remove ata_scsi_suspend/resume callbacks
2007-10-31 11:28 ` [PATCH 11/12] ata/sata_fsl: Remove sending LOG EXT command in sata_fsl_softreset() Li Yang
@ 2007-10-31 11:28 ` Li Yang
0 siblings, 0 replies; 13+ messages in thread
From: Li Yang @ 2007-10-31 11:28 UTC (permalink / raw)
To: jgarzik, linux-ide; +Cc: ashish kalra, Li Yang
From: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: ashish kalra <ashish.kalra@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
---
drivers/ata/sata_fsl.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index c3b0360..d015b4a 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1223,10 +1223,6 @@ static struct scsi_host_template sata_fsl_sht = {
.slave_configure = ata_scsi_slave_config,
.slave_destroy = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
-#ifdef CONFIG_PM
- .suspend = ata_scsi_device_suspend,
- .resume = ata_scsi_device_resume,
-#endif
};
static const struct ata_port_operations sata_fsl_ops = {
--
1.5.3.2.104.g41ef
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 01/12] ata/sata_fsl: Update for ata_link introduction
2007-10-31 11:27 [PATCH 01/12] ata/sata_fsl: Update for ata_link introduction Li Yang
2007-10-31 11:27 ` [PATCH 02/12] ata/sata_fsl: Remove deprecated hooks Li Yang
@ 2007-11-03 12:48 ` Jeff Garzik
1 sibling, 0 replies; 13+ messages in thread
From: Jeff Garzik @ 2007-11-03 12:48 UTC (permalink / raw)
To: Li Yang; +Cc: linux-ide
Li Yang wrote:
> Update the driver to use the newly added ata_link structure.
>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> drivers/ata/sata_fsl.c | 31 ++++++++++++++++++-------------
> 1 files changed, 18 insertions(+), 13 deletions(-)
applied patches 1-12 to #upstream-fixes (2.6.24), thanks much!
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-11-03 12:48 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 11:27 [PATCH 01/12] ata/sata_fsl: Update for ata_link introduction Li Yang
2007-10-31 11:27 ` [PATCH 02/12] ata/sata_fsl: Remove deprecated hooks Li Yang
2007-10-31 11:27 ` [PATCH 03/12] ata/sata_fsl: save irq in private data for irq unmapping Li Yang
2007-10-31 11:27 ` [PATCH 04/12] ata/sata_fsl: Kill ata_sg_is_last() Li Yang
2007-10-31 11:27 ` [PATCH 05/12] ata/sata_fsl: Remove unnecessary SCR cases Li Yang
2007-10-31 11:27 ` [PATCH 06/12] ata/sata_fsl: cleanup needless casts to/from void __iomem * Li Yang
2007-10-31 11:27 ` [PATCH 07/12] ata/sata_fsl: remove unneeded on-stack copy of FIS Li Yang
2007-10-31 11:28 ` [PATCH 08/12] ata/sata_fsl: remove unneeded sata_fsl_hardreset() Li Yang
2007-10-31 11:28 ` [PATCH 09/12] ata/sata_fsl: cleanup style problem Li Yang
2007-10-31 11:28 ` [PATCH 10/12] ata/sata_fsl: Move MPC8315DS link speed limit workaround to specific ifdef Li Yang
2007-10-31 11:28 ` [PATCH 11/12] ata/sata_fsl: Remove sending LOG EXT command in sata_fsl_softreset() Li Yang
2007-10-31 11:28 ` [PATCH 12/12] ata/sata_fsl: Remove ata_scsi_suspend/resume callbacks Li Yang
2007-11-03 12:48 ` [PATCH 01/12] ata/sata_fsl: Update for ata_link introduction Jeff Garzik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.