[PATCH 5/5] bfa: remove more unused functions

2016-08-02 Thread Arnd Bergmann
This is a collection of additional functions that are not called anywhere in the driver, all being removed in this patch. Alternatively, we could mark them as 'static __maybe_unused', to leave the implementation around but not cause them to end up in the object code. Signed-off-by: Arn

[PATCH 2/5] bfa: remove unused variables

2016-08-02 Thread Arnd Bergmann
t but not used bfa/bfa_ioc.c: In function 'bfa_flash_fifo_flush': bfa/bfa_ioc.c:6803:6: error: variable 't' set but not used bfa/bfa_svc.c: In function 'uf_recv': bfa/bfa_svc.c:5605:17: error: variable 'fchs' set but not used This removes all those variables.

[PATCH 3/5] bfa: rename some global variables

2016-08-02 Thread Arnd Bergmann
27; prefix to ensure the identifiers are globally unique. Signed-off-by: Arnd Bergmann --- drivers/scsi/bfa/bfad.c | 20 ++-- drivers/scsi/bfa/bfad_attr.c | 2 +- drivers/scsi/bfa/bfad_drv.h | 4 ++-- drivers/scsi/bfa/bfad_im.c | 6 +++--- 4 files changed, 16 insertions(+

[PATCH 0/5] bfa: fix W=1 build warnings

2016-08-02 Thread Arnd Bergmann
si/bfa/bfa-before.o 2218512996 908 225755 371db drivers/scsi/bfa/bfa-after.o Arnd Arnd Bergmann (5): bfa: mark symbols static where possible bfa: remove unused variables bfa: rename some global variables bfa: remove unused functions from fbbuild.c bfa: remove m

[PATCH 1/5] bfa: mark symbols static where possible

2016-08-02 Thread Arnd Bergmann
driver that have a declaration but are also used only in the same file, so this patch marks them all 'static' and moves the declarations from a header file into the .c file where necessary. Signed-off-by: Arnd Bergmann --- drivers/scsi/bfa/bfa.h | 15 --- drivers/scsi/bfa/bfa

Re: [PATCH 1/5] bfa: mark symbols static where possible

2016-08-03 Thread Arnd Bergmann
On Wednesday, August 3, 2016 12:45:50 PM CEST kbuild test robot wrote: > All errors (new ones prefixed by >>): > >drivers/scsi/bfa/bfad.c: In function 'bfad_drv_uninit': > >> drivers/scsi/bfa/bfad.c:888:2: error: implicit declaration of function > >> 'bfa_isr_disable' [-Werror=implicit-functi

Re: [GIT PULL] [PATCH v4 00/26] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2016-08-23 Thread Arnd Bergmann
On Monday, August 15, 2016 6:23:12 PM CEST Greg KH wrote: > On Sat, Aug 13, 2016 at 03:48:12PM -0700, Deepa Dinamani wrote: > > The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC > > macros. > > The macros are not y2038 safe. There is no plan to transition them into > > being

Re: [PATCH] lpfc: mark symbols static where possible

2016-09-05 Thread Arnd Bergmann
ed in the file in which they are > declared and don't need a declaration, but can be made static. > so this patch marks these functions with 'static'. > > Signed-off-by: Baoyou Xie > Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "un

Re: [PATCH] [SCSI] bnx2fc: mark symbols static where possible

2016-09-05 Thread Arnd Bergmann
ious prototype for > 'bnx2fc_abts_cleanup' [-Wmissing-prototypes] > > > In fact, these functions are only used in the file in which they are > declared and don't need a declaration, but can be made static. > so this patch marks these functions with 'static

Re: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static

2016-09-05 Thread Arnd Bergmann
d in the file in which it is > declared and don't need a declaration, but can be made static. > so this patch marks this function with 'static'. > > Signed-off-by: Baoyou Xie > Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line &quo

Re: [PATCH] [SCSI] aacraid: mark aac_src_select_comm() static

2016-09-05 Thread Arnd Bergmann
d in the file in which it is > declared and don't need a declaration, but can be made static. > so this patch marks this function with 'static'. > > Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of

Re: [PATCH] [SCSI] bfa: mark symbols static where possible

2016-09-06 Thread Arnd Bergmann
On Wednesday, September 7, 2016 6:15:34 AM CEST kbuild test robot wrote: >drivers/scsi/bfa/bfad_bsg.c: In function 'bfad_iocmd_handler': > >> drivers/scsi/bfa/bfad_bsg.c:3130: warning: the frame size of 2896 bytes is > >> larger than 2048 bytes This needs to be investigated, 2896 bytes is cle

Re: [PATCH 2/2] megaraid_sas: clean function declarations in megaraid_sas_fusion.c up

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Baoyou Xie wrote: > int megasas_transition_to_ready(struct megasas_instance *instance, int ocr); > -void megaraid_sas_kill_hba(struct megasas_instance *instance); > > extern u32 megasas_dbg_lvl; > -void megasas_sriov_heartbeat_handler(unsigned long instance_addr); >

[PATCH] qedf: fix wrong le16 conversion

2017-03-20 Thread Arnd Bergmann
:26: error: large integer implicitly truncated to unsigned type [-Werror=overflow] t_st_ctx->read_write.rx_id = cpu_to_le32(FCOE_RX_ID); The correct solution appears to be to just use a 16-bit byte swap instead. Fixes: be086e7c53f1 ("qed*: Utilize Firmware 8.15.3.0") Signe

[PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-21 Thread Arnd Bergmann
t': (.text+0x156eaa): undefined reference to `nvme_fc_unregister_remoteport' We can avoid this either by forcing lpfc to be a module, or by disabling NVMe support in this case. This implements the former. Fixes: 7d7080335f8d ("scsi: lpfc: Finalize Kconfig options for nvme"

Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-22 Thread Arnd Bergmann
On Wed, Mar 22, 2017 at 3:25 AM, James Smart wrote: > > On 3/21/2017 7:23 PM, James Smart wrote: >> >> Arnd, >> >> All of the build issues, including building as modules, should have been >> resolved by the following patch: >> http://www.spinics.net/lists/linux-scsi/msg106102.html >> >> Am I missi

[PATCH] scsi: lpfc: fix building without debugfs support

2017-03-23 Thread Arnd Bergmann
routines") Fixes: bd2cdd5e400f ("scsi: lpfc: NVME Initiator: Add debugfs support") Fixes: 2b65e18202fd ("scsi: lpfc: NVME Target: Add debugfs support") Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_debugfs.h | 22 ++ drivers/scsi/lpfc/lpfc_nvm

[PATCH] scsi: advansys: fix uninitialized data access

2017-03-23 Thread Arnd Bergmann
m at least since v2.6.12, and the warning seems correct. This uses named initializers to ensure we initialize all members of the structure. Signed-off-by: Arnd Bergmann --- drivers/scsi/advansys.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/sc

[PATCH] scsi: hisi_sas: fix SATA dependency

2017-03-28 Thread Arnd Bergmann
e can express that with a more specific dependency. We cannot have 'select SCSI_SAS_LIBSAS; depends on SCSI_SAS_ATA' as that would cause a dependency loop. Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk") Signed-off-by: Arnd Bergmann --- drivers/scsi

[PATCH] scsi: osd_uld: fix mismerge

2017-04-19 Thread Arnd Bergmann
ult [-Werror=unused-result] The original fix had more complex error unrolling, but as far as I can tell, this simpler version is now sufficient. Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value") Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add he

[PATCH 1/4] scsi: pmcraid: use __iomem pointers for ioctl argument

2017-04-20 Thread Arnd Bergmann
c ("mips: sanitize __access_ok()") Cc: Alexander Viro Signed-off-by: Arnd Bergmann --- I wanted to be sure that I get all the __iomem annotations right, so I ended up fixing all other sparse warnings as well, see the three follow-up patches. --- drivers/scsi/pmcraid.c | 44

[PATCH 2/4] scsi: pmcraid: fix lock imbalance in pmcraid_reset_reload()

2017-04-20 Thread Arnd Bergmann
ut if this will happen in practice, but I could not prove that it doesn't happen, so to be on the safe side, let's backport this fix. Cc: sta...@vger.kernel.org Fixes: 89a368104150 ("[SCSI] pmcraid: PMC-Sierra MaxRAID driver to support 6Gb/s SAS RAID controller") Signed-off-by: Ar

[PATCH 3/4] scsi: pmcraid: fix endianess sparse annotations

2017-04-20 Thread Arnd Bergmann
'm changing the type here, and the 'hrrq' values that are accessed as little-endian, so I'm changing those the other way. None of these changes should have any effect on little-endian architectures like x86, but it addresses the sparse warnings. Signed-off-by: Ar

[PATCH 4/4] scsi: pmcraid: fix minor sparse warnings

2017-04-20 Thread Arnd Bergmann
esent a NULL pointer: drivers/scsi/pmcraid.c:348:29: warning: Using plain integer as NULL pointer drivers/scsi/pmcraid.c:4824:49: warning: Using plain integer as NULL pointer Signed-off-by: Arnd Bergmann --- drivers/scsi/pmcraid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --

Re: [PATCH 1/4] scsi: pmcraid: use __iomem pointers for ioctl argument

2017-04-21 Thread Arnd Bergmann
On Thu, Apr 20, 2017 at 9:24 PM, Al Viro wrote: > On Thu, Apr 20, 2017 at 07:54:45PM +0200, Arnd Bergmann wrote: >> kernelci.org reports a new compile warning for old code in the pmcraid >> driver: >> >> arch/mips/include/asm/uaccess.h:138:21: warning: passing arg

[PATCH] scsi: pmcraid: use normal copy_from_user

2017-04-21 Thread Arnd Bergmann
also addresses the warning about the access_ok() macro on MIPS, but both fixes improve the code, so ideally we apply them both. Signed-off-by: Arnd Bergmann --- drivers/scsi/pmcraid.c | 40 +++- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a

Re: [PATCH 20/22] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error

2017-05-17 Thread Arnd Bergmann
On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: > From: Xiang Chen > > For ECC 1bit error, logic can recover it, so we only print a warning. > For ECC multi-bit and AXI bus fatal error, we panic. > > Signed-off-by: John Garry > Signed-off-by: Xiang Chen This one is tricky as there are conf

Re: [PATCH 07/22] scsi: hisi_sas: add the initialisation for pci-based controller

2017-05-17 Thread Arnd Bergmann
On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: > Add the code to initialise controller which is based on pci device > in hisi_sas_pci_init.c > > The main functionality added is for probing and initialisation of > the controller based on pci device. > > The core controller routines are still i

Re: [PATCH 09/22] scsi: hisi_sas: retrieve SAS address for pci-based controller

2017-05-17 Thread Arnd Bergmann
On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: > For a pci-based controller, retrieve the SAS address from the > ACPI tables. > > The retrieval is based on the ACPI device node name. Sample is > as follows: > Scope(_SB) > { > Device(SAS0) { > Name(_HID, "HISI0163") >

Re: [PATCH 00/22] hisi_sas: hip08 support

2017-05-17 Thread Arnd Bergmann
On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: > This patchset adds support for the HiSilicon SAS controller > in the hip08 chipset. > > The key difference compared to earlier chipsets is that the > controller is an integrated PCI endpoint in hip08. > As such, the controller is a pci device (

Re: [PATCH 09/22] scsi: hisi_sas: retrieve SAS address for pci-based controller

2017-05-17 Thread Arnd Bergmann
On Wed, May 17, 2017 at 3:37 PM, John Garry wrote: > On 17/05/2017 13:37, Arnd Bergmann wrote: >> Since this uses the _DSD information that was introduced for compatibility >> between device tree and ACPI based data, why not write the code so that >> it can work for bot

Re: [PATCH 09/22] scsi: hisi_sas: retrieve SAS address for pci-based controller

2017-05-17 Thread Arnd Bergmann
On Wed, May 17, 2017 at 6:45 PM, John Garry wrote: > On 17/05/2017 15:13, Arnd Bergmann wrote: >> On Wed, May 17, 2017 at 3:37 PM, John Garry wrote: >>> On 17/05/2017 13:37, Arnd Bergmann wrote: >>> As for your suggestion, in theory it could be ok to have a >&g

[PATCH] scsi: smartpqi: mark PM functions as __maybe_unused

2017-05-18 Thread Arnd Bergmann
nused, which will let gcc drop the unused code silently. Fixes: f44d210312a6 ("scsi: smartpqi: add suspend and resume support") Signed-off-by: Arnd Bergmann --- drivers/scsi/smartpqi/smartpqi_init.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/

Re: [PATCH] scsi: smartpqi: mark PM functions as __maybe_unused

2017-05-18 Thread Arnd Bergmann
On Thu, May 18, 2017 at 10:32 AM, Arnd Bergmann wrote: > The newly added suspend/resume support causes harmless warnings > when CONFIG_PM is disabled: > > smartpqi/smartpqi_init.c:5147:12: error: 'pqi_ctrl_wait_for_pending_io' > defined but not used [-Werror=un

[PATCH] lpfc: nvmet_fc: fix format string

2017-05-19 Thread Arnd Bergmann
. Fixes: 19b58d9473e8 ("nvmet_fc: add req_release to lldd api") Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index f94294b77b7b..

Re: [PATCH] lpfc: nvmet_fc: fix format string

2017-05-20 Thread Arnd Bergmann
On Sat, May 20, 2017 at 12:28 PM, Joe Perches wrote: > On Fri, 2017-05-19 at 10:04 +0200, Arnd Bergmann wrote: >> The lpfc_nvmeio_data() tracing helper always takes a format string and >> three additional arguments. > > No it doesn't. It takes a format and arguments.

Re: [PATCH] scsi: smartpqi: mark PM functions as __maybe_unused

2017-05-22 Thread Arnd Bergmann
On Fri, May 19, 2017 at 3:53 AM, Martin K. Petersen wrote: > > Arnd, > >> I notice that today's linux-next no longer contains the patch that >> introduced the warning. > > I had tagged my 4.12 fixes branch with for-next. It should be back to > 4.13 material shortly. Ok, the patch is back now, so

Re: [PATCH v2 02/22] scsi: hisi_sas: optimise the usage of hisi_hba.lock

2017-05-26 Thread Arnd Bergmann
On Fri, May 26, 2017 at 2:23 AM, kbuild test robot wrote: > Hi Xiang, > > [auto build test ERROR on mkp-scsi/for-next] > [also build test ERROR on v4.12-rc2 next-20170525] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https:/

Re: [PATCH v2 07/22] scsi: hisi_sas: create hisi_sas_get_fw_info()

2017-05-29 Thread Arnd Bergmann
On Thu, May 25, 2017 at 2:04 PM, John Garry wrote: > Move the functionality to retrieve the fw info into > a dedicated device type-agnostic function, > hisi_sas_get_fw_info(). > > The reasoning is that this function will be required > for future pci-based platforms. > > - > if (device_pro

Re: [PATCH v2 07/22] scsi: hisi_sas: create hisi_sas_get_fw_info()

2017-05-29 Thread Arnd Bergmann
On Mon, May 29, 2017 at 1:18 PM, John Garry wrote: > On 29/05/2017 11:53, Arnd Bergmann wrote: >> On Thu, May 25, 2017 at 2:04 PM, John Garry wrote: > > So we only require these properties for platform device with DT firmware. > This code is same as before (apart from adding

[PATCH] [RESEND 2] scsi: esas2r: use ktime_get_real_seconds()

2018-04-20 Thread Arnd Bergmann
. This changes do_gettimeofday() to ktime_get_real_seconds(), which at least simplifies the code a bit, and avoids the deprecated interface. I'm adding a comment about the overflow to document what happens. Signed-off-by: Arnd Bergmann --- Originally submitted in November 2017, no reply. Sent

[PATCH] [v2] scsi: ips: fix firmware timestamps for 32-bit

2018-04-20 Thread Arnd Bergmann
interfaces. Signed-off-by: Arnd Bergmann --- v2: addressed review comments from Finn Thain: - rewrite changelog text - drop now-unused macros - fix incorrect century calculation --- drivers/scsi/ips.c | 78 +++--- drivers/scsi/ips.h | 11

[PATCH] scsi: scsi_transport_sas: select BLK_DEV_BSGLIB

2017-09-05 Thread Arnd Bergmann
bsglib. Fixes: 651a01364994 ("scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough") Signed-off-by: Arnd Bergmann --- drivers/scsi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index d145e0d90227..4

[PATCH] scsi: nsp32: fix logic bug in error handling

2017-09-05 Thread Arnd Bergmann
ested this or checked if the new "(phase & BUSMON_BSY) || (phase & BUSMON_SEL)" condition should indeed be treated as a fatal error. Signed-off-by: Arnd Bergmann --- drivers/scsi/nsp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/nsp

Re: [PATCH v3 1/5] scsi: ufs: add Hisilicon ufs driver code

2017-09-06 Thread Arnd Bergmann
On Tue, Aug 29, 2017 at 10:41 AM, Li Wei wrote: itel(host, UFS_ARESET, PERRSTDIS3_OFFSET); > + > + /* disable lp_reset_n */ > + ufs_sys_ctrl_set_bits(host, BIT_SYSCTRL_LP_RESET_N, RESET_CTRL_EN); > + mdelay(1); > + > + if (gpio_is_valid(host->reset_gpio)) > +

[PATCH] scsi: acornscsi: fix build error

2017-09-11 Thread Arnd Bergmann
gument type change. Fixes: 74fa80ee3fae ("scsi: acornscsi: move bus reset to host reset") Signed-off-by: Arnd Bergmann --- drivers/scsi/arm/acornscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornsc

Re: [PATCH v5 2/5] dt-bindings: scsi: ufs: add document for hisi-ufs

2017-10-20 Thread Arnd Bergmann
On Fri, Oct 20, 2017 at 10:52 AM, Li Wei wrote: > --- /dev/null > +++ b/Documentation/devicetree/bindings/ufs/ufs-hisi.txt > @@ -0,0 +1,46 @@ > +* Hisilicon Universal Flash Storage (UFS) Host Controller > + > +UFS nodes are defined to describe on-chip UFS hardware macro. > +Each UFS Host Controlle

Re: 答复: [PATCH v5 2/5] dt-bindings: scsi: ufs: add document for hisi-ufs

2017-10-30 Thread Arnd Bergmann
On Tue, Oct 24, 2017 at 11:06 AM, liwei (CM) wrote: > what's your opinion about my explanation and revision method? > I am looking forward to your reply, thanks! Sorry for the delay, I was travelling last week. > 发件人: arndbergm...@gmail.com [mailto:arndbergm...@gmail.com] 代表 Arnd

[PATCH] block: fix CDROM dependency on BLK_DEV

2017-11-02 Thread Arnd Bergmann
eady have this and don't need a change. Fixes: 2a750166a5be ("block: Rework drivers/cdrom/Makefile") Signed-off-by: Arnd Bergmann --- drivers/ide/Kconfig | 1 + drivers/scsi/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ide/Kconfig b/drive

Re: [PATCH] block: fix CDROM dependency on BLK_DEV

2017-11-02 Thread Arnd Bergmann
On Thu, Nov 2, 2017 at 3:59 PM, Bart Van Assche wrote: > On Thu, 2017-11-02 at 12:19 +0100, Arnd Bergmann wrote: >> After the cdrom cleanup, I get randconfig warnings for some configurations: >> >> warning: (BLK_DEV_IDECD && BLK_DEV_SR) selects CDROM which has

[PATCH] scsi: hisi_sas: select CONFIG_RAS

2017-11-02 Thread Arnd Bergmann
like this, but the change fixes the link error. Fixes: dfeb5021f001 ("scsi: hisi_sas: report ECC and AXI errors in v2 hw to userspace") Signed-off-by: Arnd Bergmann --- drivers/scsi/hisi_sas/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/hisi_sas/Kconfig b/dri

Re: [PATCH] scsi: hisi_sas: select CONFIG_RAS

2017-11-03 Thread Arnd Bergmann
On Fri, Nov 3, 2017 at 11:14 AM, John Garry wrote: > + Shiju, who authored the original patch > >> index d42f29a5eb65..6ad8a6251d21 100644 >> --- a/drivers/scsi/hisi_sas/Kconfig >> +++ b/drivers/scsi/hisi_sas/Kconfig >> @@ -4,6 +4,7 @@ config SCSI_HISI_SAS >> depends on ARM64 || COMPILE_T

[PATCH] mpt3sas: fix dma_addr_t casts

2017-11-06 Thread Arnd Bergmann
ot of type casts in the process. I'm also renaming some variables to avoid confusion between physical and dma address spaces that are often distinct. Fixes: 016d5c35e278 ("scsi: mpt3sas: SGL to PRP Translation for I/Os to NVMe devices") Signed-off-by: Arnd Bergmann --- drivers/scsi/mp

[PATCH] fnic: use 64-bit timestamps

2017-11-07 Thread Arnd Bergmann
struct timespec is deprecated since it overflows in 2038 on 32-bit architectures, so we should use timespec64 consistently. I'm slightly adapting the format strings here, to make sure we print the nanoseconds with the correct number of leading zeroes. Signed-off-by: Arnd Bergmann --- dr

[PATCH] aacraid: use timespec64 instead of timeval

2017-11-07 Thread Arnd Bergmann
, and avoids relying on signed integer overflow to pass times into the second interface. The interface used in aac_send_hosttime() however is still problematic in year 2106 when 32-bit seconds overflow. Hopefully we don't have to worry about aacraid by that time. Signed-off-by: Arnd Ber

[PATCH 7/7] scsi: bfa: use 64-bit times in bfa_aen_entry_s ABI

2017-11-10 Thread Arnd Bergmann
e breakage. I'm posting it under the assumption that there are no open-source tools using the netlink interface, and that users of the binaries provided by qlogic for SLES10/11 and RHEL5/6 are not actually being used on new future systems with 32-bit x86 kernels. Signed-off-by: Arnd Bergmann -

[PATCH 3/7] scsi: bfa: improve bfa_ioc_send_enable/disable data

2017-11-10 Thread Arnd Bergmann
d the same change in commit a5af83925363 ("bna: avoid writing uninitialized data into hw registers") for the ethernet driver. That commit also changed the "disable" funtion to initialize the data we pass to the firmware properly, so I'm doing the same thing here.

[PATCH 5/7] scsi: bfa: replace bfa_get_log_time() with ktime_get_real_seconds()

2017-11-10 Thread Arnd Bergmann
the same thing as bfa_get_log_time() without that problem, so we can simply remove the former use ktime_get_real_seconds() instead. Signed-off-by: Arnd Bergmann --- drivers/scsi/bfa/bfa_svc.c | 32 ++-- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a

[PATCH 6/7] scsi: bfa: try to sanitize vendor netlink events

2017-11-10 Thread Arnd Bergmann
2106. Since the macro becomes overly complex at this point, I'm changing it to an inline function for readability. I'm not changing the 32-bit user-space ABI at this point, to keep the changes separate, I deally this would be defined using the same binary layout for all arch

[PATCH 1/7] scsi: bfa: use ktime_get_real_ts64 for firmware timestamp

2017-11-10 Thread Arnd Bergmann
leap seconds, or the y2038 overflow. This converts it to ktime_get_ts64(), which has none of those problems but is not synchronized to wall-clock time. Signed-off-by: Arnd Bergmann --- drivers/scsi/bfa/bfa_cs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scs

[PATCH 4/7] scsi: bfa: document overflow of io_profile_start_time

2017-11-10 Thread Arnd Bergmann
point at which it overflows to where we actually assign it to the bfa_fcpim_del_itn_stats_s structure, with an appropriate comment. Signed-off-by: Arnd Bergmann --- drivers/scsi/bfa/bfa_fcpim.c | 3 ++- drivers/scsi/bfa/bfa_fcpim.h | 4 ++-- drivers/scsi/bfa/bfad_bsg.c | 4 +--- 3 files changed

[PATCH 2/7] scsi: bfa: use proper time accessor for stats_reset_time

2017-11-10 Thread Arnd Bergmann
settimeofday calls and other problems. This uses the ktime_get_seconds() function instead, which does what we need here. Signed-off-by: Arnd Bergmann --- drivers/scsi/bfa/bfa_port.c | 15 +++ drivers/scsi/bfa/bfa_port.h | 2 +- drivers/scsi/bfa/bfa_svc.c | 15 --- drivers/scsi

[PATCH] scsi: esas2r: use ktime_get_real_seconds()

2017-11-10 Thread Arnd Bergmann
. This changes do_gettimeofday() to ktime_get_real_seconds(), which at least simplifies the code a bit, and avoids the deprecated interface. I'm adding a comment about the overflow to document what happens. Signed-off-by: Arnd Bergmann --- drivers/scsi/esas2r/esas2r_init.c | 5 ++--- 1 file ch

[PATCH 0/7] scsi: bfa: do_gettimeofday removal

2017-11-10 Thread Arnd Bergmann
ch in the series ("scsi: bfa: use 64-bit times in bfa_aen_entry_s ABI") is one that needs to be reviewed very carefully, and it can be skipped if the maintainers prefer to leave the 32-bit ABI unchanged, the rest are hopefully fairly straightforward. Arnd Arnd Bergmann (7):

[PATCH] scsi: ips: fix firmware timestamps for 32-bit

2017-11-10 Thread Arnd Bergmann
right format also has the advantage of greatly simplifying the time management code. Signed-off-by: Arnd Bergmann --- drivers/scsi/ips.c | 78 +++--- drivers/scsi/ips.h | 2 +- 2 files changed, 17 insertions(+), 63 deletions(-) diff --git a

[PATCH] megaraid: use ktime_get_real for firmware time

2017-11-10 Thread Arnd Bergmann
do_gettimeofday() overflows in 2038 on 32-bit architectures and is deprecated, so convert this driver to call ktime_get_real() directly. This also simplifies the calculation. Signed-off-by: Arnd Bergmann --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 +++ 1 file changed, 3 insertions

[PATCH 3/3] scsi: 3w-9xxx: rework lock timeouts

2017-11-10 Thread Arnd Bergmann
rflow time. This changes it to using monotonic time, using ktime_get() to simplify the code. Signed-off-by: Arnd Bergmann --- drivers/scsi/3w-9xxx.c | 13 ++--- drivers/scsi/3w-9xxx.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/3w-9xxx.c b/drive

[PATCH 2/3] scsi: 3ware: use 64-bit times for FW time sync

2017-11-10 Thread Arnd Bergmann
ktime_get_real_seconds(). Signed-off-by: Arnd Bergmann --- drivers/scsi/3w-9xxx.c | 8 +++- drivers/scsi/3w-sas.c | 10 -- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index cb9af3f7b653..b1c9bd9c1bfd 100644 --- a

[PATCH 1/3] scsi: 3ware: fix 32-bit time calculations

2017-11-10 Thread Arnd Bergmann
that without breaking the ABI. User space has 90 years to learn to deal with it, so it's probably ok. I'm changing it to use ktime_get_real_seconds() with a comment to document what happens when. Signed-off-by: Arnd Bergmann --- drivers/scsi/3w-9xxx.c | 5 ++--- drivers/scsi/3w-

Re: [Y2038] [PATCH 3/7] scsi: bfa: improve bfa_ioc_send_enable/disable data

2017-11-13 Thread Arnd Bergmann
On Mon, Nov 13, 2017 at 3:08 PM, Ben Hutchings wrote: > On Fri, 2017-11-10 at 16:37 +0100, Arnd Bergmann wrote: >> >> bfi_h2i_set(enable_req.mh, BFI_MC_IOC, BFI_IOC_H2I_ENABLE_REQ, >> bfa_ioc_portid(ioc)); >> enable_req.clscode

[PATCH] scsi: debug: remove jiffies_to_timespec

2017-11-27 Thread Arnd Bergmann
There is no need to go through an intermediate timespec to convert to ktime_t when we just want a simple multiplication. This gets rid of one of the few users of jiffies_to_timespec, which I hope to remove as part of the y2038 cleanup. Signed-off-by: Arnd Bergmann --- drivers/scsi/scsi_debug.c

Re: News UBSAN warnings in aacraid

2017-11-27 Thread Arnd Bergmann
On Mon, Nov 27, 2017 at 8:17 PM, Meelis Roos wrote: > Tried 4.15-rc1 on an old 32-bit HP Netserver with aacraid card. Compared > to 4.14, there are new UBSAN warnings with timer related backtraces, so > the timespec64 change seems suspicious: > [ 12.228155] UBSAN: Undefined behaviour in > driv

[PATCH] scsi: aacraid: address UBSAN warning regression

2017-11-28 Thread Arnd Bergmann
though. Fixes: 820f18865912 ("scsi: aacraid: use timespec64 instead of timeval") Tested-by: Meelis Roos Signed-off-by: Arnd Bergmann --- drivers/scsi/aacraid/commsup.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scs

Re: News UBSAN warnings in aacraid

2017-11-28 Thread Arnd Bergmann
On Tue, Nov 28, 2017 at 2:05 PM, Meelis Roos wrote: >> I think this chunk would solve the problem and result in the >> same behavior as before: >> >> --- a/drivers/scsi/aacraid/commsup.c >> +++ b/drivers/scsi/aacraid/commsup.c >> @@ -2511,8 +2511,8 @@ int aac_command_thread(void *data) >>

[PATCH] scsi: bfa: convert to strlcpy/strlcat

2017-12-04 Thread Arnd Bergmann
or=stringop-truncation] drivers/scsi/bfa/bfa_fcbuild.c:1253:25: note: length computed here drivers/scsi/bfa/bfa_fcbuild.c: In function 'fc_rsnn_nn_build': drivers/scsi/bfa/bfa_fcbuild.c:1275:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as

[PATCH] scsi: bfa: fix type conversion warning

2017-12-06 Thread Arnd Bergmann
rather unusual way of using the private data only as a pointer to the previously allocated structure. I did not try to get rid of the extra indirection level entirely, which would have been rather invasive and required reworking the entire initialization sequence. Fixes: 45349821ab3a ("

<    1   2   3   4   5