Commit a74b08c7 authored by Ursula Braun's avatar Ursula Braun Committed by Jeff Garzik

qeth: read number of ports from card

Read out number of ports from the hardware.
Signed-off-by: default avatarUrsula Braun <braunu@de.ibm.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 8af7c5ae
...@@ -3803,8 +3803,9 @@ int qeth_core_hardsetup_card(struct qeth_card *card) ...@@ -3803,8 +3803,9 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
return rc; return rc;
} }
mpno = qdio_get_ssqd_pct(CARD_DDEV(card));
mpno = QETH_MAX_PORTNO; if (mpno)
mpno = min(mpno - 1, QETH_MAX_PORTNO);
if (card->info.portno > mpno) { if (card->info.portno > mpno) {
PRINT_ERR("Device %s does not offer port number %d \n.", PRINT_ERR("Device %s does not offer port number %d \n.",
CARD_BUS_ID(card), card->info.portno); CARD_BUS_ID(card), card->info.portno);
......
...@@ -127,6 +127,7 @@ extern int do_QDIO(struct ccw_device*, unsigned int flags, ...@@ -127,6 +127,7 @@ extern int do_QDIO(struct ccw_device*, unsigned int flags,
unsigned int qidx,unsigned int count, unsigned int qidx,unsigned int count,
struct qdio_buffer *buffers); struct qdio_buffer *buffers);
extern int qdio_get_ssqd_pct(struct ccw_device*);
extern int qdio_synchronize(struct ccw_device*, unsigned int flags, extern int qdio_synchronize(struct ccw_device*, unsigned int flags,
unsigned int queue_number); unsigned int queue_number);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment