All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mpt2sas: Abort initialization if no memory I/O resources, detected
@ 2015-06-12 22:05 Timothy Pearson
  2015-06-16 16:28 ` Timothy Pearson
  0 siblings, 1 reply; 19+ messages in thread
From: Timothy Pearson @ 2015-06-12 22:05 UTC (permalink / raw)
  To: Nagalakshmi Nandigama, Sreekanth Reddy, support,
	DL-MPTFusionLinux, linux-scsi

The mpt2sas driver crashes if the BIOS does not set up at least one
memory I/O resource.  This failure can happen if the device is too
slow to respond during POST and is missed by the BIOS, but Linux
then detects the device later in the boot process.

This patch aborts initialization and prints a warning if no memory I/O
resources are found.

Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Tested-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
---
  drivers/scsi/mpt2sas/mpt2sas_base.c |    9 +++++++++
  1 file changed, 9 insertions(+)

diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c 
b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 11248de..15c9504 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -6,6 +6,8 @@
   * Copyright (C) 2007-2014  LSI Corporation
   * Copyright (C) 20013-2014 Avago Technologies
   *  (mailto: MPT-FusionLinux.pdl@avagotech.com)
+ * Copyright (C) 2015 Raptor Engineering
+ *  (mailto: support@araptorengineeringinc.com)
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License
@@ -1582,6 +1584,13 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER 
*ioc)
  		}
  	}

+	if (ioc->chip == NULL) {
+		printk(MPT2SAS_ERR_FMT "unable to map "
+			"adapter memory (resource not found)!\n", ioc->name);
+		r = -EINVAL;
+		goto out_fail;
+	}
+
  	_base_mask_interrupts(ioc);

  	r = _base_get_ioc_facts(ioc, CAN_SLEEP);
-- 
1.7.9.5

-- 
Timothy Pearson
Raptor Engineering
+1 (415) 727-8645
http://www.raptorengineeringinc.com

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-06-28  9:41 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 22:05 [PATCH] mpt2sas: Abort initialization if no memory I/O resources, detected Timothy Pearson
2015-06-16 16:28 ` Timothy Pearson
2015-06-16 17:42   ` Joe Lawrence
2015-06-16 18:49     ` Timothy Pearson
2015-06-21 18:46       ` Timothy Pearson
2015-06-23  3:54         ` Joe Lawrence
2015-06-23 12:36           ` Sreekanth Reddy
2015-06-23 13:35             ` James Bottomley
2015-06-23 13:49               ` Sreekanth Reddy
2015-06-23 17:33               ` Timothy Pearson
2015-06-23 17:45                 ` James Bottomley
2015-06-23 17:47                   ` Timothy Pearson
2015-06-23 17:56                     ` James Bottomley
2015-06-23 17:59                       ` Timothy Pearson
2015-06-23 18:19                         ` James Bottomley
     [not found]                           ` <421649124.3142.1435087707382.JavaMail.zimbra@raptorengineeringinc.com>
2015-06-23 19:28                             ` [PATCH v2] mpt2sas: Abort initialization if no memory I/O resources detected Timothy Pearson
2015-06-28  1:30                               ` Timothy Pearson
2015-06-28  9:41                                 ` Sreekanth Reddy
     [not found]                           ` <216113403.3157.1435087917094.JavaMail.zimbra@raptorengineeringinc.com>
2015-06-23 19:32                             ` [PATCH] mpt3sas: " Timothy Pearson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.