mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[SCSI] Return ENODATA on medium error
When a medium error is detected the SCSI stack should return ENODATA to the upper layers. [jejb: fix whitespace error] Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
a9d6ceb838
commit
7e782af576
5 changed files with 25 additions and 2 deletions
|
|
@ -1261,6 +1261,20 @@ static void activate_path(struct work_struct *work)
|
|||
pg_init_done, pgpath);
|
||||
}
|
||||
|
||||
static int noretry_error(int error)
|
||||
{
|
||||
switch (error) {
|
||||
case -EOPNOTSUPP:
|
||||
case -EREMOTEIO:
|
||||
case -EILSEQ:
|
||||
case -ENODATA:
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Anything else could be a path failure, so should be retried */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* end_io handling
|
||||
*/
|
||||
|
|
@ -1284,7 +1298,7 @@ static int do_end_io(struct multipath *m, struct request *clone,
|
|||
if (!error && !clone->errors)
|
||||
return 0; /* I/O complete */
|
||||
|
||||
if (error == -EOPNOTSUPP || error == -EREMOTEIO || error == -EILSEQ)
|
||||
if (noretry_error(error))
|
||||
return error;
|
||||
|
||||
if (mpio->pgpath)
|
||||
|
|
|
|||
Loading…
Reference in a new issue