27 #include <linux/slab.h>
29 #include <scsi/scsi.h>
93 struct se_ua *
ua, *ua_p, *ua_tmp;
102 pr_err(
"Unable to allocate struct se_ua\n");
145 if (ua_p->
ua_asc == 0x29) {
146 if ((asc == 0x29) && (ascq > ua_p->
ua_ascq))
152 }
else if (ua_p->
ua_asc == 0x2a) {
157 if ((asc == 0x29) || (ascq > ua_p->
ua_asc))
177 pr_debug(
"[%s]: Allocated UNIT ATTENTION, mapped LUN: %u, ASC:"
178 " 0x%02x, ASCQ: 0x%02x\n",
179 nacl->
se_tpg->se_tpg_tfo->get_fabric_name(), unpacked_lun,
240 if (dev->
se_sub_dev->se_dev_attrib.emulate_ua_intlck_ctrl != 0) {
264 pr_debug(
"[%s]: %s UNIT ATTENTION condition with"
265 " INTLCK_CTRL: %d, mapped LUN: %u, got CDB: 0x%02x"
266 " reported ASC: 0x%02x, ASCQ: 0x%02x\n",
267 nacl->
se_tpg->se_tpg_tfo->get_fabric_name(),
268 (dev->
se_sub_dev->se_dev_attrib.emulate_ua_intlck_ctrl != 0) ?
"Reporting" :
269 "Releasing", dev->
se_sub_dev->se_dev_attrib.emulate_ua_intlck_ctrl,
323 pr_debug(
"[%s]: Released UNIT ATTENTION condition, mapped"
324 " LUN: %u, got REQUEST_SENSE reported ASC: 0x%02x,"
325 " ASCQ: 0x%02x\n", nacl->
se_tpg->se_tpg_tfo->get_fabric_name(),
328 return (head) ? -
EPERM : 0;