summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_sas.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-01 10:22:04 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-01 10:22:04 -0800
commit71efa38c0eef581c69c221ceb8645f61d1e93270 (patch)
tree456c1894e26fb3aa362fc8e1fd8382160dfcb344 /drivers/scsi/megaraid/megaraid_sas.c
parent96789ac4b3943fec27fb6bf2713633b01a3903ad (diff)
parente2482fa16e9eef88344a4dca1a390d29432d4add (diff)
downloadop-kernel-dev-71efa38c0eef581c69c221ceb8645f61d1e93270.zip
op-kernel-dev-71efa38c0eef581c69c221ceb8645f61d1e93270.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 7de267e..4f39dd0 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -793,6 +793,20 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *))
return 0;
}
+static int megasas_slave_configure(struct scsi_device *sdev)
+{
+ /*
+ * Don't export physical disk devices to the disk driver.
+ *
+ * FIXME: Currently we don't export them to the midlayer at all.
+ * That will be fixed once LSI engineers have audited the
+ * firmware for possible issues.
+ */
+ if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && sdev->type == TYPE_DISK)
+ return -ENXIO;
+ return 0;
+}
+
/**
* megasas_wait_for_outstanding - Wait for all outstanding cmds
* @instance: Adapter soft state
@@ -943,6 +957,7 @@ static struct scsi_host_template megasas_template = {
.module = THIS_MODULE,
.name = "LSI Logic SAS based MegaRAID driver",
.proc_name = "megaraid_sas",
+ .slave_configure = megasas_slave_configure,
.queuecommand = megasas_queue_command,
.eh_device_reset_handler = megasas_reset_device,
.eh_bus_reset_handler = megasas_reset_bus_host,
@@ -1071,20 +1086,6 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd,
break;
}
- /*
- * Don't export physical disk devices to mid-layer.
- */
- if (!MEGASAS_IS_LOGICAL(cmd->scmd) &&
- (hdr->cmd_status == MFI_STAT_OK) &&
- (cmd->scmd->cmnd[0] == INQUIRY)) {
-
- if (((*(u8 *) cmd->scmd->request_buffer) & 0x1F) ==
- TYPE_DISK) {
- cmd->scmd->result = DID_BAD_TARGET << 16;
- exception = 1;
- }
- }
-
case MFI_CMD_LD_READ:
case MFI_CMD_LD_WRITE:
OpenPOWER on IntegriCloud