IB/ulps: Avoid calling ib_query_device
Instead, use the cached copy of the attributes present on the device. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
@@ -644,7 +644,7 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,
|
||||
|
||||
ib_conn = &iser_conn->ib_conn;
|
||||
if (ib_conn->pi_support) {
|
||||
u32 sig_caps = ib_conn->device->dev_attr.sig_prot_cap;
|
||||
u32 sig_caps = ib_conn->device->ib_device->attrs.sig_prot_cap;
|
||||
|
||||
scsi_host_set_prot(shost, iser_dif_prot_caps(sig_caps));
|
||||
scsi_host_set_guard(shost, SHOST_DIX_GUARD_IP |
|
||||
@@ -656,7 +656,7 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,
|
||||
* max fastreg page list length.
|
||||
*/
|
||||
shost->sg_tablesize = min_t(unsigned short, shost->sg_tablesize,
|
||||
ib_conn->device->dev_attr.max_fast_reg_page_list_len);
|
||||
ib_conn->device->ib_device->attrs.max_fast_reg_page_list_len);
|
||||
shost->max_sectors = min_t(unsigned int,
|
||||
1024, (shost->sg_tablesize * PAGE_SIZE) >> 9);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user