• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/ata/

Lines Matching defs:link

70 static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
71 static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
84 static int ahci_softreset(struct ata_link *link, unsigned int *class,
86 static int ahci_hardreset(struct ata_link *link, unsigned int *class,
88 static void ahci_postreset(struct ata_link *link, unsigned int *class);
101 static void ahci_init_sw_activity(struct ata_link *link);
519 static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val)
521 void __iomem *port_mmio = ahci_port_base(link->ap);
522 int offset = ahci_scr_offset(link->ap, sc_reg);
531 static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val)
533 void __iomem *port_mmio = ahci_port_base(link->ap);
534 int offset = ahci_scr_offset(link->ap, sc_reg);
641 /* wake up link */
674 ahci_scr_write(&ap->link, SCR_ERROR, ((1 << 16) | (1 << 18)));
689 * don't change the link pm policy - we can be called
690 * just to turn of link pm temporarily
703 /* Make sure the host is capable of link power management */
742 * change link state
756 * enter a lower power link state when it's appropriate and
794 struct ata_link *link;
807 ata_for_each_link(link, ap, EDGE) {
808 emp = &pp->em_priv[link->pmp];
824 ata_for_each_link(link, ap, EDGE)
825 ahci_init_sw_activity(link);
899 static void ahci_sw_activity(struct ata_link *link)
901 struct ata_port *ap = link->ap;
903 struct ahci_em_priv *emp = &pp->em_priv[link->pmp];
905 if (!(link->flags & ATA_LFLAG_SW_ACTIVITY))
915 struct ata_link *link = (struct ata_link *)arg;
916 struct ata_port *ap = link->ap;
918 struct ahci_em_priv *emp = &pp->em_priv[link->pmp];
924 led_message |= ap->port_no | (link->pmp << 8);
957 static void ahci_init_sw_activity(struct ata_link *link)
959 struct ata_port *ap = link->ap;
961 struct ahci_em_priv *emp = &pp->em_priv[link->pmp];
965 setup_timer(&emp->timer, ahci_sw_activity_blink, (unsigned long)link);
967 /* check our blink policy and set flag for link if it's enabled */
969 link->flags |= ATA_LFLAG_SW_ACTIVITY;
1048 struct ata_link *link;
1052 ata_for_each_link(link, ap, EDGE) {
1053 emp = &pp->em_priv[link->pmp];
1088 struct ata_link *link = dev->link;
1089 struct ata_port *ap = link->ap;
1091 struct ahci_em_priv *emp = &pp->em_priv[link->pmp];
1097 link->flags &= ~(ATA_LFLAG_SW_ACTIVITY);
1101 port_led_state |= (ap->port_no | (link->pmp << 8));
1104 link->flags |= ATA_LFLAG_SW_ACTIVITY;
1108 port_led_state |= (ap->port_no | (link->pmp << 8));
1119 struct ata_link *link = dev->link;
1120 struct ata_port *ap = link->ap;
1122 struct ahci_em_priv *emp = &pp->em_priv[link->pmp];
1185 struct ahci_host_priv *hpriv = dev->link->ap->host->private_data;
1297 int ahci_do_softreset(struct ata_link *link, unsigned int *class,
1299 int (*check_ready)(struct ata_link *link))
1301 struct ata_port *ap = link->ap;
1313 ata_link_printk(link, KERN_WARNING,
1316 ata_tf_init(link->device, &tf);
1339 /* wait for link to become ready */
1340 rc = ata_wait_after_reset(link, deadline, check_ready);
1342 ata_link_printk(link, KERN_INFO,
1346 /* link occupied, -ENODEV too is an error */
1356 ata_link_printk(link, KERN_ERR, "softreset failed (%s)\n", reason);
1360 int ahci_check_ready(struct ata_link *link)
1362 void __iomem *port_mmio = ahci_port_base(link->ap);
1369 static int ahci_softreset(struct ata_link *link, unsigned int *class,
1372 int pmp = sata_srst_pmp(link);
1376 return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
1380 static int ahci_hardreset(struct ata_link *link, unsigned int *class,
1383 const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context);
1384 struct ata_port *ap = link->ap;
1396 ata_tf_init(link->device, &tf);
1400 rc = sata_link_hardreset(link, timing, deadline, &online,
1412 static void ahci_postreset(struct ata_link *link, unsigned int *class)
1414 struct ata_port *ap = link->ap;
1418 ata_std_postreset(link, class);
1482 ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, cmd_tbl);
1495 opts = cmd_fis_len | n_elem << 16 | (qc->dev->link->pmp << 12);
1533 struct ata_eh_info *host_ehi = &ap->link.eh_info;
1534 struct ata_link *link = NULL;
1540 /* determine active link with error */
1548 link = &ap->pmp_link[pmp];
1553 ata_for_each_link(link, ap, EDGE)
1554 if (ata_link_active(link))
1557 if (!link)
1558 link = &ap->link;
1560 active_qc = ata_qc_from_tag(ap, link->active_tag);
1561 active_ehi = &link->eh_info;
1568 ahci_scr_read(&ap->link, SCR_ERROR, &serror);
1569 ahci_scr_write(&ap->link, SCR_ERROR, serror);
1578 * link. There's no active qc on NCQ errors. It will
1635 ata_link_abort(link);
1644 struct ata_eh_info *ehi = &ap->link.eh_info;
1666 ahci_scr_write(&ap->link, SCR_ERROR, ((1 << 16) | (1 << 18)));
1793 /* Keep track of the currently active link. It will be used
1797 pp->active_link = qc->dev->link;
1802 if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) {
1805 fbs |= qc->dev->link->pmp << PORT_FBS_DEV_OFFSET;
1807 pp->fbs_last_dev = qc->dev->link->pmp;
1812 ahci_sw_activity(qc->dev->link);
1823 rx_fis += qc->dev->link->pmp * AHCI_RX_FIS_SZ;
1876 if (!ata_dev_enabled(ap->link.device))