diff options
author | Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> | 2012-09-20 23:08:04 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-10-01 05:34:55 +0200 |
commit | 818216442b6dd49fa93a4caf9d7b56af364b502b (patch) | |
tree | f9f576907c2b3ae24a9a681fcb161b82802fea86 /drivers/infiniband/hw/nes/nes.h | |
parent | RDMA/nes: Fix for crash when TX checksum offload is off (diff) | |
download | linux-818216442b6dd49fa93a4caf9d7b56af364b502b.tar.xz linux-818216442b6dd49fa93a4caf9d7b56af364b502b.zip |
RDMA/nes: Print hardware resource type
Hardware resource types are added and when a resource isn't available,
its type is printed.
Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes.h')
-rw-r--r-- | drivers/infiniband/hw/nes/nes.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h index c438e4691b3c..0da62b904d00 100644 --- a/drivers/infiniband/hw/nes/nes.h +++ b/drivers/infiniband/hw/nes/nes.h @@ -399,11 +399,20 @@ static inline void nes_write8(void __iomem *addr, u8 val) writeb(val, addr); } - +enum nes_resource { + NES_RESOURCE_MW = 1, + NES_RESOURCE_FAST_MR, + NES_RESOURCE_PHYS_MR, + NES_RESOURCE_USER_MR, + NES_RESOURCE_PD, + NES_RESOURCE_QP, + NES_RESOURCE_CQ, + NES_RESOURCE_ARP +}; static inline int nes_alloc_resource(struct nes_adapter *nesadapter, unsigned long *resource_array, u32 max_resources, - u32 *req_resource_num, u32 *next) + u32 *req_resource_num, u32 *next, enum nes_resource resource_type) { unsigned long flags; u32 resource_num; @@ -414,7 +423,7 @@ static inline int nes_alloc_resource(struct nes_adapter *nesadapter, if (resource_num >= max_resources) { resource_num = find_first_zero_bit(resource_array, max_resources); if (resource_num >= max_resources) { - printk(KERN_ERR PFX "%s: No available resourcess.\n", __func__); + printk(KERN_ERR PFX "%s: No available resources [type=%u].\n", __func__, resource_type); spin_unlock_irqrestore(&nesadapter->resource_lock, flags); return -EMFILE; } |