Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236646
b: refs/heads/master
c: a07aa00
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jan 20, 2011
1 parent 90d3b3a commit 5267b91
Show file tree
Hide file tree
Showing 70 changed files with 1,842 additions and 939 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d8449286456659cdd0998e62d80df2d9e77e9e3
refs/heads/master: a07aa004c8d814a975b1a68afdb7baaa8f1b91d5
32 changes: 11 additions & 21 deletions trunk/drivers/net/vxge/vxge-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ vxge_hw_vpath_eprom_img_ver_get(struct __vxge_hw_device *hldev,
data1 = steer_ctrl = 0;

status = vxge_hw_vpath_fw_api(vpath,
VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_FW_MEMO,
VXGE_HW_FW_API_GET_EPROM_REV,
VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_FW_MEMO,
0, &data0, &data1, &steer_ctrl);
if (status != VXGE_HW_OK)
break;
Expand Down Expand Up @@ -2868,6 +2868,8 @@ __vxge_hw_ring_create(struct __vxge_hw_vpath_handle *vp,
ring->rxd_init = attr->rxd_init;
ring->rxd_term = attr->rxd_term;
ring->buffer_mode = config->buffer_mode;
ring->tim_rti_cfg1_saved = vp->vpath->tim_rti_cfg1_saved;
ring->tim_rti_cfg3_saved = vp->vpath->tim_rti_cfg3_saved;
ring->rxds_limit = config->rxds_limit;

ring->rxd_size = vxge_hw_ring_rxd_size_get(config->buffer_mode);
Expand Down Expand Up @@ -3511,6 +3513,8 @@ __vxge_hw_fifo_create(struct __vxge_hw_vpath_handle *vp,

/* apply "interrupts per txdl" attribute */
fifo->interrupt_type = VXGE_HW_FIFO_TXD_INT_TYPE_UTILZ;
fifo->tim_tti_cfg1_saved = vpath->tim_tti_cfg1_saved;
fifo->tim_tti_cfg3_saved = vpath->tim_tti_cfg3_saved;

if (fifo->config->intr)
fifo->interrupt_type = VXGE_HW_FIFO_TXD_INT_TYPE_PER_LIST;
Expand Down Expand Up @@ -4377,6 +4381,8 @@ __vxge_hw_vpath_tim_configure(struct __vxge_hw_device *hldev, u32 vp_id)
}

writeq(val64, &vp_reg->tim_cfg1_int_num[VXGE_HW_VPATH_INTR_TX]);
vpath->tim_tti_cfg1_saved = val64;

val64 = readq(&vp_reg->tim_cfg2_int_num[VXGE_HW_VPATH_INTR_TX]);

if (config->tti.uec_a != VXGE_HW_USE_FLASH_DEFAULT) {
Expand Down Expand Up @@ -4433,6 +4439,7 @@ __vxge_hw_vpath_tim_configure(struct __vxge_hw_device *hldev, u32 vp_id)
}

writeq(val64, &vp_reg->tim_cfg3_int_num[VXGE_HW_VPATH_INTR_TX]);
vpath->tim_tti_cfg3_saved = val64;
}

if (config->ring.enable == VXGE_HW_RING_ENABLE) {
Expand Down Expand Up @@ -4481,6 +4488,8 @@ __vxge_hw_vpath_tim_configure(struct __vxge_hw_device *hldev, u32 vp_id)
}

writeq(val64, &vp_reg->tim_cfg1_int_num[VXGE_HW_VPATH_INTR_RX]);
vpath->tim_rti_cfg1_saved = val64;

val64 = readq(&vp_reg->tim_cfg2_int_num[VXGE_HW_VPATH_INTR_RX]);

if (config->rti.uec_a != VXGE_HW_USE_FLASH_DEFAULT) {
Expand Down Expand Up @@ -4537,6 +4546,7 @@ __vxge_hw_vpath_tim_configure(struct __vxge_hw_device *hldev, u32 vp_id)
}

writeq(val64, &vp_reg->tim_cfg3_int_num[VXGE_HW_VPATH_INTR_RX]);
vpath->tim_rti_cfg3_saved = val64;
}

val64 = 0;
Expand All @@ -4555,26 +4565,6 @@ __vxge_hw_vpath_tim_configure(struct __vxge_hw_device *hldev, u32 vp_id)
return status;
}

void vxge_hw_vpath_tti_ci_set(struct __vxge_hw_device *hldev, u32 vp_id)
{
struct __vxge_hw_virtualpath *vpath;
struct vxge_hw_vpath_reg __iomem *vp_reg;
struct vxge_hw_vp_config *config;
u64 val64;

vpath = &hldev->virtual_paths[vp_id];
vp_reg = vpath->vp_reg;
config = vpath->vp_config;

if (config->fifo.enable == VXGE_HW_FIFO_ENABLE &&
config->tti.timer_ci_en != VXGE_HW_TIM_TIMER_CI_ENABLE) {
config->tti.timer_ci_en = VXGE_HW_TIM_TIMER_CI_ENABLE;
val64 = readq(&vp_reg->tim_cfg1_int_num[VXGE_HW_VPATH_INTR_TX]);
val64 |= VXGE_HW_TIM_CFG1_INT_NUM_TIMER_CI;
writeq(val64, &vp_reg->tim_cfg1_int_num[VXGE_HW_VPATH_INTR_TX]);
}
}

/*
* __vxge_hw_vpath_initialize
* This routine is the final phase of init which initializes the
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/vxge/vxge-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ struct __vxge_hw_virtualpath {
u32 vsport_number;
u32 max_kdfc_db;
u32 max_nofl_db;
u64 tim_tti_cfg1_saved;
u64 tim_tti_cfg3_saved;
u64 tim_rti_cfg1_saved;
u64 tim_rti_cfg3_saved;

struct __vxge_hw_ring *____cacheline_aligned ringh;
struct __vxge_hw_fifo *____cacheline_aligned fifoh;
Expand Down Expand Up @@ -921,6 +925,9 @@ struct __vxge_hw_ring {
u32 doorbell_cnt;
u32 total_db_cnt;
u64 rxds_limit;
u32 rtimer;
u64 tim_rti_cfg1_saved;
u64 tim_rti_cfg3_saved;

enum vxge_hw_status (*callback)(
struct __vxge_hw_ring *ringh,
Expand Down Expand Up @@ -1000,6 +1007,9 @@ struct __vxge_hw_fifo {
u32 per_txdl_space;
u32 vp_id;
u32 tx_intr_num;
u32 rtimer;
u64 tim_tti_cfg1_saved;
u64 tim_tti_cfg3_saved;

enum vxge_hw_status (*callback)(
struct __vxge_hw_fifo *fifo_handle,
Expand Down
Loading

0 comments on commit 5267b91

Please sign in to comment.