diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2008-12-25 07:38:43 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:38:58 -0500 |
commit | bbd50e172f75b1d12ef9b1bcf593b51a44199016 (patch) | |
tree | 85cffdd66bb9f4da36d604d857959964736f3fde /drivers/s390/net | |
parent | 43c207e6e5b7e591b59294ee4fc9860b0e3de3b8 (diff) |
[S390] qdio: fix qeth port count detection
qeth needs to get the port count information before
qdio has allocated a page for the chsc operation.
Extend qdio_get_ssqd_desc() to store the data in the
specified structure.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 52d26592c72c..ebdc549da537 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -3757,7 +3757,7 @@ static int qeth_core_driver_group(const char *buf, struct device *root_dev, | |||
3757 | 3757 | ||
3758 | int qeth_core_hardsetup_card(struct qeth_card *card) | 3758 | int qeth_core_hardsetup_card(struct qeth_card *card) |
3759 | { | 3759 | { |
3760 | struct qdio_ssqd_desc *qdio_ssqd; | 3760 | struct qdio_ssqd_desc *ssqd; |
3761 | int retries = 3; | 3761 | int retries = 3; |
3762 | int mpno = 0; | 3762 | int mpno = 0; |
3763 | int rc; | 3763 | int rc; |
@@ -3792,9 +3792,16 @@ retry: | |||
3792 | return rc; | 3792 | return rc; |
3793 | } | 3793 | } |
3794 | 3794 | ||
3795 | qdio_ssqd = qdio_get_ssqd_desc(CARD_DDEV(card)); | 3795 | ssqd = kmalloc(sizeof(struct qdio_ssqd_desc), GFP_KERNEL); |
3796 | if (qdio_ssqd) | 3796 | if (!ssqd) { |
3797 | mpno = qdio_ssqd->pcnt; | 3797 | rc = -ENOMEM; |
3798 | goto out; | ||
3799 | } | ||
3800 | rc = qdio_get_ssqd_desc(CARD_DDEV(card), ssqd); | ||
3801 | if (rc == 0) | ||
3802 | mpno = ssqd->pcnt; | ||
3803 | kfree(ssqd); | ||
3804 | |||
3798 | if (mpno) | 3805 | if (mpno) |
3799 | mpno = min(mpno - 1, QETH_MAX_PORTNO); | 3806 | mpno = min(mpno - 1, QETH_MAX_PORTNO); |
3800 | if (card->info.portno > mpno) { | 3807 | if (card->info.portno > mpno) { |