mv_sas.c (986c6f7c3fc855032f3457a5a1b7fbcc09c375bb) | mv_sas.c (1d6049a3b14feb39c8d6c8f538a711dcc54f88e0) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Marvell 88SE64xx/88SE94xx main function 4 * 5 * Copyright 2007 Red Hat, Inc. 6 * Copyright 2008 Marvell. <kewei@marvell.com> 7 * Copyright 2009-2011 Marvell. <yuxiangl@marvell.com> 8*/ --- 801 unchanged lines hidden (view full) --- 810 if (rc) { 811 mv_dprintk("rc is %x\n", rc); 812 goto err_out_slot_buf; 813 } 814 slot->task = task; 815 slot->port = tei.port; 816 task->lldd_task = slot; 817 list_add_tail(&slot->entry, &tei.port->list); | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Marvell 88SE64xx/88SE94xx main function 4 * 5 * Copyright 2007 Red Hat, Inc. 6 * Copyright 2008 Marvell. <kewei@marvell.com> 7 * Copyright 2009-2011 Marvell. <yuxiangl@marvell.com> 8*/ --- 801 unchanged lines hidden (view full) --- 810 if (rc) { 811 mv_dprintk("rc is %x\n", rc); 812 goto err_out_slot_buf; 813 } 814 slot->task = task; 815 slot->port = tei.port; 816 task->lldd_task = slot; 817 list_add_tail(&slot->entry, &tei.port->list); |
818 spin_lock(&task->task_state_lock); 819 task->task_state_flags |= SAS_TASK_AT_INITIATOR; 820 spin_unlock(&task->task_state_lock); | |
821 822 mvi_dev->running_req++; 823 ++(*pass); 824 mvi->tx_prod = (mvi->tx_prod + 1) & (MVS_CHIP_SLOT_SZ - 1); 825 826 return rc; 827 828err_out_slot_buf: --- 807 unchanged lines hidden (view full) --- 1636 } 1637 1638 return; 1639} 1640 1641static void mvs_fill_ssp_resp_iu(struct ssp_response_iu *iu, 1642 u8 key, u8 asc, u8 asc_q) 1643{ | 818 819 mvi_dev->running_req++; 820 ++(*pass); 821 mvi->tx_prod = (mvi->tx_prod + 1) & (MVS_CHIP_SLOT_SZ - 1); 822 823 return rc; 824 825err_out_slot_buf: --- 807 unchanged lines hidden (view full) --- 1633 } 1634 1635 return; 1636} 1637 1638static void mvs_fill_ssp_resp_iu(struct ssp_response_iu *iu, 1639 u8 key, u8 asc, u8 asc_q) 1640{ |
1644 iu->datapres = 2; | 1641 iu->datapres = SAS_DATAPRES_SENSE_DATA; |
1645 iu->response_data_len = 0; 1646 iu->sense_data_len = 17; 1647 iu->status = 02; 1648 mvs_set_sense(iu->sense_data, 17, 0, 1649 key, asc, asc_q); 1650} 1651 1652static int mvs_slot_err(struct mvs_info *mvi, struct sas_task *task, --- 63 unchanged lines hidden (view full) --- 1716 if (unlikely(!task || !task->lldd_task || !task->dev)) 1717 return -1; 1718 1719 tstat = &task->task_status; 1720 dev = task->dev; 1721 mvi_dev = dev->lldd_dev; 1722 1723 spin_lock(&task->task_state_lock); | 1642 iu->response_data_len = 0; 1643 iu->sense_data_len = 17; 1644 iu->status = 02; 1645 mvs_set_sense(iu->sense_data, 17, 0, 1646 key, asc, asc_q); 1647} 1648 1649static int mvs_slot_err(struct mvs_info *mvi, struct sas_task *task, --- 63 unchanged lines hidden (view full) --- 1713 if (unlikely(!task || !task->lldd_task || !task->dev)) 1714 return -1; 1715 1716 tstat = &task->task_status; 1717 dev = task->dev; 1718 mvi_dev = dev->lldd_dev; 1719 1720 spin_lock(&task->task_state_lock); |
1724 task->task_state_flags &= 1725 ~(SAS_TASK_STATE_PENDING | SAS_TASK_AT_INITIATOR); | 1721 task->task_state_flags &= ~SAS_TASK_STATE_PENDING; |
1726 task->task_state_flags |= SAS_TASK_STATE_DONE; 1727 /* race condition*/ 1728 aborted = task->task_state_flags & SAS_TASK_STATE_ABORTED; 1729 spin_unlock(&task->task_state_lock); 1730 1731 memset(tstat, 0, sizeof(*tstat)); 1732 tstat->resp = SAS_TASK_COMPLETE; 1733 --- 375 unchanged lines hidden --- | 1722 task->task_state_flags |= SAS_TASK_STATE_DONE; 1723 /* race condition*/ 1724 aborted = task->task_state_flags & SAS_TASK_STATE_ABORTED; 1725 spin_unlock(&task->task_state_lock); 1726 1727 memset(tstat, 0, sizeof(*tstat)); 1728 tstat->resp = SAS_TASK_COMPLETE; 1729 --- 375 unchanged lines hidden --- |