svn commit: r207647 - stable/8/sys/cam/ata

Alexander Motin mav at FreeBSD.org
Wed May 5 05:18:09 UTC 2010


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) {


More information about the svn-src-stable-8 mailing list