Date: Wed, 5 May 2010 05:18:08 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r207647 - stable/8/sys/cam/ata Message-ID: <201005050518.o455I8XL051801@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed May 5 05:18:08 2010 New Revision: 207647 URL: http://svn.freebsd.org/changeset/base/207647 Log: MFC r207282: Update device identify data and serial number when device change detected. Reprobe immediately following this should have fresh data. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Wed May 5 05:11:12 2010 (r207646) +++ stable/8/sys/cam/ata/ata_xpt.c Wed May 5 05:18:08 2010 (r207647) @@ -768,6 +768,7 @@ noerror: { struct ccb_pathinq cpi; int16_t *ptr; + int changed = 1; ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; @@ -809,9 +810,12 @@ noerror: sizeof(ident_buf->serial))) { /* Device changed. */ xpt_async(AC_LOST_DEVICE, path, NULL); - } else + } else { bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); - } else { + changed = 0; + } + } + if (changed) { bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); /* Clean up from previous instance of this device */ if (path->device->serial_num != NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005050518.o455I8XL051801>