On 07/04/2010 03:22 PM, Rolf Eike Beer wrote:
Mike Christie wrote:
On 06/29/2010 07:00 PM, Jayamohan Kallickal wrote:
@@ -160,18 +179,34 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd
*sc)
spin_unlock_bh(&session->lock);
inv_tbl = phba->inv_tbl;
- tag = mgmt_invalidate_icds(phba, inv_tbl, num_invalidate, cid);
+ nonemb_cmd.va = pci_alloc_consistent(phba->ctrl.pdev,
+ sizeof(struct invalidate_commands_params_in),
+ &nonemb_cmd.dma);
+ if (nonemb_cmd.va == NULL) {
+ SE_DEBUG(DBG_LVL_1,
+ "Failed to allocate memory for"
+ "mgmt_invalidate_icds\n");
+ return -1;
return FAILED.
Why not ENOMEM? That would come into my mind when an allocations fails.
Because that function is called by the scsi layer's error handling code
and it uses SUCCESS and FAILED for return values.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html