diff mbox

[v4.7,3/7] net/ncsi: Don't probe on the reserved channel ID (0x1f)

Message ID 1475030915-9525-3-git-send-email-gwshan@linux.vnet.ibm.com
State Changes Requested, archived
Headers show

Commit Message

Gavin Shan Sept. 28, 2016, 2:48 a.m. UTC
We needn't send CIS (Clear Initial State) command to the NCSI
reserved channel (0x1f) in the enumeration. We shouldn't receive
a valid response from CIS on NCSI channel 0x1f.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
 net/ncsi/ncsi-manage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Joel Stanley Sept. 28, 2016, 5:32 a.m. UTC | #1
On Wed, 2016-09-28 at 12:48 +1000, Gavin Shan wrote:
> We needn't send CIS (Clear Initial State) command to the NCSI
> reserved channel (0x1f) in the enumeration. We shouldn't receive
> a valid response from CIS on NCSI channel 0x1f.
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>

Reviewed-by: Joel Stanley <joel@jms.id.au>

> ---
>  net/ncsi/ncsi-manage.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
> index b03d1df..8011d51 100644
> --- a/net/ncsi/ncsi-manage.c
> +++ b/net/ncsi/ncsi-manage.c
> @@ -887,12 +887,12 @@ static void ncsi_probe_channel(struct
> ncsi_dev_priv *ndp)
>  		nd->state = ncsi_dev_state_probe_cis;
>  		break;
>  	case ncsi_dev_state_probe_cis:
> -		ndp->pending_req_num = 32;
> +		ndp->pending_req_num = NCSI_RESERVED_CHANNEL;
>  
>  		/* Clear initial state */
>  		nca.type = NCSI_PKT_CMD_CIS;
>  		nca.package = ndp->active_package->id;
> -		for (index = 0; index < 0x20; index++) {
> +		for (index = 0; index < NCSI_RESERVED_CHANNEL;
> index++) {
>  			nca.channel = index;
>  			ret = ncsi_xmit_cmd(&nca);
>  			if (ret)
>
diff mbox

Patch

diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index b03d1df..8011d51 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -887,12 +887,12 @@  static void ncsi_probe_channel(struct ncsi_dev_priv *ndp)
 		nd->state = ncsi_dev_state_probe_cis;
 		break;
 	case ncsi_dev_state_probe_cis:
-		ndp->pending_req_num = 32;
+		ndp->pending_req_num = NCSI_RESERVED_CHANNEL;
 
 		/* Clear initial state */
 		nca.type = NCSI_PKT_CMD_CIS;
 		nca.package = ndp->active_package->id;
-		for (index = 0; index < 0x20; index++) {
+		for (index = 0; index < NCSI_RESERVED_CHANNEL; index++) {
 			nca.channel = index;
 			ret = ncsi_xmit_cmd(&nca);
 			if (ret)