Date: Sat, 25 Jul 2009 14:19:46 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 166555 for review Message-ID: <200907251419.n6PEJkuY010733@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166555 Change 166555 by mav@mav_mavbook on 2009/07/25 14:19:15 Teach siis driver to report device async notifications. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#2 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#2 (text+ko) ==== @@ -647,6 +647,30 @@ } static void +siis_notify_events(device_t dev) +{ + struct siis_channel *ch = device_get_softc(dev); + struct cam_path *dpath; + u_int32_t status; + int i; + + status = ATA_INL(ch->r_mem, SIIS_P_SNTF); + ATA_OUTL(ch->r_mem, SIIS_P_SNTF, status); + if (bootverbose) + device_printf(dev, "SNTF 0x%04x\n", status); + for (i = 0; i < 16; i++) { + if ((status & (1 << i)) == 0) + continue; + if (xpt_create_path(&dpath, NULL, + xpt_path_path_id(ch->path), i, 0) == CAM_REQ_CMP) { + xpt_async(AC_SCSI_AEN, dpath, NULL); + xpt_free_path(dpath); + } + } + +} + +static void siis_phy_check_events(device_t dev) { struct siis_channel *ch = device_get_softc(dev); @@ -707,6 +731,9 @@ /* Process PHY events */ if (istatus & SIIS_P_IX_PHYRDYCHG) siis_phy_check_events(dev); + /* Process NOTIFY events */ + if (istatus & SIIS_P_IX_SDBN) + siis_notify_events(dev); /* Process command errors */ if (istatus & SIIS_P_IX_COMMERR) { estatus = ATA_INL(ch->r_mem, SIIS_P_CMDERR);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907251419.n6PEJkuY010733>