aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUrsula Braun <braunu@de.ibm.com>2008-04-24 04:15:26 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-29 01:56:34 -0400
commita74b08c7fcfc49727cb9e4409ec0410674410c93 (patch)
tree3430256acc3b5e1c475e80ea3ce0290589fa3b99
parent8af7c5aebc9a7b46f6ea55ee5a216dce4005f538 (diff)
qeth: read number of ports from card
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> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/s390/net/qeth_core_main.c5
-rw-r--r--include/asm-s390/qdio.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 820c332096e2..436bf1f6d4a6 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -3803,8 +3803,9 @@ retry:
3803 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); 3803 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
3804 return rc; 3804 return rc;
3805 } 3805 }
3806 3806 mpno = qdio_get_ssqd_pct(CARD_DDEV(card));
3807 mpno = QETH_MAX_PORTNO; 3807 if (mpno)
3808 mpno = min(mpno - 1, QETH_MAX_PORTNO);
3808 if (card->info.portno > mpno) { 3809 if (card->info.portno > mpno) {
3809 PRINT_ERR("Device %s does not offer port number %d \n.", 3810 PRINT_ERR("Device %s does not offer port number %d \n.",
3810 CARD_BUS_ID(card), card->info.portno); 3811 CARD_BUS_ID(card), card->info.portno);
diff --git a/include/asm-s390/qdio.h b/include/asm-s390/qdio.h
index 4b8ff55f680e..11240342a0f4 100644
--- a/include/asm-s390/qdio.h
+++ b/include/asm-s390/qdio.h
@@ -127,6 +127,7 @@ extern int do_QDIO(struct ccw_device*, unsigned int flags,
127 unsigned int qidx,unsigned int count, 127 unsigned int qidx,unsigned int count,
128 struct qdio_buffer *buffers); 128 struct qdio_buffer *buffers);
129 129
130extern int qdio_get_ssqd_pct(struct ccw_device*);
130extern int qdio_synchronize(struct ccw_device*, unsigned int flags, 131extern int qdio_synchronize(struct ccw_device*, unsigned int flags,
131 unsigned int queue_number); 132 unsigned int queue_number);
132 133