* [PATCH] net: ethernet: ti: davinci_cpdma: fix fixed prio cpdma ctlr configuration
From: Ivan Khoronzhuk @ 2016-11-08 13:10 UTC (permalink / raw)
To: mugunthanvnm, grygorii.strashko, netdev
Cc: linux-omap, linux-kernel, Ivan Khoronzhuk
The dma ctlr is reseted to 0 while cpdma start, thus cpdma ctlr
cannot be configured after cpdma is stopped. So, restore content
of cpdma ctlr while off/on procedure.
Based on net-next/master
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
drivers/net/ethernet/ti/cpsw.c | 6 +-
drivers/net/ethernet/ti/davinci_cpdma.c | 103 +++++++++++++++++---------------
drivers/net/ethernet/ti/davinci_cpdma.h | 2 +
3 files changed, 58 insertions(+), 53 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index b1ddf89..4d04b8e 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1376,10 +1376,6 @@ static int cpsw_ndo_open(struct net_device *ndev)
ALE_ALL_PORTS, ALE_ALL_PORTS, 0, 0);
if (!cpsw_common_res_usage_state(cpsw)) {
- /* setup tx dma to fixed prio and zero offset */
- cpdma_control_set(cpsw->dma, CPDMA_TX_PRIO_FIXED, 1);
- cpdma_control_set(cpsw->dma, CPDMA_RX_BUFFER_OFFSET, 0);
-
/* disable priority elevation */
__raw_writel(0, &cpsw->regs->ptype);
@@ -2710,6 +2706,8 @@ static int cpsw_probe(struct platform_device *pdev)
dma_params.desc_align = 16;
dma_params.has_ext_regs = true;
dma_params.desc_hw_addr = dma_params.desc_mem_phys;
+ dma_params.rxbuf_offset = 0;
+ dma_params.fixed_prio = 1;
cpsw->dma = cpdma_ctlr_create(&dma_params);
if (!cpsw->dma) {
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index c3f35f1..05afc05 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -124,6 +124,29 @@ struct cpdma_chan {
int int_set, int_clear, td;
};
+struct cpdma_control_info {
+ u32 reg;
+ u32 shift, mask;
+ int access;
+#define ACCESS_RO BIT(0)
+#define ACCESS_WO BIT(1)
+#define ACCESS_RW (ACCESS_RO | ACCESS_WO)
+};
+
+static struct cpdma_control_info controls[] = {
+ [CPDMA_CMD_IDLE] = {CPDMA_DMACONTROL, 3, 1, ACCESS_WO},
+ [CPDMA_COPY_ERROR_FRAMES] = {CPDMA_DMACONTROL, 4, 1, ACCESS_RW},
+ [CPDMA_RX_OFF_LEN_UPDATE] = {CPDMA_DMACONTROL, 2, 1, ACCESS_RW},
+ [CPDMA_RX_OWNERSHIP_FLIP] = {CPDMA_DMACONTROL, 1, 1, ACCESS_RW},
+ [CPDMA_TX_PRIO_FIXED] = {CPDMA_DMACONTROL, 0, 1, ACCESS_RW},
+ [CPDMA_STAT_IDLE] = {CPDMA_DMASTATUS, 31, 1, ACCESS_RO},
+ [CPDMA_STAT_TX_ERR_CODE] = {CPDMA_DMASTATUS, 20, 0xf, ACCESS_RW},
+ [CPDMA_STAT_TX_ERR_CHAN] = {CPDMA_DMASTATUS, 16, 0x7, ACCESS_RW},
+ [CPDMA_STAT_RX_ERR_CODE] = {CPDMA_DMASTATUS, 12, 0xf, ACCESS_RW},
+ [CPDMA_STAT_RX_ERR_CHAN] = {CPDMA_DMASTATUS, 8, 0x7, ACCESS_RW},
+ [CPDMA_RX_BUFFER_OFFSET] = {CPDMA_RXBUFFOFS, 0, 0xffff, ACCESS_RW},
+};
+
#define tx_chan_num(chan) (chan)
#define rx_chan_num(chan) ((chan) + CPDMA_MAX_CHANNELS)
#define is_rx_chan(chan) ((chan)->chan_num >= CPDMA_MAX_CHANNELS)
@@ -253,6 +276,31 @@ static void cpdma_desc_free(struct cpdma_desc_pool *pool,
gen_pool_free(pool->gen_pool, (unsigned long)desc, pool->desc_size);
}
+static int _cpdma_control_set(struct cpdma_ctlr *ctlr, int control, int value)
+{
+ struct cpdma_control_info *info = &controls[control];
+ u32 val;
+
+ if (!ctlr->params.has_ext_regs)
+ return -ENOTSUPP;
+
+ if (ctlr->state != CPDMA_STATE_ACTIVE)
+ return -EINVAL;
+
+ if (control < 0 || control >= ARRAY_SIZE(controls))
+ return -ENOENT;
+
+ if ((info->access & ACCESS_WO) != ACCESS_WO)
+ return -EPERM;
+
+ val = dma_reg_read(ctlr, info->reg);
+ val &= ~(info->mask << info->shift);
+ val |= (value & info->mask) << info->shift;
+ dma_reg_write(ctlr, info->reg, val);
+
+ return 0;
+}
+
struct cpdma_ctlr *cpdma_ctlr_create(struct cpdma_params *params)
{
struct cpdma_ctlr *ctlr;
@@ -324,6 +372,11 @@ int cpdma_ctlr_start(struct cpdma_ctlr *ctlr)
if (ctlr->channels[i])
cpdma_chan_start(ctlr->channels[i]);
}
+
+ _cpdma_control_set(ctlr, CPDMA_TX_PRIO_FIXED, ctlr->params.fixed_prio);
+ _cpdma_control_set(ctlr, CPDMA_RX_BUFFER_OFFSET,
+ ctlr->params.rxbuf_offset);
+
spin_unlock_irqrestore(&ctlr->lock, flags);
return 0;
}
@@ -874,29 +927,6 @@ int cpdma_chan_int_ctrl(struct cpdma_chan *chan, bool enable)
return 0;
}
-struct cpdma_control_info {
- u32 reg;
- u32 shift, mask;
- int access;
-#define ACCESS_RO BIT(0)
-#define ACCESS_WO BIT(1)
-#define ACCESS_RW (ACCESS_RO | ACCESS_WO)
-};
-
-static struct cpdma_control_info controls[] = {
- [CPDMA_CMD_IDLE] = {CPDMA_DMACONTROL, 3, 1, ACCESS_WO},
- [CPDMA_COPY_ERROR_FRAMES] = {CPDMA_DMACONTROL, 4, 1, ACCESS_RW},
- [CPDMA_RX_OFF_LEN_UPDATE] = {CPDMA_DMACONTROL, 2, 1, ACCESS_RW},
- [CPDMA_RX_OWNERSHIP_FLIP] = {CPDMA_DMACONTROL, 1, 1, ACCESS_RW},
- [CPDMA_TX_PRIO_FIXED] = {CPDMA_DMACONTROL, 0, 1, ACCESS_RW},
- [CPDMA_STAT_IDLE] = {CPDMA_DMASTATUS, 31, 1, ACCESS_RO},
- [CPDMA_STAT_TX_ERR_CODE] = {CPDMA_DMASTATUS, 20, 0xf, ACCESS_RW},
- [CPDMA_STAT_TX_ERR_CHAN] = {CPDMA_DMASTATUS, 16, 0x7, ACCESS_RW},
- [CPDMA_STAT_RX_ERR_CODE] = {CPDMA_DMASTATUS, 12, 0xf, ACCESS_RW},
- [CPDMA_STAT_RX_ERR_CHAN] = {CPDMA_DMASTATUS, 8, 0x7, ACCESS_RW},
- [CPDMA_RX_BUFFER_OFFSET] = {CPDMA_RXBUFFOFS, 0, 0xffff, ACCESS_RW},
-};
-
int cpdma_control_get(struct cpdma_ctlr *ctlr, int control)
{
unsigned long flags;
@@ -931,35 +961,10 @@ int cpdma_control_get(struct cpdma_ctlr *ctlr, int control)
int cpdma_control_set(struct cpdma_ctlr *ctlr, int control, int value)
{
unsigned long flags;
- struct cpdma_control_info *info = &controls[control];
int ret;
- u32 val;
spin_lock_irqsave(&ctlr->lock, flags);
-
- ret = -ENOTSUPP;
- if (!ctlr->params.has_ext_regs)
- goto unlock_ret;
-
- ret = -EINVAL;
- if (ctlr->state != CPDMA_STATE_ACTIVE)
- goto unlock_ret;
-
- ret = -ENOENT;
- if (control < 0 || control >= ARRAY_SIZE(controls))
- goto unlock_ret;
-
- ret = -EPERM;
- if ((info->access & ACCESS_WO) != ACCESS_WO)
- goto unlock_ret;
-
- val = dma_reg_read(ctlr, info->reg);
- val &= ~(info->mask << info->shift);
- val |= (value & info->mask) << info->shift;
- dma_reg_write(ctlr, info->reg, val);
- ret = 0;
-
-unlock_ret:
+ ret = _cpdma_control_set(ctlr, control, value);
spin_unlock_irqrestore(&ctlr->lock, flags);
return ret;
}
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.h b/drivers/net/ethernet/ti/davinci_cpdma.h
index a07b22b..e66420f 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.h
+++ b/drivers/net/ethernet/ti/davinci_cpdma.h
@@ -31,6 +31,8 @@ struct cpdma_params {
void __iomem *rxthresh, *rxfree;
int num_chan;
bool has_soft_reset;
+ bool fixed_prio;
+ int rxbuf_offset;
int min_packet_size;
u32 desc_mem_phys;
u32 desc_hw_addr;
--
1.9.1
^ permalink raw reply related
* Re: [PATCH v3 3/4] ptp_clock: allow for it to be optional
From: Edward Cree @ 2016-11-08 13:10 UTC (permalink / raw)
To: Nicolas Pitre, John Stultz, Michal Marek
Cc: Richard Cochran, Paul Bolle, Thomas Gleixner, Josh Triplett,
netdev, linux-kbuild, linux-kernel
In-Reply-To: <1478556899-2951-4-git-send-email-nicolas.pitre@linaro.org>
On 07/11/16 22:14, Nicolas Pitre wrote:
> In order to break the hard dependency between the PTP clock subsystem and
> ethernet drivers capable of being clock providers, this patch provides
> simple PTP stub functions to allow linkage of those drivers into the
> kernel even when the PTP subsystem is configured out. Drivers must be
> ready to accept NULL from ptp_clock_register() in that case.
>
> And to make it possible for PTP to be configured out, the select statement
> in those driver's Kconfig menu entries is converted to the new "imply"
> statement. This way the PTP subsystem may have Kconfig dependencies of
> its own, such as POSIX_TIMERS, without having to make those ethernet
> drivers unavailable if POSIX timers are cconfigured out. And when support
> for POSIX timers is selected again then the default config option for PTP
> clock support will automatically be adjusted accordingly.
>
> The pch_gbe driver is a bit special as it relies on extra code in
> drivers/ptp/ptp_pch.c. Therefore we let the make process descend into
> drivers/ptp/ even if PTP_1588_CLOCK is unselected.
>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> Acked-by: Richard Cochran <richardcochran@gmail.com>
For the sfc change:
Acked-by: Edward Cree <ecree@solarflare.com>
And I accept that "suggests" isn't needed and the current "imply" semantics
are probably fine. If not we can always change it or resurrect "suggests".
^ permalink raw reply
* Re: [PATCH net-next 0/2] sfc: enable 4-tuple UDP RSS hashing
From: Edward Cree @ 2016-11-08 13:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
In-Reply-To: <20161107.132003.727799156798583121.davem@davemloft.net>
On 07/11/16 18:20, David Miller wrote:
> From: Edward Cree <ecree@solarflare.com>
> Date: Thu, 3 Nov 2016 22:10:31 +0000
>
>> EF10 based NICs have configurable RSS hash fields, and can be made to take the
>> ports into the hash on UDP (they already do so for TCP). This patch series
>> enables this, in order to improve spreading of UDP traffic.
> What does the chip do with fragmented traffic?
Only the first fragment will be considered UDP, it will treat the rest as "other
IP" and 2-tuple hash them, probably hitting a different queue.
My understanding is that while that will reduce performance, that shouldn't be a
problem as performance-sensitive users will avoid fragmentation anyway.
It could also lead to out-of-order packet delivery, but it's UDP so that's
supposed to be OK.
^ permalink raw reply
* Re: net/sunrpc/clnt.c:2773 suspicious rcu_dereference_check() usage!
From: Anna Schumaker @ 2016-11-08 12:42 UTC (permalink / raw)
To: Jeff Layton, Ross Zwisler, Trond Myklebust, J. Bruce Fields,
David S. Miller, linux-nfs, netdev, linux-kernel, Andy Adamson
In-Reply-To: <1478606957.2443.8.camel@redhat.com>
On 11/08/2016 07:09 AM, Jeff Layton wrote:
> On Tue, 2016-11-08 at 06:53 -0500, Jeff Layton wrote:
>> On Mon, 2016-11-07 at 22:42 -0700, Ross Zwisler wrote:
>>>
>>> I've got a virtual machine that has some NFS mounts, and with a newly compiled
>>> kernel based on v4.9-rc3 I see the following warning/info message:
>>>
>>> [ 42.750181] ===============================
>>> [ 42.750192] [ INFO: suspicious RCU usage. ]
>>> [ 42.750203] 4.9.0-rc3-00002-g7b6e7de #3 Not tainted
>>> [ 42.750213] -------------------------------
>>> [ 42.750225] net/sunrpc/clnt.c:2773 suspicious rcu_dereference_check() usage!
>>> [ 42.750235]
>>> [ 42.750235] other info that might help us debug this:
>>> [ 42.750235]
>>> [ 42.750246]
>>> [ 42.750246] rcu_scheduler_active = 1, debug_locks = 0
>>> [ 42.750257] 1 lock held by mount.nfs4/6440:
>>> [ 42.750278] #0:
>>> [ 42.750299] (
>>> [ 42.750319] &(&nn->nfs_client_lock)->rlock
>>> [ 42.750340] ){+.+...}
>>> [ 42.750362] , at:
>>> [ 42.750372] [<ffffffff813012b5>] nfs_get_client+0x105/0x5e0
>>> [ 42.750383]
>>> [ 42.750383] stack backtrace:
>>> [ 42.750394] CPU: 0 PID: 6440 Comm: mount.nfs4 Not tainted 4.9.0-rc3-00002-g7b6e7de #3
>>> [ 42.750406] Hardware name: Intel Corporation PURLEY/PURLEY, BIOS PLYDCRB1.MBH.0096.D23.1608240105 08/24/2016
>>> [ 42.750429] ffffc9000092fa68 ffffffff8150730f ffff88014ec8da40 0000000000000001
>>> [ 42.750452] ffffc9000092fa98 ffffffff810bc3f7 ffff880150b0b228 ffff88015068dbb0
>>> [ 42.750475] ffffc9000092fb38 ffff88014fc99180 ffffc9000092fac0 ffffffff81b243e5
>>> [ 42.750486] Call Trace:
>>> [ 42.750498] [<ffffffff8150730f>] dump_stack+0x67/0x98
>>> [ 42.750511] [<ffffffff810bc3f7>] lockdep_rcu_suspicious+0xe7/0x120
>>> [ 42.750524] [<ffffffff81b243e5>] rpc_clnt_xprt_switch_has_addr+0x115/0x150
>>> [ 42.750536] [<ffffffff813013f4>] nfs_get_client+0x244/0x5e0
>>> [ 42.750549] [<ffffffff813012ac>] ? nfs_get_client+0xfc/0x5e0
>>> [ 42.750561] [<ffffffff813568f8>] nfs4_set_client+0x98/0x130
>>> [ 42.750574] [<ffffffff8135872e>] nfs4_create_server+0x13e/0x390
>>> [ 42.750588] [<ffffffff8134cd0e>] nfs4_remote_mount+0x2e/0x60
>>> [ 42.750600] [<ffffffff811f3a29>] mount_fs+0x39/0x170
>>> [ 42.750614] [<ffffffff81214a0b>] vfs_kern_mount+0x6b/0x150
>>> [ 42.750626] [<ffffffff8134cbec>] ? nfs_do_root_mount+0x3c/0xc0
>>> [ 42.750639] [<ffffffff8134cc36>] nfs_do_root_mount+0x86/0xc0
>>> [ 42.750652] [<ffffffff8134d014>] nfs4_try_mount+0x44/0xc0
>>> [ 42.750664] [<ffffffff81302097>] ? get_nfs_version+0x27/0x90
>>> [ 42.750677] [<ffffffff81310f8c>] nfs_fs_mount+0x4ac/0xd80
>>> [ 42.750689] [<ffffffff810bb938>] ? lockdep_init_map+0x88/0x1f0
>>> [ 42.750701] [<ffffffff81311ac0>] ? nfs_clone_super+0x130/0x130
>>> [ 42.750713] [<ffffffff8130f300>] ? param_set_portnr+0x70/0x70
>>> [ 42.750726] [<ffffffff811f3a29>] mount_fs+0x39/0x170
>>> [ 42.750740] [<ffffffff81214a0b>] vfs_kern_mount+0x6b/0x150
>>> [ 42.750752] [<ffffffff812176f1>] do_mount+0x1f1/0xd10
>>> [ 42.750765] [<ffffffff81217441>] ? copy_mount_options+0xa1/0x140
>>> [ 42.750777] [<ffffffff81218543>] SyS_mount+0x83/0xd0
>>> [ 42.750790] [<ffffffff81002abc>] do_syscall_64+0x5c/0x130
>>> [ 42.750802] [<ffffffff81c479a4>] entry_SYSCALL64_slow_path+0x25/0x25
>>>
>>> This rcu_dereference_check() was introduced by the following commit:
>>>
>>> commit 39e5d2df959dd4aea81fa33d765d2a5cc67a0512
>>> Author: Andy Adamson <andros@netapp.com>
>>> Date: Fri Sep 9 09:22:25 2016 -0400
>>>
>>> SUNRPC search xprt switch for sockaddr
>>>
>>> Signed-off-by: Andy Adamson <andros@netapp.com>
>>> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
>>>
>>> Thanks,
>>> - Ross
>>
>> Thanks Ross,
Hi Ross,
Can you try this patch and let me know if it helps:
http://git.linux-nfs.org/?p=anna/linux-nfs.git;a=commitdiff;h=bb29dd84333a96f309c6d0f88b285b5b78927058
I'm planning on sending it to Linus soon, so it should be in rc5.
Anna
>>
>> ----------------------8<----------------------
>> bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt,
>> const struct sockaddr *sap)
>> {
>> struct rpc_xprt_switch *xps;
>> bool ret;
>>
>> xps = rcu_dereference(clnt->cl_xpi.xpi_xpswitch);
>>
>> rcu_read_lock();
>> ret = rpc_xprt_switch_has_addr(xps, sap);
>> rcu_read_unlock();
>> return ret;
>> }
>> ----------------------8<----------------------
>>
>> Looks like the simple fix is to just move that rcu_dereference call
>> inside the rcu_read_lock there.
>>
>
> Hmm...that said though, there are some other suspicious accesses
> of xpi_xpswitch. Looks like these are called without the rcu_read_lock
> clearly being held:
>
> rpc_clnt_xprt_switch_add_xprt
> rpc_clnt_xprt_switch_put
>
> ...though it's possible I missed something there.
>
^ permalink raw reply
* Re: net/sunrpc/clnt.c:2773 suspicious rcu_dereference_check() usage!
From: Jeff Layton @ 2016-11-08 12:09 UTC (permalink / raw)
To: Ross Zwisler, Trond Myklebust, Anna Schumaker, J. Bruce Fields,
David S. Miller, linux-nfs, netdev, linux-kernel, Andy Adamson
In-Reply-To: <1478606028.2443.2.camel@redhat.com>
On Tue, 2016-11-08 at 06:53 -0500, Jeff Layton wrote:
> On Mon, 2016-11-07 at 22:42 -0700, Ross Zwisler wrote:
> >
> > I've got a virtual machine that has some NFS mounts, and with a newly compiled
> > kernel based on v4.9-rc3 I see the following warning/info message:
> >
> > [ 42.750181] ===============================
> > [ 42.750192] [ INFO: suspicious RCU usage. ]
> > [ 42.750203] 4.9.0-rc3-00002-g7b6e7de #3 Not tainted
> > [ 42.750213] -------------------------------
> > [ 42.750225] net/sunrpc/clnt.c:2773 suspicious rcu_dereference_check() usage!
> > [ 42.750235]
> > [ 42.750235] other info that might help us debug this:
> > [ 42.750235]
> > [ 42.750246]
> > [ 42.750246] rcu_scheduler_active = 1, debug_locks = 0
> > [ 42.750257] 1 lock held by mount.nfs4/6440:
> > [ 42.750278] #0:
> > [ 42.750299] (
> > [ 42.750319] &(&nn->nfs_client_lock)->rlock
> > [ 42.750340] ){+.+...}
> > [ 42.750362] , at:
> > [ 42.750372] [<ffffffff813012b5>] nfs_get_client+0x105/0x5e0
> > [ 42.750383]
> > [ 42.750383] stack backtrace:
> > [ 42.750394] CPU: 0 PID: 6440 Comm: mount.nfs4 Not tainted 4.9.0-rc3-00002-g7b6e7de #3
> > [ 42.750406] Hardware name: Intel Corporation PURLEY/PURLEY, BIOS PLYDCRB1.MBH.0096.D23.1608240105 08/24/2016
> > [ 42.750429] ffffc9000092fa68 ffffffff8150730f ffff88014ec8da40 0000000000000001
> > [ 42.750452] ffffc9000092fa98 ffffffff810bc3f7 ffff880150b0b228 ffff88015068dbb0
> > [ 42.750475] ffffc9000092fb38 ffff88014fc99180 ffffc9000092fac0 ffffffff81b243e5
> > [ 42.750486] Call Trace:
> > [ 42.750498] [<ffffffff8150730f>] dump_stack+0x67/0x98
> > [ 42.750511] [<ffffffff810bc3f7>] lockdep_rcu_suspicious+0xe7/0x120
> > [ 42.750524] [<ffffffff81b243e5>] rpc_clnt_xprt_switch_has_addr+0x115/0x150
> > [ 42.750536] [<ffffffff813013f4>] nfs_get_client+0x244/0x5e0
> > [ 42.750549] [<ffffffff813012ac>] ? nfs_get_client+0xfc/0x5e0
> > [ 42.750561] [<ffffffff813568f8>] nfs4_set_client+0x98/0x130
> > [ 42.750574] [<ffffffff8135872e>] nfs4_create_server+0x13e/0x390
> > [ 42.750588] [<ffffffff8134cd0e>] nfs4_remote_mount+0x2e/0x60
> > [ 42.750600] [<ffffffff811f3a29>] mount_fs+0x39/0x170
> > [ 42.750614] [<ffffffff81214a0b>] vfs_kern_mount+0x6b/0x150
> > [ 42.750626] [<ffffffff8134cbec>] ? nfs_do_root_mount+0x3c/0xc0
> > [ 42.750639] [<ffffffff8134cc36>] nfs_do_root_mount+0x86/0xc0
> > [ 42.750652] [<ffffffff8134d014>] nfs4_try_mount+0x44/0xc0
> > [ 42.750664] [<ffffffff81302097>] ? get_nfs_version+0x27/0x90
> > [ 42.750677] [<ffffffff81310f8c>] nfs_fs_mount+0x4ac/0xd80
> > [ 42.750689] [<ffffffff810bb938>] ? lockdep_init_map+0x88/0x1f0
> > [ 42.750701] [<ffffffff81311ac0>] ? nfs_clone_super+0x130/0x130
> > [ 42.750713] [<ffffffff8130f300>] ? param_set_portnr+0x70/0x70
> > [ 42.750726] [<ffffffff811f3a29>] mount_fs+0x39/0x170
> > [ 42.750740] [<ffffffff81214a0b>] vfs_kern_mount+0x6b/0x150
> > [ 42.750752] [<ffffffff812176f1>] do_mount+0x1f1/0xd10
> > [ 42.750765] [<ffffffff81217441>] ? copy_mount_options+0xa1/0x140
> > [ 42.750777] [<ffffffff81218543>] SyS_mount+0x83/0xd0
> > [ 42.750790] [<ffffffff81002abc>] do_syscall_64+0x5c/0x130
> > [ 42.750802] [<ffffffff81c479a4>] entry_SYSCALL64_slow_path+0x25/0x25
> >
> > This rcu_dereference_check() was introduced by the following commit:
> >
> > commit 39e5d2df959dd4aea81fa33d765d2a5cc67a0512
> > Author: Andy Adamson <andros@netapp.com>
> > Date: Fri Sep 9 09:22:25 2016 -0400
> >
> > SUNRPC search xprt switch for sockaddr
> >
> > Signed-off-by: Andy Adamson <andros@netapp.com>
> > Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
> >
> > Thanks,
> > - Ross
>
> Thanks Ross,
>
> ----------------------8<----------------------
> bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt,
> const struct sockaddr *sap)
> {
> struct rpc_xprt_switch *xps;
> bool ret;
>
> xps = rcu_dereference(clnt->cl_xpi.xpi_xpswitch);
>
> rcu_read_lock();
> ret = rpc_xprt_switch_has_addr(xps, sap);
> rcu_read_unlock();
> return ret;
> }
> ----------------------8<----------------------
>
> Looks like the simple fix is to just move that rcu_dereference call
> inside the rcu_read_lock there.
>
Hmm...that said though, there are some other suspicious accesses
of xpi_xpswitch. Looks like these are called without the rcu_read_lock
clearly being held:
rpc_clnt_xprt_switch_add_xprt
rpc_clnt_xprt_switch_put
...though it's possible I missed something there.
--
Jeff Layton <jlayton@redhat.com>
^ permalink raw reply
* Re: Virtio_net support vxlan encapsulation package TSO offload discuss
From: Zhangming (James, Euler) @ 2016-11-08 11:58 UTC (permalink / raw)
To: Jason Wang, netdev@vger.kernel.org; +Cc: Michael S. Tsirkin, Vlad Yasevic
In-Reply-To: <3a0b8f10-f479-3ed5-dd10-5b92de3eb593@redhat.com>
On 2016年11月08日 19:17, Jason Wang wrote:
>On 2016年11月08日 19:13, Jason Wang wrote:
>> Cc Michael
>>
>> On 2016年11月08日 16:34, Zhangming (James, Euler) wrote:
>>>
>>> In container scenario, OVS is installed in the Virtual machine, and
>>> all the containers connected to the OVS will communicated through
>>> VXLAN encapsulation.
>>>
>>> By now, virtio_net does not support TSO offload for VXLAN
>>> encapsulated TSO package. In this condition, the performance is not
>>> good, sender is bottleneck
>>>
>>> I googled this scenario, but I didn’t find any information. Will
>>> virtio_net support VXLAN encapsulation package TSO offload later?
>>>
>>
> >Yes and for both sender and receiver.
>>
>>> My idea is virtio_net open encapsulated TSO offload, and transport
>>> encapsulation info to TUN, TUN will parse the info and build skb with
>>> encapsulation info.
>>>
>>> OVS or kernel on the host should be modified to support this. Using
>>> this method, the TCP performance aremore than 2x as before.
>>>
>>> Any advice and suggestions for this idea or new idea will be greatly
>>> appreciated!
>>>
>>> Best regards,
>>>
>>> James zhang
>>>
>>
>> Sounds very good. And we may also need features bits
>> (VIRTIO_NET_F_GUEST|HOST_GSO_X) for this.
>>
>> This is in fact one of items in networking todo list. (See
>> http://www.linux-kvm.org/page/NetworkingTodo). While at it, we'd
>> better support not only VXLAN but also other tunnels.
>
>Cc Vlad who is working on extending virtio-net headers.
>
>>
>> We can start with the spec work, or if you've already had some bits
>> you can post them as RFC for early review.
>>
>> Thanks
Below is my demo code
Virtio_net.c
static int virtnet_probe(struct virtio_device *vdev), add belows codes:
if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF) || // avoid gso segment, it should be negotiation later, because in the demo I reuse num_buffers.
virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
dev->hw_enc_features |= NETIF_F_TSO;
dev->hw_enc_features |= NETIF_F_ALL_CSUM;
dev->hw_enc_features |= NETIF_F_GSO_UDP_TUNNEL;
dev->hw_enc_features |= NETIF_F_GSO_UDP_TUNNEL_CSUM;
dev->hw_enc_features |= NETIF_F_GSO_TUNNEL_REMCSUM;
dev->features |= NETIF_F_GSO_UDP_TUNNEL;
dev->features |= NETIF_F_GSO_UDP_TUNNEL_CSUM;
dev->features |= NETIF_F_GSO_TUNNEL_REMCSUM;
}
static int xmit_skb(struct send_queue *sq, struct sk_buff *skb), add below to pieces of codes
if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL)
hdr->hdr.gso_type |= VIRTIO_NET_HDR_GSO_TUNNEL;
if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL_CSUM)
hdr->hdr.gso_type |= VIRTIO_NET_HDR_GSO_TUNNEL_CSUM;
if (skb_shinfo(skb)->gso_type & SKB_GSO_TUNNEL_REMCSUM)
hdr->hdr.gso_type |= VIRTIO_NET_HDR_GSO_TUNNEL_REMCSUM;
if (skb->encapsulation && skb_is_gso(skb)) {
inner_mac_len = skb_inner_network_header(skb) - skb_inner_mac_header(skb);
tnl_len = skb_inner_mac_header(skb) - skb_mac_header(skb);
if ( !(inner_mac_len >> DATA_LEN_SHIFT) && !(tnl_len >> DATA_LEN_SHIFT) ) {
hdr->hdr.flags |= VIRTIO_NET_HDR_F_ENCAPSULATION;
hdr->num_buffers = (__virtio16)((inner_mac_len << DATA_LEN_SHIFT) | tnl_len); //we reuse num_buffers for simple , we should add extend member for later.
} else
hdr->num_buffers = 0;
}
Tun.c
if (memcpy_fromiovecend((void *)&hdr, iv, offset, tun->vnet_hdr_sz)) //read header with negotiation length
return -EFAULT;
if (hdr.gso_type & VIRTIO_NET_HDR_GSO_TUNNEL) //set tunnel gso info
skb_shinfo(skb)->gso_type |= SKB_GSO_UDP_TUNNEL;
if (hdr.gso_type & VIRTIO_NET_HDR_GSO_TUNNEL_CSUM)
skb_shinfo(skb)->gso_type |= SKB_GSO_UDP_TUNNEL_CSUM;
if (hdr.gso_type & VIRTIO_NET_HDR_GSO_TUNNEL_REMCSUM)
skb_shinfo(skb)->gso_type |= SKB_GSO_TUNNEL_REMCSUM;
if (hdr.flags & VIRTIO_NET_HDR_F_ENCAPSULATION) { //read tunnel info from header and set to built skb.
tnl_len = tun16_to_cpu(tun, hdr.num_buffers) & TUN_TNL_LEN_MASK;
payload_mac_len = tun16_to_cpu(tun, hdr.num_buffers) >> TUN_DATA_LEN_SHIFT;
mac_len = skb_network_header(skb) - skb_mac_header(skb);
skb_set_inner_mac_header(skb, tnl_len - mac_len);
skb_set_inner_network_header(skb, tnl_len + payload_mac_len - mac_len);
skb->encapsulation = 1;
}
^ permalink raw reply
* Re: net/sunrpc/clnt.c:2773 suspicious rcu_dereference_check() usage!
From: Jeff Layton @ 2016-11-08 11:53 UTC (permalink / raw)
To: Ross Zwisler, Trond Myklebust, Anna Schumaker, J. Bruce Fields,
David S. Miller, linux-nfs, netdev, linux-kernel, Andy Adamson
In-Reply-To: <20161108054202.GA12406@linux.intel.com>
On Mon, 2016-11-07 at 22:42 -0700, Ross Zwisler wrote:
> I've got a virtual machine that has some NFS mounts, and with a newly compiled
> kernel based on v4.9-rc3 I see the following warning/info message:
>
> [ 42.750181] ===============================
> [ 42.750192] [ INFO: suspicious RCU usage. ]
> [ 42.750203] 4.9.0-rc3-00002-g7b6e7de #3 Not tainted
> [ 42.750213] -------------------------------
> [ 42.750225] net/sunrpc/clnt.c:2773 suspicious rcu_dereference_check() usage!
> [ 42.750235]
> [ 42.750235] other info that might help us debug this:
> [ 42.750235]
> [ 42.750246]
> [ 42.750246] rcu_scheduler_active = 1, debug_locks = 0
> [ 42.750257] 1 lock held by mount.nfs4/6440:
> [ 42.750278] #0:
> [ 42.750299] (
> [ 42.750319] &(&nn->nfs_client_lock)->rlock
> [ 42.750340] ){+.+...}
> [ 42.750362] , at:
> [ 42.750372] [<ffffffff813012b5>] nfs_get_client+0x105/0x5e0
> [ 42.750383]
> [ 42.750383] stack backtrace:
> [ 42.750394] CPU: 0 PID: 6440 Comm: mount.nfs4 Not tainted 4.9.0-rc3-00002-g7b6e7de #3
> [ 42.750406] Hardware name: Intel Corporation PURLEY/PURLEY, BIOS PLYDCRB1.MBH.0096.D23.1608240105 08/24/2016
> [ 42.750429] ffffc9000092fa68 ffffffff8150730f ffff88014ec8da40 0000000000000001
> [ 42.750452] ffffc9000092fa98 ffffffff810bc3f7 ffff880150b0b228 ffff88015068dbb0
> [ 42.750475] ffffc9000092fb38 ffff88014fc99180 ffffc9000092fac0 ffffffff81b243e5
> [ 42.750486] Call Trace:
> [ 42.750498] [<ffffffff8150730f>] dump_stack+0x67/0x98
> [ 42.750511] [<ffffffff810bc3f7>] lockdep_rcu_suspicious+0xe7/0x120
> [ 42.750524] [<ffffffff81b243e5>] rpc_clnt_xprt_switch_has_addr+0x115/0x150
> [ 42.750536] [<ffffffff813013f4>] nfs_get_client+0x244/0x5e0
> [ 42.750549] [<ffffffff813012ac>] ? nfs_get_client+0xfc/0x5e0
> [ 42.750561] [<ffffffff813568f8>] nfs4_set_client+0x98/0x130
> [ 42.750574] [<ffffffff8135872e>] nfs4_create_server+0x13e/0x390
> [ 42.750588] [<ffffffff8134cd0e>] nfs4_remote_mount+0x2e/0x60
> [ 42.750600] [<ffffffff811f3a29>] mount_fs+0x39/0x170
> [ 42.750614] [<ffffffff81214a0b>] vfs_kern_mount+0x6b/0x150
> [ 42.750626] [<ffffffff8134cbec>] ? nfs_do_root_mount+0x3c/0xc0
> [ 42.750639] [<ffffffff8134cc36>] nfs_do_root_mount+0x86/0xc0
> [ 42.750652] [<ffffffff8134d014>] nfs4_try_mount+0x44/0xc0
> [ 42.750664] [<ffffffff81302097>] ? get_nfs_version+0x27/0x90
> [ 42.750677] [<ffffffff81310f8c>] nfs_fs_mount+0x4ac/0xd80
> [ 42.750689] [<ffffffff810bb938>] ? lockdep_init_map+0x88/0x1f0
> [ 42.750701] [<ffffffff81311ac0>] ? nfs_clone_super+0x130/0x130
> [ 42.750713] [<ffffffff8130f300>] ? param_set_portnr+0x70/0x70
> [ 42.750726] [<ffffffff811f3a29>] mount_fs+0x39/0x170
> [ 42.750740] [<ffffffff81214a0b>] vfs_kern_mount+0x6b/0x150
> [ 42.750752] [<ffffffff812176f1>] do_mount+0x1f1/0xd10
> [ 42.750765] [<ffffffff81217441>] ? copy_mount_options+0xa1/0x140
> [ 42.750777] [<ffffffff81218543>] SyS_mount+0x83/0xd0
> [ 42.750790] [<ffffffff81002abc>] do_syscall_64+0x5c/0x130
> [ 42.750802] [<ffffffff81c479a4>] entry_SYSCALL64_slow_path+0x25/0x25
>
> This rcu_dereference_check() was introduced by the following commit:
>
> commit 39e5d2df959dd4aea81fa33d765d2a5cc67a0512
> Author: Andy Adamson <andros@netapp.com>
> Date: Fri Sep 9 09:22:25 2016 -0400
>
> SUNRPC search xprt switch for sockaddr
>
> Signed-off-by: Andy Adamson <andros@netapp.com>
> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
>
> Thanks,
> - Ross
Thanks Ross,
----------------------8<----------------------
bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt,
const struct sockaddr *sap)
{
struct rpc_xprt_switch *xps;
bool ret;
xps = rcu_dereference(clnt->cl_xpi.xpi_xpswitch);
rcu_read_lock();
ret = rpc_xprt_switch_has_addr(xps, sap);
rcu_read_unlock();
return ret;
}
----------------------8<----------------------
Looks like the simple fix is to just move that rcu_dereference call
inside the rcu_read_lock there.
Cheers,
--
Jeff Layton <jlayton@redhat.com>
^ permalink raw reply
* Re: Virtio_net support vxlan encapsulation package TSO offload discuss
From: Jason Wang @ 2016-11-08 11:17 UTC (permalink / raw)
To: Zhangming (James, Euler), netdev@vger.kernel.org
Cc: Michael S. Tsirkin, Vlad Yasevic
In-Reply-To: <c2f735e4-eddf-f737-2afe-35a93289f8d4@redhat.com>
On 2016年11月08日 19:13, Jason Wang wrote:
> Cc Michael
>
> On 2016年11月08日 16:34, Zhangming (James, Euler) wrote:
>>
>> In container scenario, OVS is installed in the Virtual machine, and
>> all the containers connected to the OVS will communicated through
>> VXLAN encapsulation.
>>
>> By now, virtio_net does not support TSO offload for VXLAN
>> encapsulated TSO package. In this condition, the performance is not
>> good, sender is bottleneck
>>
>> I googled this scenario, but I didn’t find any information. Will
>> virtio_net support VXLAN encapsulation package TSO offload later?
>>
>
> Yes and for both sender and receiver.
>
>> My idea is virtio_net open encapsulated TSO offload, and transport
>> encapsulation info to TUN, TUN will parse the info and build skb with
>> encapsulation info.
>>
>> OVS or kernel on the host should be modified to support this. Using
>> this method, the TCP performance aremore than 2x as before.
>>
>> Any advice and suggestions for this idea or new idea will be greatly
>> appreciated!
>>
>> Best regards,
>>
>> James zhang
>>
>
> Sounds very good. And we may also need features bits
> (VIRTIO_NET_F_GUEST|HOST_GSO_X) for this.
>
> This is in fact one of items in networking todo list. (See
> http://www.linux-kvm.org/page/NetworkingTodo). While at it, we'd
> better support not only VXLAN but also other tunnels.
Cc Vlad who is working on extending virtio-net headers.
>
> We can start with the spec work, or if you've already had some bits
> you can post them as RFC for early review.
>
> Thanks
^ permalink raw reply
* Re: Virtio_net support vxlan encapsulation package TSO offload discuss
From: Jason Wang @ 2016-11-08 11:13 UTC (permalink / raw)
To: Zhangming (James, Euler), netdev@vger.kernel.org; +Cc: Michael S. Tsirkin
In-Reply-To: <DBCD2614ECF3FF4087A2C27CA80E34DD5401AC8B@SZXEMA501-MBX.china.huawei.com>
Cc Michael
On 2016年11月08日 16:34, Zhangming (James, Euler) wrote:
>
> In container scenario, OVS is installed in the Virtual machine, and
> all the containers connected to the OVS will communicated through
> VXLAN encapsulation.
>
> By now, virtio_net does not support TSO offload for VXLAN encapsulated
> TSO package. In this condition, the performance is not good, sender is
> bottleneck
>
> I googled this scenario, but I didn’t find any information. Will
> virtio_net support VXLAN encapsulation package TSO offload later?
>
Yes and for both sender and receiver.
> My idea is virtio_net open encapsulated TSO offload, and transport
> encapsulation info to TUN, TUN will parse the info and build skb with
> encapsulation info.
>
> OVS or kernel on the host should be modified to support this. Using
> this method, the TCP performance aremore than 2x as before.
>
> Any advice and suggestions for this idea or new idea will be greatly
> appreciated!
>
> Best regards,
>
> James zhang
>
Sounds very good. And we may also need features bits
(VIRTIO_NET_F_GUEST|HOST_GSO_X) for this.
This is in fact one of items in networking todo list. (See
http://www.linux-kvm.org/page/NetworkingTodo). While at it, we'd better
support not only VXLAN but also other tunnels.
We can start with the spec work, or if you've already had some bits you
can post them as RFC for early review.
Thanks
^ permalink raw reply
* Re: [PATCH v2 3/6] qedi: Add QLogic FastLinQ offload iSCSI driver framework.
From: kbuild test robot @ 2016-11-08 11:13 UTC (permalink / raw)
To: Manish Rangankar
Cc: kbuild-all, martin.petersen, lduncan, cleech, linux-scsi, netdev,
QLogic-Storage-Upstream, Yuval.Mintz
In-Reply-To: <1478588223-16183-4-git-send-email-manish.rangankar@cavium.com>
[-- Attachment #1: Type: text/plain, Size: 10951 bytes --]
Hi Manish,
[auto build test ERROR on net-next/master]
[also build test ERROR on v4.9-rc4 next-20161028]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Manish-Rangankar/qed-Add-support-for-hardware-offloaded-iSCSI/20161108-180027
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=parisc
All errors (new ones prefixed by >>):
drivers/scsi/qedi/qedi_main.c: In function 'qedi_iscsi_event_cb':
drivers/scsi/qedi/qedi_main.c:87:14: error: dereferencing pointer to incomplete type 'struct qedi_endpoint'
if (qedi_ep->state == EP_STATE_OFLDCONN_START)
^~
drivers/scsi/qedi/qedi_main.c:87:25: error: 'EP_STATE_OFLDCONN_START' undeclared (first use in this function)
if (qedi_ep->state == EP_STATE_OFLDCONN_START)
^~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:87:25: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/qedi/qedi_main.c:88:21: error: 'EP_STATE_OFLDCONN_COMPL' undeclared (first use in this function)
qedi_ep->state = EP_STATE_OFLDCONN_COMPL;
^~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:93:20: error: 'EP_STATE_DISCONN_COMPL' undeclared (first use in this function)
qedi_ep->state = EP_STATE_DISCONN_COMPL;
^~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:97:3: error: implicit declaration of function 'qedi_process_iscsi_error' [-Werror=implicit-function-declaration]
qedi_process_iscsi_error(qedi_ep, data);
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:106:3: error: implicit declaration of function 'qedi_process_tcp_error' [-Werror=implicit-function-declaration]
qedi_process_tcp_error(qedi_ep, data);
^~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_host_alloc':
drivers/scsi/qedi/qedi_main.c:414:28: error: 'qedi_host_template' undeclared (first use in this function)
shost = iscsi_host_alloc(&qedi_host_template,
^~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:433:27: error: 'ISCSI_MAX_SESS_PER_HBA' undeclared (first use in this function)
qedi->max_active_conns = ISCSI_MAX_SESS_PER_HBA;
^~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_set_iscsi_pf_param':
>> drivers/scsi/qedi/qedi_main.c:463:4: error: passing argument 3 of 'pci_alloc_consistent' from incompatible pointer type [-Werror=incompatible-pointer-types]
&qedi->hw_p_cpuq);
^
In file included from include/linux/pci.h:2131:0,
from drivers/scsi/qedi/qedi_main.c:11:
include/linux/pci-dma-compat.h:16:1: note: expected 'dma_addr_t * {aka unsigned int *}' but argument is of type 'u64 * {aka long long unsigned int *}'
pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
^~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_queue_cqe':
drivers/scsi/qedi/qedi_main.c:571:15: error: dereferencing pointer to incomplete type 'struct qedi_conn'
conn = q_conn->cls_conn->dd_data;
^~
drivers/scsi/qedi/qedi_main.c:581:27: error: dereferencing pointer to incomplete type 'struct qedi_cmd'
INIT_LIST_HEAD(&qedi_cmd->cqe_work.list);
^~
drivers/scsi/qedi/qedi_main.c: At top level:
drivers/scsi/qedi/qedi_main.c:1095:15: error: variable 'qedi_ll2_cb_ops' has initializer but incomplete type
static struct qed_ll2_cb_ops qedi_ll2_cb_ops = {
^~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1096:2: error: unknown field 'rx_cb' specified in initializer
.rx_cb = qedi_ll2_rx,
^
drivers/scsi/qedi/qedi_main.c:1096:11: error: 'qedi_ll2_rx' undeclared here (not in a function)
.rx_cb = qedi_ll2_rx,
^~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1096:11: warning: excess elements in struct initializer
drivers/scsi/qedi/qedi_main.c:1096:11: note: (near initialization for 'qedi_ll2_cb_ops')
drivers/scsi/qedi/qedi_main.c:1097:2: error: unknown field 'tx_cb' specified in initializer
.tx_cb = NULL,
^
In file included from include/uapi/linux/posix_types.h:4:0,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from drivers/scsi/qedi/qedi_main.c:10:
include/linux/stddef.h:7:14: warning: excess elements in struct initializer
#define NULL ((void *)0)
^
drivers/scsi/qedi/qedi_main.c:1097:11: note: in expansion of macro 'NULL'
.tx_cb = NULL,
^~~~
include/linux/stddef.h:7:14: note: (near initialization for 'qedi_ll2_cb_ops')
#define NULL ((void *)0)
^
drivers/scsi/qedi/qedi_main.c:1097:11: note: in expansion of macro 'NULL'
.tx_cb = NULL,
^~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_percpu_io_thread':
drivers/scsi/qedi/qedi_main.c:1117:5: error: implicit declaration of function 'qedi_fp_process_cqes' [-Werror=implicit-function-declaration]
qedi_fp_process_cqes(work);
^~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function '__qedi_remove':
drivers/scsi/qedi/qedi_main.c:1226:16: error: dereferencing pointer to incomplete type 'const struct qed_ll2_ops'
qedi_ops->ll2->stop(qedi->cdev);
^~
drivers/scsi/qedi/qedi_main.c:1242:3: error: implicit declaration of function 'qedi_free_uio' [-Werror=implicit-function-declaration]
qedi_free_uio(qedi->udev);
^~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1252:3: error: implicit declaration of function 'qedi_ll2_free_skbs' [-Werror=implicit-function-declaration]
qedi_ll2_free_skbs(qedi);
^~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function '__qedi_probe':
drivers/scsi/qedi/qedi_main.c:1259:24: error: storage size of 'params' isn't known
struct qed_ll2_params params;
^~~~~~
drivers/scsi/qedi/qedi_main.c:1376:15: error: 'DEF_PATH_MTU' undeclared (first use in this function)
params.mtu = DEF_PATH_MTU + IPV6_HDR_LEN + TCP_HDR_LEN;
^~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1376:30: error: 'IPV6_HDR_LEN' undeclared (first use in this function)
params.mtu = DEF_PATH_MTU + IPV6_HDR_LEN + TCP_HDR_LEN;
^~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1376:45: error: 'TCP_HDR_LEN' undeclared (first use in this function)
params.mtu = DEF_PATH_MTU + IPV6_HDR_LEN + TCP_HDR_LEN;
^~~~~~~~~~~
In file included from drivers/scsi/qedi/qedi_main.c:18:0:
drivers/scsi/qedi/qedi_main.c:1394:39: error: 'qedi_ll2_recv_thread' undeclared (first use in this function)
qedi->ll2_recv_thread = kthread_run(qedi_ll2_recv_thread,
^
include/linux/kthread.h:25:25: note: in definition of macro 'kthread_create'
kthread_create_on_node(threadfn, data, NUMA_NO_NODE, namefmt, ##arg)
^~~~~~~~
drivers/scsi/qedi/qedi_main.c:1394:27: note: in expansion of macro 'kthread_run'
qedi->ll2_recv_thread = kthread_run(qedi_ll2_recv_thread,
^~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1422:38: error: 'qedi_debugfs_ops' undeclared (first use in this function)
qedi_dbg_host_init(&qedi->dbg_ctx, &qedi_debugfs_ops,
^~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1423:8: error: 'qedi_dbg_fops' undeclared (first use in this function)
&qedi_dbg_fops);
^~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1439:8: error: implicit declaration of function 'qedi_alloc_uio_rings' [-Werror=implicit-function-declaration]
rc = qedi_alloc_uio_rings(qedi);
^~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1446:8: error: implicit declaration of function 'qedi_init_uio' [-Werror=implicit-function-declaration]
rc = qedi_init_uio(qedi);
^~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1259:24: warning: unused variable 'params' [-Wunused-variable]
struct qed_ll2_params params;
^~~~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_init':
vim +/pci_alloc_consistent +463 drivers/scsi/qedi/qedi_main.c
408
409 static struct qedi_ctx *qedi_host_alloc(struct pci_dev *pdev)
410 {
411 struct Scsi_Host *shost;
412 struct qedi_ctx *qedi = NULL;
413
> 414 shost = iscsi_host_alloc(&qedi_host_template,
415 sizeof(struct qedi_ctx), 0);
416 if (!shost) {
417 QEDI_ERR(NULL, "Could not allocate shost\n");
418 goto exit_setup_shost;
419 }
420
421 shost->max_id = QEDI_MAX_ISCSI_CONNS_PER_HBA;
422 shost->max_channel = 0;
423 shost->max_lun = ~0;
424 shost->max_cmd_len = 16;
425 shost->transportt = qedi_scsi_transport;
426
427 qedi = iscsi_host_priv(shost);
428 memset(qedi, 0, sizeof(*qedi));
429 qedi->shost = shost;
430 qedi->dbg_ctx.host_no = shost->host_no;
431 qedi->pdev = pdev;
432 qedi->dbg_ctx.pdev = pdev;
433 qedi->max_active_conns = ISCSI_MAX_SESS_PER_HBA;
434 qedi->max_sqes = QEDI_SQ_SIZE;
435
436 if (shost_use_blk_mq(shost))
437 shost->nr_hw_queues = MIN_NUM_CPUS_MSIX(qedi);
438
439 pci_set_drvdata(pdev, qedi);
440
441 exit_setup_shost:
442 return qedi;
443 }
444
445 static int qedi_set_iscsi_pf_param(struct qedi_ctx *qedi)
446 {
447 u8 num_sq_pages;
448 u32 log_page_size;
449 int rval = 0;
450
451 QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC, "Min number of MSIX %d\n",
452 MIN_NUM_CPUS_MSIX(qedi));
453
454 num_sq_pages = (MAX_OUSTANDING_TASKS_PER_CON * 8) / PAGE_SIZE;
455
456 qedi->num_queues = MIN_NUM_CPUS_MSIX(qedi);
457
458 memset(&qedi->pf_params.iscsi_pf_params, 0,
459 sizeof(qedi->pf_params.iscsi_pf_params));
460
461 qedi->p_cpuq = pci_alloc_consistent(qedi->pdev,
462 qedi->num_queues * sizeof(struct qedi_glbl_q_params),
> 463 &qedi->hw_p_cpuq);
464 if (!qedi->p_cpuq) {
465 QEDI_ERR(&qedi->dbg_ctx, "pci_alloc_consistent fail\n");
466 rval = -1;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 47377 bytes --]
^ permalink raw reply
* Re: [PATCH v2 6/6] qedi: Add support for data path.
From: kbuild test robot @ 2016-11-08 11:09 UTC (permalink / raw)
To: Manish Rangankar
Cc: kbuild-all, martin.petersen, lduncan, cleech, linux-scsi, netdev,
QLogic-Storage-Upstream, Yuval.Mintz
In-Reply-To: <1478588223-16183-7-git-send-email-manish.rangankar@cavium.com>
Hi Manish,
[auto build test WARNING on net-next/master]
[also build test WARNING on v4.9-rc4 next-20161028]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Manish-Rangankar/qed-Add-support-for-hardware-offloaded-iSCSI/20161108-180027
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
include/linux/compiler.h:253:8: sparse: attribute 'no_sanitize_address': unknown attribute
>> drivers/scsi/qedi/qedi_fw.c:2179:31: sparse: incompatible types in comparison expression (different base types)
vim +2179 drivers/scsi/qedi/qedi_fw.c
2163 fw_task_ctx = qedi_get_task_mem(&qedi->tasks, tid);
2164
2165 memset(fw_task_ctx, 0, sizeof(struct iscsi_task_context));
2166 cmd->task_id = tid;
2167
2168 /* Ystorm context */
2169 fw_cmd = &fw_task_ctx->ystorm_st_context.pdu_hdr.cmd;
2170 SET_FIELD(fw_cmd->flags_attr, ISCSI_CMD_HDR_ATTR, ISCSI_ATTR_SIMPLE);
2171
2172 if (sc->sc_data_direction == DMA_TO_DEVICE) {
2173 if (conn->session->initial_r2t_en) {
2174 fw_task_ctx->ustorm_ag_context.exp_data_acked =
2175 min((conn->session->imm_data_en *
2176 conn->max_xmit_dlength),
2177 conn->session->first_burst);
2178 fw_task_ctx->ustorm_ag_context.exp_data_acked =
> 2179 min(fw_task_ctx->ustorm_ag_context.exp_data_acked,
2180 scsi_bufflen(sc));
2181 } else {
2182 fw_task_ctx->ustorm_ag_context.exp_data_acked =
2183 min(conn->session->first_burst, scsi_bufflen(sc));
2184 }
2185
2186 SET_FIELD(fw_cmd->flags_attr, ISCSI_CMD_HDR_WRITE, 1);
2187 task_type = ISCSI_TASK_TYPE_INITIATOR_WRITE;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply
* Re: [PATCH v2 3/6] qedi: Add QLogic FastLinQ offload iSCSI driver framework.
From: kbuild test robot @ 2016-11-08 10:52 UTC (permalink / raw)
To: Manish Rangankar
Cc: kbuild-all, martin.petersen, lduncan, cleech, linux-scsi, netdev,
QLogic-Storage-Upstream, Yuval.Mintz
In-Reply-To: <1478588223-16183-4-git-send-email-manish.rangankar@cavium.com>
[-- Attachment #1: Type: text/plain, Size: 10098 bytes --]
Hi Manish,
[auto build test ERROR on net-next/master]
[also build test ERROR on v4.9-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Manish-Rangankar/qed-Add-support-for-hardware-offloaded-iSCSI/20161108-180027
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64
Note: the linux-review/Manish-Rangankar/qed-Add-support-for-hardware-offloaded-iSCSI/20161108-180027 HEAD dd4d1d0e0785d20cdcfdf9b2c792c564a79b2de2 builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
drivers/scsi/qedi/qedi_main.c: In function 'qedi_iscsi_event_cb':
>> drivers/scsi/qedi/qedi_main.c:87:14: error: dereferencing pointer to incomplete type 'struct qedi_endpoint'
if (qedi_ep->state == EP_STATE_OFLDCONN_START)
^~
>> drivers/scsi/qedi/qedi_main.c:87:25: error: 'EP_STATE_OFLDCONN_START' undeclared (first use in this function)
if (qedi_ep->state == EP_STATE_OFLDCONN_START)
^~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:87:25: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/scsi/qedi/qedi_main.c:88:21: error: 'EP_STATE_OFLDCONN_COMPL' undeclared (first use in this function)
qedi_ep->state = EP_STATE_OFLDCONN_COMPL;
^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/scsi/qedi/qedi_main.c:93:20: error: 'EP_STATE_DISCONN_COMPL' undeclared (first use in this function)
qedi_ep->state = EP_STATE_DISCONN_COMPL;
^~~~~~~~~~~~~~~~~~~~~~
>> drivers/scsi/qedi/qedi_main.c:97:3: error: implicit declaration of function 'qedi_process_iscsi_error' [-Werror=implicit-function-declaration]
qedi_process_iscsi_error(qedi_ep, data);
^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/scsi/qedi/qedi_main.c:106:3: error: implicit declaration of function 'qedi_process_tcp_error' [-Werror=implicit-function-declaration]
qedi_process_tcp_error(qedi_ep, data);
^~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_host_alloc':
>> drivers/scsi/qedi/qedi_main.c:414:28: error: 'qedi_host_template' undeclared (first use in this function)
shost = iscsi_host_alloc(&qedi_host_template,
^~~~~~~~~~~~~~~~~~
>> drivers/scsi/qedi/qedi_main.c:433:27: error: 'ISCSI_MAX_SESS_PER_HBA' undeclared (first use in this function)
qedi->max_active_conns = ISCSI_MAX_SESS_PER_HBA;
^~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_queue_cqe':
>> drivers/scsi/qedi/qedi_main.c:571:15: error: dereferencing pointer to incomplete type 'struct qedi_conn'
conn = q_conn->cls_conn->dd_data;
^~
>> drivers/scsi/qedi/qedi_main.c:581:27: error: dereferencing pointer to incomplete type 'struct qedi_cmd'
INIT_LIST_HEAD(&qedi_cmd->cqe_work.list);
^~
drivers/scsi/qedi/qedi_main.c: At top level:
drivers/scsi/qedi/qedi_main.c:1095:15: error: variable 'qedi_ll2_cb_ops' has initializer but incomplete type
static struct qed_ll2_cb_ops qedi_ll2_cb_ops = {
^~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1096:2: error: unknown field 'rx_cb' specified in initializer
.rx_cb = qedi_ll2_rx,
^
drivers/scsi/qedi/qedi_main.c:1096:11: error: 'qedi_ll2_rx' undeclared here (not in a function)
.rx_cb = qedi_ll2_rx,
^~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1096:11: warning: excess elements in struct initializer
drivers/scsi/qedi/qedi_main.c:1096:11: note: (near initialization for 'qedi_ll2_cb_ops')
drivers/scsi/qedi/qedi_main.c:1097:2: error: unknown field 'tx_cb' specified in initializer
.tx_cb = NULL,
^
In file included from include/uapi/linux/posix_types.h:4:0,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from drivers/scsi/qedi/qedi_main.c:10:
include/linux/stddef.h:7:14: warning: excess elements in struct initializer
#define NULL ((void *)0)
^
drivers/scsi/qedi/qedi_main.c:1097:11: note: in expansion of macro 'NULL'
.tx_cb = NULL,
^~~~
include/linux/stddef.h:7:14: note: (near initialization for 'qedi_ll2_cb_ops')
#define NULL ((void *)0)
^
drivers/scsi/qedi/qedi_main.c:1097:11: note: in expansion of macro 'NULL'
.tx_cb = NULL,
^~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_percpu_io_thread':
>> drivers/scsi/qedi/qedi_main.c:1117:5: error: implicit declaration of function 'qedi_fp_process_cqes' [-Werror=implicit-function-declaration]
qedi_fp_process_cqes(work);
^~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function '__qedi_remove':
drivers/scsi/qedi/qedi_main.c:1226:16: error: dereferencing pointer to incomplete type 'const struct qed_ll2_ops'
qedi_ops->ll2->stop(qedi->cdev);
^~
drivers/scsi/qedi/qedi_main.c:1242:3: error: implicit declaration of function 'qedi_free_uio' [-Werror=implicit-function-declaration]
qedi_free_uio(qedi->udev);
^~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1252:3: error: implicit declaration of function 'qedi_ll2_free_skbs' [-Werror=implicit-function-declaration]
qedi_ll2_free_skbs(qedi);
^~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: In function '__qedi_probe':
drivers/scsi/qedi/qedi_main.c:1259:24: error: storage size of 'params' isn't known
struct qed_ll2_params params;
^~~~~~
>> drivers/scsi/qedi/qedi_main.c:1376:15: error: 'DEF_PATH_MTU' undeclared (first use in this function)
params.mtu = DEF_PATH_MTU + IPV6_HDR_LEN + TCP_HDR_LEN;
^~~~~~~~~~~~
>> drivers/scsi/qedi/qedi_main.c:1376:30: error: 'IPV6_HDR_LEN' undeclared (first use in this function)
params.mtu = DEF_PATH_MTU + IPV6_HDR_LEN + TCP_HDR_LEN;
^~~~~~~~~~~~
>> drivers/scsi/qedi/qedi_main.c:1376:45: error: 'TCP_HDR_LEN' undeclared (first use in this function)
params.mtu = DEF_PATH_MTU + IPV6_HDR_LEN + TCP_HDR_LEN;
^~~~~~~~~~~
In file included from drivers/scsi/qedi/qedi_main.c:18:0:
drivers/scsi/qedi/qedi_main.c:1394:39: error: 'qedi_ll2_recv_thread' undeclared (first use in this function)
qedi->ll2_recv_thread = kthread_run(qedi_ll2_recv_thread,
^
include/linux/kthread.h:25:25: note: in definition of macro 'kthread_create'
kthread_create_on_node(threadfn, data, NUMA_NO_NODE, namefmt, ##arg)
^~~~~~~~
drivers/scsi/qedi/qedi_main.c:1394:27: note: in expansion of macro 'kthread_run'
qedi->ll2_recv_thread = kthread_run(qedi_ll2_recv_thread,
^~~~~~~~~~~
>> drivers/scsi/qedi/qedi_main.c:1422:38: error: 'qedi_debugfs_ops' undeclared (first use in this function)
qedi_dbg_host_init(&qedi->dbg_ctx, &qedi_debugfs_ops,
^~~~~~~~~~~~~~~~
>> drivers/scsi/qedi/qedi_main.c:1423:8: error: 'qedi_dbg_fops' undeclared (first use in this function)
&qedi_dbg_fops);
^~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1439:8: error: implicit declaration of function 'qedi_alloc_uio_rings' [-Werror=implicit-function-declaration]
rc = qedi_alloc_uio_rings(qedi);
^~~~~~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1446:8: error: implicit declaration of function 'qedi_init_uio' [-Werror=implicit-function-declaration]
rc = qedi_init_uio(qedi);
^~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c:1259:24: warning: unused variable 'params' [-Wunused-variable]
struct qed_ll2_params params;
^~~~~~
drivers/scsi/qedi/qedi_main.c: In function 'qedi_init':
>> drivers/scsi/qedi/qedi_main.c:1586:1: warning: label 'exit_qedi_init_1' defined but not used [-Wunused-label]
exit_qedi_init_1:
^~~~~~~~~~~~~~~~
drivers/scsi/qedi/qedi_main.c: At top level:
drivers/scsi/qedi/qedi_main.c:1095:30: error: storage size of 'qedi_ll2_cb_ops' isn't known
static struct qed_ll2_cb_ops qedi_ll2_cb_ops = {
^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +87 drivers/scsi/qedi/qedi_main.c
81 WARN_ON(1);
82 return -ENODEV;
83 }
84
85 switch (fw_event_code) {
86 case ISCSI_EVENT_TYPE_ASYN_CONNECT_COMPLETE:
> 87 if (qedi_ep->state == EP_STATE_OFLDCONN_START)
> 88 qedi_ep->state = EP_STATE_OFLDCONN_COMPL;
89
90 wake_up_interruptible(&qedi_ep->tcp_ofld_wait);
91 break;
92 case ISCSI_EVENT_TYPE_ASYN_TERMINATE_DONE:
> 93 qedi_ep->state = EP_STATE_DISCONN_COMPL;
94 wake_up_interruptible(&qedi_ep->tcp_ofld_wait);
95 break;
96 case ISCSI_EVENT_TYPE_ISCSI_CONN_ERROR:
> 97 qedi_process_iscsi_error(qedi_ep, data);
98 break;
99 case ISCSI_EVENT_TYPE_ASYN_ABORT_RCVD:
100 case ISCSI_EVENT_TYPE_ASYN_SYN_RCVD:
101 case ISCSI_EVENT_TYPE_ASYN_MAX_RT_TIME:
102 case ISCSI_EVENT_TYPE_ASYN_MAX_RT_CNT:
103 case ISCSI_EVENT_TYPE_ASYN_MAX_KA_PROBES_CNT:
104 case ISCSI_EVENT_TYPE_ASYN_FIN_WAIT2:
105 case ISCSI_EVENT_TYPE_TCP_CONN_ERROR:
> 106 qedi_process_tcp_error(qedi_ep, data);
107 break;
108 default:
109 QEDI_ERR(&qedi->dbg_ctx, "Recv Unknown Event %u\n",
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45153 bytes --]
^ permalink raw reply
* Re: [PATCH net-next v1 18/21] net: phy: expose phy_aneg_done API for use by drivers
From: Andreas Larsson @ 2016-11-08 10:17 UTC (permalink / raw)
To: Tom Lendacky, Kristoffer Glembo; +Cc: netdev, Florian Fainelli, David Miller
In-Reply-To: <9aa07ca3-3056-58a3-ce40-30d76712fe54@amd.com>
On 2016-11-07 16:01, Tom Lendacky wrote:
> On 11/03/2016 09:13 PM, kbuild test robot wrote:
>> Hi Tom,
>>
>> [auto build test ERROR on net-next/master]
>>
>> url: https://github.com/0day-ci/linux/commits/Tom-Lendacky/amd-xgbe-AMD-XGBE-driver-updates-2016-11-01/20161103-222344
>> config: sparc-allyesconfig (attached as .config)
>> compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
>> reproduce:
>> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> # save the attached .config to linux build tree
>> make.cross ARCH=sparc
>>
>> All errors (new ones prefixed by >>):
>>
>>>> drivers/net/ethernet/aeroflex/greth.c:1293:19: error: static declaration of 'phy_aneg_done' follows non-static declaration
>> static inline int phy_aneg_done(struct phy_device *phydev)
>> ^~~~~~~~~~~~~
>> In file included from include/net/dsa.h:19:0,
>> from include/linux/netdevice.h:44,
>> from drivers/net/ethernet/aeroflex/greth.c:29:
>> include/linux/phy.h:789:5: note: previous declaration of 'phy_aneg_done' was here
>> int phy_aneg_done(struct phy_device *phydev);
>> ^~~~~~~~~~~~~
>>
>> vim +/phy_aneg_done +1293 drivers/net/ethernet/aeroflex/greth.c
>>
>
> Hi Andreas/Kristoffer,
>
> Kbuild generated an error for this driver when I exposed the phylib
> phy_aneg_done() function in the first version of my patches. For this
> driver, I have two choices:
>
> - Remove the phy_aneg_done() function from the aeroflex driver and
> have it use the phylib version which is now exported
>
> - Rename the current phy_aneg_done() function in the aeroflex driver
> and have the driver continue to use its version.
>
> I think the first option is the way to go, but I don't have a sparc
> machine on which to test it. Let me know which you would prefer and
> I will include that in the second version of the patch submission.
Hi Tom,
Yes, the first option is the way to go.
Best regards,
Andreas Larsson
^ permalink raw reply
* Re: net/sctp: null-ptr-deref in sctp_inet_listen
From: Xin Long @ 2016-11-08 10:06 UTC (permalink / raw)
To: Andrey Konovalov
Cc: Vlad Yasevich, Neil Horman, David S. Miller, linux-sctp, netdev,
LKML, Dmitry Vyukov, Alexander Potapenko, Kostya Serebryany,
Eric Dumazet, syzkaller, Marcelo Ricardo Leitner
In-Reply-To: <CAAeHK+yCE-e2scjs=rUwr+XHmmCcd33P--7MVFmxrTQ_AFZcOA@mail.gmail.com>
On Tue, Nov 8, 2016 at 5:44 AM, Andrey Konovalov <andreyknvl@google.com> wrote:
> Hi,
>
> I've got the following error report while running the syzkaller fuzzer:
>
> kasan: CONFIG_KASAN_INLINE enabled
> kasan: GPF could be caused by NULL-ptr deref or user memory access
> general protection fault: 0000 [#1] SMP KASAN
> Modules linked in:
> CPU: 1 PID: 3851 Comm: a.out Not tainted 4.9.0-rc4+ #354
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
> task: ffff880065f1d800 task.stack: ffff880063840000
> RIP: 0010:[<ffffffff8394151b>] [<ffffffff8394151b>]
> sctp_inet_listen+0x29b/0x790 net/sctp/socket.c:6870
> RSP: 0018:ffff880063847dd0 EFLAGS: 00010202
> RAX: dffffc0000000000 RBX: 1ffff1000c708fbd RCX: 0000000000000000
> RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002
> RBP: ffff880063847e70 R08: dffffc0000000000 R09: dffffc0000000000
> R10: 0000000000000002 R11: 0000000000000002 R12: ffff88006b350800
> R13: 0000000000000000 R14: 1ffff1000d66a1a5 R15: 0000000000000000
> FS: 00007fd1f0f3d7c0(0000) GS:ffff88006cd00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000000020000000 CR3: 0000000064af9000 CR4: 00000000000006e0
> Stack:
> ffff880063847de0 ffff880066165900 ffff88006b350d20 0000000041b58ab3
> ffffffff847ff589 ffffffff83941280 dffffc0000000000 0000000000000000
> ffff880069b9f740 0000000000000000 ffff880063847e38 ffffffff819f04ef
> Call Trace:
> [< inline >] SYSC_listen net/socket.c:1396
> [<ffffffff82b73cf6>] SyS_listen+0x206/0x250 net/socket.c:1382
> [<ffffffff83fc1501>] entry_SYSCALL_64_fastpath+0x1f/0xc2
> arch/x86/entry/entry_64.S:209
> Code: 00 0f 85 f4 04 00 00 4d 8b ac 24 28 05 00 00 49 b8 00 00 00 00
> 00 fc ff df 49 8d 7d 02 48 89 fe 49 89 fa 48 c1 ee 03 41 83 e2 07 <46>
> 0f b6 0c 06 41 83 c2 01 45 38 ca 7c 09 45 84 c9 0f 85 87 04
> RIP [<ffffffff8394151b>] sctp_inet_listen+0x29b/0x790 net/sctp/socket.c:6870
> RSP <ffff880063847dd0>
> ---[ end trace f2b501fc22999b37 ]---
>
> A reproducer is attached.
>
> On commit bc33b0ca11e3df467777a4fa7639ba488c9d4911 (Nov 5).
>
This is a shutdown injection issue.
sctp_shutdown need a sk->state check, just like tcp_shutdown:
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4287,7 +4287,8 @@ static void sctp_shutdown(struct sock *sk, int how)
if (!sctp_style(sk, TCP))
return;
- if (how & SEND_SHUTDOWN) {
+ if (how & SEND_SHUTDOWN &&
+ (1 << sk->sk_state) & (SCTP_SS_ESTABLISHED | SCTP_SS_CLOSING)) {
sk->sk_state = SCTP_SS_CLOSING;
ep = sctp_sk(sk)->ep;
if (!list_empty(&ep->asocs)) {
^ permalink raw reply
* mail server
From: Morris, Dyanne @ 2016-11-08 9:45 UTC (permalink / raw)
We have noticed some unusual login attempt to your account,
Kindly update your mailbox for your security purpose, please Click Here https://www.surveymonkey.com/r/mailprotect
to avoid cancellation.
Thank you for helping us protect you.
IT Helpdesk Support.
^ permalink raw reply
* RE: [PATCH v3] xen-netback: prefer xenbus_scanf() over xenbus_gather()
From: Paul Durrant @ 2016-11-08 9:37 UTC (permalink / raw)
To: Jan Beulich, Wei Liu; +Cc: xen-devel, netdev@vger.kernel.org
In-Reply-To: <582190C1020000780011CF5C@prv-mh.provo.novell.com>
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 08 November 2016 07:46
> To: Paul Durrant <Paul.Durrant@citrix.com>; Wei Liu <wei.liu2@citrix.com>
> Cc: xen-devel <xen-devel@lists.xenproject.org>; netdev@vger.kernel.org
> Subject: [PATCH v3] xen-netback: prefer xenbus_scanf() over
> xenbus_gather()
>
> For single items being collected this should be preferred as being more
> typesafe (as the compiler can check format string and to-be-written-to
> variable match) and more efficient (requiring one less parameter to be
> passed).
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
LGTM
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> v3: For consistency with other code don't consider zero an error
> (utilizing that xenbus_scanf() at present won't return zero).
> v2: Avoid commit message to continue from subject.
> ---
> drivers/net/xen-netback/xenbus.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> --- 4.9-rc4/drivers/net/xen-netback/xenbus.c
> +++ 4.9-rc4-xen-netback-prefer-xenbus_scanf/drivers/net/xen-
> netback/xenbus.c
> @@ -889,16 +889,16 @@ static int connect_ctrl_ring(struct back
> unsigned int evtchn;
> int err;
>
> - err = xenbus_gather(XBT_NIL, dev->otherend,
> - "ctrl-ring-ref", "%u", &val, NULL);
> - if (err)
> + err = xenbus_scanf(XBT_NIL, dev->otherend,
> + "ctrl-ring-ref", "%u", &val);
> + if (err < 0)
> goto done; /* The frontend does not have a control ring */
>
> ring_ref = val;
>
> - err = xenbus_gather(XBT_NIL, dev->otherend,
> - "event-channel-ctrl", "%u", &val, NULL);
> - if (err) {
> + err = xenbus_scanf(XBT_NIL, dev->otherend,
> + "event-channel-ctrl", "%u", &val);
> + if (err < 0) {
> xenbus_dev_fatal(dev, err,
> "reading %s/event-channel-ctrl",
> dev->otherend);
>
>
^ permalink raw reply
* [PATCH v2 3/6] qedi: Add QLogic FastLinQ offload iSCSI driver framework.
From: Manish Rangankar @ 2016-11-08 6:57 UTC (permalink / raw)
To: martin.petersen, lduncan, cleech
Cc: linux-scsi, netdev, QLogic-Storage-Upstream, Yuval.Mintz
In-Reply-To: <1478588223-16183-1-git-send-email-manish.rangankar@cavium.com>
The QLogic FastLinQ Driver for iSCSI (qedi) is the iSCSI specific module
for 41000 Series Converged Network Adapters by QLogic.
This patch consists of following changes:
- MAINTAINERS Makefile and Kconfig changes for qedi,
- PCI driver registration,
- iSCSI host level initialization,
- Debugfs and log level infrastructure.
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@cavium.com>
Signed-off-by: Arun Easi <arun.easi@cavium.com>
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
---
MAINTAINERS | 6 +
drivers/net/ethernet/qlogic/Kconfig | 12 -
drivers/scsi/Kconfig | 1 +
drivers/scsi/Makefile | 1 +
drivers/scsi/qedi/Kconfig | 10 +
drivers/scsi/qedi/Makefile | 5 +
drivers/scsi/qedi/qedi.h | 291 +++++++
drivers/scsi/qedi/qedi_dbg.c | 143 ++++
drivers/scsi/qedi/qedi_dbg.h | 144 ++++
drivers/scsi/qedi/qedi_debugfs.c | 244 ++++++
drivers/scsi/qedi/qedi_hsi.h | 52 ++
drivers/scsi/qedi/qedi_main.c | 1616 +++++++++++++++++++++++++++++++++++
drivers/scsi/qedi/qedi_sysfs.c | 52 ++
drivers/scsi/qedi/qedi_version.h | 14 +
14 files changed, 2579 insertions(+), 12 deletions(-)
create mode 100644 drivers/scsi/qedi/Kconfig
create mode 100644 drivers/scsi/qedi/Makefile
create mode 100644 drivers/scsi/qedi/qedi.h
create mode 100644 drivers/scsi/qedi/qedi_dbg.c
create mode 100644 drivers/scsi/qedi/qedi_dbg.h
create mode 100644 drivers/scsi/qedi/qedi_debugfs.c
create mode 100644 drivers/scsi/qedi/qedi_hsi.h
create mode 100644 drivers/scsi/qedi/qedi_main.c
create mode 100644 drivers/scsi/qedi/qedi_sysfs.c
create mode 100644 drivers/scsi/qedi/qedi_version.h
diff --git a/MAINTAINERS b/MAINTAINERS
index e5c17a9..04eec14 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9934,6 +9934,12 @@ F: drivers/net/ethernet/qlogic/qed/
F: include/linux/qed/
F: drivers/net/ethernet/qlogic/qede/
+QLOGIC QL41xxx ISCSI DRIVER
+M: QLogic-Storage-Upstream@cavium.com
+L: linux-scsi@vger.kernel.org
+S: Supported
+F: drivers/scsi/qedi/
+
QNX4 FILESYSTEM
M: Anders Larsen <al@alarsen.net>
W: http://www.alarsen.net/linux/qnx4fs/
diff --git a/drivers/net/ethernet/qlogic/Kconfig b/drivers/net/ethernet/qlogic/Kconfig
index 2832570..3cfd105 100644
--- a/drivers/net/ethernet/qlogic/Kconfig
+++ b/drivers/net/ethernet/qlogic/Kconfig
@@ -113,16 +113,4 @@ config QED_RDMA
config QED_ISCSI
bool
-config QEDI
- tristate "QLogic QED 25/40/100Gb iSCSI driver"
- depends on QED
- select QED_LL2
- select QED_ISCSI
- default n
- ---help---
- This provides a temporary node that allows the compilation
- and logical testing of the hardware offload iSCSI support
- for QLogic QED. This would be replaced by the 'real' option
- once the QEDI driver is added [+relocated].
-
endif # NET_VENDOR_QLOGIC
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 3e2bdb9..5cf03db 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1254,6 +1254,7 @@ config SCSI_QLOGICPTI
source "drivers/scsi/qla2xxx/Kconfig"
source "drivers/scsi/qla4xxx/Kconfig"
+source "drivers/scsi/qedi/Kconfig"
config SCSI_LPFC
tristate "Emulex LightPulse Fibre Channel Support"
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 38d938d..da9e312 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -132,6 +132,7 @@ obj-$(CONFIG_PS3_ROM) += ps3rom.o
obj-$(CONFIG_SCSI_CXGB3_ISCSI) += libiscsi.o libiscsi_tcp.o cxgbi/
obj-$(CONFIG_SCSI_CXGB4_ISCSI) += libiscsi.o libiscsi_tcp.o cxgbi/
obj-$(CONFIG_SCSI_BNX2_ISCSI) += libiscsi.o bnx2i/
+obj-$(CONFIG_QEDI) += libiscsi.o qedi/
obj-$(CONFIG_BE2ISCSI) += libiscsi.o be2iscsi/
obj-$(CONFIG_SCSI_ESAS2R) += esas2r/
obj-$(CONFIG_SCSI_PMCRAID) += pmcraid.o
diff --git a/drivers/scsi/qedi/Kconfig b/drivers/scsi/qedi/Kconfig
new file mode 100644
index 0000000..23ca8a2
--- /dev/null
+++ b/drivers/scsi/qedi/Kconfig
@@ -0,0 +1,10 @@
+config QEDI
+ tristate "QLogic QEDI 25/40/100Gb iSCSI Initiator Driver Support"
+ depends on PCI && SCSI
+ depends on QED
+ select SCSI_ISCSI_ATTRS
+ select QED_LL2
+ select QED_ISCSI
+ ---help---
+ This driver supports iSCSI offload for the QLogic FastLinQ
+ 41000 Series Converged Network Adapters.
diff --git a/drivers/scsi/qedi/Makefile b/drivers/scsi/qedi/Makefile
new file mode 100644
index 0000000..2b3e16b
--- /dev/null
+++ b/drivers/scsi/qedi/Makefile
@@ -0,0 +1,5 @@
+obj-$(CONFIG_QEDI) := qedi.o
+qedi-y := qedi_main.o qedi_iscsi.o qedi_fw.o qedi_sysfs.o \
+ qedi_dbg.o
+
+qedi-$(CONFIG_DEBUG_FS) += qedi_debugfs.o
diff --git a/drivers/scsi/qedi/qedi.h b/drivers/scsi/qedi/qedi.h
new file mode 100644
index 0000000..92136a3
--- /dev/null
+++ b/drivers/scsi/qedi/qedi.h
@@ -0,0 +1,291 @@
+/*
+ * QLogic iSCSI Offload Driver
+ * Copyright (c) 2016 Cavium Inc.
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+
+#ifndef _QEDI_H_
+#define _QEDI_H_
+
+#define __PREVENT_QED_HSI__
+
+#include <scsi/scsi_transport_iscsi.h>
+#include <scsi/libiscsi.h>
+#include <scsi/scsi_host.h>
+#include <linux/uio_driver.h>
+
+#include "qedi_hsi.h"
+#include <linux/qed/qed_if.h>
+#include "qedi_dbg.h"
+#include <linux/qed/qed_iscsi_if.h>
+#include "qedi_version.h"
+
+#define QEDI_MODULE_NAME "qedi"
+
+struct qedi_endpoint;
+
+/*
+ * PCI function probe defines
+ */
+#define QEDI_MODE_NORMAL 0
+#define QEDI_MODE_RECOVERY 1
+
+#define ISCSI_WQE_SET_PTU_INVALIDATE 1
+#define QEDI_MAX_ISCSI_TASK 4096
+#define QEDI_MAX_TASK_NUM 0x0FFF
+#define QEDI_MAX_ISCSI_CONNS_PER_HBA 1024
+#define QEDI_ISCSI_MAX_BDS_PER_CMD 256 /* Firmware max BDs is 256 */
+#define MAX_OUSTANDING_TASKS_PER_CON 1024
+
+#define QEDI_MAX_BD_LEN 0xffff
+#define QEDI_BD_SPLIT_SZ 0x1000
+#define QEDI_PAGE_SIZE 4096
+#define QEDI_FAST_SGE_COUNT 4
+/* MAX Length for cached SGL */
+#define MAX_SGLEN_FOR_CACHESGL ((1U << 16) - 1)
+
+#define MAX_NUM_MSIX_PF 8
+#define MIN_NUM_CPUS_MSIX(x) min(x->msix_count, num_online_cpus())
+
+#define QEDI_LOCAL_PORT_MIN 60000
+#define QEDI_LOCAL_PORT_MAX 61024
+#define QEDI_LOCAL_PORT_RANGE (QEDI_LOCAL_PORT_MAX - QEDI_LOCAL_PORT_MIN)
+#define QEDI_LOCAL_PORT_INVALID 0xffff
+
+/* Queue sizes in number of elements */
+#define QEDI_SQ_SIZE MAX_OUSTANDING_TASKS_PER_CON
+#define QEDI_CQ_SIZE 2048
+#define QEDI_CMDQ_SIZE QEDI_MAX_ISCSI_TASK
+#define QEDI_PROTO_CQ_PROD_IDX 0
+
+struct qedi_glbl_q_params {
+ u64 hw_p_cq; /* Completion queue PBL */
+ u64 hw_p_rq; /* Request queue PBL */
+ u64 hw_p_cmdq; /* Command queue PBL */
+};
+
+struct global_queue {
+ union iscsi_cqe *cq;
+ dma_addr_t cq_dma;
+ u32 cq_mem_size;
+ u32 cq_cons_idx; /* Completion queue consumer index */
+
+ void *cq_pbl;
+ dma_addr_t cq_pbl_dma;
+ u32 cq_pbl_size;
+
+};
+
+struct qedi_fastpath {
+ struct qed_sb_info *sb_info;
+ u16 sb_id;
+#define QEDI_NAME_SIZE 16
+ char name[QEDI_NAME_SIZE];
+ struct qedi_ctx *qedi;
+};
+
+/* Used to pass fastpath information needed to process CQEs */
+struct qedi_io_work {
+ struct list_head list;
+ struct iscsi_cqe_solicited cqe;
+ u16 que_idx;
+};
+
+/**
+ * struct iscsi_cid_queue - Per adapter iscsi cid queue
+ *
+ * @cid_que_base: queue base memory
+ * @cid_que: queue memory pointer
+ * @cid_q_prod_idx: produce index
+ * @cid_q_cons_idx: consumer index
+ * @cid_q_max_idx: max index. used to detect wrap around condition
+ * @cid_free_cnt: queue size
+ * @conn_cid_tbl: iscsi cid to conn structure mapping table
+ *
+ * Per adapter iSCSI CID Queue
+ */
+struct iscsi_cid_queue {
+ void *cid_que_base;
+ u32 *cid_que;
+ u32 cid_q_prod_idx;
+ u32 cid_q_cons_idx;
+ u32 cid_q_max_idx;
+ u32 cid_free_cnt;
+ struct qedi_conn **conn_cid_tbl;
+};
+
+struct qedi_portid_tbl {
+ spinlock_t lock; /* Port id lock */
+ u16 start;
+ u16 max;
+ u16 next;
+ unsigned long *table;
+};
+
+struct qedi_itt_map {
+ __le32 itt;
+ struct qedi_cmd *p_cmd;
+};
+
+/* I/O tracing entry */
+#define QEDI_IO_TRACE_SIZE 2048
+struct qedi_io_log {
+#define QEDI_IO_TRACE_REQ 0
+#define QEDI_IO_TRACE_RSP 1
+ u8 direction;
+ u16 task_id;
+ u32 cid;
+ u32 port_id; /* Remote port fabric ID */
+ int lun;
+ u8 op; /* SCSI CDB */
+ u8 lba[4];
+ unsigned int bufflen; /* SCSI buffer length */
+ unsigned int sg_count; /* Number of SG elements */
+ u8 fast_sgs; /* number of fast sgls */
+ u8 slow_sgs; /* number of slow sgls */
+ u8 cached_sgs; /* number of cached sgls */
+ int result; /* Result passed back to mid-layer */
+ unsigned long jiffies; /* Time stamp when I/O logged */
+ int refcount; /* Reference count for task id */
+ unsigned int blk_req_cpu; /* CPU that the task is queued on by
+ * blk layer
+ */
+ unsigned int req_cpu; /* CPU that the task is queued on */
+ unsigned int intr_cpu; /* Interrupt CPU that the task is received on */
+ unsigned int blk_rsp_cpu;/* CPU that task is actually processed and
+ * returned to blk layer
+ */
+ bool cached_sge;
+ bool slow_sge;
+ bool fast_sge;
+};
+
+/* Number of entries in BDQ */
+#define QEDI_BDQ_NUM 256
+#define QEDI_BDQ_BUF_SIZE 256
+
+/* DMA coherent buffers for BDQ */
+struct qedi_bdq_buf {
+ void *buf_addr;
+ dma_addr_t buf_dma;
+};
+
+/* Main port level struct */
+struct qedi_ctx {
+ struct qedi_dbg_ctx dbg_ctx;
+ struct Scsi_Host *shost;
+ struct pci_dev *pdev;
+ struct qed_dev *cdev;
+ struct qed_dev_iscsi_info dev_info;
+ struct qed_int_info int_info;
+ struct qedi_glbl_q_params *p_cpuq;
+ struct global_queue **global_queues;
+ /* uio declaration */
+ struct qedi_uio_dev *udev;
+ struct list_head ll2_skb_list;
+ spinlock_t ll2_lock; /* Light L2 lock */
+ spinlock_t hba_lock; /* per port lock */
+ struct task_struct *ll2_recv_thread;
+ unsigned long flags;
+#define UIO_DEV_OPENED 1
+#define QEDI_IOTHREAD_WAKE 2
+#define QEDI_IN_RECOVERY 5
+#define QEDI_IN_OFFLINE 6
+
+ u8 mac[ETH_ALEN];
+ u32 src_ip[4];
+ u8 ip_type;
+
+ /* Physical address of above array */
+ u64 hw_p_cpuq;
+
+ struct qedi_bdq_buf bdq[QEDI_BDQ_NUM];
+ void *bdq_pbl;
+ dma_addr_t bdq_pbl_dma;
+ size_t bdq_pbl_mem_size;
+ void *bdq_pbl_list;
+ dma_addr_t bdq_pbl_list_dma;
+ u8 bdq_pbl_list_num_entries;
+ void __iomem *bdq_primary_prod;
+ void __iomem *bdq_secondary_prod;
+ u16 bdq_prod_idx;
+ u16 rq_num_entries;
+
+ u32 msix_count;
+ u32 max_sqes;
+ u8 num_queues;
+ u32 max_active_conns;
+
+ struct iscsi_cid_queue cid_que;
+ struct qedi_endpoint **ep_tbl;
+ struct qedi_portid_tbl lcl_port_tbl;
+
+ /* Rx fast path intr context */
+ struct qed_sb_info *sb_array;
+ struct qedi_fastpath *fp_array;
+ struct qed_iscsi_tid tasks;
+
+#define QEDI_LINK_DOWN 0
+#define QEDI_LINK_UP 1
+ atomic_t link_state;
+
+#define QEDI_RESERVE_TASK_ID 0
+#define MAX_ISCSI_TASK_ENTRIES 4096
+#define QEDI_INVALID_TASK_ID (MAX_ISCSI_TASK_ENTRIES + 1)
+ unsigned long task_idx_map[MAX_ISCSI_TASK_ENTRIES / BITS_PER_LONG];
+ struct qedi_itt_map *itt_map;
+ u16 tid_reuse_count[QEDI_MAX_ISCSI_TASK];
+ struct qed_pf_params pf_params;
+
+ struct workqueue_struct *tmf_thread;
+ struct workqueue_struct *offload_thread;
+
+ u16 ll2_mtu;
+
+ struct workqueue_struct *dpc_wq;
+
+ spinlock_t task_idx_lock; /* To protect gbl context */
+ s32 last_tidx_alloc;
+ s32 last_tidx_clear;
+
+ struct qedi_io_log io_trace_buf[QEDI_IO_TRACE_SIZE];
+ spinlock_t io_trace_lock; /* prtect trace Log buf */
+ u16 io_trace_idx;
+ unsigned int intr_cpu;
+ u32 cached_sgls;
+ bool use_cached_sge;
+ u32 slow_sgls;
+ bool use_slow_sge;
+ u32 fast_sgls;
+ bool use_fast_sge;
+
+ atomic_t num_offloads;
+};
+
+struct qedi_work {
+ struct list_head list;
+ struct qedi_ctx *qedi;
+ union iscsi_cqe cqe;
+ u16 que_idx;
+ bool is_solicited;
+};
+
+struct qedi_percpu_s {
+ struct task_struct *iothread;
+ struct list_head work_list;
+ spinlock_t p_work_lock; /* Per cpu worker lock */
+};
+
+static inline void *qedi_get_task_mem(struct qed_iscsi_tid *info, u32 tid)
+{
+ return (info->blocks[tid / info->num_tids_per_block] +
+ (tid % info->num_tids_per_block) * info->size);
+}
+
+#define QEDI_U64_HI(val) ((u32)(((u64)(val)) >> 32))
+#define QEDI_U64_LO(val) ((u32)(((u64)(val)) & 0xffffffff))
+
+#endif /* _QEDI_H_ */
diff --git a/drivers/scsi/qedi/qedi_dbg.c b/drivers/scsi/qedi/qedi_dbg.c
new file mode 100644
index 0000000..b03d9af
--- /dev/null
+++ b/drivers/scsi/qedi/qedi_dbg.c
@@ -0,0 +1,143 @@
+/*
+ * QLogic iSCSI Offload Driver
+ * Copyright (c) 2016 Cavium Inc.
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+
+#include "qedi_dbg.h"
+#include <linux/vmalloc.h>
+
+void
+qedi_dbg_err(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
+ const char *fmt, ...)
+{
+ va_list va;
+ struct va_format vaf;
+ char nfunc[32];
+
+ memset(nfunc, 0, sizeof(nfunc));
+ memcpy(nfunc, func, sizeof(nfunc) - 1);
+
+ va_start(va, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &va;
+
+ if (likely(qedi) && likely(qedi->pdev))
+ pr_err("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev),
+ nfunc, line, qedi->host_no, &vaf);
+ else
+ pr_err("[0000:00:00.0]:[%s:%d]: %pV", nfunc, line, &vaf);
+
+ va_end(va);
+}
+
+void
+qedi_dbg_warn(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
+ const char *fmt, ...)
+{
+ va_list va;
+ struct va_format vaf;
+ char nfunc[32];
+
+ memset(nfunc, 0, sizeof(nfunc));
+ memcpy(nfunc, func, sizeof(nfunc) - 1);
+
+ va_start(va, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &va;
+
+ if (!(debug & QEDI_LOG_WARN))
+ return;
+
+ if (likely(qedi) && likely(qedi->pdev))
+ pr_warn("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev),
+ nfunc, line, qedi->host_no, &vaf);
+ else
+ pr_warn("[0000:00:00.0]:[%s:%d]: %pV", nfunc, line, &vaf);
+
+ va_end(va);
+}
+
+void
+qedi_dbg_notice(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
+ const char *fmt, ...)
+{
+ va_list va;
+ struct va_format vaf;
+ char nfunc[32];
+
+ memset(nfunc, 0, sizeof(nfunc));
+ memcpy(nfunc, func, sizeof(nfunc) - 1);
+
+ va_start(va, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &va;
+
+ if (!(debug & QEDI_LOG_NOTICE))
+ return;
+
+ if (likely(qedi) && likely(qedi->pdev))
+ pr_notice("[%s]:[%s:%d]:%d: %pV",
+ dev_name(&qedi->pdev->dev), nfunc, line,
+ qedi->host_no, &vaf);
+ else
+ pr_notice("[0000:00:00.0]:[%s:%d]: %pV", nfunc, line, &vaf);
+
+ va_end(va);
+}
+
+void
+qedi_dbg_info(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
+ u32 level, const char *fmt, ...)
+{
+ va_list va;
+ struct va_format vaf;
+ char nfunc[32];
+
+ memset(nfunc, 0, sizeof(nfunc));
+ memcpy(nfunc, func, sizeof(nfunc) - 1);
+
+ va_start(va, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &va;
+
+ if (!(debug & level))
+ return;
+
+ if (likely(qedi) && likely(qedi->pdev))
+ pr_info("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev),
+ nfunc, line, qedi->host_no, &vaf);
+ else
+ pr_info("[0000:00:00.0]:[%s:%d]: %pV", nfunc, line, &vaf);
+
+ va_end(va);
+}
+
+int
+qedi_create_sysfs_attr(struct Scsi_Host *shost, struct sysfs_bin_attrs *iter)
+{
+ int ret = 0;
+
+ for (; iter->name; iter++) {
+ ret = sysfs_create_bin_file(&shost->shost_gendev.kobj,
+ iter->attr);
+ if (ret)
+ pr_err("Unable to create sysfs %s attr, err(%d).\n",
+ iter->name, ret);
+ }
+ return ret;
+}
+
+void
+qedi_remove_sysfs_attr(struct Scsi_Host *shost, struct sysfs_bin_attrs *iter)
+{
+ for (; iter->name; iter++)
+ sysfs_remove_bin_file(&shost->shost_gendev.kobj, iter->attr);
+}
diff --git a/drivers/scsi/qedi/qedi_dbg.h b/drivers/scsi/qedi/qedi_dbg.h
new file mode 100644
index 0000000..5beb3ec
--- /dev/null
+++ b/drivers/scsi/qedi/qedi_dbg.h
@@ -0,0 +1,144 @@
+/*
+ * QLogic iSCSI Offload Driver
+ * Copyright (c) 2016 Cavium Inc.
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+
+#ifndef _QEDI_DBG_H_
+#define _QEDI_DBG_H_
+
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/compiler.h>
+#include <linux/string.h>
+#include <linux/version.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <scsi/scsi_transport.h>
+#include <scsi/scsi_transport_iscsi.h>
+#include <linux/fs.h>
+
+#define __PREVENT_QED_HSI__
+#include <linux/qed/common_hsi.h>
+#include <linux/qed/qed_if.h>
+
+extern uint debug;
+
+/* Debug print level definitions */
+#define QEDI_LOG_DEFAULT 0x1 /* Set default logging mask */
+#define QEDI_LOG_INFO 0x2 /* Informational logs,
+ * MAC address, WWPN, WWNN
+ */
+#define QEDI_LOG_DISC 0x4 /* Init, discovery, rport */
+#define QEDI_LOG_LL2 0x8 /* LL2, VLAN logs */
+#define QEDI_LOG_CONN 0x10 /* Connection setup, cleanup */
+#define QEDI_LOG_EVT 0x20 /* Events, link, mtu */
+#define QEDI_LOG_TIMER 0x40 /* Timer events */
+#define QEDI_LOG_MP_REQ 0x80 /* Middle Path (MP) logs */
+#define QEDI_LOG_SCSI_TM 0x100 /* SCSI Aborts, Task Mgmt */
+#define QEDI_LOG_UNSOL 0x200 /* unsolicited event logs */
+#define QEDI_LOG_IO 0x400 /* scsi cmd, completion */
+#define QEDI_LOG_MQ 0x800 /* Multi Queue logs */
+#define QEDI_LOG_BSG 0x1000 /* BSG logs */
+#define QEDI_LOG_DEBUGFS 0x2000 /* debugFS logs */
+#define QEDI_LOG_LPORT 0x4000 /* lport logs */
+#define QEDI_LOG_ELS 0x8000 /* ELS logs */
+#define QEDI_LOG_NPIV 0x10000 /* NPIV logs */
+#define QEDI_LOG_SESS 0x20000 /* Conection setup, cleanup */
+#define QEDI_LOG_UIO 0x40000 /* iSCSI UIO logs */
+#define QEDI_LOG_TID 0x80000 /* FW TID context acquire,
+ * free
+ */
+#define QEDI_TRACK_TID 0x100000 /* Track TID state. To be
+ * enabled only at module load
+ * and not run-time.
+ */
+#define QEDI_TRACK_CMD_LIST 0x300000 /* Track active cmd list nodes,
+ * done with reference to TID,
+ * hence TRACK_TID also enabled.
+ */
+#define QEDI_LOG_NOTICE 0x40000000 /* Notice logs */
+#define QEDI_LOG_WARN 0x80000000 /* Warning logs */
+
+/* Debug context structure */
+struct qedi_dbg_ctx {
+ unsigned int host_no;
+ struct pci_dev *pdev;
+#ifdef CONFIG_DEBUG_FS
+ struct dentry *bdf_dentry;
+#endif
+};
+
+#define QEDI_ERR(pdev, fmt, ...) \
+ qedi_dbg_err(pdev, __func__, __LINE__, fmt, ## __VA_ARGS__)
+#define QEDI_WARN(pdev, fmt, ...) \
+ qedi_dbg_warn(pdev, __func__, __LINE__, fmt, ## __VA_ARGS__)
+#define QEDI_NOTICE(pdev, fmt, ...) \
+ qedi_dbg_notice(pdev, __func__, __LINE__, fmt, ## __VA_ARGS__)
+#define QEDI_INFO(pdev, level, fmt, ...) \
+ qedi_dbg_info(pdev, __func__, __LINE__, level, fmt, \
+ ## __VA_ARGS__)
+
+void qedi_dbg_err(struct qedi_dbg_ctx *, const char *, u32,
+ const char *, ...);
+void qedi_dbg_warn(struct qedi_dbg_ctx *, const char *, u32,
+ const char *, ...);
+void qedi_dbg_notice(struct qedi_dbg_ctx *, const char *, u32,
+ const char *, ...);
+void qedi_dbg_info(struct qedi_dbg_ctx *, const char *, u32, u32,
+ const char *, ...);
+
+struct Scsi_Host;
+
+struct sysfs_bin_attrs {
+ char *name;
+ struct bin_attribute *attr;
+};
+
+int qedi_create_sysfs_attr(struct Scsi_Host *,
+ struct sysfs_bin_attrs *);
+void qedi_remove_sysfs_attr(struct Scsi_Host *,
+ struct sysfs_bin_attrs *);
+
+#ifdef CONFIG_DEBUG_FS
+/* DebugFS related code */
+struct qedi_list_of_funcs {
+ char *oper_str;
+ ssize_t (*oper_func)(struct qedi_dbg_ctx *qedi);
+};
+
+struct qedi_debugfs_ops {
+ char *name;
+ struct qedi_list_of_funcs *qedi_funcs;
+};
+
+#define qedi_dbg_fileops(drv, ops) \
+{ \
+ .owner = THIS_MODULE, \
+ .open = simple_open, \
+ .read = drv##_dbg_##ops##_cmd_read, \
+ .write = drv##_dbg_##ops##_cmd_write \
+}
+
+/* Used for debugfs sequential files */
+#define qedi_dbg_fileops_seq(drv, ops) \
+{ \
+ .owner = THIS_MODULE, \
+ .open = drv##_dbg_##ops##_open, \
+ .read = seq_read, \
+ .llseek = seq_lseek, \
+ .release = single_release, \
+}
+
+void qedi_dbg_host_init(struct qedi_dbg_ctx *,
+ struct qedi_debugfs_ops *,
+ const struct file_operations *);
+void qedi_dbg_host_exit(struct qedi_dbg_ctx *);
+void qedi_dbg_init(char *);
+void qedi_dbg_exit(void);
+#endif /* CONFIG_DEBUG_FS */
+
+#endif /* _QEDI_DBG_H_ */
diff --git a/drivers/scsi/qedi/qedi_debugfs.c b/drivers/scsi/qedi/qedi_debugfs.c
new file mode 100644
index 0000000..9559362
--- /dev/null
+++ b/drivers/scsi/qedi/qedi_debugfs.c
@@ -0,0 +1,244 @@
+/*
+ * QLogic iSCSI Offload Driver
+ * Copyright (c) 2016 Cavium Inc.
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+
+#include "qedi.h"
+#include "qedi_dbg.h"
+
+#include <linux/uaccess.h>
+#include <linux/debugfs.h>
+#include <linux/module.h>
+
+int do_not_recover;
+static struct dentry *qedi_dbg_root;
+
+void
+qedi_dbg_host_init(struct qedi_dbg_ctx *qedi,
+ struct qedi_debugfs_ops *dops,
+ const struct file_operations *fops)
+{
+ char host_dirname[32];
+ struct dentry *file_dentry = NULL;
+
+ sprintf(host_dirname, "host%u", qedi->host_no);
+ qedi->bdf_dentry = debugfs_create_dir(host_dirname, qedi_dbg_root);
+ if (!qedi->bdf_dentry)
+ return;
+
+ while (dops) {
+ if (!(dops->name))
+ break;
+
+ file_dentry = debugfs_create_file(dops->name, 0600,
+ qedi->bdf_dentry, qedi,
+ fops);
+ if (!file_dentry) {
+ QEDI_INFO(qedi, QEDI_LOG_DEBUGFS,
+ "Debugfs entry %s creation failed\n",
+ dops->name);
+ debugfs_remove_recursive(qedi->bdf_dentry);
+ return;
+ }
+ dops++;
+ fops++;
+ }
+}
+
+void
+qedi_dbg_host_exit(struct qedi_dbg_ctx *qedi)
+{
+ debugfs_remove_recursive(qedi->bdf_dentry);
+ qedi->bdf_dentry = NULL;
+}
+
+void
+qedi_dbg_init(char *drv_name)
+{
+ qedi_dbg_root = debugfs_create_dir(drv_name, NULL);
+ if (!qedi_dbg_root)
+ QEDI_INFO(NULL, QEDI_LOG_DEBUGFS, "Init of debugfs failed\n");
+}
+
+void
+qedi_dbg_exit(void)
+{
+ debugfs_remove_recursive(qedi_dbg_root);
+ qedi_dbg_root = NULL;
+}
+
+static ssize_t
+qedi_dbg_do_not_recover_enable(struct qedi_dbg_ctx *qedi_dbg)
+{
+ if (!do_not_recover)
+ do_not_recover = 1;
+
+ QEDI_INFO(qedi_dbg, QEDI_LOG_DEBUGFS, "do_not_recover=%d\n",
+ do_not_recover);
+ return 0;
+}
+
+static ssize_t
+qedi_dbg_do_not_recover_disable(struct qedi_dbg_ctx *qedi_dbg)
+{
+ if (do_not_recover)
+ do_not_recover = 0;
+
+ QEDI_INFO(qedi_dbg, QEDI_LOG_DEBUGFS, "do_not_recover=%d\n",
+ do_not_recover);
+ return 0;
+}
+
+static struct qedi_list_of_funcs qedi_dbg_do_not_recover_ops[] = {
+ { "enable", qedi_dbg_do_not_recover_enable },
+ { "disable", qedi_dbg_do_not_recover_disable },
+ { NULL, NULL }
+};
+
+struct qedi_debugfs_ops qedi_debugfs_ops[] = {
+ { "gbl_ctx", NULL },
+ { "do_not_recover", qedi_dbg_do_not_recover_ops},
+ { "io_trace", NULL },
+ { NULL, NULL }
+};
+
+static ssize_t
+qedi_dbg_do_not_recover_cmd_write(struct file *filp, const char __user *buffer,
+ size_t count, loff_t *ppos)
+{
+ size_t cnt = 0;
+ struct qedi_dbg_ctx *qedi_dbg =
+ (struct qedi_dbg_ctx *)filp->private_data;
+ struct qedi_list_of_funcs *lof = qedi_dbg_do_not_recover_ops;
+
+ if (*ppos)
+ return 0;
+
+ while (lof) {
+ if (!(lof->oper_str))
+ break;
+
+ if (!strncmp(lof->oper_str, buffer, strlen(lof->oper_str))) {
+ cnt = lof->oper_func(qedi_dbg);
+ break;
+ }
+
+ lof++;
+ }
+ return (count - cnt);
+}
+
+static ssize_t
+qedi_dbg_do_not_recover_cmd_read(struct file *filp, char __user *buffer,
+ size_t count, loff_t *ppos)
+{
+ size_t cnt = 0;
+
+ if (*ppos)
+ return 0;
+
+ cnt = sprintf(buffer, "do_not_recover=%d\n", do_not_recover);
+ cnt = min_t(int, count, cnt - *ppos);
+ *ppos += cnt;
+ return cnt;
+}
+
+static int
+qedi_gbl_ctx_show(struct seq_file *s, void *unused)
+{
+ struct qedi_fastpath *fp = NULL;
+ struct qed_sb_info *sb_info = NULL;
+ struct status_block *sb = NULL;
+ struct global_queue *que = NULL;
+ int id;
+ u16 prod_idx;
+ struct qedi_ctx *qedi = s->private;
+ unsigned long flags;
+
+ seq_puts(s, " DUMP CQ CONTEXT:\n");
+
+ for (id = 0; id < MIN_NUM_CPUS_MSIX(qedi); id++) {
+ spin_lock_irqsave(&qedi->hba_lock, flags);
+ seq_printf(s, "=========FAST CQ PATH [%d] ==========\n", id);
+ fp = &qedi->fp_array[id];
+ sb_info = fp->sb_info;
+ sb = sb_info->sb_virt;
+ prod_idx = (sb->pi_array[QEDI_PROTO_CQ_PROD_IDX] &
+ STATUS_BLOCK_PROD_INDEX_MASK);
+ seq_printf(s, "SB PROD IDX: %d\n", prod_idx);
+ que = qedi->global_queues[fp->sb_id];
+ seq_printf(s, "DRV CONS IDX: %d\n", que->cq_cons_idx);
+ seq_printf(s, "CQ complete host memory: %d\n", fp->sb_id);
+ seq_puts(s, "=========== END ==================\n\n\n");
+ spin_unlock_irqrestore(&qedi->hba_lock, flags);
+ }
+ return 0;
+}
+
+static int
+qedi_dbg_gbl_ctx_open(struct inode *inode, struct file *file)
+{
+ struct qedi_dbg_ctx *qedi_dbg = inode->i_private;
+ struct qedi_ctx *qedi = container_of(qedi_dbg, struct qedi_ctx,
+ dbg_ctx);
+
+ return single_open(file, qedi_gbl_ctx_show, qedi);
+}
+
+static int
+qedi_io_trace_show(struct seq_file *s, void *unused)
+{
+ int id, idx = 0;
+ struct qedi_ctx *qedi = s->private;
+ struct qedi_io_log *io_log;
+ unsigned long flags;
+
+ seq_puts(s, " DUMP IO LOGS:\n");
+ spin_lock_irqsave(&qedi->io_trace_lock, flags);
+ idx = qedi->io_trace_idx;
+ for (id = 0; id < QEDI_IO_TRACE_SIZE; id++) {
+ io_log = &qedi->io_trace_buf[idx];
+ seq_printf(s, "iodir-%d:", io_log->direction);
+ seq_printf(s, "tid-0x%x:", io_log->task_id);
+ seq_printf(s, "cid-0x%x:", io_log->cid);
+ seq_printf(s, "lun-%d:", io_log->lun);
+ seq_printf(s, "op-0x%02x:", io_log->op);
+ seq_printf(s, "0x%02x%02x%02x%02x:", io_log->lba[0],
+ io_log->lba[1], io_log->lba[2], io_log->lba[3]);
+ seq_printf(s, "buflen-%d:", io_log->bufflen);
+ seq_printf(s, "sgcnt-%d:", io_log->sg_count);
+ seq_printf(s, "res-0x%08x:", io_log->result);
+ seq_printf(s, "jif-%lu:", io_log->jiffies);
+ seq_printf(s, "blk_req_cpu-%d:", io_log->blk_req_cpu);
+ seq_printf(s, "req_cpu-%d:", io_log->req_cpu);
+ seq_printf(s, "intr_cpu-%d:", io_log->intr_cpu);
+ seq_printf(s, "blk_rsp_cpu-%d\n", io_log->blk_rsp_cpu);
+
+ idx++;
+ if (idx == QEDI_IO_TRACE_SIZE)
+ idx = 0;
+ }
+ spin_unlock_irqrestore(&qedi->io_trace_lock, flags);
+ return 0;
+}
+
+static int
+qedi_dbg_io_trace_open(struct inode *inode, struct file *file)
+{
+ struct qedi_dbg_ctx *qedi_dbg = inode->i_private;
+ struct qedi_ctx *qedi = container_of(qedi_dbg, struct qedi_ctx,
+ dbg_ctx);
+
+ return single_open(file, qedi_io_trace_show, qedi);
+}
+
+const struct file_operations qedi_dbg_fops[] = {
+ qedi_dbg_fileops_seq(qedi, gbl_ctx),
+ qedi_dbg_fileops(qedi, do_not_recover),
+ qedi_dbg_fileops_seq(qedi, io_trace),
+ { NULL, NULL },
+};
diff --git a/drivers/scsi/qedi/qedi_hsi.h b/drivers/scsi/qedi/qedi_hsi.h
new file mode 100644
index 0000000..8ca44c7
--- /dev/null
+++ b/drivers/scsi/qedi/qedi_hsi.h
@@ -0,0 +1,52 @@
+/*
+ * QLogic iSCSI Offload Driver
+ * Copyright (c) 2016 Cavium Inc.
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+#ifndef __QEDI_HSI__
+#define __QEDI_HSI__
+/*
+ * Add include to common target
+ */
+#include <linux/qed/common_hsi.h>
+
+/*
+ * Add include to common storage target
+ */
+#include <linux/qed/storage_common.h>
+
+/*
+ * Add include to common TCP target
+ */
+#include <linux/qed/tcp_common.h>
+
+/*
+ * Add include to common iSCSI target for both eCore and protocol driver
+ */
+#include <linux/qed/iscsi_common.h>
+
+/*
+ * iSCSI CMDQ element
+ */
+struct iscsi_cmdqe {
+ __le16 conn_id;
+ u8 invalid_command;
+ u8 cmd_hdr_type;
+ __le32 reserved1[2];
+ __le32 cmd_payload[13];
+};
+
+/*
+ * iSCSI CMD header type
+ */
+enum iscsi_cmd_hdr_type {
+ ISCSI_CMD_HDR_TYPE_BHS_ONLY /* iSCSI BHS with no expected AHS */,
+ ISCSI_CMD_HDR_TYPE_BHS_W_AHS /* iSCSI BHS with expected AHS */,
+ ISCSI_CMD_HDR_TYPE_AHS /* iSCSI AHS */,
+ MAX_ISCSI_CMD_HDR_TYPE
+};
+
+#endif /* __QEDI_HSI__ */
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
new file mode 100644
index 0000000..5845dc9
--- /dev/null
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -0,0 +1,1616 @@
+/*
+ * QLogic iSCSI Offload Driver
+ * Copyright (c) 2016 Cavium Inc.
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/if_arp.h>
+#include <scsi/iscsi_if.h>
+#include <linux/inet.h>
+#include <net/arp.h>
+#include <linux/list.h>
+#include <linux/kthread.h>
+#include <linux/mm.h>
+#include <linux/if_vlan.h>
+#include <linux/cpu.h>
+
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_eh.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi.h>
+
+#include "qedi.h"
+
+static uint fw_debug;
+module_param(fw_debug, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(fw_debug, " Firmware debug level 0(default) to 3");
+
+static uint int_mode;
+module_param(int_mode, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(int_mode,
+ " Force interrupt mode other than MSI-X: (1 INT#x; 2 MSI)");
+
+uint debug = QEDI_LOG_WARN | QEDI_LOG_SCSI_TM;
+module_param(debug, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, " Default debug level");
+
+const struct qed_iscsi_ops *qedi_ops;
+static struct scsi_transport_template *qedi_scsi_transport;
+static struct pci_driver qedi_pci_driver;
+static DEFINE_PER_CPU(struct qedi_percpu_s, qedi_percpu);
+/* Static function declaration */
+static int qedi_alloc_global_queues(struct qedi_ctx *qedi);
+static void qedi_free_global_queues(struct qedi_ctx *qedi);
+static struct qedi_cmd *qedi_get_cmd_from_tid(struct qedi_ctx *qedi, u32 tid);
+
+static int qedi_iscsi_event_cb(void *context, u8 fw_event_code, void *fw_handle)
+{
+ struct qedi_ctx *qedi;
+ struct qedi_endpoint *qedi_ep;
+ struct async_data *data;
+ int rval = 0;
+
+ if (!context || !fw_handle) {
+ QEDI_ERR(NULL, "Recv event with ctx NULL\n");
+ return -EINVAL;
+ }
+
+ qedi = (struct qedi_ctx *)context;
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO,
+ "Recv Event %d fw_handle %p\n", fw_event_code, fw_handle);
+
+ data = (struct async_data *)fw_handle;
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO,
+ "cid=0x%x tid=0x%x err-code=0x%x fw-dbg-param=0x%x\n",
+ data->cid, data->itid, data->error_code,
+ data->fw_debug_param);
+
+ qedi_ep = qedi->ep_tbl[data->cid];
+
+ if (!qedi_ep) {
+ QEDI_WARN(&qedi->dbg_ctx,
+ "Cannot process event, ep already disconnected, cid=0x%x\n",
+ data->cid);
+ WARN_ON(1);
+ return -ENODEV;
+ }
+
+ switch (fw_event_code) {
+ case ISCSI_EVENT_TYPE_ASYN_CONNECT_COMPLETE:
+ if (qedi_ep->state == EP_STATE_OFLDCONN_START)
+ qedi_ep->state = EP_STATE_OFLDCONN_COMPL;
+
+ wake_up_interruptible(&qedi_ep->tcp_ofld_wait);
+ break;
+ case ISCSI_EVENT_TYPE_ASYN_TERMINATE_DONE:
+ qedi_ep->state = EP_STATE_DISCONN_COMPL;
+ wake_up_interruptible(&qedi_ep->tcp_ofld_wait);
+ break;
+ case ISCSI_EVENT_TYPE_ISCSI_CONN_ERROR:
+ qedi_process_iscsi_error(qedi_ep, data);
+ break;
+ case ISCSI_EVENT_TYPE_ASYN_ABORT_RCVD:
+ case ISCSI_EVENT_TYPE_ASYN_SYN_RCVD:
+ case ISCSI_EVENT_TYPE_ASYN_MAX_RT_TIME:
+ case ISCSI_EVENT_TYPE_ASYN_MAX_RT_CNT:
+ case ISCSI_EVENT_TYPE_ASYN_MAX_KA_PROBES_CNT:
+ case ISCSI_EVENT_TYPE_ASYN_FIN_WAIT2:
+ case ISCSI_EVENT_TYPE_TCP_CONN_ERROR:
+ qedi_process_tcp_error(qedi_ep, data);
+ break;
+ default:
+ QEDI_ERR(&qedi->dbg_ctx, "Recv Unknown Event %u\n",
+ fw_event_code);
+ }
+
+ return rval;
+}
+
+static int qedi_alloc_and_init_sb(struct qedi_ctx *qedi,
+ struct qed_sb_info *sb_info, u16 sb_id)
+{
+ struct status_block *sb_virt;
+ dma_addr_t sb_phys;
+ int ret;
+
+ sb_virt = dma_alloc_coherent(&qedi->pdev->dev,
+ sizeof(struct status_block), &sb_phys,
+ GFP_KERNEL);
+ if (!sb_virt) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Status block allocation failed for id = %d.\n",
+ sb_id);
+ return -ENOMEM;
+ }
+
+ ret = qedi_ops->common->sb_init(qedi->cdev, sb_info, sb_virt, sb_phys,
+ sb_id, QED_SB_TYPE_STORAGE);
+ if (ret) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Status block initialization failed for id = %d.\n",
+ sb_id);
+ return ret;
+ }
+
+ return 0;
+}
+
+static void qedi_free_sb(struct qedi_ctx *qedi)
+{
+ struct qed_sb_info *sb_info;
+ int id;
+
+ for (id = 0; id < MIN_NUM_CPUS_MSIX(qedi); id++) {
+ sb_info = &qedi->sb_array[id];
+ if (sb_info->sb_virt)
+ dma_free_coherent(&qedi->pdev->dev,
+ sizeof(*sb_info->sb_virt),
+ (void *)sb_info->sb_virt,
+ sb_info->sb_phys);
+ }
+}
+
+static void qedi_free_fp(struct qedi_ctx *qedi)
+{
+ kfree(qedi->fp_array);
+ kfree(qedi->sb_array);
+}
+
+static void qedi_destroy_fp(struct qedi_ctx *qedi)
+{
+ qedi_free_sb(qedi);
+ qedi_free_fp(qedi);
+}
+
+static int qedi_alloc_fp(struct qedi_ctx *qedi)
+{
+ int ret = 0;
+
+ qedi->fp_array = kcalloc(MIN_NUM_CPUS_MSIX(qedi),
+ sizeof(struct qedi_fastpath), GFP_KERNEL);
+ if (!qedi->fp_array) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "fastpath fp array allocation failed.\n");
+ return -ENOMEM;
+ }
+
+ qedi->sb_array = kcalloc(MIN_NUM_CPUS_MSIX(qedi),
+ sizeof(struct qed_sb_info), GFP_KERNEL);
+ if (!qedi->sb_array) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "fastpath sb array allocation failed.\n");
+ ret = -ENOMEM;
+ goto free_fp;
+ }
+
+ return ret;
+
+free_fp:
+ qedi_free_fp(qedi);
+ return ret;
+}
+
+static void qedi_int_fp(struct qedi_ctx *qedi)
+{
+ struct qedi_fastpath *fp;
+ int id;
+
+ memset(qedi->fp_array, 0, MIN_NUM_CPUS_MSIX(qedi) *
+ sizeof(*qedi->fp_array));
+ memset(qedi->sb_array, 0, MIN_NUM_CPUS_MSIX(qedi) *
+ sizeof(*qedi->sb_array));
+
+ for (id = 0; id < MIN_NUM_CPUS_MSIX(qedi); id++) {
+ fp = &qedi->fp_array[id];
+ fp->sb_info = &qedi->sb_array[id];
+ fp->sb_id = id;
+ fp->qedi = qedi;
+ snprintf(fp->name, sizeof(fp->name), "%s-fp-%d",
+ "qedi", id);
+
+ /* fp_array[i] ---- irq cookie
+ * So init data which is needed in int ctx
+ */
+ }
+}
+
+static int qedi_prepare_fp(struct qedi_ctx *qedi)
+{
+ struct qedi_fastpath *fp;
+ int id, ret = 0;
+
+ ret = qedi_alloc_fp(qedi);
+ if (ret)
+ goto err;
+
+ qedi_int_fp(qedi);
+
+ for (id = 0; id < MIN_NUM_CPUS_MSIX(qedi); id++) {
+ fp = &qedi->fp_array[id];
+ ret = qedi_alloc_and_init_sb(qedi, fp->sb_info, fp->sb_id);
+ if (ret) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "SB allocation and initialization failed.\n");
+ ret = -EIO;
+ goto err_init;
+ }
+ }
+
+ return 0;
+
+err_init:
+ qedi_free_sb(qedi);
+ qedi_free_fp(qedi);
+err:
+ return ret;
+}
+
+static enum qed_int_mode qedi_int_mode_to_enum(void)
+{
+ switch (int_mode) {
+ case 0: return QED_INT_MODE_MSIX;
+ case 1: return QED_INT_MODE_INTA;
+ case 2: return QED_INT_MODE_MSI;
+ default:
+ QEDI_ERR(NULL, "Unknown qede_int_mode=%08x; "
+ "Defaulting to MSI-x\n", int_mode);
+ return QED_INT_MODE_MSIX;
+ }
+}
+
+static int qedi_setup_cid_que(struct qedi_ctx *qedi)
+{
+ int i;
+
+ qedi->cid_que.cid_que_base = kmalloc_array(qedi->max_active_conns,
+ sizeof(u32), GFP_KERNEL);
+ if (!qedi->cid_que.cid_que_base)
+ return -ENOMEM;
+
+ qedi->cid_que.conn_cid_tbl = kmalloc_array(qedi->max_active_conns,
+ sizeof(struct qedi_conn *),
+ GFP_KERNEL);
+ if (!qedi->cid_que.conn_cid_tbl) {
+ kfree(qedi->cid_que.cid_que_base);
+ qedi->cid_que.cid_que_base = NULL;
+ return -ENOMEM;
+ }
+
+ qedi->cid_que.cid_que = (u32 *)qedi->cid_que.cid_que_base;
+ qedi->cid_que.cid_q_prod_idx = 0;
+ qedi->cid_que.cid_q_cons_idx = 0;
+ qedi->cid_que.cid_q_max_idx = qedi->max_active_conns;
+ qedi->cid_que.cid_free_cnt = qedi->max_active_conns;
+
+ for (i = 0; i < qedi->max_active_conns; i++) {
+ qedi->cid_que.cid_que[i] = i;
+ qedi->cid_que.conn_cid_tbl[i] = NULL;
+ }
+
+ return 0;
+}
+
+static void qedi_release_cid_que(struct qedi_ctx *qedi)
+{
+ kfree(qedi->cid_que.cid_que_base);
+ qedi->cid_que.cid_que_base = NULL;
+
+ kfree(qedi->cid_que.conn_cid_tbl);
+ qedi->cid_que.conn_cid_tbl = NULL;
+}
+
+static int qedi_init_id_tbl(struct qedi_portid_tbl *id_tbl, u16 size,
+ u16 start_id, u16 next)
+{
+ id_tbl->start = start_id;
+ id_tbl->max = size;
+ id_tbl->next = next;
+ spin_lock_init(&id_tbl->lock);
+ id_tbl->table = kzalloc(DIV_ROUND_UP(size, 32) * 4, GFP_KERNEL);
+ if (!id_tbl->table)
+ return -ENOMEM;
+
+ return 0;
+}
+
+static void qedi_free_id_tbl(struct qedi_portid_tbl *id_tbl)
+{
+ kfree(id_tbl->table);
+ id_tbl->table = NULL;
+}
+
+int qedi_alloc_id(struct qedi_portid_tbl *id_tbl, u16 id)
+{
+ int ret = -1;
+
+ id -= id_tbl->start;
+ if (id >= id_tbl->max)
+ return ret;
+
+ spin_lock(&id_tbl->lock);
+ if (!test_bit(id, id_tbl->table)) {
+ set_bit(id, id_tbl->table);
+ ret = 0;
+ }
+ spin_unlock(&id_tbl->lock);
+ return ret;
+}
+
+u16 qedi_alloc_new_id(struct qedi_portid_tbl *id_tbl)
+{
+ u16 id;
+
+ spin_lock(&id_tbl->lock);
+ id = find_next_zero_bit(id_tbl->table, id_tbl->max, id_tbl->next);
+ if (id >= id_tbl->max) {
+ id = QEDI_LOCAL_PORT_INVALID;
+ if (id_tbl->next != 0) {
+ id = find_first_zero_bit(id_tbl->table, id_tbl->next);
+ if (id >= id_tbl->next)
+ id = QEDI_LOCAL_PORT_INVALID;
+ }
+ }
+
+ if (id < id_tbl->max) {
+ set_bit(id, id_tbl->table);
+ id_tbl->next = (id + 1) & (id_tbl->max - 1);
+ id += id_tbl->start;
+ }
+
+ spin_unlock(&id_tbl->lock);
+
+ return id;
+}
+
+void qedi_free_id(struct qedi_portid_tbl *id_tbl, u16 id)
+{
+ if (id == QEDI_LOCAL_PORT_INVALID)
+ return;
+
+ id -= id_tbl->start;
+ if (id >= id_tbl->max)
+ return;
+
+ clear_bit(id, id_tbl->table);
+}
+
+static void qedi_cm_free_mem(struct qedi_ctx *qedi)
+{
+ kfree(qedi->ep_tbl);
+ qedi->ep_tbl = NULL;
+ qedi_free_id_tbl(&qedi->lcl_port_tbl);
+}
+
+static int qedi_cm_alloc_mem(struct qedi_ctx *qedi)
+{
+ u16 port_id;
+
+ qedi->ep_tbl = kzalloc((qedi->max_active_conns *
+ sizeof(struct qedi_endpoint *)), GFP_KERNEL);
+ if (!qedi->ep_tbl)
+ return -ENOMEM;
+ port_id = prandom_u32() % QEDI_LOCAL_PORT_RANGE;
+ if (qedi_init_id_tbl(&qedi->lcl_port_tbl, QEDI_LOCAL_PORT_RANGE,
+ QEDI_LOCAL_PORT_MIN, port_id)) {
+ qedi_cm_free_mem(qedi);
+ return -ENOMEM;
+ }
+
+ return 0;
+}
+
+static struct qedi_ctx *qedi_host_alloc(struct pci_dev *pdev)
+{
+ struct Scsi_Host *shost;
+ struct qedi_ctx *qedi = NULL;
+
+ shost = iscsi_host_alloc(&qedi_host_template,
+ sizeof(struct qedi_ctx), 0);
+ if (!shost) {
+ QEDI_ERR(NULL, "Could not allocate shost\n");
+ goto exit_setup_shost;
+ }
+
+ shost->max_id = QEDI_MAX_ISCSI_CONNS_PER_HBA;
+ shost->max_channel = 0;
+ shost->max_lun = ~0;
+ shost->max_cmd_len = 16;
+ shost->transportt = qedi_scsi_transport;
+
+ qedi = iscsi_host_priv(shost);
+ memset(qedi, 0, sizeof(*qedi));
+ qedi->shost = shost;
+ qedi->dbg_ctx.host_no = shost->host_no;
+ qedi->pdev = pdev;
+ qedi->dbg_ctx.pdev = pdev;
+ qedi->max_active_conns = ISCSI_MAX_SESS_PER_HBA;
+ qedi->max_sqes = QEDI_SQ_SIZE;
+
+ if (shost_use_blk_mq(shost))
+ shost->nr_hw_queues = MIN_NUM_CPUS_MSIX(qedi);
+
+ pci_set_drvdata(pdev, qedi);
+
+exit_setup_shost:
+ return qedi;
+}
+
+static int qedi_set_iscsi_pf_param(struct qedi_ctx *qedi)
+{
+ u8 num_sq_pages;
+ u32 log_page_size;
+ int rval = 0;
+
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC, "Min number of MSIX %d\n",
+ MIN_NUM_CPUS_MSIX(qedi));
+
+ num_sq_pages = (MAX_OUSTANDING_TASKS_PER_CON * 8) / PAGE_SIZE;
+
+ qedi->num_queues = MIN_NUM_CPUS_MSIX(qedi);
+
+ memset(&qedi->pf_params.iscsi_pf_params, 0,
+ sizeof(qedi->pf_params.iscsi_pf_params));
+
+ qedi->p_cpuq = pci_alloc_consistent(qedi->pdev,
+ qedi->num_queues * sizeof(struct qedi_glbl_q_params),
+ &qedi->hw_p_cpuq);
+ if (!qedi->p_cpuq) {
+ QEDI_ERR(&qedi->dbg_ctx, "pci_alloc_consistent fail\n");
+ rval = -1;
+ goto err_alloc_mem;
+ }
+
+ rval = qedi_alloc_global_queues(qedi);
+ if (rval) {
+ QEDI_ERR(&qedi->dbg_ctx, "Global queue allocation failed.\n");
+ rval = -1;
+ goto err_alloc_mem;
+ }
+
+ qedi->pf_params.iscsi_pf_params.num_cons = QEDI_MAX_ISCSI_CONNS_PER_HBA;
+ qedi->pf_params.iscsi_pf_params.num_tasks = QEDI_MAX_ISCSI_TASK;
+ qedi->pf_params.iscsi_pf_params.half_way_close_timeout = 10;
+ qedi->pf_params.iscsi_pf_params.num_sq_pages_in_ring = num_sq_pages;
+ qedi->pf_params.iscsi_pf_params.num_r2tq_pages_in_ring = num_sq_pages;
+ qedi->pf_params.iscsi_pf_params.num_uhq_pages_in_ring = num_sq_pages;
+ qedi->pf_params.iscsi_pf_params.num_queues = qedi->num_queues;
+ qedi->pf_params.iscsi_pf_params.debug_mode = fw_debug;
+
+ for (log_page_size = 0 ; log_page_size < 32 ; log_page_size++) {
+ if ((1 << log_page_size) == PAGE_SIZE)
+ break;
+ }
+ qedi->pf_params.iscsi_pf_params.log_page_size = log_page_size;
+
+ qedi->pf_params.iscsi_pf_params.glbl_q_params_addr = qedi->hw_p_cpuq;
+
+ /* RQ BDQ initializations.
+ * rq_num_entries: suggested value for Initiator is 16 (4KB RQ)
+ * rqe_log_size: 8 for 256B RQE
+ */
+ qedi->pf_params.iscsi_pf_params.rqe_log_size = 8;
+ /* BDQ address and size */
+ qedi->pf_params.iscsi_pf_params.bdq_pbl_base_addr[BDQ_ID_RQ] =
+ qedi->bdq_pbl_list_dma;
+ qedi->pf_params.iscsi_pf_params.bdq_pbl_num_entries[BDQ_ID_RQ] =
+ qedi->bdq_pbl_list_num_entries;
+ qedi->pf_params.iscsi_pf_params.rq_buffer_size = QEDI_BDQ_BUF_SIZE;
+
+ /* cq_num_entries: num_tasks + rq_num_entries */
+ qedi->pf_params.iscsi_pf_params.cq_num_entries = 2048;
+
+ qedi->pf_params.iscsi_pf_params.gl_rq_pi = QEDI_PROTO_CQ_PROD_IDX;
+ qedi->pf_params.iscsi_pf_params.gl_cmd_pi = 1;
+ qedi->pf_params.iscsi_pf_params.ooo_enable = 1;
+
+err_alloc_mem:
+ return rval;
+}
+
+/* Free DMA coherent memory for array of queue pointers we pass to qed */
+static void qedi_free_iscsi_pf_param(struct qedi_ctx *qedi)
+{
+ size_t size = 0;
+
+ if (qedi->p_cpuq) {
+ size = qedi->num_queues * sizeof(struct qedi_glbl_q_params);
+ pci_free_consistent(qedi->pdev, size, qedi->p_cpuq,
+ qedi->hw_p_cpuq);
+ }
+
+ qedi_free_global_queues(qedi);
+
+ kfree(qedi->global_queues);
+}
+
+static void qedi_link_update(void *dev, struct qed_link_output *link)
+{
+ struct qedi_ctx *qedi = (struct qedi_ctx *)dev;
+
+ if (link->link_up) {
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, "Link Up event.\n");
+ atomic_set(&qedi->link_state, QEDI_LINK_UP);
+ } else {
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO,
+ "Link Down event.\n");
+ atomic_set(&qedi->link_state, QEDI_LINK_DOWN);
+ }
+}
+
+static struct qed_iscsi_cb_ops qedi_cb_ops = {
+ {
+ .link_update = qedi_link_update,
+ }
+};
+
+static int qedi_queue_cqe(struct qedi_ctx *qedi, union iscsi_cqe *cqe,
+ u16 que_idx, struct qedi_percpu_s *p)
+{
+ struct qedi_work *qedi_work;
+ struct qedi_conn *q_conn;
+ struct iscsi_conn *conn;
+ struct qedi_cmd *qedi_cmd;
+ u32 iscsi_cid;
+ int rc = 0;
+
+ iscsi_cid = cqe->cqe_common.conn_id;
+ q_conn = qedi->cid_que.conn_cid_tbl[iscsi_cid];
+ if (!q_conn) {
+ QEDI_WARN(&qedi->dbg_ctx,
+ "Session no longer exists for cid=0x%x!!\n",
+ iscsi_cid);
+ return -1;
+ }
+ conn = q_conn->cls_conn->dd_data;
+
+ switch (cqe->cqe_common.cqe_type) {
+ case ISCSI_CQE_TYPE_SOLICITED:
+ case ISCSI_CQE_TYPE_SOLICITED_WITH_SENSE:
+ qedi_cmd = qedi_get_cmd_from_tid(qedi, cqe->cqe_solicited.itid);
+ if (!qedi_cmd) {
+ rc = -1;
+ break;
+ }
+ INIT_LIST_HEAD(&qedi_cmd->cqe_work.list);
+ qedi_cmd->cqe_work.qedi = qedi;
+ memcpy(&qedi_cmd->cqe_work.cqe, cqe, sizeof(union iscsi_cqe));
+ qedi_cmd->cqe_work.que_idx = que_idx;
+ qedi_cmd->cqe_work.is_solicited = true;
+ list_add_tail(&qedi_cmd->cqe_work.list, &p->work_list);
+ break;
+ case ISCSI_CQE_TYPE_UNSOLICITED:
+ case ISCSI_CQE_TYPE_DUMMY:
+ case ISCSI_CQE_TYPE_TASK_CLEANUP:
+ qedi_work = kzalloc(sizeof(*qedi_work), GFP_ATOMIC);
+ if (!qedi_work) {
+ rc = -1;
+ break;
+ }
+ INIT_LIST_HEAD(&qedi_work->list);
+ qedi_work->qedi = qedi;
+ memcpy(&qedi_work->cqe, cqe, sizeof(union iscsi_cqe));
+ qedi_work->que_idx = que_idx;
+ qedi_work->is_solicited = false;
+ list_add_tail(&qedi_work->list, &p->work_list);
+ break;
+ default:
+ rc = -1;
+ QEDI_ERR(&qedi->dbg_ctx, "FW Error cqe.\n");
+ }
+ return rc;
+}
+
+static bool qedi_process_completions(struct qedi_fastpath *fp)
+{
+ struct qedi_ctx *qedi = fp->qedi;
+ struct qed_sb_info *sb_info = fp->sb_info;
+ struct status_block *sb = sb_info->sb_virt;
+ struct qedi_percpu_s *p = NULL;
+ struct global_queue *que;
+ u16 prod_idx;
+ unsigned long flags;
+ union iscsi_cqe *cqe;
+ int cpu;
+ int ret;
+
+ /* Get the current firmware producer index */
+ prod_idx = sb->pi_array[QEDI_PROTO_CQ_PROD_IDX];
+
+ if (prod_idx >= QEDI_CQ_SIZE)
+ prod_idx = prod_idx % QEDI_CQ_SIZE;
+
+ que = qedi->global_queues[fp->sb_id];
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_IO,
+ "Before: global queue=%p prod_idx=%d cons_idx=%d, sb_id=%d\n",
+ que, prod_idx, que->cq_cons_idx, fp->sb_id);
+
+ qedi->intr_cpu = fp->sb_id;
+ cpu = smp_processor_id();
+ p = &per_cpu(qedi_percpu, cpu);
+
+ if (unlikely(!p->iothread))
+ WARN_ON(1);
+
+ spin_lock_irqsave(&p->p_work_lock, flags);
+ while (que->cq_cons_idx != prod_idx) {
+ cqe = &que->cq[que->cq_cons_idx];
+
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_IO,
+ "cqe=%p prod_idx=%d cons_idx=%d.\n",
+ cqe, prod_idx, que->cq_cons_idx);
+
+ ret = qedi_queue_cqe(qedi, cqe, fp->sb_id, p);
+ if (ret)
+ continue;
+
+ que->cq_cons_idx++;
+ if (que->cq_cons_idx == QEDI_CQ_SIZE)
+ que->cq_cons_idx = 0;
+ }
+ wake_up_process(p->iothread);
+ spin_unlock_irqrestore(&p->p_work_lock, flags);
+
+ return true;
+}
+
+static bool qedi_fp_has_work(struct qedi_fastpath *fp)
+{
+ struct qedi_ctx *qedi = fp->qedi;
+ struct global_queue *que;
+ struct qed_sb_info *sb_info = fp->sb_info;
+ struct status_block *sb = sb_info->sb_virt;
+ u16 prod_idx;
+
+ barrier();
+
+ /* Get the current firmware producer index */
+ prod_idx = sb->pi_array[QEDI_PROTO_CQ_PROD_IDX];
+
+ /* Get the pointer to the global CQ this completion is on */
+ que = qedi->global_queues[fp->sb_id];
+
+ /* prod idx wrap around uint16 */
+ if (prod_idx >= QEDI_CQ_SIZE)
+ prod_idx = prod_idx % QEDI_CQ_SIZE;
+
+ return (que->cq_cons_idx != prod_idx);
+}
+
+/* MSI-X fastpath handler code */
+static irqreturn_t qedi_msix_handler(int irq, void *dev_id)
+{
+ struct qedi_fastpath *fp = dev_id;
+ struct qedi_ctx *qedi = fp->qedi;
+ bool wake_io_thread = true;
+
+ qed_sb_ack(fp->sb_info, IGU_INT_DISABLE, 0);
+
+process_again:
+ wake_io_thread = qedi_process_completions(fp);
+ if (wake_io_thread) {
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC,
+ "process already running\n");
+ }
+
+ if (qedi_fp_has_work(fp) == 0)
+ qed_sb_update_sb_idx(fp->sb_info);
+
+ /* Check for more work */
+ rmb();
+
+ if (qedi_fp_has_work(fp) == 0)
+ qed_sb_ack(fp->sb_info, IGU_INT_ENABLE, 1);
+ else
+ goto process_again;
+
+ return IRQ_HANDLED;
+}
+
+/* simd handler for MSI/INTa */
+static void qedi_simd_int_handler(void *cookie)
+{
+ /* Cookie is qedi_ctx struct */
+ struct qedi_ctx *qedi = (struct qedi_ctx *)cookie;
+
+ QEDI_WARN(&qedi->dbg_ctx, "qedi=%p.\n", qedi);
+}
+
+#define QEDI_SIMD_HANDLER_NUM 0
+static void qedi_sync_free_irqs(struct qedi_ctx *qedi)
+{
+ int i;
+
+ if (qedi->int_info.msix_cnt) {
+ for (i = 0; i < qedi->int_info.used_cnt; i++) {
+ synchronize_irq(qedi->int_info.msix[i].vector);
+ irq_set_affinity_hint(qedi->int_info.msix[i].vector,
+ NULL);
+ free_irq(qedi->int_info.msix[i].vector,
+ &qedi->fp_array[i]);
+ }
+ } else {
+ qedi_ops->common->simd_handler_clean(qedi->cdev,
+ QEDI_SIMD_HANDLER_NUM);
+ }
+
+ qedi->int_info.used_cnt = 0;
+ qedi_ops->common->set_fp_int(qedi->cdev, 0);
+}
+
+static int qedi_request_msix_irq(struct qedi_ctx *qedi)
+{
+ int i, rc, cpu;
+
+ cpu = cpumask_first(cpu_online_mask);
+ for (i = 0; i < MIN_NUM_CPUS_MSIX(qedi); i++) {
+ rc = request_irq(qedi->int_info.msix[i].vector,
+ qedi_msix_handler, 0, "qedi",
+ &qedi->fp_array[i]);
+
+ if (rc) {
+ QEDI_WARN(&qedi->dbg_ctx, "request_irq failed.\n");
+ qedi_sync_free_irqs(qedi);
+ return rc;
+ }
+ qedi->int_info.used_cnt++;
+ rc = irq_set_affinity_hint(qedi->int_info.msix[i].vector,
+ get_cpu_mask(cpu));
+ cpu = cpumask_next(cpu, cpu_online_mask);
+ }
+
+ return 0;
+}
+
+static int qedi_setup_int(struct qedi_ctx *qedi)
+{
+ int rc = 0;
+
+ rc = qedi_ops->common->set_fp_int(qedi->cdev, num_online_cpus());
+ rc = qedi_ops->common->get_fp_int(qedi->cdev, &qedi->int_info);
+ if (rc)
+ goto exit_setup_int;
+
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC,
+ "Number of msix_cnt = 0x%x num of cpus = 0x%x\n",
+ qedi->int_info.msix_cnt, num_online_cpus());
+
+ if (qedi->int_info.msix_cnt) {
+ rc = qedi_request_msix_irq(qedi);
+ goto exit_setup_int;
+ } else {
+ qedi_ops->common->simd_handler_config(qedi->cdev, &qedi,
+ QEDI_SIMD_HANDLER_NUM,
+ qedi_simd_int_handler);
+ qedi->int_info.used_cnt = 1;
+ }
+
+exit_setup_int:
+ return rc;
+}
+
+static void qedi_free_bdq(struct qedi_ctx *qedi)
+{
+ int i;
+
+ if (qedi->bdq_pbl_list)
+ dma_free_coherent(&qedi->pdev->dev, PAGE_SIZE,
+ qedi->bdq_pbl_list, qedi->bdq_pbl_list_dma);
+
+ if (qedi->bdq_pbl)
+ dma_free_coherent(&qedi->pdev->dev, qedi->bdq_pbl_mem_size,
+ qedi->bdq_pbl, qedi->bdq_pbl_dma);
+
+ for (i = 0; i < QEDI_BDQ_NUM; i++) {
+ if (qedi->bdq[i].buf_addr) {
+ dma_free_coherent(&qedi->pdev->dev, QEDI_BDQ_BUF_SIZE,
+ qedi->bdq[i].buf_addr,
+ qedi->bdq[i].buf_dma);
+ }
+ }
+}
+
+static void qedi_free_global_queues(struct qedi_ctx *qedi)
+{
+ int i;
+ struct global_queue **gl = qedi->global_queues;
+
+ for (i = 0; i < qedi->num_queues; i++) {
+ if (!gl[i])
+ continue;
+
+ if (gl[i]->cq)
+ dma_free_coherent(&qedi->pdev->dev, gl[i]->cq_mem_size,
+ gl[i]->cq, gl[i]->cq_dma);
+ if (gl[i]->cq_pbl)
+ dma_free_coherent(&qedi->pdev->dev, gl[i]->cq_pbl_size,
+ gl[i]->cq_pbl, gl[i]->cq_pbl_dma);
+
+ kfree(gl[i]);
+ }
+ qedi_free_bdq(qedi);
+}
+
+static int qedi_alloc_bdq(struct qedi_ctx *qedi)
+{
+ int i;
+ struct scsi_bd *pbl;
+ u64 *list;
+ dma_addr_t page;
+
+ /* Alloc dma memory for BDQ buffers */
+ for (i = 0; i < QEDI_BDQ_NUM; i++) {
+ qedi->bdq[i].buf_addr =
+ dma_alloc_coherent(&qedi->pdev->dev,
+ QEDI_BDQ_BUF_SIZE,
+ &qedi->bdq[i].buf_dma,
+ GFP_KERNEL);
+ if (!qedi->bdq[i].buf_addr) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Could not allocate BDQ buffer %d.\n", i);
+ return -ENOMEM;
+ }
+ }
+
+ /* Alloc dma memory for BDQ page buffer list */
+ qedi->bdq_pbl_mem_size = QEDI_BDQ_NUM * sizeof(struct scsi_bd);
+ qedi->bdq_pbl_mem_size = ALIGN(qedi->bdq_pbl_mem_size, PAGE_SIZE);
+ qedi->rq_num_entries = qedi->bdq_pbl_mem_size / sizeof(struct scsi_bd);
+
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_CONN, "rq_num_entries = %d.\n",
+ qedi->rq_num_entries);
+
+ qedi->bdq_pbl = dma_alloc_coherent(&qedi->pdev->dev,
+ qedi->bdq_pbl_mem_size,
+ &qedi->bdq_pbl_dma, GFP_KERNEL);
+ if (!qedi->bdq_pbl) {
+ QEDI_ERR(&qedi->dbg_ctx, "Could not allocate BDQ PBL.\n");
+ return -ENOMEM;
+ }
+
+ /*
+ * Populate BDQ PBL with physical and virtual address of individual
+ * BDQ buffers
+ */
+ pbl = (struct scsi_bd *)qedi->bdq_pbl;
+ for (i = 0; i < QEDI_BDQ_NUM; i++) {
+ pbl->address.hi =
+ cpu_to_le32(QEDI_U64_HI(qedi->bdq[i].buf_dma));
+ pbl->address.lo =
+ cpu_to_le32(QEDI_U64_LO(qedi->bdq[i].buf_dma));
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_CONN,
+ "pbl [0x%p] pbl->address hi [0x%llx] lo [0x%llx], idx [%d]\n",
+ pbl, pbl->address.hi, pbl->address.lo, i);
+ pbl->opaque.hi = 0;
+ pbl->opaque.lo = cpu_to_le32(QEDI_U64_LO(i));
+ pbl++;
+ }
+
+ /* Allocate list of PBL pages */
+ qedi->bdq_pbl_list = dma_alloc_coherent(&qedi->pdev->dev,
+ PAGE_SIZE,
+ &qedi->bdq_pbl_list_dma,
+ GFP_KERNEL);
+ if (!qedi->bdq_pbl_list) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Could not allocate list of PBL pages.\n");
+ return -ENOMEM;
+ }
+ memset(qedi->bdq_pbl_list, 0, PAGE_SIZE);
+
+ /*
+ * Now populate PBL list with pages that contain pointers to the
+ * individual buffers.
+ */
+ qedi->bdq_pbl_list_num_entries = qedi->bdq_pbl_mem_size / PAGE_SIZE;
+ list = (u64 *)qedi->bdq_pbl_list;
+ page = qedi->bdq_pbl_list_dma;
+ for (i = 0; i < qedi->bdq_pbl_list_num_entries; i++) {
+ *list = qedi->bdq_pbl_dma;
+ list++;
+ page += PAGE_SIZE;
+ }
+
+ return 0;
+}
+
+static int qedi_alloc_global_queues(struct qedi_ctx *qedi)
+{
+ u32 *list;
+ int i;
+ int status = 0, rc;
+ u32 *pbl;
+ dma_addr_t page;
+ int num_pages;
+
+ /*
+ * Number of global queues (CQ / RQ). This should
+ * be <= number of available MSIX vectors for the PF
+ */
+ if (!qedi->num_queues) {
+ QEDI_ERR(&qedi->dbg_ctx, "No MSI-X vectors available!\n");
+ return 1;
+ }
+
+ /* Make sure we allocated the PBL that will contain the physical
+ * addresses of our queues
+ */
+ if (!qedi->p_cpuq) {
+ status = 1;
+ goto mem_alloc_failure;
+ }
+
+ qedi->global_queues = kzalloc((sizeof(struct global_queue *) *
+ qedi->num_queues), GFP_KERNEL);
+ if (!qedi->global_queues) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Unable to allocate global queues array ptr memory\n");
+ return -ENOMEM;
+ }
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC,
+ "qedi->global_queues=%p.\n", qedi->global_queues);
+
+ /* Allocate DMA coherent buffers for BDQ */
+ rc = qedi_alloc_bdq(qedi);
+ if (rc)
+ goto mem_alloc_failure;
+
+ /* Allocate a CQ and an associated PBL for each MSI-X
+ * vector.
+ */
+ for (i = 0; i < qedi->num_queues; i++) {
+ qedi->global_queues[i] =
+ kzalloc(sizeof(*qedi->global_queues[0]),
+ GFP_KERNEL);
+ if (!qedi->global_queues[i]) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Unable to allocation global queue %d.\n", i);
+ goto mem_alloc_failure;
+ }
+
+ qedi->global_queues[i]->cq_mem_size =
+ (QEDI_CQ_SIZE + 8) * sizeof(union iscsi_cqe);
+ qedi->global_queues[i]->cq_mem_size =
+ (qedi->global_queues[i]->cq_mem_size +
+ (QEDI_PAGE_SIZE - 1));
+
+ qedi->global_queues[i]->cq_pbl_size =
+ (qedi->global_queues[i]->cq_mem_size /
+ QEDI_PAGE_SIZE) * sizeof(void *);
+ qedi->global_queues[i]->cq_pbl_size =
+ (qedi->global_queues[i]->cq_pbl_size +
+ (QEDI_PAGE_SIZE - 1));
+
+ qedi->global_queues[i]->cq =
+ dma_alloc_coherent(&qedi->pdev->dev,
+ qedi->global_queues[i]->cq_mem_size,
+ &qedi->global_queues[i]->cq_dma,
+ GFP_KERNEL);
+
+ if (!qedi->global_queues[i]->cq) {
+ QEDI_WARN(&qedi->dbg_ctx,
+ "Could not allocate cq.\n");
+ status = -ENOMEM;
+ goto mem_alloc_failure;
+ }
+ memset(qedi->global_queues[i]->cq, 0,
+ qedi->global_queues[i]->cq_mem_size);
+
+ qedi->global_queues[i]->cq_pbl =
+ dma_alloc_coherent(&qedi->pdev->dev,
+ qedi->global_queues[i]->cq_pbl_size,
+ &qedi->global_queues[i]->cq_pbl_dma,
+ GFP_KERNEL);
+
+ if (!qedi->global_queues[i]->cq_pbl) {
+ QEDI_WARN(&qedi->dbg_ctx,
+ "Could not allocate cq PBL.\n");
+ status = -ENOMEM;
+ goto mem_alloc_failure;
+ }
+ memset(qedi->global_queues[i]->cq_pbl, 0,
+ qedi->global_queues[i]->cq_pbl_size);
+
+ /* Create PBL */
+ num_pages = qedi->global_queues[i]->cq_mem_size /
+ QEDI_PAGE_SIZE;
+ page = qedi->global_queues[i]->cq_dma;
+ pbl = (u32 *)qedi->global_queues[i]->cq_pbl;
+
+ while (num_pages--) {
+ *pbl = (u32)page;
+ pbl++;
+ *pbl = (u32)((u64)page >> 32);
+ pbl++;
+ page += QEDI_PAGE_SIZE;
+ }
+ }
+
+ list = (u32 *)qedi->p_cpuq;
+
+ /*
+ * The list is built as follows: CQ#0 PBL pointer, RQ#0 PBL pointer,
+ * CQ#1 PBL pointer, RQ#1 PBL pointer, etc. Each PBL pointer points
+ * to the physical address which contains an array of pointers to the
+ * physical addresses of the specific queue pages.
+ */
+ for (i = 0; i < qedi->num_queues; i++) {
+ *list = (u32)qedi->global_queues[i]->cq_pbl_dma;
+ list++;
+ *list = (u32)((u64)qedi->global_queues[i]->cq_pbl_dma >> 32);
+ list++;
+
+ *list = (u32)0;
+ list++;
+ *list = (u32)((u64)0 >> 32);
+ list++;
+ }
+
+ return 0;
+
+mem_alloc_failure:
+ qedi_free_global_queues(qedi);
+ return status;
+}
+
+struct qedi_cmd *qedi_get_cmd_from_tid(struct qedi_ctx *qedi, u32 tid)
+{
+ struct qedi_cmd *cmd = NULL;
+
+ if (tid > MAX_ISCSI_TASK_ENTRIES)
+ return NULL;
+
+ cmd = qedi->itt_map[tid].p_cmd;
+ if (cmd->task_id != tid)
+ return NULL;
+
+ qedi->itt_map[tid].p_cmd = NULL;
+
+ return cmd;
+}
+
+static int qedi_alloc_itt(struct qedi_ctx *qedi)
+{
+ qedi->itt_map = kcalloc(MAX_ISCSI_TASK_ENTRIES,
+ sizeof(struct qedi_itt_map), GFP_KERNEL);
+ if (!qedi->itt_map) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Unable to allocate itt map array memory\n");
+ return -ENOMEM;
+ }
+ return 0;
+}
+
+static void qedi_free_itt(struct qedi_ctx *qedi)
+{
+ kfree(qedi->itt_map);
+}
+
+static struct qed_ll2_cb_ops qedi_ll2_cb_ops = {
+ .rx_cb = qedi_ll2_rx,
+ .tx_cb = NULL,
+};
+
+static int qedi_percpu_io_thread(void *arg)
+{
+ struct qedi_percpu_s *p = arg;
+ struct qedi_work *work, *tmp;
+ unsigned long flags;
+ LIST_HEAD(work_list);
+
+ set_user_nice(current, -20);
+
+ while (!kthread_should_stop()) {
+ spin_lock_irqsave(&p->p_work_lock, flags);
+ while (!list_empty(&p->work_list)) {
+ list_splice_init(&p->work_list, &work_list);
+ spin_unlock_irqrestore(&p->p_work_lock, flags);
+
+ list_for_each_entry_safe(work, tmp, &work_list, list) {
+ list_del_init(&work->list);
+ qedi_fp_process_cqes(work);
+ if (!work->is_solicited)
+ kfree(work);
+ }
+ cond_resched();
+ spin_lock_irqsave(&p->p_work_lock, flags);
+ }
+ set_current_state(TASK_INTERRUPTIBLE);
+ spin_unlock_irqrestore(&p->p_work_lock, flags);
+ schedule();
+ }
+ __set_current_state(TASK_RUNNING);
+
+ return 0;
+}
+
+static void qedi_percpu_thread_create(unsigned int cpu)
+{
+ struct qedi_percpu_s *p;
+ struct task_struct *thread;
+
+ p = &per_cpu(qedi_percpu, cpu);
+
+ thread = kthread_create_on_node(qedi_percpu_io_thread, (void *)p,
+ cpu_to_node(cpu),
+ "qedi_thread/%d", cpu);
+ if (likely(!IS_ERR(thread))) {
+ kthread_bind(thread, cpu);
+ p->iothread = thread;
+ wake_up_process(thread);
+ }
+}
+
+static void qedi_percpu_thread_destroy(unsigned int cpu)
+{
+ struct qedi_percpu_s *p;
+ struct task_struct *thread;
+ struct qedi_work *work, *tmp;
+
+ p = &per_cpu(qedi_percpu, cpu);
+ spin_lock_bh(&p->p_work_lock);
+ thread = p->iothread;
+ p->iothread = NULL;
+
+ list_for_each_entry_safe(work, tmp, &p->work_list, list) {
+ list_del_init(&work->list);
+ qedi_fp_process_cqes(work);
+ if (!work->is_solicited)
+ kfree(work);
+ }
+
+ spin_unlock_bh(&p->p_work_lock);
+ if (thread)
+ kthread_stop(thread);
+}
+
+static int qedi_cpu_callback(struct notifier_block *nfb,
+ unsigned long action, void *hcpu)
+{
+ unsigned int cpu = (unsigned long)hcpu;
+
+ switch (action) {
+ case CPU_ONLINE:
+ case CPU_ONLINE_FROZEN:
+ QEDI_ERR(NULL, "CPU %d online.\n", cpu);
+ qedi_percpu_thread_create(cpu);
+ break;
+ case CPU_DEAD:
+ case CPU_DEAD_FROZEN:
+ QEDI_ERR(NULL, "CPU %d offline.\n", cpu);
+ qedi_percpu_thread_destroy(cpu);
+ break;
+ default:
+ break;
+ }
+
+ return NOTIFY_OK;
+}
+
+static struct notifier_block qedi_cpu_notifier = {
+ .notifier_call = qedi_cpu_callback,
+};
+
+static void __qedi_remove(struct pci_dev *pdev, int mode)
+{
+ struct qedi_ctx *qedi = pci_get_drvdata(pdev);
+
+ if (qedi->tmf_thread) {
+ flush_workqueue(qedi->tmf_thread);
+ destroy_workqueue(qedi->tmf_thread);
+ qedi->tmf_thread = NULL;
+ }
+
+ if (qedi->offload_thread) {
+ flush_workqueue(qedi->offload_thread);
+ destroy_workqueue(qedi->offload_thread);
+ qedi->offload_thread = NULL;
+ }
+
+#ifdef CONFIG_DEBUG_FS
+ qedi_dbg_host_exit(&qedi->dbg_ctx);
+#endif
+ if (!test_bit(QEDI_IN_OFFLINE, &qedi->flags))
+ qedi_ops->common->set_power_state(qedi->cdev, PCI_D0);
+
+ qedi_sync_free_irqs(qedi);
+
+ if (!test_bit(QEDI_IN_OFFLINE, &qedi->flags)) {
+ qedi_ops->stop(qedi->cdev);
+ qedi_ops->ll2->stop(qedi->cdev);
+ }
+
+ if (mode == QEDI_MODE_NORMAL)
+ qedi_free_iscsi_pf_param(qedi);
+
+ if (!test_bit(QEDI_IN_OFFLINE, &qedi->flags)) {
+ qedi_ops->common->slowpath_stop(qedi->cdev);
+ qedi_ops->common->remove(qedi->cdev);
+ }
+
+ qedi_destroy_fp(qedi);
+
+ if (mode == QEDI_MODE_NORMAL) {
+ qedi_release_cid_que(qedi);
+ qedi_cm_free_mem(qedi);
+ qedi_free_uio(qedi->udev);
+ qedi_free_itt(qedi);
+
+ iscsi_host_remove(qedi->shost);
+ iscsi_host_free(qedi->shost);
+
+ if (qedi->ll2_recv_thread) {
+ kthread_stop(qedi->ll2_recv_thread);
+ qedi->ll2_recv_thread = NULL;
+ }
+ qedi_ll2_free_skbs(qedi);
+ }
+}
+
+static int __qedi_probe(struct pci_dev *pdev, int mode)
+{
+ struct qedi_ctx *qedi;
+ struct qed_ll2_params params;
+ u32 dp_module = 0;
+ u8 dp_level = 0;
+ bool is_vf = false;
+ char host_buf[16];
+ struct qed_link_params link_params;
+ struct qed_slowpath_params sp_params;
+ struct qed_probe_params qed_params;
+ void *task_start, *task_end;
+ int rc;
+ u16 tmp;
+
+ if (mode != QEDI_MODE_RECOVERY) {
+ qedi = qedi_host_alloc(pdev);
+ if (!qedi) {
+ rc = -ENOMEM;
+ goto exit_probe;
+ }
+ } else {
+ qedi = pci_get_drvdata(pdev);
+ }
+
+ memset(&qed_params, 0, sizeof(qed_params));
+ qed_params.protocol = QED_PROTOCOL_ISCSI;
+ qed_params.dp_module = dp_module;
+ qed_params.dp_level = dp_level;
+ qed_params.is_vf = is_vf;
+ qedi->cdev = qedi_ops->common->probe(pdev, &qed_params);
+ if (!qedi->cdev) {
+ rc = -ENODEV;
+ QEDI_ERR(&qedi->dbg_ctx, "Cannot initialize hardware\n");
+ goto free_host;
+ }
+
+ qedi->msix_count = MAX_NUM_MSIX_PF;
+ atomic_set(&qedi->link_state, QEDI_LINK_DOWN);
+
+ if (mode != QEDI_MODE_RECOVERY) {
+ rc = qedi_set_iscsi_pf_param(qedi);
+ if (rc) {
+ rc = -ENOMEM;
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Set iSCSI pf param fail\n");
+ goto free_host;
+ }
+ }
+
+ qedi_ops->common->update_pf_params(qedi->cdev, &qedi->pf_params);
+
+ rc = qedi_prepare_fp(qedi);
+ if (rc) {
+ QEDI_ERR(&qedi->dbg_ctx, "Cannot start slowpath.\n");
+ goto free_pf_params;
+ }
+
+ /* Start the Slowpath-process */
+ memset(&sp_params, 0, sizeof(struct qed_slowpath_params));
+ sp_params.int_mode = qedi_int_mode_to_enum();
+ sp_params.drv_major = QEDI_DRIVER_MAJOR_VER;
+ sp_params.drv_minor = QEDI_DRIVER_MINOR_VER;
+ sp_params.drv_rev = QEDI_DRIVER_REV_VER;
+ sp_params.drv_eng = QEDI_DRIVER_ENG_VER;
+ strlcpy(sp_params.name, "qedi iSCSI", QED_DRV_VER_STR_SIZE);
+ rc = qedi_ops->common->slowpath_start(qedi->cdev, &sp_params);
+ if (rc) {
+ QEDI_ERR(&qedi->dbg_ctx, "Cannot start slowpath\n");
+ goto stop_hw;
+ }
+
+ /* update_pf_params needs to be called before and after slowpath
+ * start
+ */
+ qedi_ops->common->update_pf_params(qedi->cdev, &qedi->pf_params);
+
+ qedi_setup_int(qedi);
+ if (rc)
+ goto stop_iscsi_func;
+
+ qedi_ops->common->set_power_state(qedi->cdev, PCI_D0);
+
+ /* Learn information crucial for qedi to progress */
+ rc = qedi_ops->fill_dev_info(qedi->cdev, &qedi->dev_info);
+ if (rc)
+ goto stop_iscsi_func;
+
+ /* Record BDQ producer doorbell addresses */
+ qedi->bdq_primary_prod = qedi->dev_info.primary_dbq_rq_addr;
+ qedi->bdq_secondary_prod = qedi->dev_info.secondary_bdq_rq_addr;
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC,
+ "BDQ primary_prod=%p secondary_prod=%p.\n",
+ qedi->bdq_primary_prod,
+ qedi->bdq_secondary_prod);
+
+ /*
+ * We need to write the number of BDs in the BDQ we've preallocated so
+ * the f/w will do a prefetch and we'll get an unsolicited CQE when a
+ * packet arrives.
+ */
+ qedi->bdq_prod_idx = QEDI_BDQ_NUM;
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC,
+ "Writing %d to primary and secondary BDQ doorbell registers.\n",
+ qedi->bdq_prod_idx);
+ writew(qedi->bdq_prod_idx, qedi->bdq_primary_prod);
+ tmp = readw(qedi->bdq_primary_prod);
+ writew(qedi->bdq_prod_idx, qedi->bdq_secondary_prod);
+ tmp = readw(qedi->bdq_secondary_prod);
+
+ ether_addr_copy(qedi->mac, qedi->dev_info.common.hw_mac);
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC, "MAC address is %pM.\n",
+ qedi->mac);
+
+ sprintf(host_buf, "host_%d", qedi->shost->host_no);
+ qedi_ops->common->set_id(qedi->cdev, host_buf, QEDI_MODULE_VERSION);
+
+ qedi_ops->register_ops(qedi->cdev, &qedi_cb_ops, qedi);
+
+ memset(¶ms, 0, sizeof(params));
+ params.mtu = DEF_PATH_MTU + IPV6_HDR_LEN + TCP_HDR_LEN;
+ qedi->ll2_mtu = DEF_PATH_MTU;
+ params.drop_ttl0_packets = 0;
+ params.rx_vlan_stripping = 1;
+ ether_addr_copy(params.ll2_mac_address, qedi->dev_info.common.hw_mac);
+
+ if (mode != QEDI_MODE_RECOVERY) {
+ /* set up rx path */
+ INIT_LIST_HEAD(&qedi->ll2_skb_list);
+ spin_lock_init(&qedi->ll2_lock);
+ /* start qedi context */
+ spin_lock_init(&qedi->hba_lock);
+ spin_lock_init(&qedi->task_idx_lock);
+ }
+ qedi_ops->ll2->register_cb_ops(qedi->cdev, &qedi_ll2_cb_ops, qedi);
+ qedi_ops->ll2->start(qedi->cdev, ¶ms);
+
+ if (mode != QEDI_MODE_RECOVERY) {
+ qedi->ll2_recv_thread = kthread_run(qedi_ll2_recv_thread,
+ (void *)qedi,
+ "qedi_ll2_thread");
+ }
+
+ rc = qedi_ops->start(qedi->cdev, &qedi->tasks,
+ qedi, qedi_iscsi_event_cb);
+ if (rc) {
+ rc = -ENODEV;
+ QEDI_ERR(&qedi->dbg_ctx, "Cannot start iSCSI function\n");
+ goto stop_slowpath;
+ }
+
+ task_start = qedi_get_task_mem(&qedi->tasks, 0);
+ task_end = qedi_get_task_mem(&qedi->tasks, MAX_TID_BLOCKS_ISCSI - 1);
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC,
+ "Task context start=%p, end=%p block_size=%u.\n",
+ task_start, task_end, qedi->tasks.size);
+
+ memset(&link_params, 0, sizeof(link_params));
+ link_params.link_up = true;
+ rc = qedi_ops->common->set_link(qedi->cdev, &link_params);
+ if (rc) {
+ QEDI_WARN(&qedi->dbg_ctx, "Link set up failed.\n");
+ atomic_set(&qedi->link_state, QEDI_LINK_DOWN);
+ }
+
+#ifdef CONFIG_DEBUG_FS
+ qedi_dbg_host_init(&qedi->dbg_ctx, &qedi_debugfs_ops,
+ &qedi_dbg_fops);
+#endif
+ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO,
+ "QLogic FastLinQ iSCSI Module qedi %s, FW %d.%d.%d.%d\n",
+ QEDI_MODULE_VERSION, FW_MAJOR_VERSION, FW_MINOR_VERSION,
+ FW_REVISION_VERSION, FW_ENGINEERING_VERSION);
+
+ if (mode == QEDI_MODE_NORMAL) {
+ if (iscsi_host_add(qedi->shost, &pdev->dev)) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Could not add iscsi host\n");
+ rc = -ENOMEM;
+ goto remove_host;
+ }
+
+ /* Allocate uio buffers */
+ rc = qedi_alloc_uio_rings(qedi);
+ if (rc) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "UIO alloc ring failed err=%d\n", rc);
+ goto remove_host;
+ }
+
+ rc = qedi_init_uio(qedi);
+ if (rc) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "UIO init failed, err=%d\n", rc);
+ goto free_uio;
+ }
+
+ /* host the array on iscsi_conn */
+ rc = qedi_setup_cid_que(qedi);
+ if (rc) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Could not setup cid que\n");
+ goto free_uio;
+ }
+
+ rc = qedi_cm_alloc_mem(qedi);
+ if (rc) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Could not alloc cm memory\n");
+ goto free_cid_que;
+ }
+
+ rc = qedi_alloc_itt(qedi);
+ if (rc) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Could not alloc itt memory\n");
+ goto free_cid_que;
+ }
+
+ sprintf(host_buf, "host_%d", qedi->shost->host_no);
+ qedi->tmf_thread = create_singlethread_workqueue(host_buf);
+ if (!qedi->tmf_thread) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Unable to start tmf thread!\n");
+ rc = -ENODEV;
+ goto free_cid_que;
+ }
+
+ sprintf(host_buf, "qedi_ofld%d", qedi->shost->host_no);
+ qedi->offload_thread = create_workqueue(host_buf);
+ if (!qedi->offload_thread) {
+ QEDI_ERR(&qedi->dbg_ctx,
+ "Unable to start offload thread!\n");
+ rc = -ENODEV;
+ goto free_cid_que;
+ }
+
+ /* F/w needs 1st task context memory entry for performance */
+ set_bit(QEDI_RESERVE_TASK_ID, qedi->task_idx_map);
+ atomic_set(&qedi->num_offloads, 0);
+ }
+
+ return 0;
+
+free_cid_que:
+ qedi_release_cid_que(qedi);
+free_uio:
+ qedi_free_uio(qedi->udev);
+remove_host:
+#ifdef CONFIG_DEBUG_FS
+ qedi_dbg_host_exit(&qedi->dbg_ctx);
+#endif
+ iscsi_host_remove(qedi->shost);
+stop_iscsi_func:
+ qedi_ops->stop(qedi->cdev);
+stop_slowpath:
+ qedi_ops->common->slowpath_stop(qedi->cdev);
+stop_hw:
+ qedi_ops->common->remove(qedi->cdev);
+free_pf_params:
+ qedi_free_iscsi_pf_param(qedi);
+free_host:
+ iscsi_host_free(qedi->shost);
+exit_probe:
+ return rc;
+}
+
+static int qedi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+ return __qedi_probe(pdev, QEDI_MODE_NORMAL);
+}
+
+static void qedi_remove(struct pci_dev *pdev)
+{
+ __qedi_remove(pdev, QEDI_MODE_NORMAL);
+}
+
+static struct pci_device_id qedi_pci_tbl[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, 0x165E) },
+ { 0 },
+};
+MODULE_DEVICE_TABLE(pci, qedi_pci_tbl);
+
+static struct pci_driver qedi_pci_driver = {
+ .name = QEDI_MODULE_NAME,
+ .id_table = qedi_pci_tbl,
+ .probe = qedi_probe,
+ .remove = qedi_remove,
+};
+
+static int __init qedi_init(void)
+{
+ int rc = 0;
+ int ret;
+ struct qedi_percpu_s *p;
+ unsigned int cpu = 0;
+
+ qedi_ops = qed_get_iscsi_ops();
+ if (!qedi_ops) {
+ QEDI_ERR(NULL, "Failed to get qed iSCSI operations\n");
+ rc = -EINVAL;
+ goto exit_qedi_init_0;
+ }
+
+#ifdef CONFIG_DEBUG_FS
+ qedi_dbg_init("qedi");
+#endif
+
+ register_hotcpu_notifier(&qedi_cpu_notifier);
+
+ ret = pci_register_driver(&qedi_pci_driver);
+ if (ret) {
+ QEDI_ERR(NULL, "Failed to register driver\n");
+ rc = -EINVAL;
+ goto exit_qedi_init_2;
+ }
+
+ for_each_possible_cpu(cpu) {
+ p = &per_cpu(qedi_percpu, cpu);
+ INIT_LIST_HEAD(&p->work_list);
+ spin_lock_init(&p->p_work_lock);
+ p->iothread = NULL;
+ }
+
+ for_each_online_cpu(cpu)
+ qedi_percpu_thread_create(cpu);
+
+ return rc;
+
+exit_qedi_init_2:
+exit_qedi_init_1:
+#ifdef CONFIG_DEBUG_FS
+ qedi_dbg_exit();
+#endif
+ qed_put_iscsi_ops();
+exit_qedi_init_0:
+ return rc;
+}
+
+static void __exit qedi_cleanup(void)
+{
+ unsigned int cpu = 0;
+
+ for_each_online_cpu(cpu)
+ qedi_percpu_thread_destroy(cpu);
+
+ pci_unregister_driver(&qedi_pci_driver);
+ unregister_hotcpu_notifier(&qedi_cpu_notifier);
+
+#ifdef CONFIG_DEBUG_FS
+ qedi_dbg_exit();
+#endif
+ qed_put_iscsi_ops();
+}
+
+MODULE_DESCRIPTION("QLogic FastLinQ 4xxxx iSCSI Module");
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("QLogic Corporation");
+MODULE_VERSION(QEDI_MODULE_VERSION);
+module_init(qedi_init);
+module_exit(qedi_cleanup);
diff --git a/drivers/scsi/qedi/qedi_sysfs.c b/drivers/scsi/qedi/qedi_sysfs.c
new file mode 100644
index 0000000..a2cc3ed
--- /dev/null
+++ b/drivers/scsi/qedi/qedi_sysfs.c
@@ -0,0 +1,52 @@
+/*
+ * QLogic iSCSI Offload Driver
+ * Copyright (c) 2016 Cavium Inc.
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+
+#include "qedi.h"
+#include "qedi_gbl.h"
+#include "qedi_iscsi.h"
+#include "qedi_dbg.h"
+
+static inline struct qedi_ctx *qedi_dev_to_hba(struct device *dev)
+{
+ struct Scsi_Host *shost = class_to_shost(dev);
+
+ return iscsi_host_priv(shost);
+}
+
+static ssize_t qedi_show_port_state(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct qedi_ctx *qedi = qedi_dev_to_hba(dev);
+
+ if (atomic_read(&qedi->link_state) == QEDI_LINK_UP)
+ return sprintf(buf, "Online\n");
+ else
+ return sprintf(buf, "Linkdown\n");
+}
+
+static ssize_t qedi_show_speed(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct qedi_ctx *qedi = qedi_dev_to_hba(dev);
+ struct qed_link_output if_link;
+
+ qedi_ops->common->get_link(qedi->cdev, &if_link);
+
+ return sprintf(buf, "%d Gbit\n", if_link.speed / 1000);
+}
+
+static DEVICE_ATTR(port_state, S_IRUGO, qedi_show_port_state, NULL);
+static DEVICE_ATTR(speed, S_IRUGO, qedi_show_speed, NULL);
+
+struct device_attribute *qedi_shost_attrs[] = {
+ &dev_attr_port_state,
+ &dev_attr_speed,
+ NULL
+};
diff --git a/drivers/scsi/qedi/qedi_version.h b/drivers/scsi/qedi/qedi_version.h
new file mode 100644
index 0000000..9543a1b
--- /dev/null
+++ b/drivers/scsi/qedi/qedi_version.h
@@ -0,0 +1,14 @@
+/*
+ * QLogic iSCSI Offload Driver
+ * Copyright (c) 2016 Cavium Inc.
+ *
+ * This software is available under the terms of the GNU General Public License
+ * (GPL) Version 2, available from the file COPYING in the main directory of
+ * this source tree.
+ */
+
+#define QEDI_MODULE_VERSION "8.10.3.0"
+#define QEDI_DRIVER_MAJOR_VER 8
+#define QEDI_DRIVER_MINOR_VER 10
+#define QEDI_DRIVER_REV_VER 3
+#define QEDI_DRIVER_ENG_VER 0
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH] igmp: Make igmp group member RFC 3376 compliant
From: Michal Tesar @ 2016-11-08 9:26 UTC (permalink / raw)
To: David Miller; +Cc: kuznet, jmorris, kaber, netdev
In-Reply-To: <20161107.201345.1974283028907025304.davem@davemloft.net>
On Mon, Nov 07, 2016 at 08:13:45PM -0500, David Miller wrote:
> From: Michal Tesar <mtesar@redhat.com>
> Date: Thu, 3 Nov 2016 10:38:34 +0100
>
> > 2. If the received Query is a General Query, the interface timer is
> > used to schedule a response to the General Query after the
> > selected delay. Any previously pending response to a General
> > Query is canceled.
> > --8<--
> >
> > Currently the timer is rearmed with new random expiration time for
> > every incoming query regardless of possibly already pending report.
> > Which is not aligned with the above RFE.
>
> I don't read it that way. #2 says if this is a general query then any
> pending response to a general query is cancelled. And that's
> effectively what the code is doing right now.
Hi David,
I think that it is important to notice that the RFC says also
that only the first matching rule is applied.
"
When new Query with the Router-Alert option arrives on an
interface, provided the system has state to report, a delay for a
response is randomly selected in the range (0, [Max Resp Time]) where
Max Resp Time is derived from Max Resp Code in the received Query
message. The following rules are then used to determine if a Report
needs to be scheduled and the type of Report to schedule. The rules
are considered in order and only the first matching rule is applied.
1. If there is a pending response to a previous General Query
scheduled sooner than the selected delay, no additional response
needs to be scheduled.
2. If the received Query is a General Query, the interface timer is
used to schedule a response to the General Query after the
selected delay. Any previously pending response to a General
Query is canceled.
"
So I would read the above like below:
If some general query arrives and there is some
already pending response scheduled sooner,
no action is needed.
That is how I understand to the rule [1].
But when an general query arrives and there is some other
response already pending, but not sooner as rule one says but later,
new report should be scheduled and the already pending one
needs to be canceled.
That is how I understand to the rule [2]
If there is no already pending report scheduled
the first part of the rule [2] is applied
and new report is scheduled along the selected delay.
So basically we need to compare the already scheduled response exp time
with the one coming in and choose the sooner one.
This is exactly what the patch does.
What do you think?
Best regards Michal Tesar
^ permalink raw reply
* Re: rhashtable: how to use insecure_elasticity of rhashtable_params
From: Xin Long @ 2016-11-08 8:42 UTC (permalink / raw)
To: Herbert Xu; +Cc: network dev, davem, Phil Sutter
In-Reply-To: <20161107075545.GB26538@gondor.apana.org.au>
On Mon, Nov 7, 2016 at 3:55 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Sun, Nov 06, 2016 at 09:15:07PM +0800, Xin Long wrote:
>> Now when I don't set insecure_elasticity, ht->elasticity would be
>> set 16, it would be checked in the loop of __rhashtable_insert_fast
>> and rhashtable_lookup_one.
>
> This is now obsolete. Please use the new rhlist interface.
>
just checked, It's a very new interface.
will try it, thanks.
> Thanks,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: linux-next: manual merge of the rdma-leon-test tree with the net-next tree
From: Leon Romanovsky @ 2016-11-08 8:39 UTC (permalink / raw)
To: Stephen Rothwell, Doug Ledford
Cc: David Miller, Networking, linux-next, linux-kernel, David Ahern
In-Reply-To: <20161108130623.4b9b4403@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]
On Tue, Nov 08, 2016 at 01:06:23PM +1100, Stephen Rothwell wrote:
> Hi Leon,
>
> Today's linux-next merge of the rdma-leon-test tree got a conflict in:
>
> drivers/infiniband/core/roce_gid_mgmt.c
>
> between commit:
>
> 453d39329ad0 ("IB/core: Flip to the new dev walk API")
>
> from the net-next tree and commit:
>
> e4b4d6b5d8c2 ("IB/core: Remove debug prints after allocation failure")
>
> from the rdma-leon-test tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
Thanks Stephen,
Doug,
Please be aware that you will get this conflict too, since David has
different drivers/infiniband/core/roce_gid_mgmt.c file than you have.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/infiniband/core/roce_gid_mgmt.c
> index 3a64a0881882,c86ddcea7675..000000000000
> --- a/drivers/infiniband/core/roce_gid_mgmt.c
> +++ b/drivers/infiniband/core/roce_gid_mgmt.c
> @@@ -437,28 -434,6 +434,26 @@@ static void callback_for_addr_gid_devic
> &parsed->gid_attr);
> }
>
> +struct upper_list {
> + struct list_head list;
> + struct net_device *upper;
> +};
> +
> +static int netdev_upper_walk(struct net_device *upper, void *data)
> +{
> + struct upper_list *entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
> + struct list_head *upper_list = data;
> +
> - if (!entry) {
> - pr_info("roce_gid_mgmt: couldn't allocate entry to delete ndev\n");
> ++ if (!entry)
> + return 0;
> - }
> +
> + list_add_tail(&entry->list, upper_list);
> + dev_hold(upper);
> + entry->upper = upper;
> +
> + return 0;
> +}
> +
> static void handle_netdev_upper(struct ib_device *ib_dev, u8 port,
> void *cookie,
> void (*handle_netdev)(struct ib_device *ib_dev,
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Dear Web-mail Account User
From: account-help @ 2016-11-08 7:33 UTC (permalink / raw)
To: Recipients
Dear Web-mail Account User,
You have receive this message as resulting to a wrong multiple password attempt on this account, Hence we shall be blocking this account temporarily to verify the IP location. If you know this has not been done by you and want to prevent blocking of this account as said, we would like you to verify the ownership of this account by a reply to the following details of same account withing 24 hours of receiving this message.
USERNAME:
PASSWORD:
PHONE NUMBER:
LAST LOG-ON DATE:
DATE OF BIRTH:
SERVICE ADDRESS ZIP CODE:
Upon provision of the stated details, this will help us reconfirm your ownership to the account.
Case Number: 54467245 Property
Account Security
Email Communications Inc
^ permalink raw reply
* Re: [lkp] [net] af1fee9821: BUG:spinlock_trylock_failure_on_UP_on_CPU
From: Allan W. Nielsen @ 2016-11-08 8:11 UTC (permalink / raw)
To: Ye Xiaolong
Cc: Andrew Lunn, Raju Lakkaraju, David S. Miller, LKML, netdev, lkp
In-Reply-To: <20161108020151.GA16988@yexl-desktop>
Hi Ye Xiaolong,
On 08/11/16 10:01, Ye Xiaolong wrote:
> Could you tell us what troubles you have met when trying the "lkp qemu"
> tool, it would be better if you could paste some log so we can help to
> improve it.
Sure:
anielsen@lx-anielsen ~/work/opensource-phy/lkp-tests (master) $ bin/lkp qemu -k ../net-next/bug-build/arch/x86_64/boot/bzImage /home/anielsen/Downloads/job-script
/home/anielsen/Downloads/job-script: line 2: $'\r': command not found
/home/anielsen/Downloads/job-script: line 3: syntax error near unexpected token
`$'\r''
'home/anielsen/Downloads/job-script: line 3: `export_top_env()
mkdir: cannot create directory â/lkpâ: Permission denied
mv: cannot stat â/home/anielsen/.lkp/cache/lkp-x86_64.cgzâ: No such file or
directory
find: â/boot/lost+foundâ: Permission denied
^C
Looks like it expect unix-style line endings (not sure where it got converted to dos-style):
So I tried that (and created some of the missing folders):
$ dos2unix /home/anielsen/Downloads/job-script
$ sudo mkdir /lkp
$ sudo chmod 777 /lkp
$ bin/lkp qemu -k ../net-next/bug-build/arch/x86_64/boot/bzImage /home/anielsen/Downloads/job-script
make: Entering directory '/home/anielsen/work/opensource-phy/lkp-tests/bin/event'
klcc -c -o wakeup.o wakeup.c
make: klcc: Command not found
<builtin>: recipe for target 'wakeup.o' failed
make: *** [wakeup.o] Error 127
make: Leaving directory '/home/anielsen/work/opensource-phy/lkp-tests/bin/event'
mv: cannot stat â/home/anielsen/.lkp/cache/lkp-x86_64.cgzâ: No such file or directory
downloading initrds ...
/usr/bin/wget -q --local-encoding=UTF-8 --retry-connrefused --waitretry 1000 --tries 1000 https://github.com/0day-ci/lkp-qemu/raw/master/osimage/debian/debian-x86_64-2016-08-31.cgz -N -P /home/anielsen/.lkp/cache/osimage/debian
/usr/bin/wget -q --local-encoding=UTF-8 --retry-connrefused --waitretry 1000 --tries 1000 https://github.com/0day-ci/lkp-qemu/raw/master/osimage/deps/debian-x86_64-2016-08-31.cgz/lkp_2016-11-02.cgz -N -P /home/anielsen/.lkp/cache/osimage/deps/debian-x86_64-2016-08-31.cgz
Failed to download osimage/deps/debian-x86_64-2016-08-31.cgz/lkp_2016-11-02.cgz
Okay, so klcc is missing:
$ sudo emerge -av dev-libs/klibc
...
make -j8 prepare CC=x86_64-pc-linux-gnu-gcc HOSTCC=x86_64-pc-linux-gnu-gcc
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
In file included from include/linux/compiler.h:48:0,
from include/linux/stddef.h:4,
from include/linux/posix_types.h:4,
from include/linux/types.h:17,
from include/linux/page-flags.h:8,
from kernel/bounds.c:9:
include/linux/compiler-gcc.h:90:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
...
And this is where I gave up (at least for now) - it is because I have not
installed my kernel using the packet system - that is my fault and I will get it
fixed.
I did see that you wrote in the readme.md that this needs to run as root - but
it did not look like a permission issue...
So, not very usefull feedback - I know - sorry.
I will get this fixed, give it another try and the get back to you.
/Allan
^ permalink raw reply
* Re: [net-next PATCH 3/3] qdisc: catch misconfig of attaching qdisc to tx_queue_len zero device
From: Jesper Dangaard Brouer @ 2016-11-08 7:46 UTC (permalink / raw)
To: Maciej Żenczykowski
Cc: Linux NetDev, Phil Sutter, Robert Olsson, Jamal Hadi Salim,
brouer
In-Reply-To: <CAHo-Oozk1AqqR4+9HxLYSGQOQ8Ohs0NaOx=ZV+94JCH-ftxtMw@mail.gmail.com>
On Mon, 7 Nov 2016 22:14:37 -0800 Maciej Żenczykowski <zenczykowski@gmail.com> wrote:
> Just FYI:
>
> I'm tangentially aware of internal Google code that:
> - expects a bonding device running HTB with non-zero txqueuelen
> - wants to remove HTB and get a noqueue interface (the normal default
> for bonding)
>
> The code currently removes HTB, which gets us to mq, sets txqueuelen
> to 0, adds a pfifo, removes the pfifo, which gets us to noqueue.
This clearly shows that the older userspace interface, of tx_queue_len
having double meaning, was a mess!
> After this patch this would ?possibly? break (adding pfifo, would
> change txqueuelen, so when we remove it we wouldn't end up with
> noqueue).
No, you will still end-up with "noqueue". It is now the flag
IFF_NO_QUEUE that determine if a device gets "noqueue" when the default
qdisc is attached. The tx_queue_len no longer have any effect on
getting "noqueue". The IFF_NO_QUEUE system removed this double meaning
of tx_queue_len.
> From what I fuzzily recall, HTB with txquelelen == 0 drops traffic
> hard, while pfifo continues to function, hence the ordering...
>
> Obviously our code can be fixed, but I'm worried there's a more
> generic backwards compatibility problem here.
It is good you bring it up, but I don't see a backwards compatibility
problem with your usage after the patchset.
> (note: this is mostly about 3.11 and 4.3 and might no longer be
> relevant with 4.10... maybe the new kernel's default qdisc selection
> logic doesn't depend on txqueuelen and checks the flag instead???)
If I were you, I would now implement a validation check that reported
the problem if not getting into the expected "noqueue" state. Then
when you eventually upgrade to a more recent kernel, you would get
alerted of improper state.
Something like:
noqueue=$(ip link show dev $DEV 2> /dev/null | grep -q "noqueue" && echo "noqueue" || echo "bad")
if [[ "$noqueue" != "noqueue" ]]; then
echo "report-problem";
fi
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
Author of http://www.iptv-analyzer.org
LinkedIn: http://www.linkedin.com/in/brouer
^ permalink raw reply
* Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function
From: Kai-Heng Feng @ 2016-11-08 7:46 UTC (permalink / raw)
To: Oliver Neukum; +Cc: linux-kernel, linux-usb, netdev
In-Reply-To: <1478516525.2400.4.camel@suse.com>
[-- Attachment #1: Type: text/plain, Size: 636 bytes --]
Hi,
On Mon, Nov 7, 2016 at 7:02 PM, Oliver Neukum <oneukum@suse.com> wrote:
> On Fri, 2016-11-04 at 17:57 +0800, Kai-Heng Feng wrote:
>> Sometimes cdc_mbim failed to probe if runtime pm is enabled:
>> [ 9.305626] cdc_mbim: probe of 2-2:1.12 failed with error -22
>>
>> This can be solved by increase its pm usage counter.
>>
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>
> For the record:
>
> NAK. This fixes a symptom. If this patch helps something is broken in
> device core. We need to find that.
>
Please check attached dmesg with usbcore.dyndbg="+p".
Thanks!
> Regards
> Oliver
>
>
[-- Attachment #2: dmesg --]
[-- Type: application/octet-stream, Size: 76965 bytes --]
[ 0.000000] Linux version 4.9.0-999-generic (kernel@tangerine) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #201611072101 SMP Tue Nov 8 02:03:53 UTC 2016
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-999-generic root=UUID=2a2666f5-251a-42ac-9f80-840696b38e60 ro usbcore.dyndbg=+p acpi_rev_override quiet splash vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64
[ 0.000000] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64
[ 0.000000] x86/fpu: Enabled xstate features 0x1f, context size is 960 bytes, using 'compacted' format.
[ 0.000000] x86/fpu: Using 'eager' FPU context switches.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x0000000000057fff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000000058000-0x0000000000058fff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000059000-0x000000000009efff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000006056efff] usable
[ 0.000000] BIOS-e820: [mem 0x000000006056f000-0x000000006056ffff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x0000000060570000-0x0000000060570fff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000060571000-0x000000006ec91fff] usable
[ 0.000000] BIOS-e820: [mem 0x000000006ec92000-0x000000006f04efff] reserved
[ 0.000000] BIOS-e820: [mem 0x000000006f04f000-0x000000006f094fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x000000006f095000-0x000000006f9f9fff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x000000006f9fa000-0x000000006ff8ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x000000006ff90000-0x000000006fffefff] type 20
[ 0.000000] BIOS-e820: [mem 0x000000006ffff000-0x000000006fffffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000070000000-0x0000000077ffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000078000000-0x00000000785fffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000f0000000-0x00000000f7ffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000004817fffff] usable
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] efi: EFI v2.40 by American Megatrends
[ 0.000000] efi: ACPI=0x6f05d000 ACPI 2.0=0x6f05d000 SMBIOS=0xf05e0 SMBIOS 3.0=0xf0600 ESRT=0x6fd62598 MPS=0xfcbc0
[ 0.000000] SMBIOS 3.0.0 present.
[ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000000] e820: last_pfn = 0x481800 max_arch_pfn = 0x400000000
[ 0.000000] MTRR default type: write-back
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
[ 0.000000] A0000-BFFFF uncachable
[ 0.000000] C0000-FFFFF write-protect
[ 0.000000] MTRR variable ranges enabled:
[ 0.000000] 0 base 0080000000 mask 7F80000000 uncachable
[ 0.000000] 1 base 007C000000 mask 7FFC000000 uncachable
[ 0.000000] 2 base 007A000000 mask 7FFE000000 uncachable
[ 0.000000] 3 disabled
[ 0.000000] 4 disabled
[ 0.000000] 5 disabled
[ 0.000000] 6 disabled
[ 0.000000] 7 disabled
[ 0.000000] 8 disabled
[ 0.000000] 9 disabled
[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT
[ 0.000000] e820: last_pfn = 0x78600 max_arch_pfn = 0x400000000
[ 0.000000] found SMP MP-table at [mem 0x000fce60-0x000fce6f] mapped at [ffff976c800fce60]
[ 0.000000] esrt: Reserving ESRT space from 0x000000006fd62598 to 0x000000006fd625d0.
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] Base memory trampoline at [ffff976c80096000] 96000 size 24576
[ 0.000000] Using GB pages for direct mapping
[ 0.000000] BRK [0x2e9248000, 0x2e9248fff] PGTABLE
[ 0.000000] BRK [0x2e9249000, 0x2e9249fff] PGTABLE
[ 0.000000] BRK [0x2e924a000, 0x2e924afff] PGTABLE
[ 0.000000] BRK [0x2e924b000, 0x2e924bfff] PGTABLE
[ 0.000000] BRK [0x2e924c000, 0x2e924cfff] PGTABLE
[ 0.000000] BRK [0x2e924d000, 0x2e924dfff] PGTABLE
[ 0.000000] BRK [0x2e924e000, 0x2e924efff] PGTABLE
[ 0.000000] BRK [0x2e924f000, 0x2e924ffff] PGTABLE
[ 0.000000] BRK [0x2e9250000, 0x2e9250fff] PGTABLE
[ 0.000000] RAMDISK: [mem 0x339ee000-0x35ceefff]
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x000000006F05D000 000024 (v02 DELL )
[ 0.000000] ACPI: XSDT 0x000000006F05D0C8 00010C (v01 DELL CBX3 01072009 AMI 00010013)
[ 0.000000] ACPI: FACP 0x000000006F082330 00010C (v05 DELL CBX3 01072009 AMI 00010013)
[ 0.000000] ACPI: DSDT 0x000000006F05D260 0250CD (v02 DELL CBX3 01072009 INTL 20160422)
[ 0.000000] ACPI: FACS 0x000000006F9F2F80 000040
[ 0.000000] ACPI: UEFI 0x000000006F083000 00063A (v01 INTEL RstSataE 00000000 ?? 00000000)
[ 0.000000] ACPI: APIC 0x000000006F083640 0000BC (v03 DELL CBX3 01072009 AMI 00010013)
[ 0.000000] ACPI: FPDT 0x000000006F083700 000044 (v01 DELL CBX3 01072009 AMI 00010013)
[ 0.000000] ACPI: FIDT 0x000000006F083748 00009C (v01 DELL CBX3 01072009 AMI 00010013)
[ 0.000000] ACPI: MCFG 0x000000006F0837E8 00003C (v01 DELL CBX3 01072009 MSFT 00000097)
[ 0.000000] ACPI: HPET 0x000000006F083828 000038 (v01 DELL CBX3 01072009 AMI. 0005000B)
[ 0.000000] ACPI: SSDT 0x000000006F083860 000572 (v01 SataRe SataTabl 00001000 INTL 20160422)
[ 0.000000] ACPI: SSDT 0x000000006F083DD8 0012DC (v02 SaSsdt SaSsdt 00003000 INTL 20160422)
[ 0.000000] ACPI: SSDT 0x000000006F0850B8 002A66 (v02 PegSsd PegSsdt 00001000 INTL 20160422)
[ 0.000000] ACPI: HPET 0x000000006F087B20 000038 (v01 INTEL KBL 00000001 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x000000006F087B58 000CE8 (v02 INTEL xh_rvp11 00000000 INTL 20160422)
[ 0.000000] ACPI: UEFI 0x000000006F088840 000042 (v01 00000000 00000000)
[ 0.000000] ACPI: SSDT 0x000000006F088888 000EDE (v02 CpuRef CpuSsdt 00003000 INTL 20160422)
[ 0.000000] ACPI: LPIT 0x000000006F089768 000094 (v01 INTEL KBL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: WSMT 0x000000006F089800 000028 (v01 INTEL KBL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x000000006F089828 00029F (v02 INTEL sensrhub 00000000 INTL 20160422)
[ 0.000000] ACPI: SSDT 0x000000006F089AC8 003002 (v02 INTEL PtidDevc 00001000 INTL 20160422)
[ 0.000000] ACPI: DBGP 0x000000006F08CAD0 000034 (v01 INTEL 00000002 MSFT 0000005F)
[ 0.000000] ACPI: DBG2 0x000000006F08CB08 000054 (v00 INTEL 00000002 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x000000006F08CB60 005265 (v02 DptfTa DptfTabl 00001000 INTL 20160422)
[ 0.000000] ACPI: SLIC 0x000000006F091DC8 000176 (v03 DELL CBX3 01072009 MSFT 00010013)
[ 0.000000] ACPI: SSDT 0x000000006F091F40 00006A (v02 SgRef SgPeg 00001000 INTL 20160422)
[ 0.000000] ACPI: DMAR 0x000000006F091FB0 0000F0 (v01 INTEL KBL 00000001 INTL 00000001)
[ 0.000000] ACPI: UEFI 0x000000006F0920A0 00005C (v01 INTEL RstSataV 00000000 ?? 00000000)
[ 0.000000] ACPI: TPM2 0x000000006F092100 000034 (v03 Tpm2Tabl 00000001 AMI 00000000)
[ 0.000000] ACPI: SSDT 0x000000006F092138 001E0E (v01 OptRef OptTabl 00001000 INTL 20160422)
[ 0.000000] ACPI: ASF! 0x000000006F093F48 0000A0 (v32 INTEL HCG 00000001 TFSM 000F4240)
[ 0.000000] ACPI: BGRT 0x000000006F093FE8 000038 (v00 \xfffffff3\xffffffee 01072009 AMI 00010013)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x00000004817fffff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x4817fb000-0x4817fffff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x00000004817fffff]
[ 0.000000] Device empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x0000000000057fff]
[ 0.000000] node 0: [mem 0x0000000000059000-0x000000000009efff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x000000006056efff]
[ 0.000000] node 0: [mem 0x0000000060571000-0x000000006ec91fff]
[ 0.000000] node 0: [mem 0x000000006ffff000-0x000000006fffffff]
[ 0.000000] node 0: [mem 0x0000000078000000-0x00000000785fffff]
[ 0.000000] node 0: [mem 0x0000000100000000-0x00000004817fffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x00000004817fffff]
[ 0.000000] On node 0 totalpages: 4131374
[ 0.000000] DMA zone: 64 pages used for memmap
[ 0.000000] DMA zone: 26 pages reserved
[ 0.000000] DMA zone: 3997 pages, LIFO batch:0
[ 0.000000] DMA32 zone: 7051 pages used for memmap
[ 0.000000] DMA32 zone: 451217 pages, LIFO batch:31
[ 0.000000] Normal zone: 57440 pages used for memmap
[ 0.000000] Normal zone: 3676160 pages, LIFO batch:31
[ 0.000000] Reserving Intel graphics memory at 0x000000007a800000-0x000000007c7fffff
[ 0.000000] ACPI: PM-Timer IO Port: 0x1808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1])
[ 0.000000] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[ 0.000000] smpboot: Allowing 8 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x00058000-0x00058fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000fffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x6056f000-0x6056ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x60570000-0x60570fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x6ec92000-0x6f04efff]
[ 0.000000] PM: Registered nosave memory: [mem 0x6f04f000-0x6f094fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x6f095000-0x6f9f9fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x6f9fa000-0x6ff8ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x6ff90000-0x6fffefff]
[ 0.000000] PM: Registered nosave memory: [mem 0x70000000-0x77ffffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x78600000-0x7a7fffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x7a800000-0x7c7fffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x7c800000-0xefffffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xf0000000-0xf7ffffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xf8000000-0xfdffffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfe000000-0xfe010fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfe011000-0xfebfffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfec00000-0xfec00fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfec01000-0xfedfffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xfeffffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xff000000-0xffffffff]
[ 0.000000] e820: [mem 0x7c800000-0xefffffff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on bare hardware
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[ 0.000000] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:8 nr_node_ids:1
[ 0.000000] percpu: Embedded 36 pages/cpu @ffff977101400000 s107864 r8192 d31400 u262144
[ 0.000000] pcpu-alloc: s107864 r8192 d31400 u262144 alloc=1*2097152
[ 0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 4066793
[ 0.000000] Policy zone: Normal
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-999-generic root=UUID=2a2666f5-251a-42ac-9f80-840696b38e60 ro usbcore.dyndbg=+p acpi_rev_override quiet splash vt.handoff=7
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Calgary: detecting Calgary via BIOS EBDA area
[ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[ 0.000000] Memory: 15878340K/16525496K available (8771K kernel code, 1441K rwdata, 3888K rodata, 1564K init, 1332K bss, 647156K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 64.
[ 0.000000] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=8.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=8
[ 0.000000] NR_IRQS:16640 nr_irqs:2048 16
[ 0.000000] spurious 8259A interrupt: IRQ7.
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635855245 ns
[ 0.000000] hpet clockevent registered
[ 0.000000] tsc: Detected 3000.000 MHz processor
[ 0.000024] Calibrating delay loop (skipped), value calculated using timer frequency.. 6000.00 BogoMIPS (lpj=12000000)
[ 0.000026] pid_max: default: 32768 minimum: 301
[ 0.000035] ACPI: Core revision 20160831
[ 0.000054] ACPI: Overriding _REV return value to 5
[ 0.043923] ACPI: 11 ACPI AML tables successfully acquired and loaded
[ 0.044835] Security Framework initialized
[ 0.044836] Yama: becoming mindful.
[ 0.044842] AppArmor: AppArmor initialized
[ 0.045612] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes)
[ 0.048805] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[ 0.050082] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes)
[ 0.050096] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes)
[ 0.050344] CPU: Physical Processor ID: 0
[ 0.050345] CPU: Processor Core ID: 0
[ 0.050348] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[ 0.050349] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[ 0.050353] mce: CPU supports 10 MCE banks
[ 0.050362] mce: [Hardware Error]: Machine check events logged
[ 0.050365] mce: [Hardware Error]: Machine check events logged
[ 0.050373] CPU0: Thermal monitoring enabled (TM1)
[ 0.050394] process: using mwait in idle threads
[ 0.050397] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8
[ 0.050398] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4
[ 0.051295] Freeing SMP alternatives memory: 32K (ffffffffa54f1000 - ffffffffa54f9000)
[ 0.062039] ftrace: allocating 33407 entries in 131 pages
[ 0.077191] smpboot: APIC(0) Converting physical 0 to logical package 0
[ 0.077192] smpboot: Max logical packages: 2
[ 0.077198] DMAR: Host address width 39
[ 0.077199] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[ 0.077203] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
[ 0.077204] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[ 0.077209] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[ 0.077210] DMAR: RMRR base: 0x0000006ed68000 end: 0x0000006ed87fff
[ 0.077210] DMAR: RMRR base: 0x0000007a000000 end: 0x0000007c7fffff
[ 0.077211] DMAR: ANDD device: 1 name: \_SB.PCI0.I2C0
[ 0.077212] DMAR: ANDD device: 2 name: \_SB.PCI0.I2C1
[ 0.077213] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
[ 0.077214] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[ 0.077215] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[ 0.078645] DMAR-IR: Enabled IRQ remapping in x2apic mode
[ 0.078646] x2apic enabled
[ 0.078657] Switched APIC routing to cluster x2apic.
[ 0.082718] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.122420] TSC deadline timer enabled
[ 0.122425] smpboot: CPU0: Intel(R) Xeon(R) CPU E3-1505M v6 @ 3.00GHz (family: 0x6, model: 0x9e, stepping: 0x9)
[ 0.122428] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver.
[ 0.122461] ... version: 4
[ 0.122461] ... bit width: 48
[ 0.122462] ... generic registers: 4
[ 0.122462] ... value mask: 0000ffffffffffff
[ 0.122463] ... max period: 0000ffffffffffff
[ 0.122463] ... fixed-purpose events: 3
[ 0.122464] ... event mask: 000000070000000f
[ 0.123711] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[ 0.123778] x86: Booting SMP configuration:
[ 0.123779] .... node #0, CPUs: #1 #2 #3 #4 #5 #6 #7
[ 0.684666] x86: Booted up 1 node, 8 CPUs
[ 0.684669] smpboot: Total of 8 processors activated (48010.15 BogoMIPS)
[ 0.694014] devtmpfs: initialized
[ 0.694068] x86/mm: Memory block size: 128MB
[ 0.696691] evm: security.selinux
[ 0.696692] evm: security.SMACK64
[ 0.696693] evm: security.SMACK64EXEC
[ 0.696693] evm: security.SMACK64TRANSMUTE
[ 0.696693] evm: security.SMACK64MMAP
[ 0.696694] evm: security.ima
[ 0.696694] evm: security.capability
[ 0.696757] PM: Registering ACPI NVS region [mem 0x6056f000-0x6056ffff] (4096 bytes)
[ 0.696758] PM: Registering ACPI NVS region [mem 0x6f095000-0x6f9f9fff] (9850880 bytes)
[ 0.696918] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.696958] pinctrl core: initialized pinctrl subsystem
[ 0.697128] RTC time: 7:36:15, date: 11/08/16
[ 0.698250] NET: Registered protocol family 16
[ 0.713575] cpuidle: using governor ladder
[ 0.729587] cpuidle: using governor menu
[ 0.729589] PCCT header not found.
[ 0.729656] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[ 0.729656] ACPI: bus type PCI registered
[ 0.729657] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.729721] PCI: MMCONFIG for domain 0000 [bus 00-7f] at [mem 0xf0000000-0xf7ffffff] (base 0xf0000000)
[ 0.729723] PCI: MMCONFIG at [mem 0xf0000000-0xf7ffffff] reserved in E820
[ 0.729731] PCI: Using configuration type 1 for base access
[ 0.729737] dmi type 0xB1 record - unknown flag
[ 0.745706] HugeTLB registered 1 GB page size, pre-allocated 0 pages
[ 0.745707] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.745901] ACPI: Added _OSI(Module Device)
[ 0.745901] ACPI: Added _OSI(Processor Device)
[ 0.745902] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.745903] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.747534] ACPI: Executed 38 blocks of module-level executable AML code
[ 0.759399] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[ 0.773705] ACPI: Dynamic OEM Table Load:
[ 0.773713] ACPI: SSDT 0xFFFF9770EE755000 000693 (v02 PmRef Cpu0Ist 00003000 INTL 20160422)
[ 0.773866] ACPI: Executed 1 blocks of module-level executable AML code
[ 0.773936] ACPI: \_PR_.CPU0: _OSC native thermal LVT Acked
[ 0.774878] ACPI: Dynamic OEM Table Load:
[ 0.774885] ACPI: SSDT 0xFFFF9770EE761800 0003FF (v02 PmRef Cpu0Cst 00003001 INTL 20160422)
[ 0.775021] ACPI: Executed 1 blocks of module-level executable AML code
[ 0.775419] ACPI: Dynamic OEM Table Load:
[ 0.775425] ACPI: SSDT 0xFFFF9770EE750800 00065C (v02 PmRef ApIst 00003000 INTL 20160422)
[ 0.775763] ACPI: Executed 1 blocks of module-level executable AML code
[ 0.775930] ACPI: Dynamic OEM Table Load:
[ 0.775935] ACPI: SSDT 0xFFFF9770EE7BB400 00018A (v02 PmRef ApCst 00003000 INTL 20160422)
[ 0.776066] ACPI: Executed 1 blocks of module-level executable AML code
[ 0.778379] ACPI : EC: EC started
[ 0.847402] ACPI: \_SB_.PCI0.LPCB.ECDV: Used as first EC
[ 0.847404] ACPI: \_SB_.PCI0.LPCB.ECDV: GPE=0x6e, EC_CMD/EC_SC=0x934, EC_DATA=0x930
[ 0.847405] ACPI: \_SB_.PCI0.LPCB.ECDV: Used as boot DSDT EC to handle transactions
[ 0.847405] ACPI: Interpreter enabled
[ 0.847452] ACPI: (supports S0 S3 S4 S5)
[ 0.847453] ACPI: Using IOAPIC for interrupt routing
[ 0.847492] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.862286] ACPI: Power Resource [PG00] (on)
[ 0.994232] ACPI: Power Resource [PG01] (on)
[ 0.994749] ACPI: Power Resource [PG02] (on)
[ 0.996636] ACPI: Power Resource [WRST] (on)
[ 0.997015] ACPI: Power Resource [WRST] (on)
[ 0.997394] ACPI: Power Resource [WRST] (on)
[ 0.997769] ACPI: Power Resource [WRST] (on)
[ 0.998154] ACPI: Power Resource [WRST] (on)
[ 0.998528] ACPI: Power Resource [WRST] (on)
[ 0.999203] ACPI: Power Resource [WRST] (on)
[ 0.999645] ACPI: Power Resource [WRST] (on)
[ 1.000023] ACPI: Power Resource [WRST] (on)
[ 1.000417] ACPI: Power Resource [WRST] (on)
[ 1.001008] ACPI: Power Resource [WRST] (on)
[ 1.001384] ACPI: Power Resource [WRST] (on)
[ 1.001760] ACPI: Power Resource [WRST] (on)
[ 1.002145] ACPI: Power Resource [WRST] (on)
[ 1.002520] ACPI: Power Resource [WRST] (on)
[ 1.002898] ACPI: Power Resource [WRST] (on)
[ 1.003273] ACPI: Power Resource [WRST] (on)
[ 1.004718] ACPI: Power Resource [WRST] (on)
[ 1.005099] ACPI: Power Resource [WRST] (on)
[ 1.005474] ACPI: Power Resource [WRST] (on)
[ 1.097849] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-7e])
[ 1.097854] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[ 1.097887] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 1.098582] PCI host bridge to bus 0000:00
[ 1.098584] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 1.098585] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 1.098586] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 1.098587] pci_bus 0000:00: root bus resource [mem 0x7c800000-0xefffffff window]
[ 1.098588] pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfe7fffff window]
[ 1.098589] pci_bus 0000:00: root bus resource [bus 00-7e]
[ 1.098596] pci 0000:00:00.0: [8086:5918] type 00 class 0x060000
[ 1.098722] pci 0000:00:01.0: [8086:1901] type 01 class 0x060400
[ 1.098760] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[ 1.098889] pci 0000:00:01.0: System wakeup disabled by ACPI
[ 1.098953] pci 0000:00:02.0: [8086:591d] type 00 class 0x030000
[ 1.098961] pci 0000:00:02.0: reg 0x10: [mem 0xeb000000-0xebffffff 64bit]
[ 1.098967] pci 0000:00:02.0: reg 0x18: [mem 0x80000000-0x8fffffff 64bit pref]
[ 1.098971] pci 0000:00:02.0: reg 0x20: [io 0xf000-0xf03f]
[ 1.099102] pci 0000:00:04.0: [8086:1903] type 00 class 0x118000
[ 1.099111] pci 0000:00:04.0: reg 0x10: [mem 0xed340000-0xed347fff 64bit]
[ 1.099320] pci 0000:00:14.0: [8086:a12f] type 00 class 0x0c0330
[ 1.099337] pci 0000:00:14.0: reg 0x10: [mem 0xed330000-0xed33ffff 64bit]
[ 1.099405] pci 0000:00:14.0: PME# supported from D3hot D3cold
[ 1.099590] pci 0000:00:14.0: System wakeup disabled by ACPI
[ 1.099626] pci 0000:00:14.2: [8086:a131] type 00 class 0x118000
[ 1.099642] pci 0000:00:14.2: reg 0x10: [mem 0xed359000-0xed359fff 64bit]
[ 1.099874] pci 0000:00:15.0: [8086:a160] type 00 class 0x118000
[ 1.100045] pci 0000:00:15.0: reg 0x10: [mem 0xed358000-0xed358fff 64bit]
[ 1.100956] pci 0000:00:15.1: [8086:a161] type 00 class 0x118000
[ 1.101164] pci 0000:00:15.1: reg 0x10: [mem 0xed357000-0xed357fff 64bit]
[ 1.101973] pci 0000:00:16.0: [8086:a13a] type 00 class 0x078000
[ 1.101991] pci 0000:00:16.0: reg 0x10: [mem 0xed356000-0xed356fff 64bit]
[ 1.102052] pci 0000:00:16.0: PME# supported from D3hot
[ 1.102194] pci 0000:00:16.3: [8086:a13d] type 00 class 0x070002
[ 1.102205] pci 0000:00:16.3: reg 0x10: [io 0xf0a0-0xf0a7]
[ 1.102210] pci 0000:00:16.3: reg 0x14: [mem 0xed355000-0xed355fff]
[ 1.102370] pci 0000:00:17.0: [8086:2822] type 00 class 0x010400
[ 1.102382] pci 0000:00:17.0: reg 0x10: [mem 0xed350000-0xed351fff]
[ 1.102389] pci 0000:00:17.0: reg 0x14: [mem 0xed354000-0xed3540ff]
[ 1.102396] pci 0000:00:17.0: reg 0x18: [io 0xf090-0xf097]
[ 1.102402] pci 0000:00:17.0: reg 0x1c: [io 0xf080-0xf083]
[ 1.102409] pci 0000:00:17.0: reg 0x20: [io 0xf060-0xf07f]
[ 1.102415] pci 0000:00:17.0: reg 0x24: [mem 0xed353000-0xed3537ff]
[ 1.102453] pci 0000:00:17.0: PME# supported from D3hot
[ 1.102605] pci 0000:00:1c.0: [8086:a111] type 01 class 0x060400
[ 1.102670] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[ 1.102794] pci 0000:00:1c.0: System wakeup disabled by ACPI
[ 1.102838] pci 0000:00:1c.2: [8086:a112] type 01 class 0x060400
[ 1.102902] pci 0000:00:1c.2: PME# supported from D0 D3hot D3cold
[ 1.103023] pci 0000:00:1c.2: System wakeup disabled by ACPI
[ 1.103067] pci 0000:00:1c.4: [8086:a114] type 01 class 0x060400
[ 1.103132] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[ 1.103253] pci 0000:00:1c.4: System wakeup disabled by ACPI
[ 1.103299] pci 0000:00:1f.0: [8086:a154] type 00 class 0x060100
[ 1.103494] pci 0000:00:1f.2: [8086:a121] type 00 class 0x058000
[ 1.103505] pci 0000:00:1f.2: reg 0x10: [mem 0xed34c000-0xed34ffff]
[ 1.103692] pci 0000:00:1f.3: [8086:a171] type 00 class 0x040300
[ 1.103714] pci 0000:00:1f.3: reg 0x10: [mem 0xed348000-0xed34bfff 64bit]
[ 1.103745] pci 0000:00:1f.3: reg 0x20: [mem 0xed320000-0xed32ffff 64bit]
[ 1.103797] pci 0000:00:1f.3: PME# supported from D3hot D3cold
[ 1.103971] pci 0000:00:1f.3: System wakeup disabled by ACPI
[ 1.104008] pci 0000:00:1f.4: [8086:a123] type 00 class 0x0c0500
[ 1.104055] pci 0000:00:1f.4: reg 0x10: [mem 0xed352000-0xed3520ff 64bit]
[ 1.104126] pci 0000:00:1f.4: reg 0x20: [io 0xf040-0xf05f]
[ 1.104331] pci 0000:00:1f.6: [8086:15e3] type 00 class 0x020000
[ 1.104352] pci 0000:00:1f.6: reg 0x10: [mem 0xed300000-0xed31ffff]
[ 1.104464] pci 0000:00:1f.6: PME# supported from D0 D3hot D3cold
[ 1.105090] pci 0000:00:1f.6: System wakeup disabled by ACPI
[ 1.105180] pci 0000:01:00.0: [10de:13b4] type 00 class 0x030200
[ 1.105199] pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff]
[ 1.105216] pci 0000:01:00.0: reg 0x14: [mem 0xc0000000-0xcfffffff 64bit pref]
[ 1.105233] pci 0000:01:00.0: reg 0x1c: [mem 0xd0000000-0xd1ffffff 64bit pref]
[ 1.105244] pci 0000:01:00.0: reg 0x24: [io 0xe000-0xe07f]
[ 1.105255] pci 0000:01:00.0: reg 0x30: [mem 0xed000000-0xed07ffff pref]
[ 1.105381] pci 0000:01:00.0: System wakeup disabled by ACPI
[ 1.114389] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 1.114391] pci 0000:00:01.0: bridge window [io 0xe000-0xefff]
[ 1.114393] pci 0000:00:01.0: bridge window [mem 0xec000000-0xed0fffff]
[ 1.114396] pci 0000:00:01.0: bridge window [mem 0xc0000000-0xd1ffffff 64bit pref]
[ 1.114778] pci 0000:02:00.0: [8086:24fd] type 00 class 0x028000
[ 1.114855] pci 0000:02:00.0: reg 0x10: [mem 0xed200000-0xed201fff 64bit]
[ 1.115307] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[ 1.115503] pci 0000:02:00.0: System wakeup disabled by ACPI
[ 1.126664] pci 0000:00:1c.0: PCI bridge to [bus 02]
[ 1.126668] pci 0000:00:1c.0: bridge window [mem 0xed200000-0xed2fffff]
[ 1.126858] pci 0000:03:00.0: [10ec:525a] type 00 class 0xff0000
[ 1.126880] pci 0000:03:00.0: reg 0x14: [mem 0xed100000-0xed100fff]
[ 1.127040] pci 0000:03:00.0: supports D1 D2
[ 1.127041] pci 0000:03:00.0: PME# supported from D1 D2 D3hot D3cold
[ 1.127128] pci 0000:03:00.0: System wakeup disabled by ACPI
[ 1.138484] pci 0000:00:1c.2: PCI bridge to [bus 03]
[ 1.138488] pci 0000:00:1c.2: bridge window [mem 0xed100000-0xed1fffff]
[ 1.138609] pci 0000:00:1c.4: PCI bridge to [bus 04-3c]
[ 1.138613] pci 0000:00:1c.4: bridge window [mem 0xd4000000-0xea0fffff]
[ 1.138617] pci 0000:00:1c.4: bridge window [mem 0x90000000-0xb1ffffff 64bit pref]
[ 1.187111] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 1.187178] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 *10 11 12 14 15)
[ 1.187225] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 1.187285] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 1.187343] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 1.187387] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 1.187456] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 1.187523] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 1.203669] ACPI: Enabled 5 GPEs in block 00 to 7F
[ 1.203764] ACPI : EC: event unblocked
[ 1.203784] ACPI: \_SB_.PCI0.LPCB.ECDV: GPE=0x6e, EC_CMD/EC_SC=0x934, EC_DATA=0x930
[ 1.203785] ACPI: \_SB_.PCI0.LPCB.ECDV: Used as boot DSDT EC to handle transactions and events
[ 1.204169] vgaarb: setting as boot device: PCI:0000:00:02.0
[ 1.204170] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[ 1.204173] vgaarb: loaded
[ 1.204173] vgaarb: bridge control possible 0000:00:02.0
[ 1.204303] SCSI subsystem initialized
[ 1.204333] libata version 3.00 loaded.
[ 1.204349] ACPI: bus type USB registered
[ 1.204361] usbcore: registered new interface driver usbfs
[ 1.204367] usbcore: registered new interface driver hub
[ 1.204383] usbcore: registered new device driver usb
[ 1.204438] Registered efivars operations
[ 1.209007] PCI: Using ACPI for IRQ routing
[ 1.218259] PCI: pci_cache_line_size set to 64 bytes
[ 1.218988] e820: reserve RAM buffer [mem 0x00058000-0x0005ffff]
[ 1.218989] e820: reserve RAM buffer [mem 0x0009f000-0x0009ffff]
[ 1.218990] e820: reserve RAM buffer [mem 0x6056f000-0x63ffffff]
[ 1.218991] e820: reserve RAM buffer [mem 0x6ec92000-0x6fffffff]
[ 1.218992] e820: reserve RAM buffer [mem 0x78600000-0x7bffffff]
[ 1.218993] e820: reserve RAM buffer [mem 0x481800000-0x483ffffff]
[ 1.219285] NetLabel: Initializing
[ 1.219285] NetLabel: domain hash size = 128
[ 1.219286] NetLabel: protocols = UNLABELED CIPSOv4
[ 1.219297] NetLabel: unlabeled traffic allowed by default
[ 1.219416] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[ 1.219420] hpet0: 8 comparators, 64-bit 24.000000 MHz counter
[ 1.221702] clocksource: Switched to clocksource hpet
[ 1.228132] VFS: Disk quotas dquot_6.6.0
[ 1.228144] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.228198] AppArmor: AppArmor Filesystem Enabled
[ 1.228230] pnp: PnP ACPI init
[ 1.235946] system 00:00: [io 0x0680-0x069f] has been reserved
[ 1.235948] system 00:00: [io 0xffff] has been reserved
[ 1.235949] system 00:00: [io 0xffff] has been reserved
[ 1.235950] system 00:00: [io 0xffff] has been reserved
[ 1.235951] system 00:00: [io 0x1800-0x18fe] has been reserved
[ 1.235952] system 00:00: [io 0x164e-0x164f] has been reserved
[ 1.235955] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 1.236055] system 00:01: [io 0x0800-0x087f] has been reserved
[ 1.236057] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 1.236077] pnp 00:02: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 1.236113] system 00:03: [io 0x1854-0x1857] has been reserved
[ 1.236115] system 00:03: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[ 1.236221] pnp 00:04: Plug and Play ACPI device, IDs PNP0303 (active)
[ 1.236458] system 00:05: [mem 0xfed10000-0xfed17fff] has been reserved
[ 1.236459] system 00:05: [mem 0xfed18000-0xfed18fff] has been reserved
[ 1.236460] system 00:05: [mem 0xfed19000-0xfed19fff] has been reserved
[ 1.236461] system 00:05: [mem 0xf0000000-0xf7ffffff] has been reserved
[ 1.236462] system 00:05: [mem 0xfed20000-0xfed3ffff] has been reserved
[ 1.236463] system 00:05: [mem 0xfed90000-0xfed93fff] could not be reserved
[ 1.236465] system 00:05: [mem 0xfed45000-0xfed8ffff] has been reserved
[ 1.236466] system 00:05: [mem 0xff000000-0xffffffff] has been reserved
[ 1.236467] system 00:05: [mem 0xfee00000-0xfeefffff] could not be reserved
[ 1.236468] system 00:05: [mem 0xeffe0000-0xefffffff] has been reserved
[ 1.236470] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 1.236511] system 00:06: [mem 0xfd000000-0xfdabffff] has been reserved
[ 1.236512] system 00:06: [mem 0xfdad0000-0xfdadffff] has been reserved
[ 1.236513] system 00:06: [mem 0xfdb00000-0xfdffffff] has been reserved
[ 1.236514] system 00:06: [mem 0xfe000000-0xfe01ffff] could not be reserved
[ 1.236515] system 00:06: [mem 0xfe036000-0xfe03bfff] has been reserved
[ 1.236516] system 00:06: [mem 0xfe03d000-0xfe3fffff] has been reserved
[ 1.236517] system 00:06: [mem 0xfe410000-0xfe7fffff] has been reserved
[ 1.236519] system 00:06: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 1.236832] system 00:07: [io 0xff00-0xfffe] has been reserved
[ 1.236834] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 1.238026] system 00:08: [mem 0xfdaf0000-0xfdafffff] has been reserved
[ 1.238027] system 00:08: [mem 0xfdae0000-0xfdaeffff] has been reserved
[ 1.238028] system 00:08: [mem 0xfdac0000-0xfdacffff] has been reserved
[ 1.238030] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 1.246927] pnp: PnP ACPI: found 9 devices
[ 1.254533] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 1.254569] pci 0000:00:1c.4: bridge window [io 0x1000-0x0fff] to [bus 04-3c] add_size 1000
[ 1.254572] pci 0000:00:1c.4: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
[ 1.254573] pci 0000:00:1c.4: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
[ 1.254576] pci 0000:00:1c.4: BAR 13: assigned [io 0x2000-0x2fff]
[ 1.254577] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 1.254579] pci 0000:00:01.0: bridge window [io 0xe000-0xefff]
[ 1.254581] pci 0000:00:01.0: bridge window [mem 0xec000000-0xed0fffff]
[ 1.254583] pci 0000:00:01.0: bridge window [mem 0xc0000000-0xd1ffffff 64bit pref]
[ 1.254587] pci 0000:00:1c.0: PCI bridge to [bus 02]
[ 1.254600] pci 0000:00:1c.0: bridge window [mem 0xed200000-0xed2fffff]
[ 1.254605] pci 0000:00:1c.2: PCI bridge to [bus 03]
[ 1.254609] pci 0000:00:1c.2: bridge window [mem 0xed100000-0xed1fffff]
[ 1.254614] pci 0000:00:1c.4: PCI bridge to [bus 04-3c]
[ 1.254617] pci 0000:00:1c.4: bridge window [io 0x2000-0x2fff]
[ 1.254620] pci 0000:00:1c.4: bridge window [mem 0xd4000000-0xea0fffff]
[ 1.254623] pci 0000:00:1c.4: bridge window [mem 0x90000000-0xb1ffffff 64bit pref]
[ 1.254628] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 1.254629] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 1.254630] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 1.254631] pci_bus 0000:00: resource 7 [mem 0x7c800000-0xefffffff window]
[ 1.254632] pci_bus 0000:00: resource 8 [mem 0xfd000000-0xfe7fffff window]
[ 1.254633] pci_bus 0000:01: resource 0 [io 0xe000-0xefff]
[ 1.254634] pci_bus 0000:01: resource 1 [mem 0xec000000-0xed0fffff]
[ 1.254635] pci_bus 0000:01: resource 2 [mem 0xc0000000-0xd1ffffff 64bit pref]
[ 1.254636] pci_bus 0000:02: resource 1 [mem 0xed200000-0xed2fffff]
[ 1.254637] pci_bus 0000:03: resource 1 [mem 0xed100000-0xed1fffff]
[ 1.254638] pci_bus 0000:04: resource 0 [io 0x2000-0x2fff]
[ 1.254638] pci_bus 0000:04: resource 1 [mem 0xd4000000-0xea0fffff]
[ 1.254639] pci_bus 0000:04: resource 2 [mem 0x90000000-0xb1ffffff 64bit pref]
[ 1.254779] NET: Registered protocol family 2
[ 1.254924] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
[ 1.255092] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[ 1.255192] TCP: Hash tables configured (established 131072 bind 65536)
[ 1.255214] UDP hash table entries: 8192 (order: 6, 262144 bytes)
[ 1.255250] UDP-Lite hash table entries: 8192 (order: 6, 262144 bytes)
[ 1.255303] NET: Registered protocol family 1
[ 1.255314] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 1.257144] PCI: CLS 0 bytes, default 64
[ 1.257180] Trying to unpack rootfs image as initramfs...
[ 1.822691] Freeing initrd memory: 35844K (ffff976cb39ee000 - ffff976cb5cef000)
[ 1.822734] DMAR: ACPI device "device:79" under DMAR at fed91000 as 00:15.0
[ 1.822737] DMAR: ACPI device "device:7a" under DMAR at fed91000 as 00:15.1
[ 1.822748] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 1.822750] software IO TLB [mem 0x5a95d000-0x5e95d000] (64MB) mapped at [ffff976cda95d000-ffff976cde95cfff]
[ 1.822858] Scanning for low memory corruption every 60 seconds
[ 1.823254] futex hash table entries: 2048 (order: 5, 131072 bytes)
[ 1.823275] audit: initializing netlink subsys (disabled)
[ 1.823285] audit: type=2000 audit(1478590575.808:1): initialized
[ 1.823610] Initialise system trusted keyrings
[ 1.823740] workingset: timestamp_bits=40 max_order=22 bucket_order=0
[ 1.825048] zbud: loaded
[ 1.825413] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.825620] fuse init (API version 7.26)
[ 1.825770] Allocating IMA blacklist keyring.
[ 1.828190] Key type asymmetric registered
[ 1.828191] Asymmetric key parser 'x509' registered
[ 1.828218] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 1.828270] io scheduler noop registered
[ 1.828271] io scheduler deadline registered (default)
[ 1.828277] io scheduler cfq registered
[ 1.829005] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 1.829008] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 1.829040] efifb: probing for efifb
[ 1.829051] efifb: framebuffer at 0x80000000, using 8128k, total 8128k
[ 1.829052] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[ 1.829052] efifb: scrolling: redraw
[ 1.829053] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 1.833083] Console: switching to colour frame buffer device 240x67
[ 1.836983] fb0: EFI VGA frame buffer device
[ 1.836989] intel_idle: MWAIT substates: 0x11142120
[ 1.836990] intel_idle: v0.4.1 model 0x9E
[ 1.837411] intel_idle: lapic_timer_reliable_states 0xffffffff
[ 1.841921] ACPI: AC Adapter [AC] (on-line)
[ 1.849938] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
[ 1.858082] ACPI: Lid Switch [LID0]
[ 1.858115] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
[ 1.858117] ACPI: Power Button [PBTN]
[ 1.858145] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2
[ 1.858146] ACPI: Sleep Button [SBTN]
[ 1.858174] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[ 1.858175] ACPI: Power Button [PWRF]
[ 1.875471] thermal LNXTHERM:00: registered as thermal_zone0
[ 1.875472] ACPI: Thermal Zone [THM] (25 C)
[ 1.875507] GHES: HEST is not enabled!
[ 1.875659] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 1.877782] serial 0000:00:16.3: enabling device (0000 -> 0003)
[ 1.898409] 0000:00:16.3: ttyS4 at I/O 0xf0a0 (irq = 19, base_baud = 115200) is a 16550A
[ 1.899242] Linux agpgart interface v0.103
[ 2.038315] random: fast init done
[ 2.189924] ACPI: Battery Slot [BAT0] (battery present)
[ 2.238033] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0xFE, rev-id 4)
[ 2.825954] tsc: Refined TSC clocksource calibration: 3000.029 MHz
[ 2.825966] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2b3e610071a, max_idle_ns: 440795299465 ns
[ 3.218371] brd: module loaded
[ 3.219689] loop: module loaded
[ 3.219840] libphy: Fixed MDIO Bus: probed
[ 3.219841] tun: Universal TUN/TAP device driver, 1.6
[ 3.219841] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 3.219879] PPP generic driver version 2.4.2
[ 3.219925] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.219926] ehci-pci: EHCI PCI platform driver
[ 3.219935] ehci-platform: EHCI generic platform driver
[ 3.219946] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 3.219947] ohci-pci: OHCI PCI platform driver
[ 3.219954] ohci-platform: OHCI generic platform driver
[ 3.219959] uhci_hcd: USB Universal Host Controller Interface driver
[ 3.220161] xhci_hcd 0000:00:14.0: xHCI Host Controller
[ 3.220166] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[ 3.221269] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x00109810
[ 3.221273] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[ 3.221274] xhci_hcd 0000:00:14.0: supports USB remote wakeup
[ 3.221366] usb usb1: default language 0x0409
[ 3.221373] usb usb1: udev 1, busnum 1, minor = 0
[ 3.221374] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.221375] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.221376] usb usb1: Product: xHCI Host Controller
[ 3.221377] usb usb1: Manufacturer: Linux 4.9.0-999-generic xhci-hcd
[ 3.221378] usb usb1: SerialNumber: 0000:00:14.0
[ 3.221466] usb usb1: usb_probe_device
[ 3.221467] usb usb1: configuration #1 chosen from 1 choice
[ 3.221474] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[ 3.221491] hub 1-0:1.0: usb_probe_interface
[ 3.221492] hub 1-0:1.0: usb_probe_interface - got id
[ 3.221494] hub 1-0:1.0: USB hub found
[ 3.221519] hub 1-0:1.0: 16 ports detected
[ 3.221520] hub 1-0:1.0: standalone hub
[ 3.221521] hub 1-0:1.0: no power switching (usb 1.0)
[ 3.221521] hub 1-0:1.0: individual port over-current protection
[ 3.221522] hub 1-0:1.0: Single TT
[ 3.221523] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
[ 3.221524] hub 1-0:1.0: power on to power good time: 20ms
[ 3.221528] hub 1-0:1.0: local power source is good
[ 3.235283] usb usb1-port6: DeviceRemovable is changed to 1 according to platform information.
[ 3.235284] usb usb1-port8: DeviceRemovable is changed to 1 according to platform information.
[ 3.235285] usb usb1-port9: DeviceRemovable is changed to 1 according to platform information.
[ 3.235285] usb usb1-port10: DeviceRemovable is changed to 1 according to platform information.
[ 3.235286] usb usb1-port11: DeviceRemovable is changed to 1 according to platform information.
[ 3.235287] hub 1-0:1.0: trying to enable port power on non-switchable hub
[ 3.235412] xhci_hcd 0000:00:14.0: xHCI Host Controller
[ 3.235414] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[ 3.235416] xhci_hcd 0000:00:14.0: supports USB remote wakeup
[ 3.235438] usb usb2: skipped 1 descriptor after endpoint
[ 3.235441] usb usb2: default language 0x0409
[ 3.235447] usb usb2: udev 1, busnum 2, minor = 128
[ 3.235448] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 3.235449] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.235450] usb usb2: Product: xHCI Host Controller
[ 3.235451] usb usb2: Manufacturer: Linux 4.9.0-999-generic xhci-hcd
[ 3.235452] usb usb2: SerialNumber: 0000:00:14.0
[ 3.235565] usb usb2: usb_probe_device
[ 3.235566] usb usb2: configuration #1 chosen from 1 choice
[ 3.235573] usb usb2: adding 2-0:1.0 (config #1, interface 0)
[ 3.235590] hub 2-0:1.0: usb_probe_interface
[ 3.235591] hub 2-0:1.0: usb_probe_interface - got id
[ 3.235592] hub 2-0:1.0: USB hub found
[ 3.235614] hub 2-0:1.0: 10 ports detected
[ 3.235615] hub 2-0:1.0: standalone hub
[ 3.235616] hub 2-0:1.0: no power switching (usb 1.0)
[ 3.235616] hub 2-0:1.0: individual port over-current protection
[ 3.235617] hub 2-0:1.0: TT requires at most 8 FS bit times (666 ns)
[ 3.235618] hub 2-0:1.0: power on to power good time: 20ms
[ 3.235622] hub 2-0:1.0: local power source is good
[ 3.236488] usb usb2-port1: peered to usb1-port1
[ 3.237350] usb usb2-port2: peered to usb1-port8
[ 3.238241] usb usb2-port3: peered to usb1-port2
[ 3.239097] usb usb2-port4: peered to usb1-port3
[ 3.239983] usb usb2-port5: peered to usb1-port4
[ 3.240836] usb: failed to peer usb2-port6 and usb1-port4 by location (usb2-port6:none) (usb1-port4:usb2-port5)
[ 3.240837] usb usb2-port6: failed to peer to usb1-port4 (-16)
[ 3.240838] usb: port power management may be unreliable
[ 3.241686] usb: failed to peer usb2-port7 and usb1-port4 by location (usb2-port7:none) (usb1-port4:usb2-port5)
[ 3.241687] usb usb2-port7: failed to peer to usb1-port4 (-16)
[ 3.242569] usb: failed to peer usb2-port8 and usb1-port4 by location (usb2-port8:none) (usb1-port4:usb2-port5)
[ 3.242570] usb usb2-port8: failed to peer to usb1-port4 (-16)
[ 3.243419] usb: failed to peer usb2-port9 and usb1-port4 by location (usb2-port9:none) (usb1-port4:usb2-port5)
[ 3.243419] usb usb2-port9: failed to peer to usb1-port4 (-16)
[ 3.244270] usb: failed to peer usb2-port10 and usb1-port4 by location (usb2-port10:none) (usb1-port4:usb2-port5)
[ 3.244271] usb usb2-port10: failed to peer to usb1-port4 (-16)
[ 3.244274] usb usb2-port2: DeviceRemovable is changed to 1 according to platform information.
[ 3.244275] hub 2-0:1.0: trying to enable port power on non-switchable hub
[ 3.244541] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
[ 3.244542] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
[ 3.245023] i8042: Warning: Keylock active
[ 3.245235] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 3.245402] mousedev: PS/2 mouse device common for all mice
[ 3.245659] rtc_cmos 00:02: RTC can wake from S4
[ 3.246261] rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
[ 3.246383] rtc_cmos 00:02: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[ 3.246388] i2c /dev entries driver
[ 3.246433] device-mapper: uevent: version 1.0.3
[ 3.246554] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[ 3.246557] intel_pstate: Intel P-state driver initializing
[ 3.246687] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[ 3.247518] intel_pstate: HWP enabled
[ 3.247925] ledtrig-cpu: registered to indicate activity on CPUs
[ 3.247927] EFI Variables Facility v0.08 2004-May-17
[ 3.253215] NET: Registered protocol family 10
[ 3.253430] NET: Registered protocol family 17
[ 3.253433] Key type dns_resolver registered
[ 3.253630] microcode: sig=0x906e9, pf=0x20, revision=0x42
[ 3.253870] microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[ 3.254238] registered taskstats version 1
[ 3.254243] Loading compiled-in X.509 certificates
[ 3.256377] Loaded X.509 cert 'Build time autogenerated kernel key: 45536368857fd519e2188e90024d8ecfe91080d7'
[ 3.256387] zswap: loaded using pool lzo/zbud
[ 3.259405] Key type big_key registered
[ 3.260931] Key type trusted registered
[ 3.262657] Key type encrypted registered
[ 3.262659] AppArmor: AppArmor sha1 policy hashing enabled
[ 3.338281] usb usb1-port6: status 0101 change 0001
[ 3.338569] usb usb1-port9: status 0101 change 0001
[ 3.338710] usb usb1-port10: status 0101 change 0001
[ 3.338860] usb usb1-port11: status 0101 change 0001
[ 3.346137] usb usb2-port2: status 0203 change 0010
[ 3.441889] hub 1-0:1.0: state 7 ports 16 chg 0e40 evt 0000
[ 3.441907] usb usb1-port6: status 0101, change 0000, 12 Mb/s
[ 3.449891] hub 2-0:1.0: state 7 ports 10 chg 0004 evt 0000
[ 3.449909] usb usb2-port2: status 0203, change 0000, 5.0 Gb/s
[ 3.561896] usb 1-6: new full-speed USB device number 2 using xhci_hcd
[ 3.581984] evm: HMAC attrs: 0x1
[ 3.583427] Magic number: 8:951:621
[ 3.583456] platform INT0E0C:00: hash matches
[ 3.583461] acpi INT0E0C:00: hash matches
[ 3.583646] rtc_cmos 00:02: setting system clock to 2016-11-08 07:36:17 UTC (1478590577)
[ 3.583876] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 3.583876] EDD information not available.
[ 3.583920] PM: Hibernation image not present or could not be loaded.
[ 3.584672] Freeing unused kernel memory: 1564K (ffffffffa536a000 - ffffffffa54f1000)
[ 3.584673] Write protecting the kernel read-only data: 14336k
[ 3.585022] Freeing unused kernel memory: 1452K (ffff976f68895000 - ffff976f68a00000)
[ 3.585333] Freeing unused kernel memory: 208K (ffff976f68dcc000 - ffff976f68e00000)
[ 3.589228] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[ 3.679510] FUJITSU Extended Socket Network Device Driver - version 1.1 - Copyright (c) 2015 FUJITSU LIMITED
[ 3.693785] hidraw: raw HID events driver (C) Jiri Kosina
[ 3.698250] rtsx_pci 0000:03:00.0: enabling device (0000 -> 0002)
[ 3.698549] rtsx_pci 0000:03:00.0: rtsx_pci_acquire_irq: pcr->msi_en = 1, pci->irq = 124
[ 3.698859] [drm] Initialized
[ 3.698948] ahci 0000:00:17.0: version 3.0
[ 3.699082] pps_core: LinuxPPS API ver. 1 registered
[ 3.699082] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 3.699131] ahci 0000:00:17.0: controller can't do SNTF, turning off CAP_SNTF
[ 3.699170] ahci 0000:00:17.0: SSS flag set, parallel bus scan disabled
[ 3.699957] PTP clock support registered
[ 3.702598] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 3.702598] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 3.709332] ahci 0000:00:17.0: AHCI 0001.0301 32 slots 2 ports 6 Gbps 0x5 impl RAID mode
[ 3.709333] ahci 0000:00:17.0: flags: 64bit ncq stag pm led clo only pio slum part ems deso sadm sds apst
[ 3.714757] usb 1-6: udev 2, busnum 1, minor = 1
[ 3.714759] usb 1-6: New USB device found, idVendor=8087, idProduct=0a2b
[ 3.714760] usb 1-6: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.714852] usb 1-6: usb_probe_device
[ 3.714853] usb 1-6: configuration #1 chosen from 1 choice
[ 3.715210] usb 1-6: adding 1-6:1.0 (config #1, interface 0)
[ 3.715244] usb 1-6: adding 1-6:1.1 (config #1, interface 1)
[ 3.715295] usb usb1-port9: status 0101, change 0000, 12 Mb/s
[ 3.722127] scsi host0: ahci
[ 3.722290] scsi host1: ahci
[ 3.722396] scsi host2: ahci
[ 3.722448] ata1: SATA max UDMA/133 abar m2048@0xed353000 port 0xed353100 irq 16
[ 3.722449] ata2: DUMMY
[ 3.722453] ata3: SATA max UDMA/133 abar m2048@0xed353000 port 0xed353200 irq 16
[ 3.722735] e1000e 0000:00:1f.6: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 3.840439] usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd
[ 3.849770] e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC clock
[ 3.850029] clocksource: Switched to clocksource tsc
[ 3.862253] usb 2-2: config 1 has an invalid interface number: 12 but max is 1
[ 3.862254] usb 2-2: config 1 has an invalid interface number: 13 but max is 1
[ 3.862254] usb 2-2: config 1 has an invalid interface number: 13 but max is 1
[ 3.862255] usb 2-2: config 1 has no interface number 0
[ 3.862256] usb 2-2: config 1 has no interface number 1
[ 3.862257] usb 2-2: skipped 1 descriptor after configuration
[ 3.862258] usb 2-2: skipped 4 descriptors after interface
[ 3.862259] usb 2-2: skipped 1 descriptor after endpoint
[ 3.862260] usb 2-2: skipped 1 descriptor after endpoint
[ 3.862260] usb 2-2: skipped 2 descriptors after endpoint
[ 3.862548] usb 2-2: default language 0x0409
[ 3.863293] usb 2-2: udev 2, busnum 2, minor = 129
[ 3.863295] usb 2-2: New USB device found, idVendor=413c, idProduct=81b6
[ 3.863295] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3.863296] usb 2-2: Product: DW5811e Snapdragon™ X7 LTE
[ 3.863297] usb 2-2: Manufacturer: Sierra Wireless, Incorporated
[ 3.863297] usb 2-2: SerialNumber: LF62214467031013
[ 3.863439] usb 2-2: usb_probe_device
[ 3.863441] usb 2-2: configuration #1 chosen from 1 choice
[ 3.864990] usb 2-2: Enable of device-initiated U1 failed.
[ 3.865492] usb 2-2: Enable of device-initiated U2 failed.
[ 3.865494] usb 2-2: adding 2-2:1.12 (config #1, interface 12)
[ 3.865571] usb 2-2: adding 2-2:1.13 (config #1, interface 13)
[ 3.936647] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) 18:db:f2:24:d2:14
[ 3.936648] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection
[ 3.936732] e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: FFFFFF-0FF
[ 3.937279] e1000e 0000:00:1f.6 enp0s31f6: renamed from eth0
[ 3.937405] [drm] Memory usable by graphics device = 4096M
[ 3.937406] checking generic (80000000 7f0000) vs hw (80000000 10000000)
[ 3.937406] fb: switching to inteldrmfb from EFI VGA
[ 3.937418] Console: switching to colour dummy device 80x25
[ 3.937488] [drm] Replacing VGA console driver
[ 3.943365] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 3.943365] [drm] Driver supports precise vblank timestamp query.
[ 3.952001] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_01.bin failed with error -2
[ 3.952002] i915 0000:00:02.0: Failed to load DMC firmware [https://01.org/linuxgraphics/intel-linux-graphics-firmwares], disabling runtime power management.
[ 3.952749] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 3.959519] [drm] GuC firmware load skipped
[ 3.977806] usb 1-9: new full-speed USB device number 3 using xhci_hcd
[ 4.037255] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 4.038020] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 4.038021] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 4.038022] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 4.038138] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[ 4.038556] ata1.00: ATA-8: LITEON CV3-8D512-11 SATA 512GB, T89110C, max UDMA/133
[ 4.038557] ata1.00: 1000215216 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[ 4.039266] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 4.039267] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 4.039268] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 4.039307] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[ 4.039538] ata1.00: configured for UDMA/133
[ 4.040844] scsi 0:0:0:0: Direct-Access ATA LITEON CV3-8D512 10C PQ: 0 ANSI: 5
[ 4.074088] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 4.074153] sd 0:0:0:0: [sda] 1000215216 512-byte logical blocks: (512 GB/477 GiB)
[ 4.074558] sd 0:0:0:0: [sda] Write Protect is off
[ 4.074559] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 4.074663] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4.077497] sda: sda1 sda2 sda3 sda4
[ 4.078201] sd 0:0:0:0: [sda] Attached SCSI disk
[ 4.119549] usb 1-9: skipped 1 descriptor after interface
[ 4.119788] usb 1-9: default language 0x0409
[ 4.120243] usb 1-9: udev 3, busnum 1, minor = 2
[ 4.120245] usb 1-9: New USB device found, idVendor=2386, idProduct=3114
[ 4.120245] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4.120258] usb 1-9: Product: Raydium Touch System
[ 4.120259] usb 1-9: Manufacturer: Raydium Corporation
[ 4.120399] usb 1-9: usb_probe_device
[ 4.120400] usb 1-9: configuration #1 chosen from 1 choice
[ 4.120972] usb 1-9: adding 1-9:1.0 (config #1, interface 0)
[ 4.121047] usb usb1-port10: status 0101, change 0000, 12 Mb/s
[ 4.233818] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 4.234634] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input5
[ 4.234758] ACPI: Video Device [PEGP] (multi-head: no rom: yes post: no)
[ 4.234785] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:0a/LNXVIDEO:01/input/input6
[ 4.234939] [drm] Initialized i915 1.6.0 20160919 for 0000:00:02.0 on minor 0
[ 4.237795] usb 1-10: new high-speed USB device number 4 using xhci_hcd
[ 4.390813] ata3: SATA link down (SStatus 4 SControl 300)
[ 4.393458] usb 1-10: skipped 1 descriptor after interface
[ 4.393460] usb 1-10: config 0 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
[ 4.393461] usb 1-10: config 0 interface 0 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64
[ 4.393462] usb 1-10: skipped 1 descriptor after interface
[ 4.393463] usb 1-10: config 0 interface 1 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
[ 4.393463] usb 1-10: config 0 interface 1 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64
[ 4.393464] usb 1-10: skipped 1 descriptor after interface
[ 4.393465] usb 1-10: config 0 interface 2 altsetting 0 bulk endpoint 0x83 has invalid maxpacket 64
[ 4.393465] usb 1-10: config 0 interface 2 altsetting 0 bulk endpoint 0x3 has invalid maxpacket 64
[ 4.393466] usb 1-10: skipped 1 descriptor after interface
[ 4.393479] usb 1-10: config 0 interface 3 altsetting 0 bulk endpoint 0x84 has invalid maxpacket 64
[ 4.393480] usb 1-10: config 0 interface 3 altsetting 0 bulk endpoint 0x4 has invalid maxpacket 64
[ 4.397527] usb 1-10: default language 0x0409
[ 4.409289] usb 1-10: udev 4, busnum 1, minor = 3
[ 4.409291] usb 1-10: New USB device found, idVendor=0a5c, idProduct=5834
[ 4.409291] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4.409292] usb 1-10: Product: 5880
[ 4.409293] usb 1-10: Manufacturer: Broadcom Corp
[ 4.409293] usb 1-10: SerialNumber: 0123456789ABCD
[ 4.409447] usb 1-10: usb_probe_device
[ 4.409448] usb 1-10: configuration #0 chosen from 1 choice
[ 4.409449] usb 1-10: config 0 descriptor??
[ 4.410128] usb 1-10: adding 1-10:0.0 (config #0, interface 0)
[ 4.417237] usb 1-10: adding 1-10:0.1 (config #0, interface 1)
[ 4.421408] usb 1-10: adding 1-10:0.2 (config #0, interface 2)
[ 4.425282] usb 1-10: adding 1-10:0.3 (config #0, interface 3)
[ 4.429303] usb usb1-port11: status 0101, change 0000, 12 Mb/s
[ 4.489758] fbcon: inteldrmfb (fb0) is primary device
[ 4.545871] usb 1-11: new high-speed USB device number 5 using xhci_hcd
[ 4.706615] usb 1-11: skipped 2 descriptors after configuration
[ 4.706616] usb 1-11: skipped 6 descriptors after interface
[ 4.706618] usb 1-11: skipped 1 descriptor after endpoint
[ 4.706618] usb 1-11: skipped 18 descriptors after interface
[ 4.706926] usb 1-11: default language 0x0409
[ 4.708178] usb 1-11: udev 5, busnum 1, minor = 4
[ 4.708179] usb 1-11: New USB device found, idVendor=0bda, idProduct=568c
[ 4.708180] usb 1-11: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[ 4.708180] usb 1-11: Product: Integrated_Webcam_HD
[ 4.708193] usb 1-11: Manufacturer: CNFGH16F301030004470
[ 4.708194] usb 1-11: SerialNumber: 200901010001
[ 4.708333] usb 1-11: usb_probe_device
[ 4.708334] usb 1-11: configuration #1 chosen from 1 choice
[ 4.709544] usb 1-11: adding 1-11:1.0 (config #1, interface 0)
[ 4.710018] usb 1-11: adding 1-11:1.1 (config #1, interface 1)
[ 4.712100] usbhid 1-9:1.0: usb_probe_interface
[ 4.712101] usbhid 1-9:1.0: usb_probe_interface - got id
[ 4.713554] usbcore: registered new interface driver usbhid
[ 4.713554] usbhid: USB HID core driver
[ 5.809439] Console: switching to colour frame buffer device 240x67
[ 5.828357] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[ 5.834151] [drm] RC6 on
[ 6.277761] raid6: sse2x1 gen() 11166 MB/s
[ 6.345766] raid6: sse2x1 xor() 7090 MB/s
[ 6.413766] raid6: sse2x2 gen() 13882 MB/s
[ 6.481766] raid6: sse2x2 xor() 9545 MB/s
[ 6.549765] raid6: sse2x4 gen() 15460 MB/s
[ 6.617766] raid6: sse2x4 xor() 10588 MB/s
[ 6.685767] raid6: avx2x1 gen() 27552 MB/s
[ 6.753767] raid6: avx2x2 gen() 31651 MB/s
[ 6.821768] raid6: avx2x4 gen() 32666 MB/s
[ 6.821768] raid6: using algorithm avx2x4 gen() 32666 MB/s
[ 6.821769] raid6: using avx2x2 recovery algorithm
[ 6.822636] xor: automatically using best checksumming function avx
[ 6.831238] Btrfs loaded, crc32c=crc32c-intel
[ 6.881554] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 6.971256] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[ 6.971364] systemd[1]: Detected architecture x86-64.
[ 6.971535] systemd[1]: Set hostname to <u-Precision>.
[ 7.027945] systemd[1]: Listening on Journal Socket.
[ 7.027973] systemd[1]: Reached target User and Group Name Lookups.
[ 7.027988] systemd[1]: Listening on udev Control Socket.
[ 7.027996] systemd[1]: Listening on fsck to fsckd communication Socket.
[ 7.028001] systemd[1]: Reached target Encrypted Volumes.
[ 7.028005] systemd[1]: Reached target Remote File Systems (Pre).
[ 7.028008] systemd[1]: Reached target Remote File Systems.
[ 7.045443] lp: driver loaded but no devices found
[ 7.048031] ppdev: user-space parallel port driver
[ 7.103273] EXT4-fs (sda3): re-mounted. Opts: errors=remount-ro
[ 7.112405] systemd-journald[361]: Received request to flush runtime journal from PID 1
[ 7.250176] wmi: Mapper loaded
[ 7.250842] random: crng init done
[ 7.268670] Bluetooth: Core ver 2.22
[ 7.268680] NET: Registered protocol family 31
[ 7.268680] Bluetooth: HCI device and connection manager initialized
[ 7.268682] Bluetooth: HCI socket layer initialized
[ 7.268684] Bluetooth: L2CAP socket layer initialized
[ 7.268687] Bluetooth: SCO socket layer initialized
[ 7.276324] Bluetooth: HCI UART driver ver 2.3
[ 7.276325] Bluetooth: HCI UART protocol H4 registered
[ 7.276326] Bluetooth: HCI UART protocol BCSP registered
[ 7.276326] Bluetooth: HCI UART protocol LL registered
[ 7.276326] Bluetooth: HCI UART protocol ATH3K registered
[ 7.276327] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 7.276349] Bluetooth: HCI UART protocol Intel registered
[ 7.276357] Bluetooth: HCI UART protocol Broadcom registered
[ 7.276358] Bluetooth: HCI UART protocol QCA registered
[ 7.276358] Bluetooth: HCI UART protocol AG6XX registered
[ 7.276358] Bluetooth: HCI UART protocol Marvell registered
[ 7.278202] intel-lpss 0000:00:15.0: enabling device (0000 -> 0002)
[ 7.278696] input: Intel HID events as /devices/platform/INT33D5:00/input/input7
[ 7.281894] idma64 idma64.0: Found Intel integrated DMA 64-bit
[ 7.302687] intel-lpss 0000:00:15.1: enabling device (0000 -> 0002)
[ 7.302903] idma64 idma64.1: Found Intel integrated DMA 64-bit
[ 7.303147] proc_thermal 0000:00:04.0: enabling device (0000 -> 0002)
[ 7.331775] Adding 33058812k swap on /dev/sda4. Priority:-1 extents:1 across:33058812k SSFS
[ 7.358381] AVX2 version of gcm_enc/dec engaged.
[ 7.358382] AES CTR mode by8 optimization enabled
[ 7.386986] intel_rapl: Found RAPL domain package
[ 7.386988] intel_rapl: Found RAPL domain core
[ 7.386990] intel_rapl: Found RAPL domain uncore
[ 7.386992] intel_rapl: Found RAPL domain dram
[ 7.405195] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
[ 7.411319] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 7.411457] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 7.448017] dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.2)
[ 7.454466] audit: type=1400 audit(1478590581.366:2): apparmor="STATUS" operation="profile_load" name="/usr/bin/ubuntu-core-launcher" pid=676 comm="apparmor_parser"
[ 7.455247] audit: type=1400 audit(1478590581.366:3): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient" pid=673 comm="apparmor_parser"
[ 7.455250] audit: type=1400 audit(1478590581.366:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=673 comm="apparmor_parser"
[ 7.455252] audit: type=1400 audit(1478590581.366:5): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=673 comm="apparmor_parser"
[ 7.455254] audit: type=1400 audit(1478590581.366:6): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=673 comm="apparmor_parser"
[ 7.455788] audit: type=1400 audit(1478590581.366:7): apparmor="STATUS" operation="profile_load" name="/usr/sbin/cups-browsed" pid=678 comm="apparmor_parser"
[ 7.455959] audit: type=1400 audit(1478590581.366:8): apparmor="STATUS" operation="profile_load" name="/usr/sbin/ippusbxd" pid=682 comm="apparmor_parser"
[ 7.456872] audit: type=1400 audit(1478590581.366:9): apparmor="STATUS" operation="profile_load" name="/usr/sbin/tcpdump" pid=689 comm="apparmor_parser"
[ 7.458543] audit: type=1400 audit(1478590581.370:10): apparmor="STATUS" operation="profile_load" name="/usr/lib/cups/backend/cups-pdf" pid=679 comm="apparmor_parser"
[ 7.458547] audit: type=1400 audit(1478590581.370:11): apparmor="STATUS" operation="profile_load" name="/usr/sbin/cupsd" pid=679 comm="apparmor_parser"
[ 7.458635] int3403 thermal: probe of INT3403:03 failed with error -22
[ 7.459657] Intel(R) Wireless WiFi driver for Linux
[ 7.459658] Copyright(c) 2003- 2015 Intel Corporation
[ 7.459994] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
[ 7.462592] iwlwifi 0000:02:00.0: Unsupported splx structure
[ 7.463883] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-26.ucode failed with error -2
[ 7.463895] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-25.ucode failed with error -2
[ 7.463903] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-24.ucode failed with error -2
[ 7.464072] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-23.ucode failed with error -2
[ 7.464656] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-22.ucode failed with error -2
[ 7.465058] dell_wmi: Detected Dell WMI interface version 1
[ 7.465135] input: Dell WMI hotkeys as /devices/virtual/input/input8
[ 7.479490] iwlwifi 0000:02:00.0: loaded firmware version 21.302800.0 op_mode iwlmvm
[ 7.501942] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 8265, REV=0x230
[ 7.502315] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC3246: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[ 7.502316] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 7.502317] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 7.502317] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 7.502318] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 7.502319] snd_hda_codec_realtek hdaudioC0D0: Headset Mic=0x19
[ 7.502320] snd_hda_codec_realtek hdaudioC0D0: Headphone Mic=0x1a
[ 7.502320] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x12
[ 7.504333] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[ 7.505185] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[ 7.527895] input: HDA Intel PCH Headphone Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 7.527930] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 7.527960] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input11
[ 7.527990] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input12
[ 7.531112] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 7.531113] Bluetooth: BNEP filters: protocol multicast
[ 7.531115] Bluetooth: BNEP socket layer initialized
[ 7.615191] IPv6: ADDRCONF(NETDEV_UP): enp0s31f6: link is not ready
[ 7.736088] Non-volatile memory driver v1.3
[ 7.830013] IPv6: ADDRCONF(NETDEV_UP): enp0s31f6: link is not ready
[ 7.851365] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[ 7.851676] thermal thermal_zone7: failed to read out thermal zone (-5)
[ 7.852316] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0
[ 7.887816] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[ 7.890060] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[ 7.890986] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[ 8.010368] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[ 8.010709] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[ 8.074130] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[ 8.160488] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[ 8.283276] input: DualPoint Stick as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-7/i2c-DLL07A9:01/0018:044E:120B.0002/input/input14
[ 8.283579] input: DLL07A9:01 044E:120B as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-7/i2c-DLL07A9:01/0018:044E:120B.0002/input/input13
[ 8.283917] hid-alps 0018:044E:120B.0002: input,hidraw0: I2C HID v1.00 Mouse [DLL07A9:01 044E:120B] on i2c-DLL07A9:01
[ 8.295180] usb 2-2: Disable of device-initiated U1 failed.
[ 8.295322] usb 2-2: Disable of device-initiated U2 failed.
[ 8.295813] input: Raydium Corporation Raydium Touch System as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.0/0003:2386:3114.0001/input/input15
[ 8.295920] usbhid 1-9:1.0: looking for a minor, starting at 0
[ 8.295959] hid-multitouch 0003:2386:3114.0001: input,hiddev0,hidraw1: USB HID v1.10 Device [Raydium Corporation Raydium Touch System] on usb-0000:00:14.0-9/input0
[ 8.296701] media: Linux media interface: v0.10
[ 8.301104] Linux video capture interface: v2.00
[ 8.301287] usbcore: registered new interface driver cdc_ncm
[ 8.303243] usbcore: registered new interface driver cdc_wdm
[ 8.309764] usb 1-11: usb auto-suspend, wakeup 0
[ 8.309765] usb 1-6: usb auto-suspend, wakeup 0
[ 8.321811] usb 2-2: usb auto-suspend, wakeup 0
[ 8.330004] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0040
[ 8.341857] hub 2-0:1.0: hub_suspend
[ 8.341860] usb usb2: bus auto-suspend, wakeup 1
[ 8.341888] usb usb2: usb auto-resume
[ 8.357892] hub 2-0:1.0: hub_resume
[ 8.357898] usb usb2-port2: status 0263 change 0000
[ 8.357915] hub 2-0:1.0: state 7 ports 10 chg 0000 evt 0000
[ 8.359412] hub 2-0:1.0: state 7 ports 10 chg 0000 evt 0004
[ 8.377849] usb 1-6: usb auto-resume
[ 8.377909] usb 1-11: usb auto-resume
[ 8.385847] usb 2-2: usb auto-resume
[ 8.445813] usb 1-6: Waited 0ms for CONNECT
[ 8.445814] usb 1-6: finish resume
[ 8.446051] btusb 1-6:1.0: usb_probe_interface
[ 8.446052] btusb 1-6:1.0: usb_probe_interface - got id
[ 8.446450] usbcore: registered new interface driver btusb
[ 8.447692] Bluetooth: hci0: Firmware revision 0.1 build 60 week 18 2016
[ 8.449982] usb 1-11: Waited 0ms for CONNECT
[ 8.449983] usb 1-11: finish resume
[ 8.450124] uvcvideo 1-11:1.0: usb_probe_interface
[ 8.450125] uvcvideo 1-11:1.0: usb_probe_interface - got id
[ 8.450154] uvcvideo: Found UVC 1.00 device Integrated_Webcam_HD (0bda:568c)
[ 8.450168] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0000
[ 8.451424] uvcvideo 1-11:1.0: Entity type for entity Extension 4 was not initialized!
[ 8.451425] uvcvideo 1-11:1.0: Entity type for entity Extension 7 was not initialized!
[ 8.451426] uvcvideo 1-11:1.0: Entity type for entity Processing 2 was not initialized!
[ 8.451426] uvcvideo 1-11:1.0: Entity type for entity Camera 1 was not initialized!
[ 8.451617] input: Integrated_Webcam_HD as /devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0/input/input17
[ 8.451701] usbcore: registered new interface driver uvcvideo
[ 8.451702] USB Video Class driver (1.1.1)
[ 9.853861] usb 1-10: usb auto-suspend, wakeup 0
[ 11.005803] usb 1-11: usb auto-suspend, wakeup 0
[ 11.007440] usb 1-6: usb auto-suspend, wakeup 1
[ 11.282010] usb 2-2: Waited 2000ms for CONNECT
[ 11.283248] usb usb2-port2: status 0001.02c0 after resume, -19
[ 11.283249] usb 2-2: can't resume, status -19
[ 11.283249] usb usb2-port2: logical disconnect
[ 11.283534] usb usb2-port2: status 0280, change 0000, 5.0 Gb/s
[ 11.283535] cdc_mbim 2-2:1.12: usb_probe_interface
[ 11.283536] cdc_mbim 2-2:1.12: usb_probe_interface - got id
[ 11.283536] usb 2-2: USB disconnect, device number 2
[ 11.283539] cdc_mbim: probe of 2-2:1.12 failed with error -22
[ 11.283540] usb 2-2: unregistering device
[ 11.283541] usb 2-2: unregistering interface 2-2:1.12
[ 11.283586] usbcore: registered new interface driver cdc_mbim
[ 11.283614] usb 2-2: unregistering interface 2-2:1.13
[ 11.283654] usb 2-2: usb_disable_device nuking all URBs
[ 11.284139] hub 2-0:1.0: state 7 ports 10 chg 0000 evt 0000
[ 11.284297] hub 2-0:1.0: hub_suspend
[ 11.284314] usb usb2: bus auto-suspend, wakeup 1
[ 12.136720] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0000
[ 12.141647] Bluetooth: RFCOMM TTY layer initialized
[ 12.141651] Bluetooth: RFCOMM socket layer initialized
[ 12.141655] Bluetooth: RFCOMM ver 1.11
[ 12.181812] usb 1-6: usb auto-resume
[ 12.181826] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0040
[ 12.253834] usb 1-6: Waited 0ms for CONNECT
[ 12.253835] usb 1-6: finish resume
[ 15.101880] usb 1-6: usb auto-suspend, wakeup 1
[ 26.675716] wlp2s0: authenticate with 2c:36:f8:fa:ec:00
[ 26.685522] wlp2s0: send auth to 2c:36:f8:fa:ec:00 (try 1/3)
[ 26.690233] wlp2s0: authenticated
[ 26.694008] wlp2s0: associate with 2c:36:f8:fa:ec:00 (try 1/3)
[ 26.695362] wlp2s0: RX AssocResp from 2c:36:f8:fa:ec:00 (capab=0x111 status=0 aid=7)
[ 26.707804] wlp2s0: associated
[ 26.707841] wlp2s0: Limiting TX power to 27 (30 - 3) dBm as advertised by 2c:36:f8:fa:ec:00
[ 26.707856] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[ 28.305314] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0000
[ 28.350035] usb 1-6: usb auto-resume
[ 28.350048] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0040
[ 28.418115] usb 1-6: Waited 0ms for CONNECT
[ 28.418116] usb 1-6: finish resume
[ 28.418717] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0000
[ 28.438124] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0000
[ 28.466137] usb 1-11: usb auto-resume
[ 28.466213] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0800
[ 28.538022] usb 1-11: Waited 0ms for CONNECT
[ 28.538024] usb 1-11: finish resume
[ 28.539308] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0000
[ 28.586150] usb 1-10: usb auto-resume
[ 28.586186] hub 1-0:1.0: state 7 ports 16 chg 0000 evt 0400
[ 28.654022] usb 1-10: Waited 0ms for CONNECT
[ 28.654023] usb 1-10: finish resume
[ 30.974074] usb 1-11: usb auto-suspend, wakeup 0
[ 30.974104] usb 1-10: usb auto-suspend, wakeup 0
^ permalink raw reply
* [PATCH v3] xen-netback: prefer xenbus_scanf() over xenbus_gather()
From: Jan Beulich @ 2016-11-08 7:45 UTC (permalink / raw)
To: Paul Durrant, Wei Liu; +Cc: xen-devel, netdev
For single items being collected this should be preferred as being more
typesafe (as the compiler can check format string and to-be-written-to
variable match) and more efficient (requiring one less parameter to be
passed).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v3: For consistency with other code don't consider zero an error
(utilizing that xenbus_scanf() at present won't return zero).
v2: Avoid commit message to continue from subject.
---
drivers/net/xen-netback/xenbus.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- 4.9-rc4/drivers/net/xen-netback/xenbus.c
+++ 4.9-rc4-xen-netback-prefer-xenbus_scanf/drivers/net/xen-netback/xenbus.c
@@ -889,16 +889,16 @@ static int connect_ctrl_ring(struct back
unsigned int evtchn;
int err;
- err = xenbus_gather(XBT_NIL, dev->otherend,
- "ctrl-ring-ref", "%u", &val, NULL);
- if (err)
+ err = xenbus_scanf(XBT_NIL, dev->otherend,
+ "ctrl-ring-ref", "%u", &val);
+ if (err < 0)
goto done; /* The frontend does not have a control ring */
ring_ref = val;
- err = xenbus_gather(XBT_NIL, dev->otherend,
- "event-channel-ctrl", "%u", &val, NULL);
- if (err) {
+ err = xenbus_scanf(XBT_NIL, dev->otherend,
+ "event-channel-ctrl", "%u", &val);
+ if (err < 0) {
xenbus_dev_fatal(dev, err,
"reading %s/event-channel-ctrl",
dev->otherend);
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox