Skip to content

Commit

Permalink
qeth: read number of ports from card
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ursula Braun authored and Jeff Garzik committed Apr 29, 2008
1 parent 8af7c5a commit a74b08c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/s390/net/qeth_core_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3803,8 +3803,9 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
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);
Expand Down
1 change: 1 addition & 0 deletions include/asm-s390/qdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a74b08c

Please sign in to comment.