vxge: Titan1A detection
Subsystems (2)
PATCH 8/12 vxge: Titan1A detection
Detect if the adapter is Titan or Titan1A, and tune the driver for this hardware. Also, remove unnecessary function __vxge_hw_device_id_get.
Signed-off-by Jon Mason <[email protected]>
Signed-off-by Ram Vepa <[email protected]>
--- drivers/net/vxge/vxge-config.c | 40 +++++++------------------------ drivers/net/vxge/vxge-config.h | 6 ---- drivers/net/vxge/vxge-main.c | 45 +++++++++++++++++++++++++++++++---- drivers/net/vxge/vxge-main.h | 51 +++++++++++++++++++++++++++++---------- 4 files changed, 87 insertions(+), 55 deletions(-)
drivers/net/vxge/vxge-config.c +9 -31
@@ -99,9 +99,6 @@ static enum vxge_hw_status __vxge_hw_device_config_check(struct vxge_hw_device_config *new_config);static void -__vxge_hw_device_id_get (struct __vxge_hw_device *hldev); - -static void __vxge_hw_device_host_info_get (struct __vxge_hw_device *hldev); static enum vxge_hw_status
@@ -806,26 +803,6 @@ exit: }/* -* __vxge_hw_device_id_get -* This routine returns sets the device id and revision numbers into the device -* structure -*/ -void __vxge_hw_device_id_get (struct __vxge_hw_device *hldev) -{ -u64 val64; - - val64 =readq (&hldev->common_reg->titan_asic_id); - hldev->device_id = - (u16 )VXGE_HW_TITAN_ASIC_ID_GET_INITIAL_DEVICE_ID (val64); - - hldev->major_revision = - (u8 )VXGE_HW_TITAN_ASIC_ID_GET_INITIAL_MAJOR_REVISION (val64); - - hldev->minor_revision = - (u8 )VXGE_HW_TITAN_ASIC_ID_GET_INITIAL_MINOR_REVISION (val64); -} - -/* * __vxge_hw_device_access_rights_get: Get Access Rights of the driver * This routine returns the Access Rights of the driver */
@@ -1327,7 +1304,6 @@ vxge_hw_device_initialize(vfree (hldev); goto exit; } -__vxge_hw_device_id_get (hldev);__vxge_hw_device_host_info_get (hldev);
@@ -4442,16 +4418,18 @@ vpath_open_exit1:void vxge_hw_vpath_rx_doorbell_init (struct __vxge_hw_vpath_handle *vp) { -struct __vxge_hw_virtualpath *vpath =NULL ; +struct __vxge_hw_virtualpath *vpath = vp->vpath; +struct __vxge_hw_ring *ring = vpath->ringh; +struct vxgedev *vdev =netdev_priv (vpath->hldev->ndev);u64 new_count, val64, val164; -struct __vxge_hw_ring *ring; - vpath = vp->vpath; - ring = vpath->ringh; +if (vdev->titan1) { + new_count =readq (&vpath->vp_reg->rxdmem_size); + new_count &=0x1fff ; + }else + new_count = ring->config->ring_blocks *VXGE_HW_BLOCK_SIZE /8 ; - new_count =readq (&vpath->vp_reg->rxdmem_size); - new_count &=0x1fff ; - val164 = (VXGE_HW_RXDMEM_SIZE_PRC_RXDMEM_SIZE (new_count)); + val164 =VXGE_HW_RXDMEM_SIZE_PRC_RXDMEM_SIZE (new_count);writeq (VXGE_HW_PRC_RXD_DOORBELL_NEW_QW_CNT (val164), &vpath->vp_reg->prc_rxd_doorbell);
drivers/net/vxge/vxge-config.h +0 -6
@@ -713,9 +713,6 @@ struct __vxge_hw_vpath_handle{/** * struct __vxge_hw_device - Hal device object * @magic: Magic Number -* @device_id: PCI Device Id of the adapter -* @major_revision: PCI Device major revision -* @minor_revision: PCI Device minor revision * @bar0: BAR0 virtual address. * @pdev: Physical device handle * @config: Confguration passed by the LL driver at initialization
@@ -727,9 +724,6 @@ struct __vxge_hw_device {u32 magic;#define VXGE_HW_DEVICE_MAGIC 0x12345678#define VXGE_HW_DEVICE_DEAD 0xDEADDEAD -u16 device_id; -u8 major_revision; -u8 minor_revision;void __iomem *bar0;struct pci_dev *pdev;struct net_device *ndev;
drivers/net/vxge/vxge-main.c +40 -5
76 lines not on this page · raw message
drivers/net/vxge/vxge-main.h +38 -13
82 lines not on this page · raw message
Signature · 1 line
1.7.0.4