diff mbox series

[GIT,PULL] SCSI fixes for 5.4-rc3

Message ID 1571166922.15362.19.camel@HansenPartnership.com (mailing list archive)
State Not Applicable
Headers show
Series [GIT,PULL] SCSI fixes for 5.4-rc3 | expand

Commit Message

James Bottomley Oct. 15, 2019, 7:15 p.m. UTC
Five changes, two in drivers (qla2xxx, zfcp), one to MAINTAINERS
(qla2xxx) and two in the core.  The last two are mostly about removing
incorrect messages from the kernel log: the resid message is definitely
wrong and the sync cache on protected drive problem is arguably wrong.

The patch is available here:

git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes

The short changelog is:

Damien Le Moal (1):
      scsi: core: save/restore command resid for error handling

Daniel Wagner (1):
      scsi: qla2xxx: Remove WARN_ON_ONCE in qla2x00_status_cont_entry()

Himanshu Madhani (1):
      scsi: MAINTAINERS: Update qla2xxx driver

Oliver Neukum (1):
      scsi: sd: Ignore a failure to sync cache due to lack of authorization

Steffen Maier (1):
      scsi: zfcp: fix reaction on bit error threshold notification

And the diffstat:

 MAINTAINERS                    |  2 +-
 drivers/s390/scsi/zfcp_fsf.c   | 16 +++++++++++++---
 drivers/scsi/qla2xxx/qla_isr.c |  2 --
 drivers/scsi/scsi_error.c      |  3 +++
 drivers/scsi/sd.c              |  3 ++-
 include/scsi/scsi_eh.h         |  1 +
 6 files changed, 20 insertions(+), 7 deletions(-)

With full diff below.

James

---

Comments

pr-tracker-bot@kernel.org Oct. 15, 2019, 10:25 p.m. UTC | #1
The pull request you sent on Tue, 15 Oct 2019 15:15:22 -0400:

> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/8625732e7712882bd14e1fce962bdc3c315acd41

Thank you!
Heiko Carstens Oct. 18, 2019, 10:35 a.m. UTC | #2
On Tue, Oct 15, 2019 at 03:15:22PM -0400, James Bottomley wrote:
> Five changes, two in drivers (qla2xxx, zfcp), one to MAINTAINERS
> (qla2xxx) and two in the core.  The last two are mostly about removing
> incorrect messages from the kernel log: the resid message is definitely
> wrong and the sync cache on protected drive problem is arguably wrong.
> 
> The patch is available here:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
> 
> The short changelog is:
> 
> Damien Le Moal (1):
>       scsi: core: save/restore command resid for error handling
> 
> Daniel Wagner (1):
>       scsi: qla2xxx: Remove WARN_ON_ONCE in qla2x00_status_cont_entry()
> 
> Himanshu Madhani (1):
>       scsi: MAINTAINERS: Update qla2xxx driver
> 
> Oliver Neukum (1):
>       scsi: sd: Ignore a failure to sync cache due to lack of authorization
> 
> Steffen Maier (1):
>       scsi: zfcp: fix reaction on bit error threshold notification

James, Martin, I do not know how you coordinate your work, however is
there any chance that the two fixes sitting in

https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git/log/?h=postmerge

get merged anytime soon?

6b6fa7a5c86e1269d9f0c9a5b902072351317387 ("scsi: core: fix dh and multipathing for SCSI hosts without request batching")
82a9ac7130cf51c2640800fb0ef19d3a05cb8fff ("scsi: core: fix missing .cleanup_rq for SCSI hosts without request batching")

I have a CI system which fails to boot since two weeks because of this...
Martin K. Petersen Oct. 18, 2019, 1:19 p.m. UTC | #3
> James, Martin, I do not know how you coordinate your work, however is
> there any chance that the two fixes sitting in
>
> https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git/log/?h=postmerge
>
> get merged anytime soon?

Ugh.

Linus, these two commits were in a separate postmerge branch due to a
dependency on changes merged for 5.4 in the block tree. The patches fix
two issues in the intersection of the request cleanup changes from block
(b7e9e1fb7a92) and the request batching changes (8930a6c20791) that were
made to SCSI during the 5.4 cycle.

