Date: Wed, 20 Jan 2010 20:06:57 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 173428 for review Message-ID: <201001202006.o0KK6vuh007009@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=173428 Change 173428 by mav@mav_mavtest on 2010/01/20 20:06:37 Call siis_portinit() before doing soft reset. It is required to probe multiplier without device on first port, same as CLO on AHCI. Remove some useless messages. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#36 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#36 (text+ko) ==== @@ -1035,6 +1035,13 @@ if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) ctp->control |= htole16(SIIS_PRB_PACKET_WRITE); } + /* Special handling for Soft Reset command. */ + if ((ccb->ccb_h.func_code == XPT_ATA_IO) && + (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && + (ccb->ataio.cmd.control & ATA_A_RESET)) { + /* Kick controller into sane state */ + siis_portinit(dev); + } /* Setup the FIS for this request */ if (!siis_setup_fis(dev, ctp, ccb, slot->slot)) { device_printf(ch->dev, "Setting up SATA FIS failed\n"); @@ -1091,10 +1098,11 @@ if (slot->state < SIIS_SLOT_RUNNING) return; device_printf(dev, "Timeout on slot %d\n", slot->slot); -device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n", - __func__, ATA_INL(ch->r_mem, SIIS_P_IS), ATA_INL(ch->r_mem, SIIS_P_SS), ch->rslots, - ATA_INL(ch->r_mem, SIIS_P_CMDERR), ATA_INL(ch->r_mem, SIIS_P_STS), - ATA_INL(ch->r_mem, SIIS_P_SERR)); + device_printf(dev, "%s is %08x ss %08x rs %08x es %08x sts %08x serr %08x\n", + __func__, ATA_INL(ch->r_mem, SIIS_P_IS), + ATA_INL(ch->r_mem, SIIS_P_SS), ch->rslots, + ATA_INL(ch->r_mem, SIIS_P_CMDERR), ATA_INL(ch->r_mem, SIIS_P_STS), + ATA_INL(ch->r_mem, SIIS_P_SERR)); if (ch->toslots == 0) xpt_freeze_simq(ch->sim, 1); @@ -1378,8 +1386,6 @@ return (EBUSY); } } - if (bootverbose) - device_printf(dev, "device reset time=%dms\n", timeout); return (0); } @@ -1399,8 +1405,6 @@ return (EBUSY); } } - if (bootverbose) - device_printf(dev, "ready wait time=%dms\n", timeout); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001202006.o0KK6vuh007009>