Update device identify data and serial number when device change detected.

Reprobe immediately following this should have fresh data.
This commit is contained in:
Alexander Motin 2010-04-27 15:59:38 +00:00
parent 45191d2588
commit 2eb4a8dcae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=207282

View File

@ -768,6 +768,7 @@ device_fail: if ((!softc->restart) &&
{
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 @@ device_fail: if ((!softc->restart) &&
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) {