aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/aachba.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aacraid/aachba.c')
-rw-r--r--drivers/scsi/aacraid/aachba.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 7e26ebc26661..24b1ba06ece4 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -328,6 +328,16 @@ int aac_get_config_status(struct aac_dev *dev, int commit_flag)
328 return status; 328 return status;
329} 329}
330 330
331static void aac_expose_phy_device(struct scsi_cmnd *scsicmd)
332{
333 char inq_data;
334 scsi_sg_copy_to_buffer(scsicmd, &inq_data, sizeof(inq_data));
335 if ((inq_data & 0x20) && (inq_data & 0x1f) == TYPE_DISK) {
336 inq_data &= 0xdf;
337 scsi_sg_copy_from_buffer(scsicmd, &inq_data, sizeof(inq_data));
338 }
339}
340
331/** 341/**
332 * aac_get_containers - list containers 342 * aac_get_containers - list containers
333 * @common: adapter to probe 343 * @common: adapter to probe
@@ -2573,6 +2583,11 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
2573 2583
2574 scsi_dma_unmap(scsicmd); 2584 scsi_dma_unmap(scsicmd);
2575 2585
2586 /* expose physical device if expose_physicald flag is on */
2587 if (scsicmd->cmnd[0] == INQUIRY && !(scsicmd->cmnd[1] & 0x01)
2588 && expose_physicals > 0)
2589 aac_expose_phy_device(scsicmd);
2590
2576 /* 2591 /*
2577 * First check the fib status 2592 * First check the fib status
2578 */ 2593 */