summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-07-30 15:39:18 -0400
committerRussell Bryant <rbryant@redhat.com>2012-07-30 20:18:39 -0400
commit99f6c32bf8a5204da0e07137486c61cdba5318a3 (patch)
treeddb820f6a89ea1ae85a6b40b511c78f8ec1110d4 /nova/compute
parent36dc58791482d44d63d63e9780451f9499619f05 (diff)
Send a full instance in set_admin_password.
Change the set_admin_password method of the compute rpc API to take a full instance over rpc instead of just the instance UUID. This cuts down on database access needed by nova-compute. Part of blueprint no-db-messaging. Change-Id: Iddcc7cb068090faa98f0bb87307e09d5b0ebf0c2
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/manager.py30
-rw-r--r--nova/compute/rpcapi.py8
2 files changed, 22 insertions, 16 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 426577d5c..6d8a52d16 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -272,7 +272,7 @@ def _get_image_meta(context, image_ref):
class ComputeManager(manager.SchedulerDependentManager):
"""Manages the running instances from creation to destruction."""
- RPC_API_VERSION = '1.32'
+ RPC_API_VERSION = '1.33'
def __init__(self, compute_driver=None, *args, **kwargs):
"""Load configuration options and connect to the hypervisor."""
@@ -1221,7 +1221,8 @@ class ComputeManager(manager.SchedulerDependentManager):
@exception.wrap_exception(notifier=notifier, publisher_id=publisher_id())
@checks_instance_lock
@wrap_instance_fault
- def set_admin_password(self, context, instance_uuid, new_pass=None):
+ def set_admin_password(self, context, instance=None, instance_uuid=None,
+ new_pass=None):
"""Set the root/admin password for an instance on this host.
This is generally only called by API password resets after an
@@ -1234,43 +1235,44 @@ class ComputeManager(manager.SchedulerDependentManager):
# Generate a random password
new_pass = utils.generate_password(FLAGS.password_length)
+ if not instance:
+ instance = self.db.instance_get_by_uuid(context, instance_uuid)
+
max_tries = 10
for i in xrange(max_tries):
- instance_ref = self.db.instance_get_by_uuid(context, instance_uuid)
-
- current_power_state = self._get_power_state(context, instance_ref)
+ current_power_state = self._get_power_state(context, instance)
expected_state = power_state.RUNNING
if current_power_state != expected_state:
- self._instance_update(context, instance_ref['uuid'],
+ self._instance_update(context, instance['uuid'],
task_state=None)
_msg = _('Failed to set admin password. Instance %s is not'
- ' running') % instance_ref["uuid"]
+ ' running') % instance["uuid"]
raise exception.Invalid(_msg)
else:
try:
- self.driver.set_admin_password(instance_ref, new_pass)
- LOG.audit(_("Root password set"), instance=instance_ref)
+ self.driver.set_admin_password(instance, new_pass)
+ LOG.audit(_("Root password set"), instance=instance)
self._instance_update(context,
- instance_ref['uuid'],
+ instance['uuid'],
task_state=None)
break
except NotImplementedError:
# NOTE(dprince): if the driver doesn't implement
# set_admin_password we break to avoid a loop
LOG.warn(_('set_admin_password is not implemented '
- 'by this driver.'), instance=instance_ref)
+ 'by this driver.'), instance=instance)
self._instance_update(context,
- instance_ref['uuid'],
+ instance['uuid'],
task_state=None)
break
except Exception, e:
# Catch all here because this could be anything.
- LOG.exception(e, instance=instance_ref)
+ LOG.exception(e, instance=instance)
if i == max_tries - 1:
self._set_instance_error_state(context,
- instance_ref['uuid'])
+ instance['uuid'])
# We create a new exception here so that we won't
# potentially reveal password information to the
# API caller. The real exception is logged above
diff --git a/nova/compute/rpcapi.py b/nova/compute/rpcapi.py
index c3b7f068d..15d1db81a 100644
--- a/nova/compute/rpcapi.py
+++ b/nova/compute/rpcapi.py
@@ -104,6 +104,8 @@ class ComputeAPI(nova.openstack.common.rpc.proxy.RpcProxy):
1.31 - Remove instance_uuid, add instance argument to revert_resize()
1.32 - Remove instance_id, add instance argument to
rollback_live_migration_at_destination()
+ 1.33 - Remove instance_uuid, add instance argument to
+ set_admin_password()
'''
BASE_RPC_API_VERSION = '1.0'
@@ -395,9 +397,11 @@ class ComputeAPI(nova.openstack.common.rpc.proxy.RpcProxy):
version='1.32')
def set_admin_password(self, ctxt, instance, new_pass):
+ instance_p = jsonutils.to_primitive(instance)
self.cast(ctxt, self.make_msg('set_admin_password',
- instance_uuid=instance['uuid'], new_pass=new_pass),
- topic=_compute_topic(self.topic, ctxt, None, instance))
+ instance=instance_p, new_pass=new_pass),
+ topic=_compute_topic(self.topic, ctxt, None, instance),
+ version='1.33')
def set_host_enabled(self, ctxt, enabled, host):
topic = _compute_topic(self.topic, ctxt, host, None)
1'>381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032
/***********************************************************************
 *
 * Copyright (c) 2005 Freescale Semiconductor, Inc.
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 *
 * Description:
 *   Ethernet interface for Tundra TSI108 bridge chip
 *
 ***********************************************************************/

#include <config.h>

#if !defined(CONFIG_TSI108_ETH_NUM_PORTS) || (CONFIG_TSI108_ETH_NUM_PORTS > 2)
#error "CONFIG_TSI108_ETH_NUM_PORTS must be defined as 1 or 2"
#endif

#include <common.h>
#include <malloc.h>
#include <net.h>
#include <netdev.h>
#include <asm/cache.h>

#ifdef DEBUG
#define TSI108_ETH_DEBUG 7
#else
#define TSI108_ETH_DEBUG 0
#endif

#if TSI108_ETH_DEBUG > 0
#define debug_lev(lev, fmt, args...) \
if (lev <= TSI108_ETH_DEBUG) \
printf ("%s %d: " fmt, __FUNCTION__, __LINE__, ##args)
#else
#define debug_lev(lev, fmt, args...) do{}while(0)
#endif

#define RX_PRINT_ERRORS
#define TX_PRINT_ERRORS

#define ETH_BASE	(CONFIG_SYS_TSI108_CSR_BASE + 0x6000)

#define ETH_PORT_OFFSET	0x400

#define __REG32(base, offset) (*((volatile u32 *)((char *)(base) + (offset))))

#define reg_MAC_CONFIG_1(base)		__REG32(base, 0x00000000)
#define MAC_CONFIG_1_TX_ENABLE		(0x00000001)
#define MAC_CONFIG_1_SYNC_TX_ENABLE	(0x00000002)
#define MAC_CONFIG_1_RX_ENABLE		(0x00000004)
#define MAC_CONFIG_1_SYNC_RX_ENABLE	(0x00000008)
#define MAC_CONFIG_1_TX_FLOW_CONTROL	(0x00000010)
#define MAC_CONFIG_1_RX_FLOW_CONTROL	(0x00000020)
#define MAC_CONFIG_1_LOOP_BACK		(0x00000100)
#define MAC_CONFIG_1_RESET_TX_FUNCTION	(0x00010000)
#define MAC_CONFIG_1_RESET_RX_FUNCTION	(0x00020000)
#define MAC_CONFIG_1_RESET_TX_MAC	(0x00040000)
#define MAC_CONFIG_1_RESET_RX_MAC	(0x00080000)
#define MAC_CONFIG_1_SIM_RESET		(0x40000000)
#define MAC_CONFIG_1_SOFT_RESET		(0x80000000)

#define reg_MAC_CONFIG_2(base)		__REG32(base, 0x00000004)
#define MAC_CONFIG_2_FULL_DUPLEX	(0x00000001)
#define MAC_CONFIG_2_CRC_ENABLE		(0x00000002)
#define MAC_CONFIG_2_PAD_CRC		(0x00000004)
#define MAC_CONFIG_2_LENGTH_CHECK	(0x00000010)
#define MAC_CONFIG_2_HUGE_FRAME		(0x00000020)
#define MAC_CONFIG_2_INTERFACE_MODE(val)	(((val) & 0x3) << 8)
#define MAC_CONFIG_2_PREAMBLE_LENGTH(val)	(((val) & 0xf) << 12)
#define INTERFACE_MODE_NIBBLE		1	/* 10/100 Mb/s MII) */
#define INTERFACE_MODE_BYTE		2	/* 1000 Mb/s GMII/TBI */

#define reg_MAXIMUM_FRAME_LENGTH(base)		__REG32(base, 0x00000010)

#define reg_MII_MGMT_CONFIG(base)		__REG32(base, 0x00000020)
#define MII_MGMT_CONFIG_MGMT_CLOCK_SELECT(val)	((val) & 0x7)
#define MII_MGMT_CONFIG_NO_PREAMBLE		(0x00000010)
#define MII_MGMT_CONFIG_SCAN_INCREMENT		(0x00000020)
#define MII_MGMT_CONFIG_RESET_MGMT		(0x80000000)

#define reg_MII_MGMT_COMMAND(base)		__REG32(base, 0x00000024)
#define MII_MGMT_COMMAND_READ_CYCLE		(0x00000001)
#define MII_MGMT_COMMAND_SCAN_CYCLE		(0x00000002)

#define reg_MII_MGMT_ADDRESS(base)		__REG32(base, 0x00000028)
#define reg_MII_MGMT_CONTROL(base)		__REG32(base, 0x0000002c)
#define reg_MII_MGMT_STATUS(base)		__REG32(base, 0x00000030)

#define reg_MII_MGMT_INDICATORS(base)		__REG32(base, 0x00000034)
#define MII_MGMT_INDICATORS_BUSY		(0x00000001)
#define MII_MGMT_INDICATORS_SCAN		(0x00000002)
#define MII_MGMT_INDICATORS_NOT_VALID		(0x00000004)

#define reg_INTERFACE_STATUS(base)		__REG32(base, 0x0000003c)
#define INTERFACE_STATUS_LINK_FAIL		(0x00000008)
#define INTERFACE_STATUS_EXCESS_DEFER		(0x00000200)

#define reg_STATION_ADDRESS_1(base)		__REG32(base, 0x00000040)
#define reg_STATION_ADDRESS_2(base)		__REG32(base, 0x00000044)

#define reg_PORT_CONTROL(base)			__REG32(base, 0x00000200)
#define PORT_CONTROL_PRI		(0x00000001)
#define PORT_CONTROL_BPT		(0x00010000)
#define PORT_CONTROL_SPD		(0x00040000)
#define PORT_CONTROL_RBC		(0x00080000)
#define PORT_CONTROL_PRB		(0x00200000)
#define PORT_CONTROL_DIS		(0x00400000)
#define PORT_CONTROL_TBI		(0x00800000)
#define PORT_CONTROL_STE		(0x10000000)
#define PORT_CONTROL_ZOR		(0x20000000)
#define PORT_CONTROL_CLR		(0x40000000)
#define PORT_CONTROL_SRT		(0x80000000)

#define reg_TX_CONFIG(base)		__REG32(base, 0x00000220)
#define TX_CONFIG_START_Q		(0x00000003)
#define TX_CONFIG_EHP			(0x00400000)
#define TX_CONFIG_CHP			(0x00800000)
#define TX_CONFIG_RST			(0x80000000)

#define reg_TX_CONTROL(base)		__REG32(base, 0x00000224)
#define TX_CONTROL_GO			(0x00008000)
#define TX_CONTROL_MP			(0x01000000)
#define TX_CONTROL_EAI			(0x20000000)
#define TX_CONTROL_ABT			(0x40000000)
#define TX_CONTROL_EII			(0x80000000)

#define reg_TX_STATUS(base)		__REG32(base, 0x00000228)
#define TX_STATUS_QUEUE_USABLE		(0x0000000f)
#define TX_STATUS_CURR_Q		(0x00000300)
#define TX_STATUS_ACT			(0x00008000)
#define TX_STATUS_QUEUE_IDLE		(0x000f0000)
#define TX_STATUS_EOQ_PENDING		(0x0f000000)

#define reg_TX_EXTENDED_STATUS(base)		__REG32(base, 0x0000022c)
#define TX_EXTENDED_STATUS_END_OF_QUEUE_CONDITION		(0x0000000f)
#define TX_EXTENDED_STATUS_END_OF_FRAME_CONDITION		(0x00000f00)
#define TX_EXTENDED_STATUS_DESCRIPTOR_INTERRUPT_CONDITION	(0x000f0000)
#define TX_EXTENDED_STATUS_ERROR_FLAG				(0x0f000000)

#define reg_TX_THRESHOLDS(base)			__REG32(base, 0x00000230)

#define reg_TX_DIAGNOSTIC_ADDR(base)           __REG32(base, 0x00000270)
#define TX_DIAGNOSTIC_ADDR_INDEX		(0x0000007f)
#define TX_DIAGNOSTIC_ADDR_DFR			(0x40000000)
#define TX_DIAGNOSTIC_ADDR_AI			(0x80000000)

#define reg_TX_DIAGNOSTIC_DATA(base)		__REG32(base, 0x00000274)

#define reg_TX_ERROR_STATUS(base)		__REG32(base, 0x00000278)
#define TX_ERROR_STATUS				(0x00000278)
#define TX_ERROR_STATUS_QUEUE_0_ERROR_RESPONSE	(0x0000000f)
#define TX_ERROR_STATUS_TEA_ON_QUEUE_0		(0x00000010)
#define TX_ERROR_STATUS_RER_ON_QUEUE_0		(0x00000020)
#define TX_ERROR_STATUS_TER_ON_QUEUE_0		(0x00000040)
#define TX_ERROR_STATUS_DER_ON_QUEUE_0		(0x00000080)
#define TX_ERROR_STATUS_QUEUE_1_ERROR_RESPONSE	(0x00000f00)
#define TX_ERROR_STATUS_TEA_ON_QUEUE_1		(0x00001000)
#define TX_ERROR_STATUS_RER_ON_QUEUE_1		(0x00002000)
#define TX_ERROR_STATUS_TER_ON_QUEUE_1		(0x00004000)
#define TX_ERROR_STATUS_DER_ON_QUEUE_1		(0x00008000)
#define TX_ERROR_STATUS_QUEUE_2_ERROR_RESPONSE	(0x000f0000)
#define TX_ERROR_STATUS_TEA_ON_QUEUE_2		(0x00100000)
#define TX_ERROR_STATUS_RER_ON_QUEUE_2		(0x00200000)
#define TX_ERROR_STATUS_TER_ON_QUEUE_2		(0x00400000)
#define TX_ERROR_STATUS_DER_ON_QUEUE_2		(0x00800000)
#define TX_ERROR_STATUS_QUEUE_3_ERROR_RESPONSE	(0x0f000000)
#define TX_ERROR_STATUS_TEA_ON_QUEUE_3		(0x10000000)
#define TX_ERROR_STATUS_RER_ON_QUEUE_3		(0x20000000)
#define TX_ERROR_STATUS_TER_ON_QUEUE_3		(0x40000000)
#define TX_ERROR_STATUS_DER_ON_QUEUE_3		(0x80000000)

#define reg_TX_QUEUE_0_CONFIG(base)		__REG32(base, 0x00000280)
#define TX_QUEUE_0_CONFIG_OCN_PORT		(0x0000003f)
#define TX_QUEUE_0_CONFIG_BSWP			(0x00000400)
#define TX_QUEUE_0_CONFIG_WSWP			(0x00000800)
#define TX_QUEUE_0_CONFIG_AM			(0x00004000)
#define TX_QUEUE_0_CONFIG_GVI			(0x00008000)
#define TX_QUEUE_0_CONFIG_EEI			(0x00010000)
#define TX_QUEUE_0_CONFIG_ELI			(0x00020000)
#define TX_QUEUE_0_CONFIG_ENI			(0x00040000)
#define TX_QUEUE_0_CONFIG_ESI			(0x00080000)
#define TX_QUEUE_0_CONFIG_EDI			(0x00100000)

#define reg_TX_QUEUE_0_BUF_CONFIG(base)		__REG32(base, 0x00000284)
#define TX_QUEUE_0_BUF_CONFIG_OCN_PORT		(0x0000003f)
#define TX_QUEUE_0_BUF_CONFIG_BURST		(0x00000300)
#define TX_QUEUE_0_BUF_CONFIG_BSWP		(0x00000400)
#define TX_QUEUE_0_BUF_CONFIG_WSWP		(0x00000800)

#define OCN_PORT_HLP			0	/* HLP Interface */
#define OCN_PORT_PCI_X			1	/* PCI-X Interface */
#define OCN_PORT_PROCESSOR_MASTER	2	/* Processor Interface (master) */
#define OCN_PORT_PROCESSOR_SLAVE	3	/* Processor Interface (slave) */
#define OCN_PORT_MEMORY			4	/* Memory Controller */
#define OCN_PORT_DMA			5	/* DMA Controller */
#define OCN_PORT_ETHERNET		6	/* Ethernet Controller */
#define OCN_PORT_PRINT			7	/* Print Engine Interface */

#define reg_TX_QUEUE_0_PTR_LOW(base)		__REG32(base, 0x00000288)

#define reg_TX_QUEUE_0_PTR_HIGH(base)		__REG32(base, 0x0000028c)
#define TX_QUEUE_0_PTR_HIGH_VALID		(0x80000000)

#define reg_RX_CONFIG(base)			__REG32(base, 0x00000320)
#define RX_CONFIG_DEF_Q				(0x00000003)
#define RX_CONFIG_EMF				(0x00000100)
#define RX_CONFIG_EUF				(0x00000200)
#define RX_CONFIG_BFE				(0x00000400)
#define RX_CONFIG_MFE				(0x00000800)
#define RX_CONFIG_UFE				(0x00001000)
#define RX_CONFIG_SE				(0x00002000)
#define RX_CONFIG_ABF				(0x00200000)
#define RX_CONFIG_APE				(0x00400000)
#define RX_CONFIG_CHP				(0x00800000)
#define RX_CONFIG_RST				(0x80000000)

#define reg_RX_CONTROL(base)			__REG32(base, 0x00000324)
#define GE_E0_RX_CONTROL_QUEUE_ENABLES		(0x0000000f)
#define GE_E0_RX_CONTROL_GO			(0x00008000)
#define GE_E0_RX_CONTROL_EAI			(0x20000000)
#define GE_E0_RX_CONTROL_ABT			(0x40000000)
#define GE_E0_RX_CONTROL_EII			(0x80000000)

#define reg_RX_EXTENDED_STATUS(base)		__REG32(base, 0x0000032c)
#define RX_EXTENDED_STATUS			(0x0000032c)
#define RX_EXTENDED_STATUS_EOQ			(0x0000000f)
#define RX_EXTENDED_STATUS_EOQ_0		(0x00000001)
#define RX_EXTENDED_STATUS_EOF			(0x00000f00)
#define RX_EXTENDED_STATUS_DESCRIPTOR_INTERRUPT_CONDITION	(0x000f0000)
#define RX_EXTENDED_STATUS_ERROR_FLAG				(0x0f000000)

#define reg_RX_THRESHOLDS(base)			__REG32(base, 0x00000330)

#define reg_RX_DIAGNOSTIC_ADDR(base)		__REG32(base, 0x00000370)
#define RX_DIAGNOSTIC_ADDR_INDEX		(0x0000007f)
#define RX_DIAGNOSTIC_ADDR_DFR			(0x40000000)
#define RX_DIAGNOSTIC_ADDR_AI			(0x80000000)

#define reg_RX_DIAGNOSTIC_DATA(base)		__REG32(base, 0x00000374)

#define reg_RX_QUEUE_0_CONFIG(base)		__REG32(base, 0x00000380)
#define RX_QUEUE_0_CONFIG_OCN_PORT		(0x0000003f)
#define RX_QUEUE_0_CONFIG_BSWP			(0x00000400)
#define RX_QUEUE_0_CONFIG_WSWP			(0x00000800)
#define RX_QUEUE_0_CONFIG_AM			(0x00004000)
#define RX_QUEUE_0_CONFIG_EEI			(0x00010000)
#define RX_QUEUE_0_CONFIG_ELI			(0x00020000)
#define RX_QUEUE_0_CONFIG_ENI			(0x00040000)
#define RX_QUEUE_0_CONFIG_ESI			(0x00080000)
#define RX_QUEUE_0_CONFIG_EDI			(0x00100000)

#define reg_RX_QUEUE_0_BUF_CONFIG(base)		__REG32(base, 0x00000384)
#define RX_QUEUE_0_BUF_CONFIG_OCN_PORT		(0x0000003f)
#define RX_QUEUE_0_BUF_CONFIG_BURST		(0x00000300)
#define RX_QUEUE_0_BUF_CONFIG_BSWP		(0x00000400)
#define RX_QUEUE_0_BUF_CONFIG_WSWP		(0x00000800)

#define reg_RX_QUEUE_0_PTR_LOW(base)		__REG32(base, 0x00000388)

#define reg_RX_QUEUE_0_PTR_HIGH(base)		__REG32(base, 0x0000038c)
#define RX_QUEUE_0_PTR_HIGH_VALID		(0x80000000)

/*
 *  PHY register definitions
 */
/* the first 15 PHY registers are standard. */
#define PHY_CTRL_REG		0	/* Control Register */
#define PHY_STATUS_REG		1	/* Status Regiser */
#define PHY_ID1_REG		2	/* Phy Id Reg (word 1) */