login
Header Space

 
 

[patch 09/11] qeth: read number of ports from card

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <jgarzik@...>
Cc: <netdev@...>, <linux-s390@...>, Ursula Braun <braunu@...>
Date: Thursday, April 24, 2008 - 4:15 am

From: Ursula Braun <braunu@de.ibm.com>

Read out number of ports from the hardware.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_core_main.c |    5 +++--
 include/asm-s390/qdio.h           |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

Index: git_linus/drivers/s390/net/qeth_core_main.c
===================================================================
--- git_linus.orig/drivers/s390/net/qeth_core_main.c	2008-04-24 08:51:11.000000000 +0200
+++ git_linus/drivers/s390/net/qeth_core_main.c	2008-04-24 08:55:40.000000000 +0200
@@ -3803,8 +3803,9 @@
 		QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
 		return rc;
 	}
-
-	mpno = QETH_MAX_PORTNO;
+	mpno = qdio_get_ssqd_pct(CARD_DDEV(card));
+	if (mpno)
+		mpno = min(mpno - 1, QETH_MAX_PORTNO);
 	if (card->info.portno > mpno) {
 		PRINT_ERR("Device %s does not offer port number %d \n.",
 			CARD_BUS_ID(card), card->info.portno);
Index: git_linus/include/asm-s390/qdio.h
===================================================================
--- git_linus.orig/include/asm-s390/qdio.h	2008-04-23 14:56:16.000000000 +0200
+++ git_linus/include/asm-s390/qdio.h	2008-04-24 08:53:24.000000000 +0200
@@ -127,6 +127,7 @@
 		   unsigned int qidx,unsigned int count,
 		   struct qdio_buffer *buffers);
 
+extern int qdio_get_ssqd_pct(struct ccw_device*);
 extern int qdio_synchronize(struct ccw_device*, unsigned int flags,
 			    unsigned int queue_number);
 

-- 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 09/11] qeth: read number of ports from card, , (Thu Apr 24, 4:15 am)
speck-geostationary