mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
SCSI fixes on 20191015
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. Signed-off-by: James E.J. Bottomley <[email protected]> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXaYZYCYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishVuDAP9HBhGv dQ3FPA7gZ33rmsb8M1Q1NJ0GJuvFj2muh9CFYwD6AoJtVLivVZR75gojLLMqKpuf 6EwRTaUZwYAoWeILNuA= =+iTy -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "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" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: MAINTAINERS: Update qla2xxx driver scsi: zfcp: fix reaction on bit error threshold notification scsi: core: save/restore command resid for error handling scsi: qla2xxx: Remove WARN_ON_ONCE in qla2x00_status_cont_entry() scsi: sd: Ignore a failure to sync cache due to lack of authorization
This commit is contained in:
commit
8625732e77
6 changed files with 20 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1654,7 +1654,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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue