[PATCH 1/1] ehea: Fix use after free on reboot

2008-05-14 Thread Brian King
.kernel_restart+0x20/0x6c [c0002ec6fc90] c0078674 .sys_reboot+0x1d4/0x290 [c0002ec6fe30] c00086ac syscall_exit+0x0/0x40 --- Exception: c01 (System Call) at 0ff63a40 SP (ffceea50) is in userspace Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-b

[PATCH 1/1] ibmvscsi: Non SCSI error status fixup

2008-05-19 Thread Brian King
Some versions of the Virtual I/O Server on Power return 0x99 in the non-SCSI error status field as success, rather than 0. This fixes the ibmvscsi driver to treat this response as success. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/scsi/ibmvscsi/ibmv

Re: [PATCH 1/1] ibmvscsi: Non SCSI error status fixup

2008-05-20 Thread Brian King
Michael Ellerman wrote: > On Mon, 2008-05-19 at 10:56 -0500, Dave Boutcher wrote: >> On Mon, 19 May 2008 10:27:56 -0500, Brian King <[EMAIL PROTECTED]> said: >>> Some versions of the Virtual I/O Server on Power >>> return 0x99 in the non-SCSI error status field as

Re: [PATCH 10/19] [repost] powerpc: move get_longbusy_msecs out of ehca/ehea

2008-06-13 Thread Brian King
) { > + case H_LONG_BUSY_ORDER_1_MSEC: > + return 1; > + case H_LONG_BUSY_ORDER_10_MSEC: > + return 10; > + case H_LONG_BUSY_ORDER_100_MSEC: > + return 100; > + case H_LONG_BUSY_ORDER_1_SEC: > + return 1000; > + case H_L

Re: [PATCH 18/19] ibmvscsi: driver enablement for CMO

2008-06-13 Thread Brian King
HIS_MODULE, > Index: b/drivers/scsi/ibmvscsi/ibmvscsi.h > === > --- a/drivers/scsi/ibmvscsi/ibmvscsi.h > +++ b/drivers/scsi/ibmvscsi/ibmvscsi.h > @@ -45,6 +45,8 @@ struct Scsi_Host; > #define MAX_INDIRECT_BUFS 10 > > #define IBMVSCSI_MAX_REQUESTS_DEFAULT 100 > +#define IBMVSCSI_CMDS_PER_LUN_DEFAULT 16 > +#define IBMVSCSI_MAX_SECTORS_DEFAULT 256 /* 32 * 8 = default max I/O 32 > pages */ > #define IBMVSCSI_MAX_CMDS_PER_LUN 64 > > /* > ___ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev -- Brian King Linux on Power Virtualization IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 03/19][v3] powerpc: Add memory entitlement capabilities to /proc/ppc64/lparcfg

2008-06-24 Thread Brian King
pool_size; > +long loan_request; Might as well be specific here and call this a signed long. Tab/spacing issue here as well. -- Brian King Linux on Power Virtualization IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 08/18 v2] powerpc: Do not probe PCI buses or eBus devices if CMO is enabled

2008-06-30 Thread Brian King
Paul Mackerras wrote: > Robert Jennings writes: > >> From: Brian King <[EMAIL PROTECTED]> >> >> The Cooperative Memory Overcommit (CMO) on System p does not currently >> support native PCI devices or eBus devices when enabled. > > Then why would we

Re: [PATCH 15/16 v3] ibmvscsi: driver enablement for CMO

2008-07-07 Thread Brian King
ULT * > + IBMVSCSI_CMDS_PER_LUN_DEFAULT); > + > + return IOMMU_PAGE_ALIGN(io_entitlement); I really think this function should just return the number of bytes and let the caller round it up to any boundary requirements it might have. -Brian

Re: [PATCH 15/16 v3] [v2] ibmvscsi: driver enablement for CMO

2008-07-10 Thread Brian King
Acked by: Brian King <[EMAIL PROTECTED]> -- Brian King Linux on Power Virtualization IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 08/16 v3] powerpc: Do not probe PCI buses or eBus devices if CMO is enabled

