mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-17 20:56:24 +00:00
1. Fixed bug - Task frame type setting.
2. Dead lock risk. 3. Null pointer may be used. 4. Alignment issue git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@826 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+8
-8
@@ -766,9 +766,9 @@ static int mvs_task_prep_ssp(struct mvs_info *mvi,
|
||||
flags |= MCH_FBURST;
|
||||
fburst = (1 << 7);
|
||||
}
|
||||
hdr->flags = cpu_to_le32(flags |
|
||||
(tei->n_elem << MCH_PRD_LEN_SHIFT) |
|
||||
(MCH_SSP_FR_CMD << MCH_SSP_FR_TYPE_SHIFT));
|
||||
if (is_tmf)
|
||||
flags |= (MCH_SSP_FR_TASK << MCH_SSP_FR_TYPE_SHIFT);
|
||||
hdr->flags = cpu_to_le32(flags | (tei->n_elem << MCH_PRD_LEN_SHIFT));
|
||||
hdr->tags = cpu_to_le32(tag);
|
||||
hdr->data_len = cpu_to_le32(task->total_xfer_len);
|
||||
|
||||
@@ -1473,7 +1473,7 @@ static int mvs_exec_internal_tmf_task(struct domain_device *dev,
|
||||
task->timer.expires = jiffies + MVS_TASK_TIMEOUT*HZ;
|
||||
add_timer(&task->timer);
|
||||
|
||||
res = mvs_task_exec(task, 1, GFP_KERNEL, NULL, 0, 1, tmf);
|
||||
res = mvs_task_exec(task, 1, GFP_KERNEL, NULL, 1, 1, tmf);
|
||||
|
||||
if (res) {
|
||||
del_timer(&task->timer);
|
||||
@@ -1900,11 +1900,11 @@ int mvs_slot_complete(struct mvs_info *mvi, u32 rx_desc, u32 flags)
|
||||
}
|
||||
|
||||
out:
|
||||
if (mvi_dev)
|
||||
if (mvi_dev) {
|
||||
mvi_dev->runing_req--;
|
||||
if (sas_protocol_ata(task->task_proto))
|
||||
mvs_free_reg_set(mvi, mvi_dev);
|
||||
|
||||
if (sas_protocol_ata(task->task_proto))
|
||||
mvs_free_reg_set(mvi, mvi_dev);
|
||||
}
|
||||
mvs_slot_task_free(mvi, task, slot, slot_idx);
|
||||
sts = tstat->stat;
|
||||
|
||||
|
||||
+1
-1
@@ -329,7 +329,7 @@ struct mvs_info {
|
||||
const struct mvs_chip_info *chip;
|
||||
|
||||
int tags_num;
|
||||
u8 tags[MVS_SLOTS >> 3];
|
||||
u32 tags[MVS_SLOTS >> 5];
|
||||
|
||||
/* further per-slot information */
|
||||
struct mvs_phy phy[MVS_MAX_PHYS];
|
||||
|
||||
Reference in New Issue
Block a user