Lines Matching refs:status

235 #define STATUS_GET_ORB_HIGH(v)		((v).status & 0xffff)
236 #define STATUS_GET_SBP_STATUS(v) (((v).status >> 16) & 0xff)
237 #define STATUS_GET_LEN(v) (((v).status >> 24) & 0x07)
238 #define STATUS_GET_DEAD(v) (((v).status >> 27) & 0x01)
239 #define STATUS_GET_RESPONSE(v) (((v).status >> 28) & 0x03)
240 #define STATUS_GET_SOURCE(v) (((v).status >> 30) & 0x03)
245 u32 status;
260 void (*callback)(struct sbp2_orb * orb, struct sbp2_status * status);
287 struct sbp2_status status;
412 struct sbp2_status status;
416 length < 8 || length > sizeof(status)) {
421 status.status = be32_to_cpup(payload);
422 status.orb_low = be32_to_cpup(payload + 4);
423 memset(status.data, 0, sizeof(status.data));
425 memcpy(status.data, payload + 8, length - 8);
427 if (STATUS_GET_SOURCE(status) == 2 || STATUS_GET_SOURCE(status) == 3) {
429 "non-ORB related status write, not handled\n");
434 /* Lookup the orb corresponding to this status write. */
437 if (STATUS_GET_ORB_HIGH(status) == 0 &&
438 STATUS_GET_ORB_LOW(status) == iter->request_bus) {
448 orb->callback(orb, &status);
451 dev_err(lu_dev(lu), "status write for unknown ORB\n");
464 * This is a little tricky. We can get the status write for
465 * the orb before we get this callback. The status write
470 * failed and we didn't already get a status write.
538 struct sbp2_status *status)
543 if (status)
544 memcpy(&orb->status, status, sizeof(*status));
623 if (STATUS_GET_RESPONSE(orb->status) != 0 ||
624 STATUS_GET_SBP_STATUS(orb->status) != 0) {
625 dev_err(lu_dev(lu), "error status: %d:%d\n",
626 STATUS_GET_RESPONSE(orb->status),
627 STATUS_GET_SBP_STATUS(orb->status));
929 * We could check for "Function rejected" status, but
1336 struct sbp2_status *status)
1343 if (status != NULL) {
1344 if (STATUS_GET_DEAD(*status))
1347 switch (STATUS_GET_RESPONSE(*status)) {
1361 if (result == DID_OK << 16 && STATUS_GET_LEN(*status) > 1)
1362 result = sbp2_status_to_sense_data(STATUS_GET_DATA(*status),
1366 * If the orb completes with status == NULL, something