[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>
This commit is contained in:
Jan Glauber
2008-12-25 13:38:43 +01:00
committed by Martin Schwidefsky
parent 43c207e6e5
commit bbd50e172f
5 changed files with 55 additions and 30 deletions

View File

@ -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) {