cxgb3 - parity initialization for T3C adapters.
Subsystems (2)
PATCH 1/2 cxgb3 - parity initialization for T3C adapters.
From: Divy Le Ray <[email protected]>
Add parity initialization for T3C adapters.
Signed-off-by Divy Le Ray <[email protected]>
---
drivers/net/cxgb3/adapter.h | 1 drivers/net/cxgb3/cxgb3_main.c | 82 ++++++++++++ drivers/net/cxgb3/cxgb3_offload.c | 15 ++ drivers/net/cxgb3/regs.h | 248 +++++++++++++++++++++++++++++++++++++ drivers/net/cxgb3/sge.c | 24 +++- drivers/net/cxgb3/t3_hw.c | 131 +++++++++++++++++--- 6 files changed, 472 insertions(+), 29 deletions(-)
drivers/net/cxgb3/adapter.h +1 -0
@@ -71,6 +71,7 @@ enum { /* adapter flags */USING_MSI = (1 <<1 ),USING_MSIX = (1 <<2 ),QUEUES_BOUND = (1 <<3 ), + TP_PARITY_INIT = (1 << 4), }; struct fl_pg_chunk {
drivers/net/cxgb3/cxgb3_main.c +82 -0
100 lines not on this page · raw message
drivers/net/cxgb3/cxgb3_offload.c +13 -2
@@ -403,8 +403,6 @@ static int cxgb_offload_ctl(struct t3cdev *tdev, unsigned int req, void *data)static int rx_offload_blackhole (struct t3cdev *dev,struct sk_buff **skbs,int n) { -CH_ERR (tdev2adap (dev),"%d unexpected offload packets, first data %u\n" , - n,ntohl (*(__be32 *)skbs[0 ]->data));while (n--)dev_kfree_skb_any (skbs[n]);return 0 ;
@@ -634,6 +632,18 @@ static int do_l2t_write_rpl(struct t3cdev *dev, struct sk_buff *skb)return CPL_RET_BUF_DONE ; } +static int do_rte_write_rpl (struct t3cdev *dev,struct sk_buff *skb) +{ +struct cpl_rte_write_rpl *rpl =cplhdr (skb); + +if (rpl->status !=CPL_ERR_NONE ) +printk (KERN_ERR +"Unexpected RTE_WRITE_RPL status %u for entry %u\n" , + rpl->status,GET_TID (rpl)); + +return CPL_RET_BUF_DONE ; +} +static int do_act_open_rpl (struct t3cdev *dev,struct sk_buff *skb) {struct cpl_act_open_rpl *rpl =cplhdr (skb);
@@ -1257,6 +1267,7 @@ void __init cxgb3_offload_init(void)t3_register_cpl_handler (CPL_SMT_WRITE_RPL , do_smt_write_rpl);t3_register_cpl_handler (CPL_L2T_WRITE_RPL , do_l2t_write_rpl); +t3_register_cpl_handler (CPL_RTE_WRITE_RPL , do_rte_write_rpl);t3_register_cpl_handler (CPL_PASS_OPEN_RPL , do_stid_rpl);t3_register_cpl_handler (CPL_CLOSE_LISTSRV_RPL , do_stid_rpl);t3_register_cpl_handler (CPL_PASS_ACCEPT_REQ , do_cr);
drivers/net/cxgb3/regs.h +245 -3
327 lines not on this page · raw message
drivers/net/cxgb3/sge.c +20 -4
@@ -2443,6 +2443,15 @@ irq_handler_t t3_intr_handler(struct adapter *adap, int polling)return t3_intr; } +#define SGE_PARERR (F_CPPARITYERROR | F_OCPARITYERROR | F_RCPARITYERROR | \ + F_IRPARITYERROR | V_ITPARITYERROR(M_ITPARITYERROR) | \ + V_FLPARITYERROR(M_FLPARITYERROR) | F_LODRBPARITYERROR | \ + F_HIDRBPARITYERROR | F_LORCQPARITYERROR | \ + F_HIRCQPARITYERROR) +#define SGE_FRAMINGERR (F_UC_REQ_FRAMINGERROR | F_R_REQ_FRAMINGERROR) +#define SGE_FATALERR (SGE_PARERR | SGE_FRAMINGERR | F_RSPQCREDITOVERFOW | \ + F_RSPQDISABLED) +/** * t3_sge_err_intr_handler - SGE async event interrupt handler * @adapter: the adapter
@@ -2453,6 +2462,13 @@ void t3_sge_err_intr_handler(struct adapter *adapter) {unsigned int v, status =t3_read_reg (adapter,A_SG_INT_CAUSE ); +if (status &SGE_PARERR ) +CH_ALERT (adapter,"SGE parity error (0x%x)\n" , + status &SGE_PARERR ); +if (status &SGE_FRAMINGERR ) +CH_ALERT (adapter,"SGE framing error (0x%x)\n" , + status &SGE_FRAMINGERR ); +if (status &F_RSPQCREDITOVERFOW )CH_ALERT (adapter,"SGE response queue credit overflow\n" );
@@ -2469,7 +2485,7 @@ void t3_sge_err_intr_handler(struct adapter *adapter) status & F_HIPIODRBDROPERR ? "high" : "lo");t3_write_reg (adapter,A_SG_INT_CAUSE , status); -if (status & (F_RSPQCREDITOVERFOW |F_RSPQDISABLED )) +if (status &SGE_FATALERR )t3_fatal_err (adapter); }
@@ -2781,7 +2797,7 @@ void t3_sge_init(struct adapter *adap, struct sge_params *p)unsigned int ctrl, ups =ffs (pci_resource_len (adap->pdev,2 ) >>12 ); ctrl =F_DROPPKT |V_PKTSHIFT (2 ) |F_FLMODE |F_AVOIDCQOVFL | -F_CQCRDTCTRL | +F_CQCRDTCTRL |F_CONGMODE |F_TNLFLMODE |F_FATLPERREN |V_HOSTPAGESIZE (PAGE_SHIFT -11 ) |F_BIGENDIANINGRESS |V_USERSPACESIZE (ups ? ups -1 :0 ) |F_ISCSICOALESCING ;#if SGE_NUM_GENBITS ==1
@@ -2790,7 +2806,6 @@ void t3_sge_init(struct adapter *adap, struct sge_params *p)if (adap->params.rev >0 ) {if (!(adap->flags & (USING_MSIX |USING_MSI ))) ctrl |=F_ONEINTMULTQ |F_OPTONEINTMULTQ ; - ctrl |=F_CQCRDTCTRL |F_AVOIDCQOVFL ; }t3_write_reg (adap,A_SG_CONTROL , ctrl); t3_write_reg(adap, A_SG_EGR_RCQ_DRB_THRSH, V_HIRCQDRBTHRSH(512) |
@@ -2798,7 +2813,8 @@ void t3_sge_init(struct adapter *adap, struct sge_params *p)t3_write_reg (adap,A_SG_TIMER_TICK ,core_ticks_per_usec (adap) /10 );t3_write_reg (adap,A_SG_CMDQ_CREDIT_TH ,V_THRESHOLD (32 ) |V_TIMEOUT (200 *core_ticks_per_usec (adap))); -t3_write_reg (adap,A_SG_HI_DRB_HI_THRSH ,1000 ); +t3_write_reg (adap,A_SG_HI_DRB_HI_THRSH , + adap->params.rev <T3_REV_C ?1000 :500 );t3_write_reg (adap,A_SG_HI_DRB_LO_THRSH ,256 );t3_write_reg (adap,A_SG_LO_DRB_HI_THRSH ,1000 );t3_write_reg (adap,A_SG_LO_DRB_LO_THRSH ,256 );
drivers/net/cxgb3/t3_hw.c +111 -20
266 lines not on this page · raw message
Quoted 5 lines · Divy Le Ray
From: Divy Le Ray <[email protected]>
Add parity initialization for T3C adapters.
Signed-off-by Divy Le Ray <[email protected]>
applied 1-2 to #upstream