Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 508b3c4f authored by Ursula Braun's avatar Ursula Braun Committed by Jeff Garzik
Browse files

qeth: allow qdio queue element addresses > 2GB



OSA-adapters do not have an address limitation for the qdio queue
structures except the MAX storage level of the current processor.
And due to a recent z/VM APAR there is no longer a restriction to
allocate qdio structures below 2 GB.

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 2d921c32
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -241,7 +241,7 @@ static int qeth_alloc_buffer_pool(struct qeth_card *card)
			return -ENOMEM;
			return -ENOMEM;
		}
		}
		for (j = 0; j < QETH_MAX_BUFFER_ELEMENTS(card); ++j) {
		for (j = 0; j < QETH_MAX_BUFFER_ELEMENTS(card); ++j) {
			ptr = (void *) __get_free_page(GFP_KERNEL|GFP_DMA);
			ptr = (void *) __get_free_page(GFP_KERNEL);
			if (!ptr) {
			if (!ptr) {
				while (j > 0)
				while (j > 0)
					free_page((unsigned long)
					free_page((unsigned long)
@@ -2000,7 +2000,7 @@ static int qeth_alloc_qdio_buffers(struct qeth_card *card)
		return 0;
		return 0;


	card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q),
	card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q),
				  GFP_KERNEL|GFP_DMA);
				  GFP_KERNEL);
	if (!card->qdio.in_q)
	if (!card->qdio.in_q)
		goto out_nomem;
		goto out_nomem;
	QETH_DBF_TEXT(setup, 2, "inq");
	QETH_DBF_TEXT(setup, 2, "inq");
@@ -2021,7 +2021,7 @@ static int qeth_alloc_qdio_buffers(struct qeth_card *card)
		goto out_freepool;
		goto out_freepool;
	for (i = 0; i < card->qdio.no_out_queues; ++i) {
	for (i = 0; i < card->qdio.no_out_queues; ++i) {
		card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q),
		card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q),
					       GFP_KERNEL|GFP_DMA);
					       GFP_KERNEL);
		if (!card->qdio.out_qs[i])
		if (!card->qdio.out_qs[i])
			goto out_freeoutq;
			goto out_freeoutq;
		QETH_DBF_TEXT_(setup, 2, "outq %i", i);
		QETH_DBF_TEXT_(setup, 2, "outq %i", i);
@@ -2308,7 +2308,7 @@ static inline struct qeth_buffer_pool_entry *qeth_find_free_buffer_pool_entry(
			struct qeth_buffer_pool_entry, list);
			struct qeth_buffer_pool_entry, list);
	for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i) {
	for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i) {
		if (page_count(virt_to_page(entry->elements[i])) > 1) {
		if (page_count(virt_to_page(entry->elements[i])) > 1) {
			page = alloc_page(GFP_ATOMIC|GFP_DMA);
			page = alloc_page(GFP_ATOMIC);
			if (!page) {
			if (!page) {
				return NULL;
				return NULL;
			} else {
			} else {