aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoore, Eric <Eric.Moore@lsil.com>2006-04-13 18:08:17 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-14 10:35:12 -0400
commit3c0c25b97c7d020ef07f6366cf1d668a8e980c7c (patch)
tree229cd04ca4836ebdf7b12bf71540d5b92d32f170
parent1e08dcb39c6b95ec84fc8bad97d5bdce879b76c9 (diff)
[SCSI] mptfusion - fix panic in mptsas_slave_configure
Driver panic when RAID logical volume was present when driver loaded, or when a RAID logical volume was created on the fly. This issue was created in due to recent scsi_transport_sas change, when sas_read_port_mode_page was added into the mptsas drivers slave_config entry point. This new API expects that all sdev's to be assocated to an rphy, however that is not the case for logical volumes, as they are created using scsi_add_device, instead of sas_rphy_add(). Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/message/fusion/mptsas.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 010d4a39269b..e9716b10acea 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -366,7 +366,15 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure,
366static int 366static int
367mptsas_slave_configure(struct scsi_device *sdev) 367mptsas_slave_configure(struct scsi_device *sdev)
368{ 368{
369 sas_read_port_mode_page(sdev); 369 struct Scsi_Host *host = sdev->host;
370 MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata;
371
372 /*
373 * RAID volumes placed beyond the last expected port.
374 * Ignore sending sas mode pages in that case..
375 */
376 if (sdev->channel < hd->ioc->num_ports)
377 sas_read_port_mode_page(sdev);
370 378
371 return mptscsih_slave_configure(sdev); 379 return mptscsih_slave_configure(sdev);
372} 380}