Lines Matching refs:port

50 ata_sata_phy_check_events(device_t dev, int port)
55 if (ata_sata_scr_read(ch, port, ATA_SERROR, &error))
64 ata_sata_scr_write(ch, port, ATA_SERROR, error);
69 if (ata_sata_scr_read(ch, port, ATA_SSTATUS, &status)) {
83 ata_sata_scr_read(struct ata_channel *ch, int port, int reg, uint32_t *val)
87 return (ch->hw.pm_read(ch->dev, port, reg, val));
96 ata_sata_scr_write(struct ata_channel *ch, int port, int reg, uint32_t val)
100 return (ch->hw.pm_write(ch->dev, port, reg, val));
109 ata_sata_connect(struct ata_channel *ch, int port, int quick)
118 if (ata_sata_scr_read(ch, port, ATA_SSTATUS, &status))
130 if (port < 0) {
135 port, status);
137 } else if (port < 0) {
142 port, t * 10, status);
147 ata_sata_scr_write(ch, port, ATA_SERROR, 0xffffffff);
153 ata_sata_phy_reset(device_t dev, int port, int quick)
159 sata_rev = ch->user[port < 0 ? 0 : port].revision;
164 if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val))
167 ata_sata_scr_write(ch, port, ATA_SCONTROL,
170 return ata_sata_connect(ch, port, quick);
175 if (port < 0) {
178 device_printf(dev, "p%d: hard reset ...\n", port);
191 if (ata_sata_scr_write(ch, port, ATA_SCONTROL, ATA_SC_DET_RESET |
195 if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val))
202 if (ata_sata_scr_write(ch, port, ATA_SCONTROL,
207 if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val))
210 return ata_sata_connect(ch, port, 0);
215 ata_sata_scr_write(ch, port, ATA_SERROR, 0xffffffff);
218 if (port < 0) {
221 device_printf(dev, "p%d: hard reset failed\n", port);
290 int port;
306 device_printf(dev, "error getting PM port info\n");
315 * Port 5 is enclosure management bridge port, which has implementation
325 * port 6 is enclosure management bridge port.
339 for (port=0; port < pm_ports; port++) {
342 if (!ata_sata_phy_reset(dev, port, 1))
346 * XXX: I have no idea how to properly wait for PMP port hardreset
352 signature = ch->hw.softreset(dev, port);
355 device_printf(dev, "p%d: SIGNATURE=%08x\n", port, signature);
360 ch->devices |= (ATA_ATA_MASTER << port);
363 ch->devices |= (ATA_ATAPI_MASTER << port);