Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux-2.6-microblaze.git] / drivers / scsi / scsi.c
index 1f5b5c8..930e480 100644 (file)
@@ -186,7 +186,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
        struct scsi_driver *drv;
        unsigned int good_bytes;
 
-       scsi_device_unbusy(sdev);
+       scsi_device_unbusy(sdev, cmd);
 
        /*
         * Clear the flags that say that the device/target/host is no longer
@@ -434,8 +434,8 @@ static void scsi_update_vpd_page(struct scsi_device *sdev, u8 page,
                return;
 
        mutex_lock(&sdev->inquiry_mutex);
-       rcu_swap_protected(*sdev_vpd_buf, vpd_buf,
-                          lockdep_is_held(&sdev->inquiry_mutex));
+       vpd_buf = rcu_replace_pointer(*sdev_vpd_buf, vpd_buf,
+                                     lockdep_is_held(&sdev->inquiry_mutex));
        mutex_unlock(&sdev->inquiry_mutex);
 
        if (vpd_buf)
@@ -465,10 +465,14 @@ void scsi_attach_vpd(struct scsi_device *sdev)
                return;
 
        for (i = 4; i < vpd_buf->len; i++) {
+               if (vpd_buf->data[i] == 0x0)
+                       scsi_update_vpd_page(sdev, 0x0, &sdev->vpd_pg0);
                if (vpd_buf->data[i] == 0x80)
                        scsi_update_vpd_page(sdev, 0x80, &sdev->vpd_pg80);
                if (vpd_buf->data[i] == 0x83)
                        scsi_update_vpd_page(sdev, 0x83, &sdev->vpd_pg83);
+               if (vpd_buf->data[i] == 0x89)
+                       scsi_update_vpd_page(sdev, 0x89, &sdev->vpd_pg89);
        }
        kfree(vpd_buf);
 }