2008-07-14 Thread Brian King
Ben, Please drop this patch from the series. After further discussion, this patch is not required and has actually been causing problems. Thanks, Brian Robert Jennings wrote: > From: Brian King <[EMAIL PROTECTED]> > > The Cooperative Memory Overcommit (CMO) on System p doe

Re: [PATCH] powerpc: correct CMO feature flag enablement

2008-07-15 Thread Brian King
Acked by: Brian King <[EMAIL PROTECTED]> Robert Jennings wrote: > Correct string conversion for rtas value being read for CMO configuration. > A value of -1 in the string indicates that CMO is not enabled and we > had used simple_strtoul rather than simple_strtol which

[PATCH 1/1] powerpc: Fix vio_bus_probe oops on probe error

2008-08-12 Thread Brian King
x1a10 [ce13be30] c0008748 syscall_exit+0x0/0x40 Signed-off-by: Brian King <[EMAIL PROTECTED]> --- arch/powerpc/kernel/vio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN arch/powerpc/kernel/vio.c~powerpc_vio_bus_probe_error arch/powerpc/kernel/vio.c --- lin

[PATCH 1/1] powerpc: Update page in counter for CMM

2008-10-20 Thread Brian King
needs more memory allocated to it. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/lppaca.h |3 ++- arch/powerpc/kernel/paca.c|1 + arch/powerpc/mm/fault.c |8 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff -puN arch/powe

Re: [1/1] powerpc: Update page in counter for CMM

