aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/net
diff options
context:
space:
mode:
authorJan Glauber <jang@linux.vnet.ibm.com>2008-12-25 13:38:43 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 13:38:58 +0100
commitbbd50e172f75b1d12ef9b1bcf593b51a44199016 (patch)
tree85cffdd66bb9f4da36d604d857959964736f3fde /drivers/s390/net
parent43c207e6e5b7e591b59294ee4fc9860b0e3de3b8 (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.c15
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 52d26592c72..ebdc549da53 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,
int qeth_core_hardsetup_card(struct qeth_card *card)
{
- struct qdio_ssqd_desc *qdio_ssqd;
+ struct qdio_ssqd_desc *ssqd;
int retries = 3;
int mpno = 0;
int rc;
@@ -3792,9 +3792,16 @@ retry:
return rc;
}
- qdio_ssqd = qdio_get_ssqd_desc(CARD_DDEV(card));
- if (qdio_ssqd)
- mpno = qdio_ssqd->pcnt;
+ ssqd = kmalloc(sizeof(struct qdio_ssqd_desc), GFP_KERNEL);
+ if (!ssqd) {
+ rc = -ENOMEM;
+ goto out;
+ }
+ rc = qdio_get_ssqd_desc(CARD_DDEV(card), ssqd);
+ if (rc == 0)
+ mpno = ssqd->pcnt;
+ kfree(ssqd);
+
if (mpno)
mpno = min(mpno - 1, QETH_MAX_PORTNO);
if (card->info.portno > mpno) {