rrq_req->event != QEDF_IOREQ_EV_ELS_ERR_DETECT)
cancel_delayed_work_sync(&orig_io_req->timeout_work);
- refcount = atomic_read(&orig_io_req->refcount.refcount);
+ refcount = kref_read(&orig_io_req->refcount);
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "rrq_compl: orig io = %p,"
" orig xid = 0x%x, rrq_xid = 0x%x, refcount=%d\n",
orig_io_req, orig_io_req->xid, rrq_req->xid, refcount);
srr_req->event != QEDF_IOREQ_EV_ELS_ERR_DETECT)
cancel_delayed_work_sync(&orig_io_req->timeout_work);
- refcount = atomic_read(&orig_io_req->refcount.refcount);
+ refcount = kref_read(&orig_io_req->refcount);
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "Entered: orig_io=%p,"
" orig_io_xid=0x%x, rec_xid=0x%x, refcount=%d\n",
orig_io_req, orig_io_req->xid, srr_req->xid, refcount);
rec_req->event != QEDF_IOREQ_EV_ELS_ERR_DETECT)
cancel_delayed_work_sync(&orig_io_req->timeout_work);
- refcount = atomic_read(&orig_io_req->refcount.refcount);
+ refcount = kref_read(&orig_io_req->refcount);
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "Entered: orig_io=%p,"
" orig_io_xid=0x%x, rec_xid=0x%x, refcount=%d\n",
orig_io_req, orig_io_req->xid, rec_req->xid, refcount);
io_log->sg_count = scsi_sg_count(sc_cmd);
io_log->result = sc_cmd->result;
io_log->jiffies = jiffies;
- io_log->refcount = atomic_read(&io_req->refcount.refcount);
+ io_log->refcount = kref_read(&io_req->refcount);
if (direction == QEDF_IO_TRACE_REQ) {
/* For requests we only care abot the submission CPU */
/* Good I/O completion */
sc_cmd->result = DID_OK << 16;
} else {
- refcount = atomic_read(&io_req->refcount.refcount);
+ refcount = kref_read(&io_req->refcount);
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO,
"%d:0:%d:%d xid=0x%0x op=0x%02x "
"lba=%02x%02x%02x%02x cdb_status=%d "
qedf_unmap_sg_list(qedf, io_req);
sc_cmd->result = result << 16;
- refcount = atomic_read(&io_req->refcount.refcount);
+ refcount = kref_read(&io_req->refcount);
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, "%d:0:%d:%d: Completing "
"sc_cmd=%p result=0x%08x op=0x%02x lba=0x%02x%02x%02x%02x, "
"allowed=%d retries=%d refcount=%d.\n",
{
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO,
"Flushing ELS request xid=0x%x refcount=%d.\n", els_req->xid,
- atomic_read(&els_req->refcount.refcount));
+ kref_read(&els_req->refcount));
/*
* Need to distinguish this from a timeout when calling the