2008-10-21 Thread Brian King
ad only field from the hypervisor's perspective. They shouldn't be clearing it. > If we are worried about linux preemption, then we need to disable > it to avoid crossing cpu variables or getting to this point multiple > times. (I have not looked at the context to see if we are alrea

[PATCHv2 1/1] powerpc: Update page in counter for CMM

2008-10-21 Thread Brian King
more memory allocated to it. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/lppaca.h |3 ++- arch/powerpc/kernel/paca.c|1 + arch/powerpc/mm/fault.c |7 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff -puN arch/powe

[PATCHv3 1/1] powerpc: Update page in counter for CMM

2008-10-22 Thread Brian King
more memory allocated to it. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/lppaca.h |3 ++- arch/powerpc/kernel/paca.c|1 + arch/powerpc/mm/fault.c | 12 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff -pu

[PATCH 1/1] powerpc: Check for valid hugepage size in hugetlb_get_unmapped_area

2008-12-04 Thread Brian King
1 f8c10158 f8e10160 <7d49002e> f9010168 e92d01b0 eb4902b0 Signed-off-by: Brian King <[EMAIL PROTECTED]> --- arch/powerpc/mm/hugetlbpage.c |3 +++ 1 file changed, 3 insertions(+) diff -puN arch/powerpc/mm/hugetlbpage.c~powerpc_hugepage_mmap_check arch/powerpc/mm/hugetlbpage.c ---

Re: [PATCH 1/1] powerpc: Check for valid hugepage size in hugetlb_get_unmapped_area

2008-12-04 Thread Brian King
Paul Mackerras wrote: > Brian King writes: > >> It looks like most of the hugetlb code is doing the correct thing if >> hugepages are not supported, but the mmap code is not. If we get into >> the mmap code when hugepages are not supported, such as in an LPAR >>

Re: [PATCH 1/1] powerpc: Check for valid hugepage size in hugetlb_get_unmapped_area

2008-12-04 Thread Brian King
Paul Mackerras wrote: > Brian King writes: > >> This should go to Linus for 2.6.28 > > OK, thanks, but is it a regression from 2.6.27? Probably not. Its probably broken in 2.6.27 as well. Looking at the git history of arch/powerpc/mm/hugetlbpage.c, it hasn't changed si

[PATCH 1/2] powerpc: Disable Collaborative Memory Manager for kdump

2008-12-18 Thread Brian King
ang due to the CMM driver inflating too large. Since there really is no clean way for the CMM driver in the kdump kernel to clean this up, simply disable CMM in the kdump kernel. This fixes hangs we were seeing doing kdump with AMS. Signed-off-by: Brian King --- arch/powerpc/platforms/pseries/Kconfig

[PATCH 2/2] powerpc: Add reboot notifier to Collaborative Memory Manager

2008-12-18 Thread Brian King
er can get out of sync with respect to the number of pages currently marked "loaned". Fix this by adding a reboot notifier to the CMM driver to deflate the balloon and mark all pages as active. Signed-off-by: Brian King --- arch/powerpc/platforms/pseries/cmm.c | 29 +

Re: [PATCH] powerpc: cleanup from l64 to ll64 change: drivers/scsi

2009-01-12 Thread Brian King
Acked by: Brian King Stephen Rothwell wrote: > This is a powerpc specific driver. > > Signed-off-by: Stephen Rothwell > --- > drivers/scsi/ibmvscsi/ibmvfc.c | 14 +++--- > drivers/scsi/ibmvscsi/ibmvfc.h |6 +++--- > 2 files changed, 10 insertions(+), 10 d

Re: [PATCH] powerpc: Correct VIO bus accounting problem in CMO env.

2009-01-28 Thread Brian King
Acked by: Brian King Robert Jennings wrote: > In the VIO bus code the wrappers for dma alloc_coherent and free_coherent > calls are rounding to IOMMU_PAGE_SIZE. Taking a look at the underlying > calls, the actual mapping is promoted to PAGE_SIZE. Changing the > rounding in these t

[PATCH 1/1] powerpc: Add H_ILLAN_ATTRIBUTES

2007-07-10 Thread Brian King
Adds the H_ILLAN_ATTRIBUTES hcall Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/include/asm-powerpc/hvcall.h |1 + 1 file changed, 1 insertion(+) diff -puN include/asm-powerpc/hvcall.h~powerpc_illan_attrs include/asm-powerpc/hvcall.h --- linux-2.6/inclu

[PATCH 1/4] ibmveth: Enable TCP checksum offload

2007-07-17 Thread Brian King
yielded a ~30% increase in throughput. This feature is enabled by default on systems that support it, but can be disabled with a module option. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c | 58 linux-2.6-bjking1/d

[PATCH 2/4] ibmveth: Implement ethtool hooks to enable/disable checksum offload

2007-07-17 Thread Brian King
This patch adds the appropriate ethtool hooks to allow for enabling/disabling of hypervisor assisted checksum offload for TCP. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c | 120 +++- linux-2.6-bjking1/drive

[PATCH 3/4] ibmveth: Add ethtool TSO handlers

2007-07-17 Thread Brian King
Add handlers for get_tso and get_ufo to prevent errors being printed by ethtool. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/net/ibmveth.c~ibmveth_ethtool_g

[PATCH 4/4] ibmveth: Add ethtool driver stats hooks

2007-07-17 Thread Brian King
Add ethtool hooks to ibmveth to retrieve driver statistics. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c | 53 +++- 1 file changed, 52 insertions(+), 1 deletion(-) diff -puN drivers/net/ibm

Re: [PATCH 1/4] ibmveth: Enable TCP checksum offload

2007-07-19 Thread Brian King
Jeff Garzik wrote: > Brian King wrote: >> This patchset enables TCP checksum offload support for IPV4 >> on ibmveth. This completely eliminates the generation and checking of >> the checksum for packets that are completely virtual and never >> touch a physical network.

[PATCH 1/4] ibmveth: Enable TCP checksum offload

2007-07-19 Thread Brian King
yielded a ~30% increase in throughput. This feature is enabled by default on systems that support it, but can be disabled with a module option. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c | 53 linux-2.6-bjking1/d

[PATCH 2/4] ibmveth: Implement ethtool hooks to enable/disable checksum offload

2007-07-19 Thread Brian King
This patch adds the appropriate ethtool hooks to allow for enabling/disabling of hypervisor assisted checksum offload for TCP. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c | 120 +++- linux-2.6-bjking1/drive

[PATCH 4/4] ibmveth: Add ethtool driver stats hooks

2007-07-19 Thread Brian King
Add ethtool hooks to ibmveth to retrieve driver statistics. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c | 53 +++- 1 file changed, 52 insertions(+), 1 deletion(-) diff -puN drivers/net/ibm

[PATCH 3/4] ibmveth: Add ethtool TSO handlers

2007-07-19 Thread Brian King
Add handlers for get_tso and get_ufo to prevent errors being printed by ethtool. Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN drivers/net/ibmveth.c~ibmveth_ethtool_g

Re: [PATCH 2/4] ibmveth: Implement ethtool hooks to enable/disable checksum offload

2007-07-19 Thread Brian King
Ragner Magalhaes wrote: > ext Brian King wrote: > >> + >> +static int ibmveth_set_rx_csum(struct net_device *dev, u32 data) >> +{ >> +struct ibmveth_adapter *adapter = dev->priv; >> + > > Why do not to do > > if ((data

Re: [PATCH 2/4] ibmveth: Implement ethtool hooks to enable/disable checksum offload

2007-07-19 Thread Brian King
Ragner Magalhaes wrote: > ext Brian King wrote: >> Ragner Magalhaes wrote: >>> here also, as above ... >>>> + if (data && (dev->features & NETIF_F_IP_CSUM)) >>>> + return 0; >>>> + if (!data && !(dev->feat

[PATCH 1/1] ibmveth: Fix rx pool deactivate oops

2007-08-01 Thread Brian King
1 789c0020 1d3d00a8 7b8a1f24 3800 7c7f1b78 7d291a14 e9690128 <7c0a592a> e803 e9690120 80a90100 Signed-off-by: Brian King <[EMAIL PROTECTED]> --- linux-2.6-bjking1/drivers/net/ibmveth.c | 24 ++-- linux-2.6-bjking1/drivers/net/ibmveth.h |3 --- 2 files

Re: [PATCH 1/4] ibmvfc: simplify handling of sub-CRQ initialization

2021-02-15 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 2/4] ibmvfc: fix invalid sub-CRQ handles after hard reset

2021-02-16 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 3/4] ibmvfc: treat H_CLOSED as success during sub-CRQ registration

2021-02-16 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 4/4] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup

2021-02-16 Thread Brian King
e); > } while (rc == H_BUSY || H_IS_LONG_BUSY(rc)); Other places in the driver where we get a busy return code back we have an msleep(100). Should we be doing that here as well? Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 4/5] ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup

