RDMA: Allow for NULL .modify_device() and .modify_port() methods
These methods don't make sense for iWARP devices, so rather than forcing them to implement stubs, just return -ENOSYS in the core if the hardware driver doesn't set .modify_device and/or .modify_port. Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:

committed by
Roland Dreier

父節點
620917de59
當前提交
10e1b54bbb
@@ -604,16 +604,6 @@ static int nes_query_port(struct ib_device *ibdev, u8 port, struct ib_port_attr
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* nes_modify_port
|
||||
*/
|
||||
static int nes_modify_port(struct ib_device *ibdev, u8 port,
|
||||
int port_modify_mask, struct ib_port_modify *props)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* nes_query_pkey
|
||||
*/
|
||||
@@ -3882,7 +3872,6 @@ struct nes_ib_device *nes_init_ofa_device(struct net_device *netdev)
|
||||
nesibdev->ibdev.dev.parent = &nesdev->pcidev->dev;
|
||||
nesibdev->ibdev.query_device = nes_query_device;
|
||||
nesibdev->ibdev.query_port = nes_query_port;
|
||||
nesibdev->ibdev.modify_port = nes_modify_port;
|
||||
nesibdev->ibdev.query_pkey = nes_query_pkey;
|
||||
nesibdev->ibdev.query_gid = nes_query_gid;
|
||||
nesibdev->ibdev.alloc_ucontext = nes_alloc_ucontext;
|
||||
|
Reference in New Issue
Block a user