git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4621 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-11-14 23:25:03 +00:00
parent e66752b4fc
commit b80d55ec5d
8 changed files with 11 additions and 11 deletions

View File

@@ -90,7 +90,7 @@ static int cdrom_attach(struct scst_device *dev)
cmd[0] = READ_CAPACITY;
cmd[1] = (dev->scsi_dev->scsi_level <= SCSI_2) ?
((dev->scsi_dev->lun << 5) & 0xe0) : 0;
retries = SCST_DEV_UA_RETRIES;
retries = SCST_DEV_RETRIES_ON_UA;
while (1) {
memset(buffer, 0, buffer_size);
memset(sense_buffer, 0, sizeof(sense_buffer));
@@ -115,7 +115,7 @@ static int cdrom_attach(struct scst_device *dev)
if (!--retries) {
PRINT_ERROR("UA not cleared after %d retries",
SCST_DEV_UA_RETRIES);
SCST_DEV_RETRIES_ON_UA);
dev->block_shift = CDROM_DEF_BLOCK_SHIFT;
res = -ENODEV;
goto out_free_buf;

View File

@@ -80,7 +80,7 @@ static int changer_attach(struct scst_device *dev)
goto out;
}
retries = SCST_DEV_UA_RETRIES;
retries = SCST_DEV_RETRIES_ON_UA;
do {
TRACE_DBG("%s", "Doing TEST_UNIT_READY");
rc = scsi_test_unit_ready(dev->scsi_dev,

View File

@@ -9,7 +9,7 @@
#include "scst_debug.h"
#endif
#define SCST_DEV_UA_RETRIES 5
#define SCST_DEV_RETRIES_ON_UA 5
#define SCST_PASSTHROUGH_RETRIES 0
#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)

View File

@@ -187,7 +187,7 @@ static int disk_attach(struct scst_device *dev)
cmd[0] = READ_CAPACITY;
cmd[1] = (dev->scsi_dev->scsi_level <= SCSI_2) ?
((dev->scsi_dev->lun << 5) & 0xe0) : 0;
retries = SCST_DEV_UA_RETRIES;
retries = SCST_DEV_RETRIES_ON_UA;
while (1) {
memset(buffer, 0, buffer_size);
memset(sense_buffer, 0, sizeof(sense_buffer));
@@ -211,7 +211,7 @@ static int disk_attach(struct scst_device *dev)
break;
if (!--retries) {
PRINT_ERROR("UA not clear after %d retries",
SCST_DEV_UA_RETRIES);
SCST_DEV_RETRIES_ON_UA);
res = -ENODEV;
goto out_free_buf;
}

View File

@@ -191,7 +191,7 @@ static int modisk_attach(struct scst_device *dev)
cmd[0] = READ_CAPACITY;
cmd[1] = (dev->scsi_dev->scsi_level <= SCSI_2) ?
((dev->scsi_dev->lun << 5) & 0xe0) : 0;
retries = SCST_DEV_UA_RETRIES;
retries = SCST_DEV_RETRIES_ON_UA;
while (1) {
memset(buffer, 0, buffer_size);
memset(sense_buffer, 0, sizeof(sense_buffer));
@@ -215,7 +215,7 @@ static int modisk_attach(struct scst_device *dev)
if (!--retries) {
PRINT_ERROR("UA not cleared after %d retries",
SCST_DEV_UA_RETRIES);
SCST_DEV_RETRIES_ON_UA);
res = -ENODEV;
goto out_free_buf;
}

View File

@@ -80,7 +80,7 @@ static int processor_attach(struct scst_device *dev)
goto out;
}
retries = SCST_DEV_UA_RETRIES;
retries = SCST_DEV_RETRIES_ON_UA;
do {
TRACE_DBG("%s", "Doing TEST_UNIT_READY");
rc = scsi_test_unit_ready(dev->scsi_dev,

View File

@@ -80,7 +80,7 @@ static int raid_attach(struct scst_device *dev)
goto out;
}
retries = SCST_DEV_UA_RETRIES;
retries = SCST_DEV_RETRIES_ON_UA;
do {
TRACE_DBG("%s", "Doing TEST_UNIT_READY");
rc = scsi_test_unit_ready(dev->scsi_dev,

View File

@@ -176,7 +176,7 @@ static int tape_attach(struct scst_device *dev)
goto out;
}
retries = SCST_DEV_UA_RETRIES;
retries = SCST_DEV_RETRIES_ON_UA;
do {
TRACE_DBG("%s", "Doing TEST_UNIT_READY");
rc = scsi_test_unit_ready(dev->scsi_dev,