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:
Linus Torvalds 2008-04-02 07:47:31 -07:00
commit d200ccce6d
4 changed files with 497 additions and 237 deletions

View file

@ -218,18 +218,24 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
get_device(&shost->shost_gendev);
if (shost->transportt->host_size &&
(shost->shost_data = kzalloc(shost->transportt->host_size,
GFP_KERNEL)) == NULL)
goto out_del_classdev;
if (shost->transportt->host_size) {
shost->shost_data = kzalloc(shost->transportt->host_size,
GFP_KERNEL);
if (shost->shost_data == NULL) {
error = -ENOMEM;
goto out_del_classdev;
}
}
if (shost->transportt->create_work_queue) {
snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsi_wq_%d",
shost->host_no);
shost->work_q = create_singlethread_workqueue(
shost->work_q_name);
if (!shost->work_q)
if (!shost->work_q) {
error = -EINVAL;
goto out_free_shost_data;
}
}
error = scsi_sysfs_add_host(shost);

View file

@ -295,11 +295,14 @@ static void sas_discover_domain(struct work_struct *work)
case FANOUT_DEV:
error = sas_discover_root_expander(dev);
break;
#ifdef CONFIG_SCSI_SAS_ATA
case SATA_DEV:
case SATA_PM:
#ifdef CONFIG_SCSI_SAS_ATA
error = sas_discover_sata(dev);
break;
#else
SAS_DPRINTK("ATA device seen but CONFIG_SCSI_SAS_ATA=N so cannot attach\n");
/* Fall through */
#endif
default:
error = -ENXIO;

File diff suppressed because it is too large Load diff

View file

@ -294,7 +294,6 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
}
if (sdev->request_queue) {
bsg_unregister_queue(sdev->request_queue);
sdev->request_queue->queuedata = NULL;
/* user context needed to free 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)
return;
bsg_unregister_queue(sdev->request_queue);
class_device_unregister(&sdev->sdev_classdev);
transport_remove_device(dev);
device_del(dev);