projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'lsk/v3.10/topic/android-fixes' into linux-linaro-lsk...
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
scsi
/
esp_scsi.c
diff --git
a/drivers/scsi/esp_scsi.c
b/drivers/scsi/esp_scsi.c
index 34552bf1c023d6468af7aea32afcc70ab0f88953..55548dc5cec39da14ec4b23c33ae4d1a609d30e6 100644
(file)
--- a/
drivers/scsi/esp_scsi.c
+++ b/
drivers/scsi/esp_scsi.c
@@
-530,7
+530,7
@@
static int esp_need_to_nego_sync(struct esp_target_data *tp)
static int esp_alloc_lun_tag(struct esp_cmd_entry *ent,
struct esp_lun_data *lp)
{
static int esp_alloc_lun_tag(struct esp_cmd_entry *ent,
struct esp_lun_data *lp)
{
- if (!ent->tag[0]) {
+ if (!ent->
orig_
tag[0]) {
/* Non-tagged, slot already taken? */
if (lp->non_tagged_cmd)
return -EBUSY;
/* Non-tagged, slot already taken? */
if (lp->non_tagged_cmd)
return -EBUSY;
@@
-564,9
+564,9
@@
static int esp_alloc_lun_tag(struct esp_cmd_entry *ent,
return -EBUSY;
}
return -EBUSY;
}
- BUG_ON(lp->tagged_cmds[ent->tag[1]]);
+ BUG_ON(lp->tagged_cmds[ent->
orig_
tag[1]]);
- lp->tagged_cmds[ent->tag[1]] = ent;
+ lp->tagged_cmds[ent->
orig_
tag[1]] = ent;
lp->num_tagged++;
return 0;
lp->num_tagged++;
return 0;
@@
-575,9
+575,9
@@
static int esp_alloc_lun_tag(struct esp_cmd_entry *ent,
static void esp_free_lun_tag(struct esp_cmd_entry *ent,
struct esp_lun_data *lp)
{
static void esp_free_lun_tag(struct esp_cmd_entry *ent,
struct esp_lun_data *lp)
{
- if (ent->tag[0]) {
- BUG_ON(lp->tagged_cmds[ent->tag[1]] != ent);
- lp->tagged_cmds[ent->tag[1]] = NULL;
+ if (ent->
orig_
tag[0]) {
+ BUG_ON(lp->tagged_cmds[ent->
orig_
tag[1]] != ent);
+ lp->tagged_cmds[ent->
orig_
tag[1]] = NULL;
lp->num_tagged--;
} else {
BUG_ON(lp->non_tagged_cmd != ent);
lp->num_tagged--;
} else {
BUG_ON(lp->non_tagged_cmd != ent);
@@
-667,6
+667,8
@@
static struct esp_cmd_entry *find_and_prep_issuable_command(struct esp *esp)
ent->tag[0] = 0;
ent->tag[1] = 0;
}
ent->tag[0] = 0;
ent->tag[1] = 0;
}
+ ent->orig_tag[0] = ent->tag[0];
+ ent->orig_tag[1] = ent->tag[1];
if (esp_alloc_lun_tag(ent, lp) < 0)
continue;
if (esp_alloc_lun_tag(ent, lp) < 0)
continue;