2021-02-25 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM

2021-02-25 Thread Brian King
channels = 0; > + > + ibmvfc_init_sub_crqs(vhost); > + > + spin_unlock(vhost->crq.q_lock); > + spin_unlock_irqrestore(vhost->host->host_lock, flags); ibmvfc_init_sub_crqs can sleep, for multiple reasons, so you can't hold a lock when you call it. There is a GFP_KERNEL allocation in it, and the patch before this one adds an msleep in an error path. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v4 2/5] ibmvfc: fix invalid sub-CRQ handles after hard reset

2021-02-26 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v4 5/5] ibmvfc: reinitialize sub-CRQs and perform channel enquiry after LPM

2021-02-26 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 1/2] ibmvfc: fix potential race in ibmvfc_wait_for_ops

2021-03-19 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 2/2] ibmvfc: make ibmvfc_wait_for_ops MQ aware

2021-03-19 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v4 5/7] powerpc/iommu: Move iommu_table cleaning routine to iommu_table_clean

2020-07-21 Thread Brian King
. > >> Since we are replacing a table for a device which is still in the >> system, we should not try messing with its DMA if it already has >> mappings so the warning should become an error preventing DDW. It is >> rather hard to trigger in practice but I could hac

[PATCH] powerpc: Enhance pmem DMA bypass handling

2021-10-21 Thread Brian King
the default window to dynamically map ibm,pmemory. In the case where we only have a single DMA window, this won't work, so if the window is not big enough to map the entire address range, we cannot direct map. Signed-off-by: Brian King --- arch/powerpc/platforms/pseries/iommu.c

Re: [PATCH] powerpc: Enhance pmem DMA bypass handling

2021-10-22 Thread Brian King
On 10/22/21 7:24 AM, Alexey Kardashevskiy wrote: > > > On 22/10/2021 04:44, Brian King wrote: >> If ibm,pmemory is installed in the system, it can appear anywhere >> in the address space. This patch enhances how we handle DMA for devices when >> ibm,pmemory is present

Re: [PATCH] powerpc: Enhance pmem DMA bypass handling

