> + if ((dev != (struct aac_dev *)NULL) > + && (dev->scsi_host_ptr != (struct Scsi_Host *)NULL)) { no need for the casts. > + shost_for_each_device(device, dev->scsi_host_ptr) > + { > + if ((device->channel == CONTAINER_TO_CHANNEL(container)) > + && (device->id == CONTAINER_TO_ID(container)) > + && (device->lun == CONTAINER_TO_LUN(container))) { > + busy |= device->device_busy || > + test_bit(SHOST_RECOVERY, > + (const unsigned long*)&dev->scsi_host_ptr->shost_state); this is broken. You must not look at the device_busy field from a driver, and it means something different than what seems intended here. Also the direct messing with the host state is wrong. > + if (busy == 0) { > + device->removable = 1; devce->removeable means the device has a removable medium, not that it can go away. ---end quoted text--- - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html