From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Brace Subject: Re: [PATCH 03/21] hpsa: abandon rescans on memory alloaction failures. Date: Mon, 26 Oct 2015 09:29:02 -0500 Message-ID: <562E38AE.8080409@pmcs.com> References: <20151024193306.17127.7819.stgit@brunhilda> <20151024195244.17127.26347.stgit@brunhilda> <562E379B.5040400@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pa0-f66.google.com ([209.85.220.66]:34164 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753975AbbJZO3F (ORCPT ); Mon, 26 Oct 2015 10:29:05 -0400 Received: by padda3 with SMTP id da3so21662519pad.1 for ; Mon, 26 Oct 2015 07:29:04 -0700 (PDT) In-Reply-To: <562E379B.5040400@redhat.com> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Tomas Henzl , scott.teel@pmcs.com, Kevin.Barnett@pmcs.com, scott.benesh@pmcs.com, james.bottomley@parallels.com, hch@infradead.org, Justin.Lindley@pmcs.com, elliott@hpe.com Cc: linux-scsi@vger.kernel.org On 10/26/2015 09:24 AM, Tomas Henzl wrote: > On 24.10.2015 21:52, Don Brace wrote: >> Abandon and reschedule rescan process only if device inquiries >> fail due to mem alloc failures, which are likely to occur for >> all devices. >> >> Otherwise, skip device if inquiry fails for other reasons, >> and continue rescanning process for other devices. >> >> Reviewed-by: Scott Teel >> Reviewed-by: Justin Lindley >> Reviewed-by: Kevin Barnett >> Signed-off-by: Don Brace >> --- >> drivers/scsi/hpsa.c | 24 +++++++++++++++++++----- >> 1 file changed, 19 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c >> index 5dfb6cf..e1ee06d 100644 >> --- a/drivers/scsi/hpsa.c >> +++ b/drivers/scsi/hpsa.c >> >> @@ -3799,11 +3804,20 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno) >> continue; >> >> /* Get device type, vendor, model, device id */ >> - if (hpsa_update_device_info(h, lunaddrbytes, tmpdevice, >> - &is_OBDR)) { >> + rc = hpsa_update_device_info(h, lunaddrbytes, tmpdevice, >> + &is_OBDR); >> + if (rc == -ENOMEM) { >> + dev_warn(&h->pdev->dev, >> + "Out of memory, rescan stopped.\n"); > What about 'rescan deferred" instead of "rescan stopped? I can do either "rescan deferred" or "rescan rescheduled" > > >> h->drv_req_rescan = 1; >> - continue; /* skip it if we can't talk to it. */ >> + goto out; >> } >> + if (rc) { >> + dev_warn(&h->pdev->dev, >> + "Inquiry failed, skipping device.\n"); >> + continue; >> + } >> + >> figure_bus_target_lun(h, lunaddrbytes, tmpdevice); >> hpsa_update_device_supports_aborts(h, tmpdevice, lunaddrbytes); >> this_device = currentsd[ncurrent]; >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html