summaryrefslogtreecommitdiff
path: root/drivers/scsi/pm8001/pm80xx_hwi.c
diff options
context:
space:
mode:
authorViswas G <Viswas.G@microsemi.com>2017-10-18 09:09:10 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-10-19 03:55:42 +0300
commit25c6edbde2946a5be57111a701a0f4fd06adf1ae (patch)
treeb7d9e1718b3218fb05079ce99c5913d36c5b6b11 /drivers/scsi/pm8001/pm80xx_hwi.c
parent6c85e4bcfd7c07ca20c0d8ad1bdde652ef99131f (diff)
downloadlinux-25c6edbde2946a5be57111a701a0f4fd06adf1ae.tar.xz
scsi: pm80xx: tag allocation for phy control request.
tag is taken from the tag pool instead of using the hardcoded tag value(1). Signed-off-by: Deepak Ukey <deepak.ukey@microsemi.com> Signed-off-by: Viswas G <Viswas.G@microsemi.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001/pm80xx_hwi.c')
-rw-r--r--drivers/scsi/pm8001/pm80xx_hwi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 2b26445d1b97..097096bf4bb0 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -4500,17 +4500,20 @@ static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha,
static int pm80xx_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha,
u32 phyId, u32 phy_op)
{
+ u32 tag;
+ int rc;
struct local_phy_ctl_req payload;
struct inbound_queue_table *circularQ;
- int ret;
u32 opc = OPC_INB_LOCAL_PHY_CONTROL;
memset(&payload, 0, sizeof(payload));
+ rc = pm8001_tag_alloc(pm8001_ha, &tag);
+ if (rc)
+ return rc;
circularQ = &pm8001_ha->inbnd_q_tbl[0];
- payload.tag = cpu_to_le32(1);
+ payload.tag = cpu_to_le32(tag);
payload.phyop_phyid =
cpu_to_le32(((phy_op & 0xFF) << 8) | (phyId & 0xFF));
- ret = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &payload, 0);
- return ret;
+ return pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &payload, 0);
}
static u32 pm80xx_chip_is_our_interupt(struct pm8001_hba_info *pm8001_ha)