2021-10-25 Thread Brian King
On 10/23/21 7:18 AM, Alexey Kardashevskiy wrote: > > > On 23/10/2021 07:18, Brian King wrote: >> On 10/22/21 7:24 AM, Alexey Kardashevskiy wrote: >>> >>> >>> On 22/10/2021 04:44, Brian King wrote: >>>> If ibm,pmemory is installed in the sy

Re: [PATCH] powerpc: Enhance pmem DMA bypass handling

2021-10-27 Thread Brian King
On 10/26/21 12:39 AM, Alexey Kardashevskiy wrote: > > > On 10/26/21 01:40, Brian King wrote: >> On 10/23/21 7:18 AM, Alexey Kardashevskiy wrote: >>> >>> >>> On 23/10/2021 07:18, Brian King wrote: >>>> On 10/22/21 7:24 AM, Alexey Kardashevsk

Re: [PATCH net-next 01/12] ibmvnic: Ensure that subCRQ entry reads are ordered

2020-11-13 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH net-next 02/12] ibmvnic: Introduce indirect subordinate Command Response Queue buffer

2020-11-13 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 3/6] ibmvfc: add new fields for version 2 of several MADs

2020-11-17 Thread Brian King
fc_passthru_iu { > __be64 correlation; > __be64 scsi_id; > __be64 tag; > + __be64 targetWWPN; For consistency, can you make this target_wwpn? > __be64 reserved2[2]; > } __packed __aligned(8); > > -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 4/6] ibmvfc: add FC payload retrieval routines for versioned vfcFrames

2020-11-17 Thread Brian King
On 11/17/20 4:14 PM, Brian King wrote: > On 11/11/20 7:04 PM, Tyrel Datwyler wrote: >> The FC iu and response payloads are located at different offsets >> depending on the ibmvfc_cmd version. This is a result of the version 2 >> vfcFrame definition adding an extra 64bytes of

Re: [PATCH 6/6] ibmvfc: advertise client support for targetWWPN using v2 commands

2020-11-17 Thread Brian King
Everything else in this series looks OK to me. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 4/6] ibmvfc: add FC payload retrieval routines for versioned vfcFrames

2020-11-17 Thread Brian King
t;resp.capabilities) & > IBMVFC_HANDLE_VF_WWPN) Same here > + return &vfc_cmd->v2.rsp; > + else > + return &vfc_cmd->v1.rsp; > +} > + > #ifdef CONFIG_SCSI_IBMVFC_TRACE > /** > * ibmvfc_trc_start - Log a start trace entry -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 01/13] ibmvfc: add vhost fields and defaults for MQ enablement

2020-11-27 Thread Brian King
t; int scan_complete; > int logged_in; > + int mq_enabled; > + int using_channels; > + int do_enquiry; > + int client_scsi_channels; > int aborting_passthru; > int events_to_log; > #define IBMVFC_AE_LINKUP 0x0001 > -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 02/13] ibmvfc: define hcall wrapper for registering a Sub-CRQ

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 03/13] ibmvfc: add Subordinate CRQ definitions

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 04/13] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-11-27 Thread Brian King
+ > + ENTER; > + if (!vhost->scsi_scrqs.scrqs) > + return; > + > + for (i = 0; i < vhost->client_scsi_channels; i++) > + ibmvfc_deregister_scsi_channel(vhost, i); > + > + vhost->scsi_scrqs.active_queues = 0; > + kfree(vhost->scsi_scrqs.scrqs); Do you want to NULL this out after you free it do you don't keep a reference to a freed page around? > + LEAVE; > +} > + > /** > * ibmvfc_free_mem - Free memory for vhost > * @vhost: ibmvfc host struct -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 05/13] ibmvfc: add Sub-CRQ IRQ enable/disable routine

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 06/13] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-11-27 Thread Brian King
nlikely(atomic_read(&evt->free))) { > + dev_err(vhost->dev, "Received duplicate correlation_token > 0x%08llx!\n", > + crq->ioba); > + return; > + } > + > + del_timer(&evt->timer); > + list_del(&evt->queue); > + ibmvfc_trc_end(evt); > + evt->done(evt); > +} > + -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 07/13] ibmvfc: define Sub-CRQ interrupt handler routine

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 08/13] ibmvfc: map/request irq and register Sub-CRQ interrupt handler

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 09/13] ibmvfc: implement channel enquiry and setup commands

