Re: [PATCH v6 7/7] scsi_io_completion convert BUGs to WARNs
On 06/23/2018 12:22 PM, Douglas Gilbert wrote: The scsi_io_completion function contains three BUG() and BUG_ON() calls. Replace them with WARN variants. Signed-off-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 19ed11abe886..252edd61a688 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1060,13 +1060,21 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) scsi_req(req->next_rq)->resid_len = scsi_in(cmd)->resid; if (scsi_end_request(req, BLK_STS_OK, blk_rq_bytes(req), blk_rq_bytes(req->next_rq))) - BUG(); + WARN_ONCE(true, + "Bidi command with remaining bytes"); return; } } /* no bidi support yet, other than in pass-through */ - BUG_ON(blk_bidi_rq(req)); + if (unlikely(blk_bidi_rq(req))) { + WARN_ONCE(true, "Only support bidi command in passthrough"); + scmd_printk(KERN_ERR, cmd, "Killing bidi command\n"); + if (scsi_end_request(req, BLK_STS_IOERR, blk_rq_bytes(req), +blk_rq_bytes(req->next_rq))) + WARN_ONCE(true, "Bidi command with remaining bytes"); + return; + } /* * Next deal with any sectors which we were able to correctly @@ -1089,7 +1097,8 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) /* Kill remainder if no retries. */ if (unlikely(blk_stat && scsi_noretry_cmd(cmd))) { if (scsi_end_request(req, blk_stat, blk_rq_bytes(req), 0)) - BUG(); + WARN_ONCE(true, + "Bytes remaining after failed, no-retry command"); return; } So what happens to these requests if not all bytes could be finished? Do we have an error recovery strategy? Changing to WARN_ON would only makes sense if we have a way of recovering the failed request, otherwise we'd have to reboot anyway, hence there wouldn't be much difference to the BUG() statement... Cheers, Hannes
Re: [PATCH V4 3/3] scsi: ufs: Add configfs support for ufs provisioning
Hi Sayali, Thank you for the patch! Yet something to improve: [auto build test ERROR on mkp-scsi/for-next] [also build test ERROR on v4.18-rc2 next-20180625] [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/Sayali-Lokhande/Add-ufs-provisioning-support-in-driver/20180626-120644 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next config: x86_64-kexec (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> ERROR: "ufshcd_configfs_init" [drivers/scsi/ufs/ufshcd-core.ko] undefined! >> ERROR: "ufshcd_configfs_exit" [drivers/scsi/ufs/ufshcd-core.ko] undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v6 6/7] scsi_io_completion hints on fastpatch
On 06/23/2018 12:22 PM, Douglas Gilbert wrote: Add likely() and unlikely() hints to conditionals on or near the fastpath. Signed-off-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- A reviewer wanted any performance improvement (or otherwise) quantified. The improvement was so small, that ftrace ignored it. Inline timing code suggests the improvement from this whole patchset is around 7 nanoseconds per invocation (tested on a Lenovo X270 (i5-7200U)). Not exactly huge. Another win might be the smaller size of scsi_io_completion() after the refactoring; this should allow more other code to fit in the instruction cache. Reviewed-by: Hannes Reinecke Cheers, Hannes
Re: [PATCH v6 5/7] scsi_io_completion_reprep helper added
On 06/23/2018 12:22 PM, Douglas Gilbert wrote: Since the action "reprep" is called from two places, rather than repeat the code, make a new scsi_io_completion helper with "reprep" as its suffix. Signed-off-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 41 ++--- 1 file changed, 18 insertions(+), 23 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes
Re: [PATCH v6 4/7] scsi_io_completion_action helper added
On 06/23/2018 12:22 PM, Douglas Gilbert wrote: Place scsi_io_completion()'s complex error processing associated with a local enumeration into a static helper function. That enumeration's values start with "ACTION_" so use the suffix "_action" in the helper function's name. Signed-off-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 329 +--- 1 file changed, 175 insertions(+), 154 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes
Re: [PATCH v6 3/7] scsi_io_completion_nz_result: function added
On 06/23/2018 12:22 PM, Douglas Gilbert wrote: Break out several intertwined paths when cmd->result is non zero and place them in the scsi_io_completion_nz_result helper function. The logic is not changed. Signed-off-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- A reviewer requested the original helper function's two return values be reduced to one: the blk_stat variable. This required a hack to differentiate the default setting of blk_stat (BLK_STS_OK) from the case when the helper assigns BLK_STS_OK as the return value. The hack was to return the otherwise unused BLK_STS_NOTSUPP value as an indication that the helper didn't change anything. That hack was judged by another reviewer to be worse that the "two return values" ugliness it was trying to address. So back to the original "two return values" solution. drivers/scsi/scsi_lib.c | 132 +++- 1 file changed, 75 insertions(+), 57 deletions(-) Still looks ugly, but then it's only a helper function. Reviewed-by: Hannes Reinecke Cheers, Hannes
Re: [PATCH v6 2/7] scsi_io_completion: rename variables
On 06/23/2018 12:22 PM, Douglas Gilbert wrote: Change and add some variable names, adjust some associated comments for clarity. Correct some misleading comments. Signed-off-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 72 ++--- 1 file changed, 39 insertions(+), 33 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes
Re: [PATCH v6 1/7] scsi_io_completion: comment on end_request return
On 06/23/2018 12:22 PM, Douglas Gilbert wrote: scsi_end_request() is called multiple times from scsi_io_completion() which branches on its bool returned value. Add comment before the static definition of scsi_end_request() about the meaning of that return. Signed-off-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 41e9ac9fc138..8ac2fa6256da 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -662,6 +662,7 @@ static void scsi_release_bidi_buffers(struct scsi_cmnd *cmd) cmd->request->next_rq->special = NULL; } +/* Returns false when no more bytes to process, true if there are more */ static bool scsi_end_request(struct request *req, blk_status_t error, unsigned int bytes, unsigned int bidi_bytes) { Reviewed-by: Hannes Reinecke Cheers, Hannes
[PATCH V4 3/3] scsi: ufs: Add configfs support for ufs provisioning
Add configfs support to provision ufs device at runtime. Usage: echo > /config/ufshcd/ufs_provision To check provisioning status: cat /config/ufshcd/ufs_provision 1 -> Success (Reboot device to check updated provisioning) Signed-off-by: Sayali Lokhande --- Documentation/ABI/testing/configfs-driver-ufs | 15 ++ drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-configfs.c | 198 ++ drivers/scsi/ufs/ufs.h| 2 + drivers/scsi/ufs/ufshcd.c | 2 + drivers/scsi/ufs/ufshcd.h | 18 +++ 6 files changed, 236 insertions(+) create mode 100644 Documentation/ABI/testing/configfs-driver-ufs create mode 100644 drivers/scsi/ufs/ufs-configfs.c diff --git a/Documentation/ABI/testing/configfs-driver-ufs b/Documentation/ABI/testing/configfs-driver-ufs new file mode 100644 index 000..f6ef38e --- /dev/null +++ b/Documentation/ABI/testing/configfs-driver-ufs @@ -0,0 +1,15 @@ +What: /config/ufshcd/ufs_provision +Date: Jun 2018 +KernelVersion: 4.14 +Description: + This file shows the status of runtime ufs provisioning. + This can be used to provision ufs device if bConfigDescrLock is 0. + Configuration buffer needs to be written in space separated format + specificied as below: + echo + + + + + + > /config/ufshcd/ufs_provision diff --git a/drivers/scsi/ufs/Makefile b/drivers/scsi/ufs/Makefile index 918f579..d438e74 100644 --- a/drivers/scsi/ufs/Makefile +++ b/drivers/scsi/ufs/Makefile @@ -5,5 +5,6 @@ obj-$(CONFIG_SCSI_UFS_DWC_TC_PLATFORM) += tc-dwc-g210-pltfrm.o ufshcd-dwc.o tc-d obj-$(CONFIG_SCSI_UFS_QCOM) += ufs-qcom.o obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o ufshcd-core-objs := ufshcd.o ufs-sysfs.o +obj-$(CONFIG_CONFIGFS_FS) += ufs-configfs.o obj-$(CONFIG_SCSI_UFSHCD_PCI) += ufshcd-pci.o obj-$(CONFIG_SCSI_UFSHCD_PLATFORM) += ufshcd-pltfrm.o diff --git a/drivers/scsi/ufs/ufs-configfs.c b/drivers/scsi/ufs/ufs-configfs.c new file mode 100644 index 000..614b017 --- /dev/null +++ b/drivers/scsi/ufs/ufs-configfs.c @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2018, Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include + +#include "ufs.h" +#include "ufshcd.h" + +struct ufs_hba *hba; + +static ssize_t ufs_provision_show(struct config_item *item, char *buf) +{ + return snprintf(buf, PAGE_SIZE, "provision_enabled = %x\n", + hba->provision_enabled); +} + +ssize_t ufshcd_desc_configfs_store(const char *buf, size_t count) +{ + struct ufs_config_descr *cfg = &hba->cfgs; + char *strbuf; + char *strbuf_copy; + int desc_buf[count]; + int *pt; + char *token; + int i, ret; + int value, commit = 0; + int num_luns = 0; + int KB_per_block = 4; + + /* reserve one byte for null termination */ + strbuf = kmalloc(count + 1, GFP_KERNEL); + if (!strbuf) + return -ENOMEM; + + strbuf_copy = strbuf; + strlcpy(strbuf, buf, count + 1); + memset(desc_buf, 0, count); + + /* Just return if bConfigDescrLock is already set */ + ret = ufshcd_query_attr(hba, UPIU_QUERY_OPCODE_READ_ATTR, + QUERY_ATTR_IDN_CONF_DESC_LOCK, 0, 0, &cfg->bConfigDescrLock); + if (ret) { + dev_err(hba->dev, "%s: Failed reading bConfigDescrLock %d, cannot re-provision device!\n", + __func__, ret); + hba->provision_enabled = 0; + goto out; + } + if (cfg->bConfigDescrLock == 1) { + dev_err(hba->dev, "%s: bConfigDescrLock already set to %u, cannot re-provision device!\n", + __func__, cfg->bConfigDescrLock); + hba->provision_enabled = 0; + goto out; + } + + for (i = 0; i < count; i++) { + token = strsep(&strbuf, " "); + if (!token && i) { + num_luns = desc_buf[i-1]; + dev_dbg(hba->dev, "%s: token %s, num_luns %d\n", + __func__, token, num_luns); + if (num_luns > 8) { + dev_err(hba->dev, "%s: Invalid num_luns %d\n", + __func__, num_luns); + hba->provi
[PATCH V4 0/3] Add ufs provisioning support in driver
This change adds a new API ufshcd_do_config_device() to write configuration descriptor with the provisioning data. Configfs support is added in driver to trigger ufs provisioning at runtime. Provisioning data is parsed from vendor specific provisioning file. This parsed data is passed as a buffer via configfs to provision ufs device. Changes since V3: 1)scsi: ufs: set the device reference clock setting Updated logic to retain default ref_clk frequency setting programmed in device in case if invalid value is passed via devicetree setting. Replaced of_property_read_u32() with device_property_read_u32(). Removed invalid checks. 2)scsi: ufs: Add ufs provisioning support Added pm_runtime_get/put_sync and scsi_block/unblock_request in runtime provisioning for stable operation. 3)scsi: ufs: Add configfs support for ufs provisioning Updated Documentation with missing buffer entries required for runtime provisioning. Used config option to support conditional compilation for configfs api's. Changes since V2: Added configfs support for ufs provisioning and removed sysfs support. Changes since V1: Added device tree entry to parse reference clock frequency instead of hardcoding 19.2 MHz, as it can vary for different vendors. Also removed setting ref_clk again during runtime provisioning as it will be already set during probe. Used get_unaligned_be*/put_unaligned_be* where applicable. Changes since RFC: Added check to avoid ufs runtime provisioning if Configuration decriptor lock attribute is set to one. Instead of parsing ref_clk frequency via device tree, used correct enum ref_clk_freq value(19.2 Mhz for proviosioning). Added config_descriptor sysfs entry to provision ufs and also updated documentation for its correct usage. Added more protection against bad data handling in sysfs code. Sayali Lokhande (2): scsi: ufs: Add ufs provisioning support scsi: ufs: Add configfs support for ufs provisioning Subhash Jadavani (1): scsi: ufs: set the device reference clock setting Documentation/ABI/testing/configfs-driver-ufs | 15 ++ .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 7 + drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-configfs.c| 198 +++ drivers/scsi/ufs/ufs.h | 39 +++ drivers/scsi/ufs/ufshcd-pltfrm.c | 2 + drivers/scsi/ufs/ufshcd.c | 272 + drivers/scsi/ufs/ufshcd.h | 22 ++ 8 files changed, 556 insertions(+) create mode 100644 Documentation/ABI/testing/configfs-driver-ufs create mode 100644 drivers/scsi/ufs/ufs-configfs.c -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
RE: [PATCH V3 0/3] Add ufs provisioning support in driver
-Original Message- From: Kyuho Choi [mailto:chlrb...@gmail.com] Sent: Monday, June 18, 2018 6:50 AM To: Sayali Lokhande Cc: subha...@codeaurora.org; c...@codeaurora.org; vivek.gau...@codeaurora.org; rna...@codeaurora.org; vinholika...@gmail.com; j...@linux.vnet.ibm.com; martin.peter...@oracle.com; asuto...@codeaurora.org; evgr...@chromium.org; rite...@codeaurora.org; linux-scsi@vger.kernel.org Subject: Re: [PATCH V3 0/3] Add ufs provisioning support in driver Hi, On 6/14/18, Sayali Lokhande wrote: > This change adds a new API ufshcd_do_config_device() to write > configuration descriptor with the provisioning data. > Configfs support is added in driver to trigger ufs provisioning at > runtime. Provisioning data is parsed from vendor specific provisioning > file. This parsed data is passed as a buffer via configfs to provision > ufs device. AFAIK, ufd device's every data are will be removed after provisioning. How this working on mobile platform?. Could you share the provisioning and downloading sequence what you expecting?. [Sayali] : Yes, after provisioning, device data will be all removed. Runtime UFS provisioning can be primarily useful during the factory or assembly line. Some devices may be required to be configured multiple times during system setup or system development as long as bConfigDescrLock is unset. Once re-provisioned, some custom/advanced tool will be required to update partitioning details inside updated provisioning scheme. I am mostly using it in very initial stage (unprovisioned device). Provisioning sequence includes: 1. Parsing provisioning data from vendor specific xml file using python script. 2. echo to configfs node. 3. Reboot device to check updated provisioning. > > Changes since V2: > Added configfs support for ufs provisioning and removed sysfs > support. > > Changes since V1: > Added device tree entry to parse reference clock frequency > instead of hardcoding 19.2 MHz, as it can vary for different > vendors. Also removed setting ref_clk again during runtime > provisioning as it will be already set during probe. > Used get_unaligned_be*/put_unaligned_be* where applicable. > > Changes since RFC: > Added check to avoid ufs runtime provisioning if > Configuration decriptor lock attribute is set to one. > Instead of parsing ref_clk frequency via device tree, used > correct enum ref_clk_freq value(19.2 Mhz for proviosioning). > Added config_descriptor sysfs entry to provision ufs and also > updated documentation for its correct usage. > Added more protection against bad data handling in sysfs code. > > > Sayali Lokhande (2): > scsi: ufs: Add ufs provisioning support > scsi: ufs: Add configfs support for ufs provisioning > > Subhash Jadavani (1): > scsi: ufs: set the device reference clock setting > > Documentation/ABI/testing/configfs-driver-ufs | 14 ++ > .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 7 + > drivers/scsi/ufs/Makefile | 1 + > drivers/scsi/ufs/ufs-configfs.c| 191 + > drivers/scsi/ufs/ufs.h | 39 > drivers/scsi/ufs/ufshcd-pltfrm.c | 24 +++ > drivers/scsi/ufs/ufshcd.c | 234 > + > drivers/scsi/ufs/ufshcd.h | 10 + > 8 files changed, 520 insertions(+) > create mode 100644 Documentation/ABI/testing/configfs-driver-ufs > create mode 100644 drivers/scsi/ufs/ufs-configfs.c > > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora > Forum, a Linux Foundation Collaborative Project > >
[PATCH] sd: Remove a superfluous assignment
Since blk_rq_bytes(req) returns req->__data_len, assigning that value to req->__data_len is superfluous. Hence remove that assignment. See also commit 5db44863b6eb ("[SCSI] sd: Implement support for WRITE SAME"). Signed-off-by: Bart Van Assche --- drivers/scsi/sd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9421d9877730..3463f21f91ee 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2028,7 +2028,6 @@ static int sd_done(struct scsi_cmnd *SCpnt) } else { sdkp->device->no_write_same = 1; sd_config_write_same(sdkp); - req->__data_len = blk_rq_bytes(req); req->rq_flags |= RQF_QUIET; } break; -- 2.17.1
[Bug 199703] HPSA blocking boot on HP smart Array P400
https://bugzilla.kernel.org/show_bug.cgi?id=199703 --- Comment #14 from Don (don.br...@microsemi.com) --- I'm wondering how you updated. If you were booted from a cciss block driver before, the disk mapping would be to a /dev/cciss/c0dX boot device. Do you use by-label, by-uuid, ...? If not and you simply updated the kernel and the kernel switched to hpsa, your disk mapping would not be changed over to /dev/sdX, it would still be to /dev/cciss/... Can you boot into rescue mode? If so, can you post your grub.cfg, /etc/fstab files? Also, do you know how to obtain ilo vsp console output? IE. In RBSU enabling VSP logging and setting the BIOS console and BAUD(115200), then updating the boot line with console=ttyS0,11500 console=tty0 Then script -c "ssh /tmp/E200boot.log from another machine? This will capture what is happening and you can post E200boot.log -- You are receiving this mail because: You are the assignee for the bug.
[Bug 199703] HPSA blocking boot on HP smart Array P400
https://bugzilla.kernel.org/show_bug.cgi?id=199703 --- Comment #13 from Roberto M. (roby_program...@fastwebnet.it) --- I mean I can't blacklist cciss, I can't blacklist a module that doens't exist anymore I can't blacklist HPSA, because from kernel 4.14 it's only driver for this boards.. (in my case E200i e P400) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 199703] HPSA blocking boot on HP smart Array P400
https://bugzilla.kernel.org/show_bug.cgi?id=199703 --- Comment #12 from Roberto M. (roby_program...@fastwebnet.it) --- Hi Don, Thank you for your answer 1) for your comment #9 you saw my last lspci output with a working kernel, I mean the original one from kernel.org 4.13.16, it boot, there is still cciss drive inside, it was removed in 4.14 kernel and above, so no lspci output from kernel > 4.13.16 because it crash at boot, I can only made a video please habe a look : https://kernelnewbies.org/Linux_4.14 https://www.systutorials.com/docs/linux/man/4-hpsa/ 2) for comment #10 and #11 I tested hpsa_allow_any, if I use it, it doesn't boot also with a working kernel, for me it means that my HP P400 card work only with cciss driver. I read P400 card use cciss (and maybe cciss use hpsa) instead e200i use hpsa, so is why I have both drivers loaded with kernel 4.13.16, but I am not sure at 100% 3) check https://access.redhat.com/solutions/874443 4) maybe is my problem I misunderstood that cciss driver was removed because it is/will been replaced by hpsa driver, it will take care also of old board working only cciss, but it not seems so, I don't get why at booting it crash so without any possibility to do anything I have to remove power https://github.com/torvalds/linux/blob/master/drivers/scsi/hpsa.c https://patchwork.kernel.org/patch/9947333/ sorry for my bad English, I think hpsa didn't be tested on older card, I am available for test some patch and so on... bye -- You are receiving this mail because: You are the assignee for the bug.
Proof Of Payment
Proof Of Payment. View your payment funds. FBI Director Christopher A. Wray Director Since August 2, 2017 - Present __ This email has been scanned by the Symantec Email Security.cloud service. (SEND)__ FBI Headquarters in Washington.output.pdf Description: Adobe PDF document
[Bug 199703] HPSA blocking boot on HP smart Array P400
https://bugzilla.kernel.org/show_bug.cgi?id=199703 --- Comment #11 from Don (don.br...@microsemi.com) --- One more thing. the hpsa_allow_any module parameter was removed by this patch: commit c8cd71f1f32a6227ecadbbbaaf3147a41292ecb5 Author: Hannes Reinecke Date: Tue Aug 15 08:58:09 2017 +0200 scsi: hpsa: Remove 'hpsa_allow_any' module option As the cciss driver has been removed there are no overlapping PCI IDs anymore, and the 'hpsa_allow_any' flag can be removed. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen And, since the cciss driver has been removed from the kernel but still show up in your lspci output shows that the cciss driver is still in your initramfs? lsinitrd | egrep "cciss|hpsa" If you remove cciss from here, your devices will change over to SCSI devices. Depending on your fstab and grub, your system may not boot. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 199703] HPSA blocking boot on HP smart Array P400
https://bugzilla.kernel.org/show_bug.cgi?id=199703 --- Comment #10 from Don (don.br...@microsemi.com) --- (In reply to Don from comment #9) > I notice this: > > 13:08.0 RAID bus controller [0104]: Hewlett-Packard Company Smart Array > E200i (SAS Controller) [103c:3238] > Subsystem: Hewlett-Packard Company Smart Array E200i [103c:3211] > Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ > Stepping- SERR+ FastB2B- DisINTx+ > Status: Cap+ 66MHz- UDF- FastB2B- ParErr+ DEVSEL=fast >TAbort- > SERR- Latency: 64 > Interrupt: pin A routed to IRQ 29 > Region 0: Memory at fde8 (64-bit, non-prefetchable) [size=512K] > Region 2: I/O ports at 5000 [size=256] > Region 3: Memory at fde7 (32-bit, non-prefetchable) [size=32K] > [virtual] Expansion ROM at fde0 [disabled] [size=16K] > Capabilities: > Kernel driver in use: cciss > Kernel modules: cciss, hpsa > > It looks like both the cciss drivere and the hpsa driver are competing for > the same controller E200i. One is a block driver, the other is a SCSI driver. > > So, we need to blacklist one of them. > > What is the format for blacklisting a driver for Ubuntu? > > rdblacklist=??? Actually, I see that the cciss driver has claimed the E200i first. So, blacklist the hpsa driver. The support for this controller was added by Hannes Reinecke some time ago and perhaps there is a bug in the init code when the device is already claimed by another driver commit 135ae6edeb51979d0998daf1357f149a7d6ebb08 Author: Hannes Reinecke Date: Tue Aug 15 08:58:04 2017 +0200 scsi: hpsa: add support for legacy boards Add support for legacy boards, ensuring to enable the driver for those boards only when 'hpsa_allow_any' is set. The attribute 'legacy_board' is set to '1' if the device is a legacy board, and '0' otherwise. Signed-off-by: Hannes Reinecke Acked-by: Don Brace Signed-off-by: Martin K. Petersen -- You are receiving this mail because: You are the assignee for the bug.
[Bug 199703] HPSA blocking boot on HP smart Array P400
https://bugzilla.kernel.org/show_bug.cgi?id=199703 Don (don.br...@microsemi.com) changed: What|Removed |Added CC||don.br...@microsemi.com --- Comment #9 from Don (don.br...@microsemi.com) --- I notice this: 13:08.0 RAID bus controller [0104]: Hewlett-Packard Company Smart Array E200i (SAS Controller) [103c:3238] Subsystem: Hewlett-Packard Company Smart Array E200i [103c:3211] Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr+ DEVSEL=fast >TAbort- SERR- Kernel driver in use: cciss Kernel modules: cciss, hpsa It looks like both the cciss drivere and the hpsa driver are competing for the same controller E200i. One is a block driver, the other is a SCSI driver. So, we need to blacklist one of them. What is the format for blacklisting a driver for Ubuntu? rdblacklist=??? -- You are receiving this mail because: You are the assignee for the bug.
Re: [PATCH-next] scsi: libsas: dynamically allocate and free ata host
On 19/06/2018 03:31, Martin K. Petersen wrote: Jason, So we have to change this embedded static ata host to a dynamically allocated ata host and initialize the ->kref member. To use ata_host_get() and ata_host_put() in libsas, we need to move the declaration of these functions to the public libata.h and export them. Took a while for all the prerequisites to materialize. I just rebased 4.19/scsi-queue to v4.18-rc1 and applied your patch. Thanks! Hi Martin, Is it possible to add this patch to the 4.18 fixes? All the best, John
Proof Of Payment
Proof Of Payment. View your payment funds. FBI Director Christopher A. Wray Director Since August 2, 2017 - Present __ This email has been scanned by the Symantec Email Security.cloud service. (SEND)__ FBI Headquarters in Washington.output.pdf Description: Adobe PDF document
Re: [PATCH] scsi: aacraid: Fix PD performance regression over incorrect qd being set
On Fri, 2018-06-22 at 06:55 -0700, Raghava Aditya Renukunta wrote: > The driver fails to set the correct queue depth for native devices, due > to failing to set the device type prior to calling > aac_set_safw_target_qd(). This results in slave configure setting the > queue depth to 1. > > This causes around 30% performance degradation. Fixed by setting the > dev type before trying to set queue depth. > > Reported-by: Steve Best > Fixes: 0bcb45fb20c2a ("scsi: aacraid: Add helper function to set queue depth") s/0bcb45fb20c2a/0bcb45fb20c21/ > cc: sta...@vger.kernel.org > Signed-off-by: Raghava Aditya Renukunta > > Reviewed-by: David Carroll > --- > drivers/scsi/aacraid/aachba.c | 15 +++ > 1 file changed, 7 insertions(+), 8 deletions(-) > > diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c > index a9831bd37a73..a57f3a7d4748 100644 > --- a/drivers/scsi/aacraid/aachba.c > +++ b/drivers/scsi/aacraid/aachba.c > @@ -1974,7 +1974,6 @@ static void aac_set_safw_attr_all_targets(struct > aac_dev *dev) > u32 lun_count, nexus; > u32 i, bus, target; > u8 expose_flag, attribs; > - u8 devtype; > > lun_count = aac_get_safw_phys_lun_count(dev); > > @@ -1992,23 +1991,23 @@ static void aac_set_safw_attr_all_targets(struct > aac_dev *dev) > continue; > > if (expose_flag != 0) { > - devtype = AAC_DEVTYPE_RAID_MEMBER; > - goto update_devtype; > + dev->hba_map[bus][target].devtype = > + AAC_DEVTYPE_RAID_MEMBER; > + continue; > } > > if (nexus != 0 && (attribs & 8)) { > - devtype = AAC_DEVTYPE_NATIVE_RAW; > + dev->hba_map[bus][target].devtype = > + AAC_DEVTYPE_NATIVE_RAW; > dev->hba_map[bus][target].rmw_nexus = > nexus; > } else > - devtype = AAC_DEVTYPE_ARC_RAW; > + dev->hba_map[bus][target].devtype = > + AAC_DEVTYPE_ARC_RAW; > > dev->hba_map[bus][target].scan_counter = dev->scan_counter; > > aac_set_safw_target_qd(dev, bus, target); > - > -update_devtype: > - dev->hba_map[bus][target].devtype = devtype; > } > } > > The "Fixes:" tag above does not look correct to me, I've put in what I see in Martin's tree. Fixes a very noticeable performance regression. Reviewed-by: Ewan D. Milne
[PATCH] qedi: Fix misleading indentation
This patch avoids that smatch reports the following warnings: drivers/scsi/qedi/qedi_fw_api.c:129: init_sqe() warn: inconsistent indenting drivers/scsi/qedi/qedi_fw_api.c:137: init_sqe() warn: inconsistent indenting Signed-off-by: Bart Van Assche Cc: qlogic-storage-upstr...@cavium.com --- drivers/scsi/qedi/qedi_fw_api.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/qedi/qedi_fw_api.c b/drivers/scsi/qedi/qedi_fw_api.c index a269da1a6c75..387dc87e4d22 100644 --- a/drivers/scsi/qedi/qedi_fw_api.c +++ b/drivers/scsi/qedi/qedi_fw_api.c @@ -126,22 +126,24 @@ static void init_sqe(struct iscsi_task_params *task_params, sgl_task_params, dif_task_params); - if (scsi_is_slow_sgl(sgl_task_params->num_sges, -sgl_task_params->small_mid_sge)) - num_sges = ISCSI_WQE_NUM_SGES_SLOWIO; - else - num_sges = min(sgl_task_params->num_sges, - (u16)SCSI_NUM_SGES_SLOW_SGL_THR); - } + if (scsi_is_slow_sgl(sgl_task_params->num_sges, +sgl_task_params->small_mid_sge)) + num_sges = ISCSI_WQE_NUM_SGES_SLOWIO; + else + num_sges = min(sgl_task_params->num_sges, + (u16)SCSI_NUM_SGES_SLOW_SGL_THR); + } - SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES, num_sges); - SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CONT_LEN, - buf_size); + SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES, + num_sges); + SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CONT_LEN, + buf_size); - if (GET_FIELD(pdu_header->hdr_second_dword, - ISCSI_CMD_HDR_TOTAL_AHS_LEN)) - SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CDB_SIZE, - cmd_params->extended_cdb_sge.sge_len); + if (GET_FIELD(pdu_header->hdr_second_dword, + ISCSI_CMD_HDR_TOTAL_AHS_LEN)) + SET_FIELD(task_params->sqe->contlen_cdbsize, + ISCSI_WQE_CDB_SIZE, + cmd_params->extended_cdb_sge.sge_len); } break; case ISCSI_TASK_TYPE_INITIATOR_READ: -- 2.17.1
Re: [PATCH] qedi: Fix static checker warning
On 06/25/18 05:32, Nilesh Javali wrote: This patch fixes the static checker warning, drivers/scsi/qedi/qedi_main.c:891 qedi_get_boot_tgt_info() error: snprintf() is printing too much 256 vs 255 Which static checker produced this warning? Signed-off-by: Nilesh Javali --- drivers/scsi/qedi/qedi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index cf274a7..85491da 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -888,8 +888,8 @@ static void qedi_get_boot_tgt_info(struct nvm_iscsi_block *block, ipv6_en = !!(block->generic.ctrl_flags & NVM_ISCSI_CFG_GEN_IPV6_ENABLED); - snprintf(tgt->iscsi_name, NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN, "%s\n", -block->target[index].target_name.byte); + sprintf(tgt->iscsi_name, "%.*s\n", NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN, + block->target[index].target_name.byte); tgt->ipv6_en = ipv6_en; Since sizeof(tgt->iscsi_name) == 255, since NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN == 256 and since sizeof(block->target[index].target_name.byte) == 256, I think you are making a potential buffer overflow worse instead of just suppressing a static checker warning. Bart.
[PATCH] qedi: Fix static checker warning
This patch fixes the static checker warning, drivers/scsi/qedi/qedi_main.c:891 qedi_get_boot_tgt_info() error: snprintf() is printing too much 256 vs 255 Signed-off-by: Nilesh Javali --- drivers/scsi/qedi/qedi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index cf274a7..85491da 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -888,8 +888,8 @@ static void qedi_get_boot_tgt_info(struct nvm_iscsi_block *block, ipv6_en = !!(block->generic.ctrl_flags & NVM_ISCSI_CFG_GEN_IPV6_ENABLED); - snprintf(tgt->iscsi_name, NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN, "%s\n", -block->target[index].target_name.byte); + sprintf(tgt->iscsi_name, "%.*s\n", NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN, + block->target[index].target_name.byte); tgt->ipv6_en = ipv6_en; -- 1.8.3.1
Re: [PATCH 6/8] mpt3sas: Fix _transport_smp_handler() error path
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Re: [PATCH 5/8] mpt3sas: Introduce struct mpt3sas_nvme_cmd
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Re: [PATCH 3/8] mpt3sas: Annotate switch/case fall-through
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Re: [PATCH 1/8] mpt3sas: Fix indentation
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Re: [PATCH 2/8] mpt3sas: Remove set-but-not-used variables
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850