svn commit: r207282 - head/sys/cam/ata
Alexander Motin
mav at FreeBSD.org
Tue Apr 27 15:59:38 UTC 2010
Author: mav
Date: Tue Apr 27 15:59:38 2010
New Revision: 207282
URL: http://svn.freebsd.org/changeset/base/207282
Log:
Update device identify data and serial number when device change detected.
Reprobe immediately following this should have fresh data.
Modified:
head/sys/cam/ata/ata_xpt.c
Modified: head/sys/cam/ata/ata_xpt.c
==============================================================================
--- head/sys/cam/ata/ata_xpt.c Tue Apr 27 15:50:25 2010 (r207281)
+++ head/sys/cam/ata/ata_xpt.c Tue Apr 27 15:59:38 2010 (r207282)
@@ -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-head
mailing list