- 23 2月, 2022 2 次提交
-
-
由 Damien Le Moal 提交于
The function pm8001_tag_alloc() determines free tags using the function find_first_zero_bit() which can return 0 when the first bit of the bitmap being inspected is 0. As such, tag 0 is a valid tag value that should not be dismissed as invalid. Fix the functions pm8001_work_fn(), mpi_sata_completion(), pm8001_mpi_task_abort_resp() and pm8001_open_reject_retry() to not dismiss 0 tags as invalid. The value 0xffffffff is used for invalid tags for unused ccb information structures. Add the macro definition PM8001_INVALID_TAG to define this value. Link: https://lore.kernel.org/r/20220220031810.738362-20-damien.lemoal@opensource.wdc.comReviewed-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Damien Le Moal 提交于
Avoid the sparse warning "warning: cast removes address space '__iomem' of expression" by declaring the qp pointer as "u32 __iomem *". Accordingly, change the accesses to the qp array to use readl(). Link: https://lore.kernel.org/r/20220220031810.738362-3-damien.lemoal@opensource.wdc.comReviewed-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 20 2月, 2022 10 次提交
-
-
由 John Garry 提交于
Add a generic implementation of abort task TMF handler, and use in LLDDs. With that, some LLDDs custom TMF functions can now be deleted. Link: https://lore.kernel.org/r/1645112566-115804-18-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
Add a generic implementation of query task TMF handler, and use in LLDDs. Link: https://lore.kernel.org/r/1645112566-115804-17-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
Add a generic implementation of LU reset TMF handler, and use in LLDDs. Link: https://lore.kernel.org/r/1645112566-115804-16-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
Add a generic implementation of clear task set TMF handler, and use in LLDDs. Link: https://lore.kernel.org/r/1645112566-115804-15-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
Add a generic implementation of abort task set TMF handler, and use in LLDDs. Link: https://lore.kernel.org/r/1645112566-115804-14-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
The hisi_sas and pm8001 TMF handlers have some special processing for when the TMF is aborted, so add a callback and fill it in for those drivers. Link: https://lore.kernel.org/r/1645112566-115804-13-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
The pm8001 TMF handler has some special processing when the TMF completes, so add a callback and fill it in for the pm8001 driver. Link: https://lore.kernel.org/r/1645112566-115804-12-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
Add a pointer to a sas_tmf_task to the sas_task struct, as this will be used when the common LLDD TMF code is factored out. Also set it for the LLDDs to store per-sas_task TMF info. Link: https://lore.kernel.org/r/1645112566-115804-9-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
Some of the LLDDs which use libsas have their own definition of a struct to hold TMF info, so add a common struct for libsas. Also add an interim force phy id field for hisi_sas driver, which will be removed once the STP "TMF" code is factored out. Even though some LLDDs (pm8001) use a u32 for the tag, u16 will be adequate, as that named driver only uses tags in range [0, 1024). Link: https://lore.kernel.org/r/1645112566-115804-8-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
This callback is never called, so remove support. Link: https://lore.kernel.org/r/1645112566-115804-4-git-send-email-john.garry@huawei.comTested-by: NYihang Li <liyihang6@hisilicon.com> Tested-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: NJack Wang <jinpu.wang@ionos.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NXiang Chen <chenxiang66@hisilicon.com> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 12 2月, 2022 1 次提交
-
-
由 John Garry 提交于
This flag is now only ever set, so delete it. This also avoids a use-after-free in the pm8001 queue path, as reported in the following: https://lore.kernel.org/linux-scsi/c3cb7228-254e-9584-182b-007ac5e6fe0a@huawei.com/T/#m28c94c6d3ff582ec4a9fa54819180740e8bd4cfb https://lore.kernel.org/linux-scsi/0cc0c435-b4f2-9c76-258d-865ba50a29dd@huawei.com/ [mkp: checkpatch + two SAS_TASK_AT_INITIATOR references] Link: https://lore.kernel.org/r/1644489804-85730-3-git-send-email-john.garry@huawei.comReviewed-by: NDamien Le Moal <damien.lemoal@wdc.com> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 01 2月, 2022 1 次提交
-
-
由 John Garry 提交于
Currently a use-after-free may occur if a TMF sas_task is aborted before we handle the IO completion in mpi_ssp_completion(). The abort occurs due to timeout. When the timeout occurs, the SAS_TASK_STATE_ABORTED flag is set and the sas_task is freed in pm8001_exec_internal_tmf_task(). However, if the I/O completion occurs later, the I/O completion still thinks that the sas_task is available. Fix this by clearing the ccb->task if the TMF times out - the I/O completion handler does nothing if this pointer is cleared. Link: https://lore.kernel.org/r/1643289172-165636-3-git-send-email-john.garry@huawei.comReviewed-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 05 1月, 2022 1 次提交
-
-
由 Ajish Koshy 提交于
Error handling steps were not in sequence as per the programmers manual. Expected sequence: - PHY_DOWN (PORT_IN_RESET) - PORT_RESET_TIMER_TMO - Host aborts pending I/Os - Host deregister the device - Host sends HW_EVENT_PHY_DOWN ACK Previously we were sending HW_EVENT_PHY_DOWN ACK first and then deregister the device. Fix this to use the expected sequence. Link: https://lore.kernel.org/r/20211228111753.10802-1-Ajish.Koshy@microchip.comSigned-off-by: NAjish Koshy <Ajish.Koshy@microchip.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 19 11月, 2021 1 次提交
-
-
由 Changyuan Lyu 提交于
Tracepoints for tracking controller and ATA commands issued and completed. Link: https://lore.kernel.org/r/20211115215750.131696-2-changyuanl@google.comAcked-by: NJack Wang <jinpu.wang@ionos.com> Co-developed-by: NAkshat Jain <akshatzen@google.com> Signed-off-by: NAkshat Jain <akshatzen@google.com> Signed-off-by: NChangyuan Lyu <changyuanl@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 15 9月, 2021 1 次提交
-
-
由 Ajish Koshy 提交于
During phyup event, the firmware provides the phy_id and port_id and driver is supposed to use these during device handle registration. Previously the driver was using the port id value from libsas during device handle registration. Since id can be different from the one assigned by firmware, this can lead to wrong device registration and drives not showing up. Use firmware assigned port id during device registration. Link: https://lore.kernel.org/r/20210906170404.5682-2-Ajish.Koshy@microchip.comAcked-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NAjish Koshy <Ajish.Koshy@microchip.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 29 7月, 2021 1 次提交
-
-
由 Igor Pylypiv 提交于
The TMF timeout timer may trigger at the same time when the response from a controller is being handled. When this happens the SAS task may get freed before the response processing is finished. Fix this by calling complete() only when SAS_TASK_STATE_DONE is not set. A similar race condition was fixed in commit b90cd6f2 ("scsi: libsas: fix a race condition when smp task timeout") Link: https://lore.kernel.org/r/20210707185945.35559-1-ipylypiv@google.comReviewed-by: NVishakha Channapattan <vishakhavc@google.com> Acked-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NIgor Pylypiv <ipylypiv@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 13 7月, 2021 1 次提交
-
-
由 Randy Dunlap 提交于
Fix kernel-doc warnings then test again, wash, rinse, find more, then repeat more/again. Also fix spellos, some grammar, and some punctuation. ../drivers/scsi/pm8001/pm8001_ctl.c:557: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** pm8001_ctl_fatal_log_show - fatal error logging ../drivers/scsi/pm8001/pm8001_ctl.c:577: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** non_fatal_log_show - non fatal error logging ../drivers/scsi/pm8001/pm8001_ctl.c:622: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** pm8001_ctl_gsm_log_show - gsm dump collection Link: https://lore.kernel.org/r/20210708165723.8594-1-rdunlap@infradead.org Cc: Jack Wang <jinpu.wang@cloud.ionos.com> Cc: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Acked-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 16 6月, 2021 1 次提交
-
-
由 Zhen Lei 提交于
Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Also change the return error code from "-1" to "-ENOMEM". Link: https://lore.kernel.org/r/20210610094605.16672-2-thunder.leizhen@huawei.comAcked-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 03 6月, 2021 1 次提交
-
-
由 Bart Van Assche 提交于
This patch prepares for converting SAM status codes into an enum. Without this patch converting SAM status codes into an enumeration type would trigger complaints about enum type mismatches for the SAS code. Link: https://lore.kernel.org/r/20210524025457.11299-2-bvanassche@acm.org Cc: Hannes Reinecke <hare@suse.com> Cc: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Cc: Jason Yan <yanaijie@huawei.com> Reviewed-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NHimanshu Madhani <himanshu.madhani@oracle.com> Acked-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 16 5月, 2021 1 次提交
-
-
由 Ajish Koshy 提交于
When driver is loaded after rmmod some drives are not showing up during discovery. SATA drives are directly attached to the controller connected phys. During device discovery, the IDENTIFY command (qc timeout (cmd 0xec)) is timing out during revalidation. This will trigger abort from host side and controller successfully aborts the command and returns success. Post this successful abort response ATA library decides to mark the disk as NODEV. To overcome this, inside pm8001_scan_start() after phy_start() call, add get start response and wait for few milliseconds to trigger next phy start. This millisecond delay will give sufficient time for the controller state machine to accept next phy start. Link: https://lore.kernel.org/r/20210505120103.24497-1-ajish.koshy@microchip.comSigned-off-by: NAjish Koshy <ajish.koshy@microchip.com> Signed-off-by: NViswas G <viswas.g@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 16 4月, 2021 1 次提交
-
-
由 Ruksar Devadi 提交于
When controller runs into fatal error, I/Os get stuck with no response, handler event is defined to complete the pending I/Os (SAS task and internal task) and also perform the cleanup for the drives. Link: https://lore.kernel.org/r/20210415103352.3580-7-Viswas.G@microchip.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NRuksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NAshokkumar N <Ashokkumar.N@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 13 4月, 2021 1 次提交
-
-
由 Luo Jiaxing 提交于
checkpatch reports the following: ERROR: space prohibited before that ',' (ctx:WxW) +int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb); Remove unnecessary whitespace. Link: https://lore.kernel.org/r/1617886593-36421-2-git-send-email-luojiaxing@huawei.comAcked-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NLuo Jiaxing <luojiaxing@huawei.com> Signed-off-by: NJianqin Xie <xiejianqin@hisilicon.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 16 3月, 2021 1 次提交
-
-
由 Lee Jones 提交于
Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_sas.c:989: warning: expecting prototype for and hard reset for(). Prototype was for pm8001_I_T_nexus_reset() instead Link: https://lore.kernel.org/r/20210303144631.3175331-12-lee.jones@linaro.org Cc: Jack Wang <jinpu.wang@cloud.ionos.com> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Acked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 10 3月, 2021 1 次提交
-
-
由 Igor Pylypiv 提交于
This improves the code readability. Link: https://lore.kernel.org/r/20210305060908.2476850-1-ipylypiv@google.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NIgor Pylypiv <ipylypiv@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 23 1月, 2021 3 次提交
-
-
由 Ahmed S. Darwish 提交于
libsas event notifiers required an extension where gfp_t flags must be explicitly passed. For bisectability, a temporary _gfp() variant of such functions were added. All call sites then got converted use the _gfp() variants and explicitly pass GFP context. Having no callers left, the original libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Link: https://lore.kernel.org/r/20210118100955.1761652-16-a.darwish@linutronix.de Cc: Jack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NAhmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Ahmed S. Darwish 提交于
Use the new libsas event notifiers API, which requires callers to explicitly pass the gfp_t memory allocation flags. Call chain analysis, pm8001_hwi.c: pm8001_interrupt_handler_msix() || pm8001_interrupt_handler_intx() || pm8001_tasklet() -> PM8001_CHIP_DISP->isr() = pm80xx_chip_isr() -> process_oq [spin_lock_irqsave(&pm8001_ha->lock, ...)] -> process_one_iomb() -> mpi_hw_event() -> hw_event_sas_phy_up() -> pm8001_bytes_dmaed() -> hw_event_sata_phy_up -> pm8001_bytes_dmaed() All functions are invoked by process_one_iomb(), which is invoked by the interrupt service routine and the tasklet handler. A similar call chain is also found at pm80xx_hwi.c. Pass GFP_ATOMIC. For pm8001_sas.c, pm8001_phy_control() runs in task context as it calls wait_for_completion() and msleep(). Pass GFP_KERNEL. Link: https://lore.kernel.org/r/20210118100955.1761652-10-a.darwish@linutronix.de Cc: Jack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NAhmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 John Garry 提交于
LLDDs report events to libsas with .notify_port_event and .notify_phy_event callbacks. These callbacks are fixed and so there is no reason why the functions cannot be called directly, so do that. This neatens the code slightly, makes it more obvious, and reduces function pointer usage, which is generally a good thing. Downside is that there are 2x more symbol exports. [a.darwish@linutronix.de: Remove the now unused "sas_ha" local variables] Link: https://lore.kernel.org/r/20210118100955.1761652-3-a.darwish@linutronix.deReviewed-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NAhmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 13 1月, 2021 1 次提交
-
-
由 akshatzen 提交于
When the controller runs into a fatal error, commands get stuck due to no response. If the controller is in fatal error state, abort requests issued to the controller get stuck too. Check the controller state for fatal error conditions. Link: https://lore.kernel.org/r/20210109123849.17098-3-Viswas.G@microchip.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Nakshatzen <akshatzen@google.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NRuksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: NRadha Ramachandran <radha@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 01 12月, 2020 1 次提交
-
-
由 Joe Perches 提交于
Use the more common logging style. [mkp: fixed a few conflicts] Link: https://lore.kernel.org/r/69dc34ff63adfa60b3f203ed2d58143b5692af57.1606192458.git.joe@perches.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 24 11月, 2020 2 次提交
-
-
由 Joe Perches 提交于
Make the pm8001_printk() macro take an explicit HBA instead of assuming the existence of an unspecified pm8001_ha argument. Miscellanea: - Add pm8001_ha to the few uses of pm8001_printk() - Add HBA to the pm8001_dbg macro call to pm8001_printk() Link: https://lore.kernel.org/r/0e17a4c845f15e18f98b346ffb9b039584d21cdd.1605914030.git.joe@perches.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Joe Perches 提交于
Every PM8001_<FOO>_DBG macro uses an internal call to pm8001_printk. Convert all uses of: PM8001_<FOO>_DBG(hba, pm8001_printk(fmt, ...)) to pm8001_dbg(hba, <FOO>, fmt, ...) so the visual complexity of each macro is reduced. The repetitive macro definitions are converted to a single pm8001_dbg and the level is concatenated using PM8001_##level##_LOGGING for the specific level test. Done with coccinelle, checkpatch and a little typing of the new macro definition. Miscellanea: - Coalesce formats - Realign arguments - Add missing terminating newlines to formats - Remove trailing spaces from formats - Change defective loop with printk(KERN_INFO... to emit a 16 byte hex block to %p16h Link: https://lore.kernel.org/r/49f36a93af7752b613d03c89a87078243567fd9a.1605914030.git.joe@perches.comReported-by: Nkernel test robot <lkp@intel.com> Acked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 11 11月, 2020 1 次提交
-
-
由 Lee Jones 提交于
This string is not NUL terminated. Fixes the following W=1 kernel build warning(s): from drivers/scsi/pm8001/pm8001_sas.c:41: In function ‘strncpy’, inlined from ‘pm8001_issue_ssp_tmf’ at drivers/scsi/pm8001/pm8001_sas.c:919:2: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 8 equals destination size [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20201102102544.1018706-2-lee.jones@linaro.org Cc: Jack Wang <jinpu.wang@cloud.ionos.com> Acked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 05 11月, 2020 1 次提交
-
-
由 Viswas G 提交于
Incorrect value of the running_req was causing the driver unload to be stuck during the SAS lldd_dev_gone notification handling. During SATA I/O completion, for some error status values, the driver schedules the event handler and running_req is decremented from that. However, there are some other error status values (like IO_DS_IN_RECOVERY, IO_XFER_ERR_LAST_PIO_DATAIN_CRC_ERR) where the I/O has already been completed by fw/driver so running_req is not decremented. Also during NCQ error handling, driver itself will initiate READ_LOG_EXT and ABORT_ALL. When libsas/libata initiate READ_LOG_EXT (0x2F), driver increments running_req. This will be completed by the driver in pm80xx_chip_sata_req(), but running_req was not decremented. Link: https://lore.kernel.org/r/20201102165528.26510-3-Viswas.G@microchip.com.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NRuksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 01 9月, 2020 1 次提交
-
-
由 Dinghao Liu 提交于
When pm8001_tag_alloc() fails, task should be freed just like it is done in the subsequent error paths. Link: https://lore.kernel.org/r/20200823091453.4782-1-dinghao.liu@zju.edu.cnAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NDinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 25 7月, 2020 1 次提交
-
-
由 Lee Jones 提交于
Functions must follow directly after the header that documents them. Fixes the following W=1 kernel build warning(s): from drivers/scsi/pm8001/pm8001_sas.c:41: inlined from ‘pm8001_issue_ssp_tmf’ at drivers/scsi/pm8001/pm8001_sas.c:919:2: drivers/scsi/pm8001/pm8001_sas.c:379: warning: Function parameter or member 'pm8001_dev' not described in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'task' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'num' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'gfp_flags' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'is_tmf' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'tmf' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:583: warning: Function parameter or member 'device_id' not described in 'pm8001_find_dev' drivers/scsi/pm8001/pm8001_sas.c:1000: warning: Function parameter or member 'dev' not described in 'pm8001_I_T_nexus_reset' Link: https://lore.kernel.org/r/20200721164148.2617584-11-lee.jones@linaro.org Cc: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 20 11月, 2019 3 次提交
-
-
由 peter chang 提交于
Added the fix so the if driver properly sent the abort it tries to remove it from the firmware's list of outstanding commands regardless of the abort status. This means that the task gets freed 'now' rather than possibly getting freed later when the scsi layer thinks it's leaked but still valid. Link: https://lore.kernel.org/r/20191114100910.6153-10-deepak.ukey@microchip.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Npeter chang <dpf@google.com> Signed-off-by: NDeepak Ukey <deepak.ukey@microchip.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Vikram Auradkar 提交于
sas_task structure should not be used after task_done is called. If the device is gone or not attached, we call task_done on t and continue to use in the sas_task in rest of the function. task_done is pointing to sas_ata_task_done, may free the memory associated with the task before returning. Link: https://lore.kernel.org/r/20191114100910.6153-8-deepak.ukey@microchip.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NVikram Auradkar <auradkar@google.com> Signed-off-by: NDeepak Ukey <deepak.ukey@microchip.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 peter chang 提交于
The default logging doesn't include the device name, so it's difficult to determine which controller is being logged about in error scenarios. The logging level was only settable via sysfs, which made it inconvenient for actual debugging. This changes the default to only cover error handling. Link: https://lore.kernel.org/r/20191114100910.6153-6-deepak.ukey@microchip.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Npeter chang <dpf@google.com> Signed-off-by: NDeepak Ukey <deepak.ukey@microchip.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-