aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_promise.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_promise.c')
-rw-r--r--drivers/ata/sata_promise.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index a5b3a7db7a9f..d627812ea73d 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -104,7 +104,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
104static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf); 104static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
105static void pdc_irq_clear(struct ata_port *ap); 105static void pdc_irq_clear(struct ata_port *ap);
106static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc); 106static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc);
107static void pdc_host_stop(struct ata_host_set *host_set); 107static void pdc_host_stop(struct ata_host *host);
108 108
109 109
110static struct scsi_host_template pdc_ata_sht = { 110static struct scsi_host_template pdc_ata_sht = {
@@ -175,7 +175,7 @@ static const struct ata_port_info pdc_port_info[] = {
175 /* board_2037x */ 175 /* board_2037x */
176 { 176 {
177 .sht = &pdc_ata_sht, 177 .sht = &pdc_ata_sht,
178 .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA, 178 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA,
179 .pio_mask = 0x1f, /* pio0-4 */ 179 .pio_mask = 0x1f, /* pio0-4 */
180 .mwdma_mask = 0x07, /* mwdma0-2 */ 180 .mwdma_mask = 0x07, /* mwdma0-2 */
181 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 181 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
@@ -185,7 +185,7 @@ static const struct ata_port_info pdc_port_info[] = {
185 /* board_20319 */ 185 /* board_20319 */
186 { 186 {
187 .sht = &pdc_ata_sht, 187 .sht = &pdc_ata_sht,
188 .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA, 188 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA,
189 .pio_mask = 0x1f, /* pio0-4 */ 189 .pio_mask = 0x1f, /* pio0-4 */
190 .mwdma_mask = 0x07, /* mwdma0-2 */ 190 .mwdma_mask = 0x07, /* mwdma0-2 */
191 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 191 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
@@ -195,7 +195,7 @@ static const struct ata_port_info pdc_port_info[] = {
195 /* board_20619 */ 195 /* board_20619 */
196 { 196 {
197 .sht = &pdc_ata_sht, 197 .sht = &pdc_ata_sht,
198 .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS, 198 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS,
199 .pio_mask = 0x1f, /* pio0-4 */ 199 .pio_mask = 0x1f, /* pio0-4 */
200 .mwdma_mask = 0x07, /* mwdma0-2 */ 200 .mwdma_mask = 0x07, /* mwdma0-2 */
201 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 201 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
@@ -205,7 +205,7 @@ static const struct ata_port_info pdc_port_info[] = {
205 /* board_20771 */ 205 /* board_20771 */
206 { 206 {
207 .sht = &pdc_ata_sht, 207 .sht = &pdc_ata_sht,
208 .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA, 208 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA,
209 .pio_mask = 0x1f, /* pio0-4 */ 209 .pio_mask = 0x1f, /* pio0-4 */
210 .mwdma_mask = 0x07, /* mwdma0-2 */ 210 .mwdma_mask = 0x07, /* mwdma0-2 */
211 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 211 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
@@ -215,7 +215,7 @@ static const struct ata_port_info pdc_port_info[] = {
215 /* board_2057x */ 215 /* board_2057x */
216 { 216 {
217 .sht = &pdc_ata_sht, 217 .sht = &pdc_ata_sht,
218 .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA, 218 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA,
219 .pio_mask = 0x1f, /* pio0-4 */ 219 .pio_mask = 0x1f, /* pio0-4 */
220 .mwdma_mask = 0x07, /* mwdma0-2 */ 220 .mwdma_mask = 0x07, /* mwdma0-2 */
221 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 221 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
@@ -225,7 +225,7 @@ static const struct ata_port_info pdc_port_info[] = {
225 /* board_40518 */ 225 /* board_40518 */
226 { 226 {
227 .sht = &pdc_ata_sht, 227 .sht = &pdc_ata_sht,
228 .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA, 228 .flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA,
229 .pio_mask = 0x1f, /* pio0-4 */ 229 .pio_mask = 0x1f, /* pio0-4 */
230 .mwdma_mask = 0x07, /* mwdma0-2 */ 230 .mwdma_mask = 0x07, /* mwdma0-2 */
231 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 231 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
@@ -292,7 +292,7 @@ static struct pci_driver pdc_ata_pci_driver = {
292 292
293static int pdc_port_start(struct ata_port *ap) 293static int pdc_port_start(struct ata_port *ap)
294{ 294{
295 struct device *dev = ap->host_set->dev; 295 struct device *dev = ap->host->dev;
296 struct pdc_port_priv *pp; 296 struct pdc_port_priv *pp;
297 int rc; 297 int rc;
298 298
@@ -326,7 +326,7 @@ err_out:
326 326
327static void pdc_port_stop(struct ata_port *ap) 327static void pdc_port_stop(struct ata_port *ap)
328{ 328{
329 struct device *dev = ap->host_set->dev; 329 struct device *dev = ap->host->dev;
330 struct pdc_port_priv *pp = ap->private_data; 330 struct pdc_port_priv *pp = ap->private_data;
331 331
332 ap->private_data = NULL; 332 ap->private_data = NULL;
@@ -336,11 +336,11 @@ static void pdc_port_stop(struct ata_port *ap)
336} 336}
337 337
338 338
339static void pdc_host_stop(struct ata_host_set *host_set) 339static void pdc_host_stop(struct ata_host *host)
340{ 340{
341 struct pdc_host_priv *hp = host_set->private_data; 341 struct pdc_host_priv *hp = host->private_data;
342 342
343 ata_pci_host_stop(host_set); 343 ata_pci_host_stop(host);
344 344
345 kfree(hp); 345 kfree(hp);
346} 346}
@@ -443,14 +443,14 @@ static void pdc_qc_prep(struct ata_queued_cmd *qc)
443 443
444static void pdc_eng_timeout(struct ata_port *ap) 444static void pdc_eng_timeout(struct ata_port *ap)
445{ 445{
446 struct ata_host_set *host_set = ap->host_set; 446 struct ata_host *host = ap->host;
447 u8 drv_stat; 447 u8 drv_stat;
448 struct ata_queued_cmd *qc; 448 struct ata_queued_cmd *qc;
449 unsigned long flags; 449 unsigned long flags;
450 450
451 DPRINTK("ENTER\n"); 451 DPRINTK("ENTER\n");
452 452
453 spin_lock_irqsave(&host_set->lock, flags); 453 spin_lock_irqsave(&host->lock, flags);
454 454
455 qc = ata_qc_from_tag(ap, ap->active_tag); 455 qc = ata_qc_from_tag(ap, ap->active_tag);
456 456
@@ -473,7 +473,7 @@ static void pdc_eng_timeout(struct ata_port *ap)
473 break; 473 break;
474 } 474 }
475 475
476 spin_unlock_irqrestore(&host_set->lock, flags); 476 spin_unlock_irqrestore(&host->lock, flags);
477 ata_eh_qc_complete(qc); 477 ata_eh_qc_complete(qc);
478 DPRINTK("EXIT\n"); 478 DPRINTK("EXIT\n");
479} 479}
@@ -509,15 +509,15 @@ static inline unsigned int pdc_host_intr( struct ata_port *ap,
509 509
510static void pdc_irq_clear(struct ata_port *ap) 510static void pdc_irq_clear(struct ata_port *ap)
511{ 511{
512 struct ata_host_set *host_set = ap->host_set; 512 struct ata_host *host = ap->host;
513 void __iomem *mmio = host_set->mmio_base; 513 void __iomem *mmio = host->mmio_base;
514 514
515 readl(mmio + PDC_INT_SEQMASK); 515 readl(mmio + PDC_INT_SEQMASK);
516} 516}
517 517
518static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *regs) 518static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *regs)
519{ 519{
520 struct ata_host_set *host_set = dev_instance; 520 struct ata_host *host = dev_instance;
521 struct ata_port *ap; 521 struct ata_port *ap;
522 u32 mask = 0; 522 u32 mask = 0;
523 unsigned int i, tmp; 523 unsigned int i, tmp;
@@ -526,12 +526,12 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r
526 526
527 VPRINTK("ENTER\n"); 527 VPRINTK("ENTER\n");
528 528
529 if (!host_set || !host_set->mmio_base) { 529 if (!host || !host->mmio_base) {
530 VPRINTK("QUICK EXIT\n"); 530 VPRINTK("QUICK EXIT\n");
531 return IRQ_NONE; 531 return IRQ_NONE;
532 } 532 }
533 533
534 mmio_base = host_set->mmio_base; 534 mmio_base = host->mmio_base;
535 535
536 /* reading should also clear interrupts */ 536 /* reading should also clear interrupts */
537 mask = readl(mmio_base + PDC_INT_SEQMASK); 537 mask = readl(mmio_base + PDC_INT_SEQMASK);
@@ -541,7 +541,7 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r
541 return IRQ_NONE; 541 return IRQ_NONE;
542 } 542 }
543 543
544 spin_lock(&host_set->lock); 544 spin_lock(&host->lock);
545 545
546 mask &= 0xffff; /* only 16 tags possible */ 546 mask &= 0xffff; /* only 16 tags possible */
547 if (!mask) { 547 if (!mask) {
@@ -551,9 +551,9 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r
551 551
552 writel(mask, mmio_base + PDC_INT_SEQMASK); 552 writel(mask, mmio_base + PDC_INT_SEQMASK);
553 553
554 for (i = 0; i < host_set->n_ports; i++) { 554 for (i = 0; i < host->n_ports; i++) {
555 VPRINTK("port %u\n", i); 555 VPRINTK("port %u\n", i);
556 ap = host_set->ports[i]; 556 ap = host->ports[i];
557 tmp = mask & (1 << (i + 1)); 557 tmp = mask & (1 << (i + 1));
558 if (tmp && ap && 558 if (tmp && ap &&
559 !(ap->flags & ATA_FLAG_DISABLED)) { 559 !(ap->flags & ATA_FLAG_DISABLED)) {
@@ -568,7 +568,7 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r
568 VPRINTK("EXIT\n"); 568 VPRINTK("EXIT\n");
569 569
570done_irq: 570done_irq:
571 spin_unlock(&host_set->lock); 571 spin_unlock(&host->lock);
572 return IRQ_RETVAL(handled); 572 return IRQ_RETVAL(handled);
573} 573}
574 574
@@ -581,8 +581,8 @@ static inline void pdc_packet_start(struct ata_queued_cmd *qc)
581 581
582 VPRINTK("ENTER, ap %p\n", ap); 582 VPRINTK("ENTER, ap %p\n", ap);
583 583
584 writel(0x00000001, ap->host_set->mmio_base + (seq * 4)); 584 writel(0x00000001, ap->host->mmio_base + (seq * 4));
585 readl(ap->host_set->mmio_base + (seq * 4)); /* flush */ 585 readl(ap->host->mmio_base + (seq * 4)); /* flush */
586 586
587 pp->pkt[2] = seq; 587 pp->pkt[2] = seq;
588 wmb(); /* flush PRD, pkt writes */ 588 wmb(); /* flush PRD, pkt writes */
@@ -743,7 +743,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
743 probe_ent->private_data = hp; 743 probe_ent->private_data = hp;
744 744
745 probe_ent->sht = pdc_port_info[board_idx].sht; 745 probe_ent->sht = pdc_port_info[board_idx].sht;
746 probe_ent->host_flags = pdc_port_info[board_idx].host_flags; 746 probe_ent->port_flags = pdc_port_info[board_idx].flags;
747 probe_ent->pio_mask = pdc_port_info[board_idx].pio_mask; 747 probe_ent->pio_mask = pdc_port_info[board_idx].pio_mask;
748 probe_ent->mwdma_mask = pdc_port_info[board_idx].mwdma_mask; 748 probe_ent->mwdma_mask = pdc_port_info[board_idx].mwdma_mask;
749 probe_ent->udma_mask = pdc_port_info[board_idx].udma_mask; 749 probe_ent->udma_mask = pdc_port_info[board_idx].udma_mask;