2020-11-27 Thread Brian King
l, "Channel Enquiry failed\n"); > + ibmvfc_free_event(evt); Looks like you are freeing this event twice due to the fallthrough... > + fallthrough; > + case IBMVFC_MAD_DRIVER_FAILED: > + ibmvfc_free_event(evt); > + return; > + default: > + dev_err(vhost->dev, "Invalid Channel Enquiry response: 0x%x\n", > + mad_status); > + ibmvfc_link_down(vhost, IBMVFC_LINK_DEAD); > + ibmvfc_free_event(evt); > + return; > + } > + > + ibmvfc_channel_setup(vhost); > +} > + -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 11/13] ibmvfc: set and track hw queue in ibmvfc_event struct

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 10/13] ibmvfc: advertise client support for using hardware channels

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 12/13] ibmvfc: send commands down HW Sub-CRQ when channelized

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 13/13] ibmvfc: register Sub-CRQ handles with VIOS during channel setup

2020-11-27 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-02 Thread Brian King
d_len = IBMVFC_MAX_CDB_LEN; > shost->unique_id = shost->host_no; > + shost->nr_hw_queues = IBMVFC_SCSI_HW_QUEUES; > > vhost = shost_priv(shost); > INIT_LIST_HEAD(&vhost->sent); -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 04/17] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-12-02 Thread Brian King
goto reg_failed; > + } > + > + scrq->hwq_id = index; > + scrq->vhost = vhost; > + > + LEAVE; > + return 0; > + > +reg_failed: > + dma_unmap_single(dev, scrq->msg_token, PAGE_SIZE, DMA_BIDIRECTIONAL); > +dma_map_failed: > + free_page((unsigned long)scrq->msgs); > + LEAVE; > + return rc; > +} > + -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 06/17] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-02 Thread Brian King
unlikely, could you also be in ibmvfc_reset_crq in another thread? If so, you'd have a subtle race condition here where the cur pointer could be read, then ibmvfc_reset_crq writes it to zero, then this thread writes it to a non zero value, which would then cause you to be out of sync with the VIOS as to where the cur pointer is. > + scrq->cur = 0; > + rmb(); > + } else > + crq = NULL; > + > + return crq; > +} > + -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 09/17] ibmvfc: implement channel enquiry and setup commands

2020-12-02 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 06/17] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-02 Thread Brian King
re, remove the command from the free list, and call the done function again, which could result in a double completion to the scsi layer. I think you need to grab the host lock before you check the free bit to avoid this race. > + spin_unlock_irqrestore(vhost->host->host_lock, flags); > + evt->done(evt); > +} > + -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 14/17] ibmvfc: add cancel mad initialization helper

2020-12-02 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 15/17] ibmvfc: send Cancel MAD down each hw scsi channel

2020-12-02 Thread Brian King
s down to after the check for !found_evt? > + > + found_evt = NULL; > + list_for_each_entry(evt, &vhost->sent, queue) { > + if (evt->cmnd && evt->cmnd->device == sdev && evt->hwq > == i) { > + found_evt = evt; > + break; > + } > } > - } > -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 16/17] ibmvfc: enable MQ and set reasonable defaults

2020-12-02 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 17/17] ibmvfc: provide modules parameters for MQ settings

2020-12-02 Thread Brian King
_channels = min(channels, nr_scsi_hw_queues); Don't we need to do a LIP here for this new setting to go into effect? > + spin_unlock_irqrestore(shost->host_lock, flags); > + return strlen(buf); > +} > + > static DEVICE_ATTR(partition_name, S_IRUGO, ibmvfc_show_host_partition_name, > NULL); > static DEVICE_ATTR(device_name, S_IRUGO, ibmvfc_show_host_device_name, NULL); > static DEVICE_ATTR(port_loc_code, S_IRUGO, ibmvfc_show_host_loc_code, NULL); -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-04 Thread Brian King
On 12/2/20 11:27 AM, Tyrel Datwyler wrote: > On 12/2/20 7:14 AM, Brian King wrote: >> On 12/1/20 6:53 PM, Tyrel Datwyler wrote: >>> Introduce several new vhost fields for managing MQ state of the adapter >>> as well as initial defaults for MQ enablement. >>&g

