scst: Open-code the status_byte() macro

The status_byte() macro and also the SAM_STAT_* macros shifted right by one
bit have been removed from kernel v5.14. Hence open-code status_byte() and
change GOOD into SAM_STAT_GOOD etc.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-09-03 05:05:13 +00:00
parent 6edaec0d40
commit 3624c1baaf
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -264,7 +264,7 @@ static void disk_cmd_done(void *data, char *sense, int result, int resid)
WARN_ON_ONCE(IS_ERR_VALUE((long)result));
if (status_byte(result) == GOOD)
if ((result & 0xff) == SAM_STAT_GOOD)
goto out_complete;
work->result = result;
+2 -2
View File
@@ -12928,7 +12928,7 @@ static void scst_check_internal_sense(struct scst_device *dev, int result,
sl = scst_set_sense(sense, sense_len, dev->d_sense,
SCST_LOAD_SENSE(scst_sense_reset_UA));
scst_dev_check_set_UA(dev, NULL, sense, sl);
} else if ((status_byte(result) == CHECK_CONDITION) &&
} else if ((result & 0xff) == SAM_STAT_CHECK_CONDITION &&
scst_is_ua_sense(sense, sense_len))
scst_dev_check_set_UA(dev, NULL, sense, sense_len);
@@ -13809,7 +13809,7 @@ int scst_obtain_device_parameters(struct scst_device *dev,
scst_check_internal_sense(dev, rc, sense_buffer,
sizeof(sense_buffer));
#if 0
if ((status_byte(rc) == CHECK_CONDITION) &&
if ((rc & 0xff) == SAM_STAT_CHECK_CONDITION &&
scst_sense_valid(sense_buffer)) {
#else
/*