Lines Matching +full:0 +full:x4140

36  *	0 on success, AC_ERR_* mask on failure.
52 err_mask = ata_exec_internal(pmp_dev, &tf, NULL, DMA_NONE, NULL, 0, in sata_pmp_read()
58 return 0; in sata_pmp_read()
73 * 0 on success, AC_ERR_* mask on failure.
87 tf.nsect = val & 0xff; in sata_pmp_write()
88 tf.lbal = (val >> 8) & 0xff; in sata_pmp_write()
89 tf.lbam = (val >> 16) & 0xff; in sata_pmp_write()
90 tf.lbah = (val >> 24) & 0xff; in sata_pmp_write()
92 return ata_exec_internal(pmp_dev, &tf, NULL, DMA_NONE, NULL, 0, in sata_pmp_write()
107 * ATA_DEFER_* if deferring is needed, 0 otherwise.
115 if (ap->nr_active_links == 0 || ata_link_active(link)) { in sata_pmp_qc_defer_cmd_switch()
139 * 0 on success, -errno on failure.
150 ata_link_warn(link, "failed to read SCR %d (Emask=0x%x)\n", in sata_pmp_scr_read()
154 return 0; in sata_pmp_scr_read()
170 * 0 on success, -errno on failure.
181 ata_link_warn(link, "failed to write SCR %d (Emask=0x%x)\n", in sata_pmp_scr_write()
185 return 0; in sata_pmp_scr_write()
201 * 0 on success, -errno on failure.
221 * 0 on success, -errno on failure.
225 static const int gscr_to_read[] = { 0, 1, 2, 32, 33, 64, 96 }; in sata_pmp_read_gscr()
228 for (i = 0; i < ARRAY_SIZE(gscr_to_read); i++) { in sata_pmp_read_gscr()
234 ata_dev_err(dev, "failed to read PMP GSCR[%d] (Emask=0x%x)\n", in sata_pmp_read_gscr()
240 return 0; in sata_pmp_read_gscr()
264 unsigned int err_mask = 0; in sata_pmp_configure()
270 if (nr_ports <= 0 || nr_ports > SATA_PMP_MAX_PORTS) { in sata_pmp_configure()
295 if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) { in sata_pmp_configure()
304 reg &= ~0x1; in sata_pmp_configure()
315 "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n", in sata_pmp_configure()
327 return 0; in sata_pmp_configure()
331 "failed to configure Port Multiplier (%s, Emask=0x%x)\n", in sata_pmp_configure()
342 pmp_link = kcalloc(SATA_PMP_MAX_PORTS, sizeof(pmp_link[0]), in sata_pmp_init_links()
347 for (i = 0; i < SATA_PMP_MAX_PORTS; i++) in sata_pmp_init_links()
352 for (i = 0; i < SATA_PMP_MAX_PORTS; i++) { in sata_pmp_init_links()
360 for (i = 0; i < nr_ports; i++) { in sata_pmp_init_links()
364 link->flags = 0; in sata_pmp_init_links()
369 return 0; in sata_pmp_init_links()
371 while (--i >= 0) in sata_pmp_init_links()
385 if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) { in sata_pmp_quirks()
404 } else if (vendor == 0x1095 && devid == 0x4723) { in sata_pmp_quirks()
416 } else if (vendor == 0x1095 && devid == 0x4726) { in sata_pmp_quirks()
424 * Config device can be at port 0 or 5 and in sata_pmp_quirks()
438 } else if (vendor == 0x1095 && (devid == 0x5723 || devid == 0x5733 || in sata_pmp_quirks()
439 devid == 0x5734 || devid == 0x5744)) { in sata_pmp_quirks()
449 } else if (vendor == 0x197b && (devid == 0x2352 || devid == 0x0325)) { in sata_pmp_quirks()
451 * 0x2352: found in Thermaltake BlackX Duet, jmicron JMB350? in sata_pmp_quirks()
452 * 0x0325: jmicron JMB394. in sata_pmp_quirks()
462 } else if (vendor == 0x11ab && devid == 0x4140) { in sata_pmp_quirks()
483 * 0 on success, -errno on failure.
509 WARN_ON(link->pmp != 0); in sata_pmp_attach()
542 return 0; in sata_pmp_attach()
545 link->pmp = 0; in sata_pmp_attach()
578 ap->nr_pmp_links = 0; in sata_pmp_detach()
579 link->pmp = 0; in sata_pmp_detach()
595 * 1 if @dev matches @new_gscr, 0 otherwise.
612 "Port Multiplier vendor mismatch '0x%x' != '0x%x'\n", in sata_pmp_same_pmp()
614 return 0; in sata_pmp_same_pmp()
619 "Port Multiplier device ID mismatch '0x%x' != '0x%x'\n", in sata_pmp_same_pmp()
621 return 0; in sata_pmp_same_pmp()
626 "Port Multiplier nr_ports mismatch '0x%x' != '0x%x'\n", in sata_pmp_same_pmp()
628 return 0; in sata_pmp_same_pmp()
646 * 0 on success, -errno otherwise.
679 memcpy(dev->gscr, gscr, sizeof(gscr[0]) * SATA_PMP_GSCR_DWORDS); in sata_pmp_revalidate()
681 rc = sata_pmp_configure(dev, 0); in sata_pmp_revalidate()
687 return 0; in sata_pmp_revalidate()
704 * 0 on success, -errno otherwise.
714 "failed to read PMP product ID (Emask=0x%x)\n", in sata_pmp_revalidate_quick()
725 return 0; in sata_pmp_revalidate_quick()
745 * 0 on success, -errno on failure.
755 int detach = 0, rc = 0; in sata_pmp_eh_recover_pmp()
756 int reval_failed = 0; in sata_pmp_eh_recover_pmp()
765 ehc->classes[0] = ATA_DEV_UNKNOWN; in sata_pmp_eh_recover_pmp()
771 rc = ata_eh_reset(link, 0, prereset, softreset, hardreset, in sata_pmp_eh_recover_pmp()
791 rc = sata_pmp_revalidate(dev, ehc->classes[0]); in sata_pmp_eh_recover_pmp()
808 sata_down_spd_limit(link, 0); in sata_pmp_eh_recover_pmp()
823 ehc->i.flags = 0; in sata_pmp_eh_recover_pmp()
825 return 0; in sata_pmp_eh_recover_pmp()
872 return 0; in sata_pmp_eh_handle_disabled_links()
895 link->eh_context.i.action = 0; in sata_pmp_handle_link_fail()
897 return 0; in sata_pmp_handle_link_fail()
913 * 0 on success, -errno on failure.
945 return 0; in sata_pmp_eh_recover()
970 "failed to disable NOTIFY (err_mask=0x%x)\n", in sata_pmp_eh_recover()
989 if (rc == 0) in sata_pmp_eh_recover()
998 return 0; in sata_pmp_eh_recover()
1014 "failed to write PMP_FEAT_EN (Emask=0x%x)\n", in sata_pmp_eh_recover()
1025 "failed to read PMP_GSCR_ERROR (Emask=0x%x)\n", in sata_pmp_eh_recover()
1031 cnt = 0; in sata_pmp_eh_recover()
1053 return 0; in sata_pmp_eh_recover()