The following changes since commit 10fd71780f7d155f4e35fecfad0ebd4a725a244b:

  Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi (2019-09-21 10:50:15 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git tags/mkp-scsi-postmerge

for you to fetch changes up to 6b6fa7a5c86e1269d9f0c9a5b902072351317387:

  scsi: core: fix dh and multipathing for SCSI hosts without request batching (2019-09-23 21:34:34 -0400)

----------------------------------------------------------------
Steffen Maier (2):
      scsi: core: fix missing .cleanup_rq for SCSI hosts without request batching
      scsi: core: fix dh and multipathing for SCSI hosts without request batching

 drivers/scsi/scsi_lib.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Linus Torvalds Oct. 18, 2019, 3:12 p.m. UTC | #4
On Fri, Oct 18, 2019 at 6:21 AM Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>
> Linus, these two commits were in a separate postmerge branch due to a
> dependency on changes merged for 5.4 in the block tree. The patches fix
> two issues in the intersection of the request cleanup changes from block
> (b7e9e1fb7a92) and the request batching changes (8930a6c20791) that were
> made to SCSI during the 5.4 cycle.

Pulled. I don't know if you'll get the pr-tracker-bot reply when the
pull request was in the middle of a thread like this, but it probably
doesn't matter. We'll see.

The "in the middle of a thread" probably matters more to me - just as
a FYI, when there's some discussion thread where the developers are
already actively involved, I tend to just scan the emails
superficially, and could easily have missed that there was a pull
request hidden in the conversation..

              Linus
pr-tracker-bot@kernel.org Oct. 18, 2019, 3:15 p.m. UTC | #5
The pull request you sent on Fri, 18 Oct 2019 09:19:42 -0400:

> https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git tags/mkp-scsi-postmerge

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/c3419fd6d3a340d23329ce01bb391deb27d8368b

Thank you!
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 783569e3c4b4..91f33522393a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13184,7 +13184,7 @@  S:	Maintained
 F:	drivers/scsi/qla1280.[ch]
 
 QLOGIC QLA2XXX FC-SCSI DRIVER
-M:	qla2xxx-upstream@qlogic.com
+M:	hmadhani@marvell.com
 L:	linux-scsi@vger.kernel.org
 S:	Supported
 F:	Documentation/scsi/LICENSE.qla2xxx
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 296bbc3c4606..cf63916814cc 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -27,6 +27,11 @@ 
 
 struct kmem_cache *zfcp_fsf_qtcb_cache;
 
+static bool ber_stop = true;
+module_param(ber_stop, bool, 0600);
+MODULE_PARM_DESC(ber_stop,
+		 "Shuts down FCP devices for FCP channels that report a bit-error count in excess of its threshold (default on)");
+
 static void zfcp_fsf_request_timeout_handler(struct timer_list *t)
 {
 	struct zfcp_fsf_req *fsf_req = from_timer(fsf_req, t, timer);
@@ -236,10 +241,15 @@  static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req)
 	case FSF_STATUS_READ_SENSE_DATA_AVAIL:
 		break;
 	case FSF_STATUS_READ_BIT_ERROR_THRESHOLD:
-		dev_warn(&adapter->ccw_device->dev,
-			 "The error threshold for checksum statistics "
-			 "has been exceeded\n");
 		zfcp_dbf_hba_bit_err("fssrh_3", req);
+		if (ber_stop) {
+			dev_warn(&adapter->ccw_device->dev,
+				 "All paths over this FCP device are disused because of excessive bit errors\n");
+			zfcp_erp_adapter_shutdown(adapter, 0, "fssrh_b");
+		} else {
+			dev_warn(&adapter->ccw_device->dev,
+				 "The error threshold for checksum statistics has been exceeded\n");
+		}
 		break;
 	case FSF_STATUS_READ_LINK_DOWN:
 		zfcp_fsf_status_read_link_down(req);
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 4c26630c1c3e..009fd5a33fcd 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -2837,8 +2837,6 @@  qla2x00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
 	if (sense_len == 0) {
 		rsp->status_srb = NULL;
 		sp->done(sp, cp->result);
-	} else {
-		WARN_ON_ONCE(true);
 	}
 }
 
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 1c470e31ae81..ae2fa170f6ad 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -967,6 +967,7 @@  void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
 	ses->data_direction = scmd->sc_data_direction;
 	ses->sdb = scmd->sdb;
 	ses->result = scmd->result;
+	ses->resid_len = scmd->req.resid_len;
 	ses->underflow = scmd->underflow;
 	ses->prot_op = scmd->prot_op;
 	ses->eh_eflags = scmd->eh_eflags;
@@ -977,6 +978,7 @@  void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
 	memset(scmd->cmnd, 0, BLK_MAX_CDB);
 	memset(&scmd->sdb, 0, sizeof(scmd->sdb));
 	scmd->result = 0;
+	scmd->req.resid_len = 0;
 
 	if (sense_bytes) {
 		scmd->sdb.length = min_t(unsigned, SCSI_SENSE_BUFFERSIZE,
@@ -1029,6 +1031,7 @@  void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses)
 	scmd->sc_data_direction = ses->data_direction;
 	scmd->sdb = ses->sdb;
 	scmd->result = ses->result;
+	scmd->req.resid_len = ses->resid_len;
 	scmd->underflow = ses->underflow;
 	scmd->prot_op = ses->prot_op;
 	scmd->eh_eflags = ses->eh_eflags;
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 91af598f2f53..0f96eb0ddbfa 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1655,7 +1655,8 @@  static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr)
 		/* we need to evaluate the error return  */
 		if (scsi_sense_valid(sshdr) &&
 			(sshdr->asc == 0x3a ||	/* medium not present */
-			 sshdr->asc == 0x20))	/* invalid command */
+			 sshdr->asc == 0x20 ||	/* invalid command */
+			 (sshdr->asc == 0x74 && sshdr->ascq == 0x71)))	/* drive is password locked */
 				/* this is no error here */
 				return 0;
 
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h
index 3810b340551c..6bd5ed695a5e 100644
--- a/include/scsi/scsi_eh.h
+++ b/include/scsi/scsi_eh.h
@@ -32,6 +32,7 @@  extern int scsi_ioctl_reset(struct scsi_device *, int __user *);
 struct scsi_eh_save {
 	/* saved state */
 	int result;
+	unsigned int resid_len;
 	int eh_eflags;
 	enum dma_data_direction data_direction;
 	unsigned underflow;