Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] mvsas: check subsystem id [SCSI] mvsas: get phy info. [SCSI] mvsas: fix the buffer of rx DMA overflow bug [SCSI] mvsas: retry aborting task. [SCSI] mvsas: check hd whether unplugged [SCSI] mvsas : interrupt handling [SCSI] mvsas: a tag handler implementation [SCSI] mvsas: fill in error info record and phy mode6 bits. [SCSI] libsas: Warn if ATA device detected but CONFIG_SCSI_SAS_ATA not set [SCSI] hosts.c: fixes for "no error" reported after error scenarios Revert "[SCSI] fix bsg queue oops with iscsi logout"
This commit is contained in:
commit
d200ccce6d
|
@ -218,18 +218,24 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
|
||||||
|
|
||||||
get_device(&shost->shost_gendev);
|
get_device(&shost->shost_gendev);
|
||||||
|
|
||||||
if (shost->transportt->host_size &&
|
if (shost->transportt->host_size) {
|
||||||
(shost->shost_data = kzalloc(shost->transportt->host_size,
|
shost->shost_data = kzalloc(shost->transportt->host_size,
|
||||||
GFP_KERNEL)) == NULL)
|
GFP_KERNEL);
|
||||||
goto out_del_classdev;
|
if (shost->shost_data == NULL) {
|
||||||
|
error = -ENOMEM;
|
||||||
|
goto out_del_classdev;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (shost->transportt->create_work_queue) {
|
if (shost->transportt->create_work_queue) {
|
||||||
snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsi_wq_%d",
|
snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsi_wq_%d",
|
||||||
shost->host_no);
|
shost->host_no);
|
||||||
shost->work_q = create_singlethread_workqueue(
|
shost->work_q = create_singlethread_workqueue(
|
||||||
shost->work_q_name);
|
shost->work_q_name);
|
||||||
if (!shost->work_q)
|
if (!shost->work_q) {
|
||||||
|
error = -EINVAL;
|
||||||
goto out_free_shost_data;
|
goto out_free_shost_data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
error = scsi_sysfs_add_host(shost);
|
error = scsi_sysfs_add_host(shost);
|
||||||
|
|
|
@ -295,11 +295,14 @@ static void sas_discover_domain(struct work_struct *work)
|
||||||
case FANOUT_DEV:
|
case FANOUT_DEV:
|
||||||
error = sas_discover_root_expander(dev);
|
error = sas_discover_root_expander(dev);
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_SCSI_SAS_ATA
|
|
||||||
case SATA_DEV:
|
case SATA_DEV:
|
||||||
case SATA_PM:
|
case SATA_PM:
|
||||||
|
#ifdef CONFIG_SCSI_SAS_ATA
|
||||||
error = sas_discover_sata(dev);
|
error = sas_discover_sata(dev);
|
||||||
break;
|
break;
|
||||||
|
#else
|
||||||
|
SAS_DPRINTK("ATA device seen but CONFIG_SCSI_SAS_ATA=N so cannot attach\n");
|
||||||
|
/* Fall through */
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
error = -ENXIO;
|
error = -ENXIO;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -294,7 +294,6 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdev->request_queue) {
|
if (sdev->request_queue) {
|
||||||
bsg_unregister_queue(sdev->request_queue);
|
|
||||||
sdev->request_queue->queuedata = NULL;
|
sdev->request_queue->queuedata = NULL;
|
||||||
/* user context needed to free queue */
|
/* user context needed to free queue */
|
||||||
scsi_free_queue(sdev->request_queue);
|
scsi_free_queue(sdev->request_queue);
|
||||||
|
@ -858,6 +857,7 @@ void __scsi_remove_device(struct scsi_device *sdev)
|
||||||
if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
|
if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
bsg_unregister_queue(sdev->request_queue);
|
||||||
class_device_unregister(&sdev->sdev_classdev);
|
class_device_unregister(&sdev->sdev_classdev);
|
||||||
transport_remove_device(dev);
|
transport_remove_device(dev);
|
||||||
device_del(dev);
|
device_del(dev);
|
||||||
|
|
Loading…
Reference in a new issue