]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qeth: read number of ports from card
authorUrsula Braun <braunu@de.ibm.com>
Thu, 24 Apr 2008 08:15:26 +0000 (10:15 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 29 Apr 2008 05:56:34 +0000 (01:56 -0400)
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>
drivers/s390/net/qeth_core_main.c
include/asm-s390/qdio.h

index 820c332096e2fcc53603b631dc032dff1402dd80..436bf1f6d4a602935dd94776e95909a450737bc3 100644 (file)
@@ -3803,8 +3803,9 @@ retry:
                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 4b8ff55f680e4d6e26183d2da148c545054116d6..11240342a0f4f54a6e7e66b3e03667400d4a9e35 100644 (file)
@@ -127,6 +127,7 @@ extern int do_QDIO(struct ccw_device*, unsigned int flags,
                   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);