Re: [PATCH v3 04/18] ibmvfc: add alloc/dealloc routines for SCSI Sub-CRQ Channels

2020-12-04 Thread Brian King
scrqs.active_queues == 0 And you proceed with discovery. You will proceed with enquiry and channel setup. Then, I think you could end up in queuecommand doing this: evt->hwq = hwq % vhost->scsi_scrqs.active_queues; And that is a divide by zero... I wonder if it would be better in this scenario where registering the sub crqs fails, if you just did: vhost->do_enquiry = 0; vhost->mq_enabled = 0; vhost->using_channels = 0; It looks like you only try to allocate the subcrqs in probe, so if that fails, we'd never end up using mq, so just disabling in this case seems reasonable. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v3 06/18] ibmvfc: add handlers to drain and complete Sub-CRQ responses

2020-12-04 Thread Brian King
t; + crq->valid = 0; > + wmb(); > + } > + > + ibmvfc_toggle_scrq_irq(scrq, 1); > + if ((crq = ibmvfc_next_scrq(scrq)) != NULL) { > + ibmvfc_toggle_scrq_irq(scrq, 0); > + ibmvfc_handle_scrq(crq, scrq->vhost); > + crq->valid = 0; > + wmb(); > + } else > + done = 1; > + } > + spin_unlock_irqrestore(scrq->vhost->host->host_lock, flags); > +} > + > /** > * ibmvfc_init_tgt - Set the next init job step for the target > * @tgt: ibmvfc target struct > -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v3 15/18] ibmvfc: send Cancel MAD down each hw scsi channel

2020-12-04 Thread Brian King
standing cancel commands? Do you need to wait for those to complete before freeing them? > + default: > + ret = -EIO; > + goto free_events; > + }; > + } > } > > sdev_printk(KERN_INFO, sdev, "Successfully cancelled outstanding > commands\n"); > - return 0; > +free_events: > + spin_lock_irqsave(vhost->host->host_lock, flags); > + for (i = 0; i < num_hwq; i++) > + if (scrqs[i].cancel_event) > + ibmvfc_free_event(scrqs[i].cancel_event); > + spin_unlock_irqrestore(vhost->host->host_lock, flags); > + > + return ret; > } > > /** -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v3 17/18] ibmvfc: provide modules parameters for MQ settings

2020-12-04 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v3 18/18] ibmvfc: drop host lock when completing commands in CRQ

2020-12-04 Thread Brian King
_unlock_irqrestore. You'll need to rethink the locking here. You could just do a spin_unlock_irq / spin_lock_irq here and that would probably be OK, but probably isn't the best. > } > > /** > -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v4 01/21] ibmvfc: add vhost fields and defaults for MQ enablement

2021-01-12 Thread Brian King
to either be to implement our own host wide busy reference counting, which doesn't sound very good, or we need to add some API to block / scsi that allows us to dynamically change can_queue. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v4 18/21] ibmvfc: send Cancel MAD down each hw scsi channel

2021-01-12 Thread Brian King
gt; + */ > + break; > + default: > + break; I think this default break needs to be a return -EIO. > + } > + } > + } > + > + sdev_printk(KERN_INFO, sdev, "Successfully cancelled outstanding > commands\n"); > + return 0; > +} > + > +static int ibmvfc_cancel_all_sq(struct scsi_device *sdev, int type) > { > struct ibmvfc_host *vhost = shost_priv(sdev->host); > struct ibmvfc_event *evt, *found_evt; > @@ -2498,6 +2559,27 @@ static int ibmvfc_cancel_all(struct scsi_device *sdev, > int type) > return 0; > } > -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v4 01/21] ibmvfc: add vhost fields and defaults for MQ enablement

