Skip to content

Commit

Permalink
scsi: ibmvfc: Define hcall wrapper for registering a Sub-CRQ
Browse files Browse the repository at this point in the history
Sub-CRQs are registred with firmware via a hypercall. Abstract that
interface into a simpler helper function.

Link: https://lore.kernel.org/r/20210114203148.246656-6-tyreld@linux.ibm.com
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Tyrel Datwyler authored and Martin K. Petersen committed Jan 15, 2021
1 parent bb35ecb commit 9e6b6b8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/scsi/ibmvscsi/ibmvfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@ static void ibmvfc_tgt_move_login(struct ibmvfc_target *);

static const char *unknown_error = "unknown error";

static long h_reg_sub_crq(unsigned long unit_address, unsigned long ioba,
unsigned long length, unsigned long *cookie,
unsigned long *irq)
{
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
long rc;

rc = plpar_hcall(H_REG_SUB_CRQ, retbuf, unit_address, ioba, length);
*cookie = retbuf[0];
*irq = retbuf[1];

return rc;
}

static int ibmvfc_check_caps(struct ibmvfc_host *vhost, unsigned long cap_flags)
{
u64 host_caps = be64_to_cpu(vhost->login_buf->resp.capabilities);
Expand Down

0 comments on commit 9e6b6b8

Please sign in to comment.