Source
192
192
193
193
timeout = (cmd[0] == INITIALIZE_ELEMENT_STATUS)
194
194
? timeout_init : timeout_move;
195
195
196
196
retry:
197
197
errno = 0;
198
198
result = scsi_execute_req(ch->device, cmd, direction, buffer,
199
199
buflength, &sshdr, timeout * HZ,
200
200
MAX_RETRIES, NULL);
201
201
202
-
if (driver_byte(result) & DRIVER_SENSE) {
202
+
if (driver_byte(result) == DRIVER_SENSE) {
203
203
if (debug)
204
204
scsi_print_sense_hdr(ch->device, ch->name, &sshdr);
205
205
errno = ch_find_errno(&sshdr);
206
206
207
207
switch(sshdr.sense_key) {
208
208
case UNIT_ATTENTION:
209
209
ch->unit_attention = 1;
210
210
if (retries++ < 3)
211
211
goto retry;
212
212
break;