From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Steve Wise" Subject: RE: [PATCH rdma-core 04/10] providers: Use the new match_device and allocate_device ops Date: Tue, 19 Sep 2017 16:29:17 -0500 Message-ID: <017a01d3318e$5947c870$0bd75950$@opengridcomputing.com> References: <1505855931-4956-1-git-send-email-jgunthorpe@obsidianresearch.com> <1505855931-4956-5-git-send-email-jgunthorpe@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <1505855931-4956-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Content-Language: en-us Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: 'Jason Gunthorpe' , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: 'Devesh Sharma' , 'Mike Marciniszyn' , 'Dennis Dalessandro' , 'Lijun Ou' , "'Wei Hu(Xavier)'" , 'Tatyana Nikolova' , 'Yishai Hadas' , 'Vladimir Sokolovsky' , 'Ram Amrani' , 'Ariel Elior' , 'Moni Shoua' , 'Adit Ranadive' , "'moderated list:HF1 USERSPACE PROVIDER (for hf1.ko)'" , "'open list:IPATH/QIB USERSPACE PROVIDER (for ib_qib.ko)'" , pv-drivers-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org List-Id: linux-rdma@vger.kernel.org > > This is the first step to simplify the provider binding process. > > Checking of the ABI version is hoisted into the core code, as are some > of the common error messages. > > Signed-off-by: Jason Gunthorpe > --- > diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c > index 492b3978995607..43c5a3c97bc864 100644 > --- a/providers/cxgb4/dev.c > +++ b/providers/cxgb4/dev.c > @@ -462,22 +455,30 @@ found: > fw_min, FW_MIN); > fflush(stderr); > } > + return true; > +} > > - PDBG("%s found vendor %d device %d type %d\n", > - __FUNCTION__, vendor, device, > CHELSIO_CHIP_VERSION(hca_table[i].device >> 8)); > +static struct verbs_device *c4iw_device_alloc(struct verbs_sysfs_dev > *sysfs_dev) > +{ > + struct c4iw_dev *dev; > + struct hca_ent *hca_ent = sysfs_dev->provider_data; > + > + c4iw_page_size = sysconf(_SC_PAGESIZE); > + c4iw_page_shift = long_log2(c4iw_page_size); > + c4iw_page_mask = ~(c4iw_page_size - 1); > > c4iw_page_size = sysconf(_SC_PAGESIZE); > c4iw_page_shift = long_log2(c4iw_page_size); > c4iw_page_mask = ~(c4iw_page_size - 1); The above doesn't look right. Other than this, the cxgb bits look ok. Did you test it? 😊 Acked-by: Steve Wise -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html