2021-01-13 Thread Brian King
On 1/12/21 6:33 PM, Tyrel Datwyler wrote: > On 1/12/21 2:54 PM, Brian King wrote: >> On 1/11/21 5:12 PM, Tyrel Datwyler wrote: >>> Introduce several new vhost fields for managing MQ state of the adapter >>> as well as initial defaults for MQ enablement. >>&g

Re: [PATCH v4 21/21] ibmvfc: provide modules parameters for MQ settings

2021-01-13 Thread Brian King
; - vhost->mq_enabled = IBMVFC_MQ; > - vhost->client_scsi_channels = IBMVFC_SCSI_CHANNELS; > + vhost->mq_enabled = mq_enabled; > + vhost->client_scsi_channels = min(nr_scsi_hw_queues, nr_scsi_channels); > vhost->using_channels = 0; > vhost->do_enquiry = 1; > > -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v4 00/21] ibmvfc: initial MQ development

2021-01-13 Thread Brian King
With the exception of the few comments I've shared, the rest of this looks good to me and you can add my: Reviewed-by: Brian King Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v4 01/21] ibmvfc: add vhost fields and defaults for MQ enablement

2021-01-14 Thread Brian King
On 1/13/21 7:27 PM, Ming Lei wrote: > On Wed, Jan 13, 2021 at 11:13:07AM -0600, Brian King wrote: >> On 1/12/21 6:33 PM, Tyrel Datwyler wrote: >>> On 1/12/21 2:54 PM, Brian King wrote: >>>> On 1/11/21 5:12 PM, Tyrel Datwyler wrote: >>>>> Introduce seve

Re: [PATCH v5 18/21] ibmvfc: send Cancel MAD down each hw scsi channel

2021-01-14 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v5 21/21] ibmvfc: provide modules parameters for MQ settings

2021-01-14 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH v5 00/21] ibmvfc: initial MQ development/enablement

2021-01-14 Thread Brian King
rately. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 2/3] ibmvscsi: redo driver work thread to use enum action states

2019-05-02 Thread Brian King
_crq_queue with the host_lock held. However, ibmvscsi_reset_crq_queue can call msleep. This had been implemented as separate reset_crq and reenable_crq fields so that it could run lockless. I'm not opposed to changing this to a single field in general, we just need to be careful where we are adding locking. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH 1/3] ibmvscsi: Wire up host_reset() in the drivers scsi_host_template

2019-05-02 Thread Brian King
+ vio_enable_interrupts(to_vio_dev(hostdata->dev)); Is it necessary to disable / enable interrupts around the call to ibmvscsi_reset_host? I don't know why we'd need to do that before calling the reset as we have other cases, like ibmvscsi_timeout where we don't bother doing this. Also, at the end of the reset we look to be already enabling interrupts. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [Intel-wired-lan] [PATCH 0/7] [RESEND] [net] intel: Use smp_rmb rather than read_barrier_depends

2017-11-16 Thread Brian King
On 11/16/2017 01:33 PM, Jesse Brandeburg wrote: > On Thu, 16 Nov 2017 09:37:48 -0600 > Brian King wrote: > >> Resending as the first attempt is not showing up in the list archive. >> >> This patch converts several network drivers to use smp_rmb >> rather than

Re: [Intel-wired-lan] [PATCH 0/7] [RESEND] [net] intel: Use smp_rmb rather than read_barrier_depends

2017-11-17 Thread Brian King
On 11/16/2017 04:57 PM, Michael Ellerman wrote: > Brian King writes: > >> On 11/16/2017 01:33 PM, Jesse Brandeburg wrote: >>> On Thu, 16 Nov 2017 09:37:48 -0600 >>> Brian King wrote: >>> >>>> Resending as the first attempt is not showing up

Re: [PATCH] ibmvscsi: add write memory barrier to CRQ processing

2016-12-08 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH] powerpc/powernv: Turn on SCSI_AACRAID in powernv_defconfig

2018-02-23 Thread Brian King
On 02/22/2018 06:16 PM, Stewart Smith wrote: > Michael Ellerman writes: >> Brian King writes: >>> On 09/03/2017 06:19 PM, Stewart Smith wrote: >>>> Michael Ellerman writes: >>>>>> 2. On a bare metal machine, if you set ipr.fast_reboot=1 on the ski

<    1   2   3   4   >