From 2c07c1d7dadcc0025c56351be8e81d74e4feb5af Mon Sep 17 00:00:00 2001 From: Vasundhara Volam Date: Wed, 15 Jan 2014 13:23:32 +0530 Subject: [PATCH] be2net: don't set "pport" field when querying "pvid" In the GET_HSW_CONFIG cmd, the "pport" field must be set only while querying the switch mode. When the "pport" field is set, the "interface_id" field must be set to the port number, otherwise, it must be set to adapter->if_handle. Signed-off-by: Vasundhara Volam Signed-off-by: Sathya Perla Signed-off-by: David S. Miller --- drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 95eeb2423f39..d9bdeba79aa4 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -2996,7 +2996,7 @@ int be_cmd_get_hsw_config(struct be_adapter *adapter, u16 *pvid, ctxt, intf_id); AMAP_SET_BITS(struct amap_get_hsw_req_context, pvid_valid, ctxt, 1); - if (!BEx_chip(adapter)) { + if (!BEx_chip(adapter) && mode) { AMAP_SET_BITS(struct amap_get_hsw_req_context, interface_id, ctxt, adapter->hba_port_num); AMAP_SET_BITS(struct amap_get_hsw_req_context, pport, ctxt, 1); -- 2.30.2