- 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 提交于
In pm8001_pci_resume(), the use of the u32 type for the local variable device_state causes a sparse warning: warning: incorrect type in assignment (different base types) expected unsigned int [usertype] device_state got restricted pci_power_t [usertype] current_state Since this variable is used only once in the function, remove it and use pdev->current_state directly. While at it, also add a blank line after the last local variable declaration. Link: https://lore.kernel.org/r/20220220031810.738362-14-damien.lemoal@opensource.wdc.comReviewed-by: NJohn Garry <john.garry@huawei.com> Reviewed-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 4 次提交
-
-
由 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 提交于
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>
-
- 03 12月, 2021 1 次提交
-
-
由 Igor Pylypiv 提交于
Calling scsi_remove_host() before scsi_add_host() results in a crash: BUG: kernel NULL pointer dereference, address: 0000000000000108 RIP: 0010:device_del+0x63/0x440 Call Trace: device_unregister+0x17/0x60 scsi_remove_host+0xee/0x2a0 pm8001_pci_probe+0x6ef/0x1b90 [pm80xx] local_pci_probe+0x3f/0x90 We cannot call scsi_remove_host() in pm8001_alloc() because scsi_add_host() has not been called yet at that point in time. Function call tree: pm8001_pci_probe() | `- pm8001_pci_alloc() | | | `- pm8001_alloc() | | | `- scsi_remove_host() | `- scsi_add_host() Link: https://lore.kernel.org/r/20211201041627.1592487-1-ipylypiv@google.com Fixes: 05c6c029 ("scsi: pm80xx: Increase number of supported queues") Reviewed-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>
-
- 19 11月, 2021 1 次提交
-
-
由 Igor Pylypiv 提交于
We used to allocate X bytes while we only need X bits. Link: https://lore.kernel.org/r/20211101232825.2350233-5-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>
-
- 17 10月, 2021 1 次提交
-
-
由 Bart Van Assche 提交于
struct device supports attribute groups directly but does not support struct device_attribute directly. Hence switch to attribute groups. Link: https://lore.kernel.org/r/20211012233558.4066756-36-bvanassche@acm.orgAcked-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>
-
- 15 9月, 2021 2 次提交
-
-
由 Ajish Koshy 提交于
Driver failed to release all memory allocated. This would lead to memory leak during driver removal. Properly free memory when the module is removed. Link: https://lore.kernel.org/r/20210906170404.5682-5-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>
-
由 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>
-
- 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>
-
- 23 6月, 2021 1 次提交
-
-
由 Yufen Yu 提交于
Offlining a SATA device connected to a hisi SAS controller and then scanning the host will result in detecting 255 non-existent devices: # lsscsi [2:0:0:0] disk ATA Samsung SSD 860 2B6Q /dev/sda [2:0:1:0] disk ATA WDC WD2003FYYS-3 1D01 /dev/sdb [2:0:2:0] disk SEAGATE ST600MM0006 B001 /dev/sdc # echo "offline" > /sys/block/sdb/device/state # echo "- - -" > /sys/class/scsi_host/host2/scan # lsscsi [2:0:0:0] disk ATA Samsung SSD 860 2B6Q /dev/sda [2:0:1:0] disk ATA WDC WD2003FYYS-3 1D01 /dev/sdb [2:0:1:1] disk ATA WDC WD2003FYYS-3 1D01 /dev/sdh ... [2:0:1:255] disk ATA WDC WD2003FYYS-3 1D01 /dev/sdjb After a REPORT LUN command issued to the offline device fails, the SCSI midlayer tries to do a sequential scan of all devices whose LUN number is not 0. However, SATA does not support LUN numbers at all. Introduce a generic sas_slave_alloc() handler which will return -ENXIO for SATA devices if the requested LUN number is larger than 0 and make libsas drivers use this function as their .slave_alloc callback. Link: https://lore.kernel.org/r/20210622034037.1467088-1-yuyufen@huawei.comReported-by: NWu Bo <wubo40@huawei.com> Suggested-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NYufen Yu <yuyufen@huawei.com> 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 次提交
-
-
由 Viswas G 提交于
Introduce spin lock for outbound queue. With this, driver need not acquire HBA global lock for outbound queue processing. Link: https://lore.kernel.org/r/20210415103352.3580-9-Viswas.G@microchip.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: NAshokkumar N <Ashokkumar.N@microchip.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 25 3月, 2021 1 次提交
-
-
由 Arnd Bergmann 提交于
On some configurations, gcc warns about overlapping source and destination arguments to snprintf: drivers/scsi/pm8001/pm8001_init.c: In function 'pm8001_request_msix': drivers/scsi/pm8001/pm8001_init.c:977:3: error: 'snprintf' argument 4 may overlap destination object 'pm8001_ha' [-Werror=restrict] 977 | snprintf(drvname, len, "%s-%d", pm8001_ha->name, i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/pm8001/pm8001_init.c:962:56: note: destination object referenced by 'restrict'-qualified argument 1 was declared here 962 | static u32 pm8001_request_msix(struct pm8001_hba_info *pm8001_ha) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ I first assumed this was a gcc bug, as that should not happen, but a reduced test case makes it clear that this happens when the loop counter is not bounded by the array size. Help the compiler out by adding an explicit limit here to make the code slightly more robust and avoid the warning. Link: https://godbolt.org/z/6T1qPM Link: https://lore.kernel.org/r/20210323125458.1825564-1-arnd@kernel.orgAcked-by: NJack Wang <jinpu.wang@ionos.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de> 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_init.c:192: warning: expecting prototype for tasklet for 64 msi(). Prototype was for pm8001_tasklet() instead drivers/scsi/pm8001/pm8001_init.c:872: warning: expecting prototype for pm8001_set_phy_settings_ven_117c_12Gb(). Prototype was for pm8001_set_phy_settings_ven_117c_12G() instead Link: https://lore.kernel.org/r/20210303144631.3175331-9-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: Kumar Santhanam <AnandKumar.Santhanam@pmcs.com> Cc: Sangeetha Gnanasekaran <Sangeetha.Gnanasekaran@pmcs.com> Cc: Nikith Ganigarakoppal <Nikith.Ganigarakoppal@pmcs.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>
-
- 21 1月, 2021 1 次提交
-
-
由 Christophe JAILLET 提交于
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'pm8001_init_ccb_tag()' GFP_KERNEL can be used because this function already uses this flag a few lines above. While at it, remove "pm80xx: " in a debug message. 'pm8001_dbg()' already adds the driver name in the message. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Link: https://lore.kernel.org/r/20210117132445.562552-1-christophe.jaillet@wanadoo.frAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 13 1月, 2021 1 次提交
-
-
由 akshatzen 提交于
The driver initializes main configuration, general status, inbound queue and outbound queue table addresses based on a value read from MSGU_SCRATCH_PAD_0 register. We should validate these addresses before dereferencing them. Adds two validations: 1. Check if main configuration table offset lies within the pcibar mapped 2. Check if first dword of main configuration table reads "PMCS" There are two calls to init_pci_device_addresses() done during pm8001_pci_probe() in this sequence: 1. First inside chip_soft_rst, where if init_pci_device_addresses fails we will go ahead assuming MPI state is not ready and reset the device as long as bootloader is okay. This gives chance to second call of init_pci_device_addresses to set up the addresses after reset. 2. The second call is via pm80xx_chip_init, after soft reset is done and firmware is checked to be ready. Once that is done we are safe to go ahead and initialize default table values and use them. Tests: 1. Enabled debugging logs and observed no issues during initialization, with a controller with no issues: pm80xx0:: pm8001_setup_msix 1034: pci_alloc_irq_vectors request ret:64 no of intr 64 pm80xx0:: init_pci_device_addresses 917: Scratchpad 0 Offset: 0x2000 value 0x40002000 pm80xx0:: init_pci_device_addresses 925: Scratchpad 0 PCI BAR: 0 pm80xx0:: init_pci_device_addresses 952: VALID main config signature 0x53434d50 pm80xx0:: init_pci_device_addresses 975: GST OFFSET 0xc4 pm80xx0:: init_pci_device_addresses 978: INBND OFFSET 0x20000128 pm80xx0:: init_pci_device_addresses 981: OBND OFFSET 0x24000928 pm80xx0:: init_pci_device_addresses 984: IVT OFFSET 0x8001408 pm80xx0:: init_pci_device_addresses 987: PSPA OFFSET 0x8001608 pm80xx0:: init_pci_device_addresses 991: addr - main cfg (ptrval) general status (ptrval) pm80xx0:: init_pci_device_addresses 995: addr - inbnd (ptrval) obnd (ptrval) pm80xx0:: init_pci_device_addresses 999: addr - pspa (ptrval) ivt (ptrval) pm80xx0:: pm80xx_chip_soft_rst 1446: reset register before write : 0x0 pm80xx0:: pm80xx_chip_soft_rst 1478: reset register after write 0x40 pm80xx0:: pm80xx_chip_soft_rst 1544: SPCv soft reset Complete pm80xx0:: init_pci_device_addresses 917: Scratchpad 0 Offset: 0x2000 value 0x40002000 pm80xx0:: init_pci_device_addresses 925: Scratchpad 0 PCI BAR: 0 pm80xx0:: init_pci_device_addresses 952: VALID main config signature 0x53434d50 pm80xx0:: init_pci_device_addresses 975: GST OFFSET 0xc4 pm80xx0:: init_pci_device_addresses 978: INBND OFFSET 0x20000128 pm80xx0:: init_pci_device_addresses 981: OBND OFFSET 0x24000928 pm80xx0:: init_pci_device_addresses 984: IVT OFFSET 0x8001408 pm80xx0:: init_pci_device_addresses 987: PSPA OFFSET 0x8001608 pm80xx0:: init_pci_device_addresses 991: addr - main cfg (ptrval) general status (ptrval) pm80xx0:: init_pci_device_addresses 995: addr - inbnd (ptrval) obnd (ptrval) pm80xx0:: init_pci_device_addresses 999: addr - pspa (ptrval) ivt (ptrval) pm80xx0:: pm80xx_chip_init 1329: MPI initialize successful! 2. Tested controller with firmware known to have initialization issue and observed no crashes with this fix: pm80xx 0000:01:00.0: pm80xx: driver version 0.1.38 pm80xx 0000:01:00.0: Removing from 1:1 domain pm80xx 0000:01:00.0: Requesting non-1:1 mappings pm80xx0:: init_pci_device_addresses 948: BAD main config signature 0x0 pm80xx0:: mpi_uninit_check 1365: Failed to init pci addresses pm80xx0:: pm80xx_chip_soft_rst 1435: MPI state is not ready scratch:0:8:62a01000:0 pm80xx0:: pm80xx_chip_soft_rst 1518: Firmware is not ready! pm80xx0:: pm80xx_chip_soft_rst 1532: iButton Feature is not Available!!! pm80xx0:: pm80xx_chip_init 1301: Firmware is not ready! pm80xx0:: pm8001_pci_probe 1215: chip_init failed [ret: -16] pm80xx: probe of 0000:01:00.0 failed with error -16 pm80xx 0000:07:00.0: pm80xx: driver version 0.1.38 pm80xx 0000:07:00.0: Removing from 1:1 domain pm80xx 0000:07:00.0: Requesting non-1:1 mappings scsi host6: pm80xx pm80xx1:: pm8001_setup_sgpio 5568: failed sgpio_req timeout pm80xx1:: mpi_phy_start_resp 3447: phy start resp status:0x0, phyid:0x0 pm80xx 0000:08:00.0: pm80xx: driver version 0.1.38 pm80xx 0000:08:00.0: Removing from 1:1 domain pm80xx 0000:08:00.0: Requesting non-1:1 mappings 3. Without this fix we observe crash on the same controller: pm80xx 0000:01:00.0: pm80xx: driver version 0.1.38 pm80xx 0000:01:00.0: Removing from 1:1 domain pm80xx 0000:01:00.0: Requesting non-1:1 mappings [<ffffffffc0451b3b>] pm80xx_chip_soft_rst+0x6b/0x4c0 [pm80xx] [<ffffffffc043a933>] pm8001_pci_probe+0xa43/0x1630 [pm80xx] RIP: 0010:pm80xx_chip_soft_rst+0x71/0x4c0 [pm80xx] [<ffffffffc0451b3b>] ? pm80xx_chip_soft_rst+0x6b/0x4c0 [pm80xx] [<ffffffffc043a933>] pm8001_pci_probe+0xa43/0x1630 [pm80xx] pm80xx0:: mpi_uninit_check 1339: TIMEOUT:IBDB value/=2 pm80xx0:: pm80xx_chip_soft_rst 1387: MPI state is not ready scratch:0:8:62a01000:0 pm80xx0:: pm80xx_chip_soft_rst 1470: Firmware is not ready! pm80xx0:: pm80xx_chip_soft_rst 1484: iButton Feature is not Available!!! pm80xx0:: pm80xx_chip_init 1266: Firmware is not ready! pm80xx0:: pm8001_pci_probe 1207: chip_init failed [ret: -16] pm80xx: probe of 0000:01:00.0 failed with error -16 Link: https://lore.kernel.org/r/20210109123849.17098-4-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>
-
- 08 12月, 2020 1 次提交
-
-
由 Zhang Qilong 提交于
The driver did not return an error in the case where pm8001_configure_phy_settings() failed. Use rc to store the return value of pm8001_configure_phy_settings(). Link: https://lore.kernel.org/r/20201205115551.2079471-1-zhangqilong3@huawei.com Fixes: 27909407 ("[SCSI] pm80xx: Phy settings support for motherboard controller.") Acked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NZhang Qilong <zhangqilong3@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 01 12月, 2020 2 次提交
-
-
由 Joe Perches 提交于
kernel robot reported a misindentation of a goto. Fix it. At the same time, use a temporary for a repeated entry in the same block to reduce visual noise. Link: https://lore.kernel.org/r/9542a8be9954c1dca744f93f53bb1af6dd1436e8.1606192458.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>
-
由 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>
-
- 26 11月, 2020 2 次提交
-
-
由 Vaibhav Gupta 提交于
Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-20-vaibhavgupta40@gmail.comSigned-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Vaibhav Gupta 提交于
The driver calls pci_enable_wake(...., false) in pm8001_pci_resume(), and there is no corresponding pci_enable_wake(...., true) in pm8001_pci_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from pm8001_pci__resume(). Link: https://lore.kernel.org/r/20201102164730.324035-19-vaibhavgupta40@gmail.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 24 11月, 2020 3 次提交
-
-
由 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>
-
由 Xu Wang 提交于
Stop typecasting the value returned by kcalloc(). Link: https://lore.kernel.org/r/20201120083648.9319-1-vulab@iscas.ac.cnAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NXu Wang <vulab@iscas.ac.cn> 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>
-
- 08 10月, 2020 3 次提交
-
-
由 Viswas G 提交于
The pm80xx driver currently sets the controller queue depth to 256. Hoewver, the controller supports outstanding I/Os up 1024. Increase the number of outstanding I/Os from 256 to 1024. CCBs and tags are allocated according to outstanding I/Os. Also update the can_queue value (max_out_io - PM8001_RESERVE_SLOT) used by the SCSI midlayer. [mkp: fixed zeroday complaint] Link: https://lore.kernel.org/r/20201005145011.23674-4-Viswas.G@microchip.com.comReported-by: Nkernel test robot <lkp@intel.com> Acked-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>
-
由 Viswas G 提交于
Remove DMA memory allocation for Devices and CCB structure. Instead allocate memory outside of DMA memory. DMA memory is a limited system resource and it is better to allocate memory outside of DMA memory when possible. Link: https://lore.kernel.org/r/20201005145011.23674-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>
-
由 Viswas G 提交于
Current driver uses fixed number of Inbound and Outbound queues and all of the I/O, TMF and internal requests are submitted through those. A global spin lock is used to control the shared access. This can create a lock contention and it is real bottleneck in the I/O path. To avoid this, the number of supported Inbound and Outbound queues is increased to 64, and the number of queues used is decided based on number of CPU cores online and number of MSI-X vectors allocated. Also add locks per queue instead of using the global lock. Link: https://lore.kernel.org/r/20201005145011.23674-2-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>
-
- 16 7月, 2020 1 次提交
-
-
由 Lee Jones 提交于
More bitrot issues with function documentation not keeping up with API changes. Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_init.c:64: warning: cannot understand function prototype: 'const struct pm8001_chip_info pm8001_chips[] = ' drivers/scsi/pm8001/pm8001_init.c:86: warning: cannot understand function prototype: 'struct scsi_host_template pm8001_sht = ' drivers/scsi/pm8001/pm8001_init.c:115: warning: cannot understand function prototype: 'struct sas_domain_function_template pm8001_transport_ops = ' drivers/scsi/pm8001/pm8001_init.c:212: warning: Function parameter or member 'irq' not described in 'pm8001_interrupt_handler_msix' drivers/scsi/pm8001/pm8001_init.c:237: warning: Function parameter or member 'irq' not described in 'pm8001_interrupt_handler_intx' drivers/scsi/pm8001/pm8001_init.c:265: warning: Function parameter or member 'ent' not described in 'pm8001_alloc' drivers/scsi/pm8001/pm8001_init.c:624: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_init_sas_add' drivers/scsi/pm8001/pm8001_init.c:624: warning: Excess function parameter 'chip_info' description in 'pm8001_init_sas_add' drivers/scsi/pm8001/pm8001_init.c:900: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_setup_msix' drivers/scsi/pm8001/pm8001_init.c:900: warning: Excess function parameter 'chip_info' description in 'pm8001_setup_msix' drivers/scsi/pm8001/pm8001_init.c:900: warning: Excess function parameter 'irq_handler' description in 'pm8001_setup_msix' drivers/scsi/pm8001/pm8001_init.c:981: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_request_irq' drivers/scsi/pm8001/pm8001_init.c:981: warning: Excess function parameter 'chip_info' description in 'pm8001_request_irq' Link: https://lore.kernel.org/r/20200713074645.126138-27-lee.jones@linaro.org Cc: Kumar Santhanam <AnandKumar.Santhanam@pmcs.com> Cc: Sangeetha Gnanasekaran <Sangeetha.Gnanasekaran@pmcs.com> Cc: Nikith Ganigarakoppal <Nikith.Ganigarakoppal@pmcs.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>
-
- 16 6月, 2020 1 次提交
-
-
由 Christoph Hellwig 提交于
We need ata_scsi_dma_need_drain for all drivers wired up to drive ATAPI devices through libata. That also includes the SAS HBA drivers in addition to native libata HBA drivers. Link: https://lore.kernel.org/r/20200615064624.37317-3-hch@lst.de Fixes: cc97923a ("block: move dma drain handling to scsi") Reported-by: NMichael Ellerman <mpe@ellerman.id.au> Tested-by: NMichael Ellerman <mpe@ellerman.id.au> Acked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Acked-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 18 3月, 2020 5 次提交
-
-
由 Viswas G 提交于
Removed the common length and introduce read and write length for IOCTL payload structure. [mkp: fixed SoB ordering] Link: https://lore.kernel.org/r/20200316074906.9119-7-deepak.ukey@microchip.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NViswas G <viswas.g@microchip.com> Signed-off-by: NDeepak Ukey <deepak.ukey@microchip.com> Signed-off-by: NRadha Ramachandran <radha@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Deepak Ukey 提交于
Added the sysfs attribute for non fatal log so that management utility can get the non fatal dump from driver. The non-fatal error is an error condition or abnormal behavior detected by the host, or detected and reported by the controller to the host.The non-fatal error does not stop the controller firmware and enables it to still respond to host requests. A typical example of a non-fatal error is an I/O timeout or an unusual error notification from the controller. Since the firmware is operational, the error dump information is pushed to host memory (by firmware) upon request from the host. Link: https://lore.kernel.org/r/20200316074906.9119-6-deepak.ukey@microchip.comAcked-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NDeepak Ukey <deepak.ukey@microchip.com> Signed-off-by: NViswas G <Viswas.G@microchip.com> Signed-off-by: NRadha Ramachandran <radha@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Peter Chang 提交于
1) Move the instance tracking down after we think the instance is good to go. Avoids having a use-after free. 2) There are goto targets for trying to cleanup if the hw fails to initialize, but there's some overlap depending on who thinks they own the sub-structures. Link: https://lore.kernel.org/r/20200316074906.9119-5-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: NRadha Ramachandran <radha@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Vikram Auradkar 提交于
A kexec reboot causes the controller fw to assert. This assertion shows up in two ways, the controller doesn't show up as ready and an interrupt is waiting as soon as the handler is registered. To resolve this added below fix: - Split the interrupt handling setup into two parts, setup and request. - If the controller ready register indicates not-ready, but that the not readiness is only on the IOC units we can still try a reset to bring the system back to the pre-reboot state. Link: https://lore.kernel.org/r/20200316074906.9119-3-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: NRadha Ramachandran <radha@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Peter Chang 提交于
Increasing the per-request size maximum (max_sectors_kb) runs into the per-device DMA scatter gather list limit (max_segments) for users of the io vector system calls (eg, readv and writev). This is because the kernel combines io vectors into DMA segments when possible, but it doesn't work for our user because the vectors in the buffer cache get scrambled. This change bumps the advertised max scatter gather length to 528 to cover 2M w/ x86's 4k pages and some extra for the user checksum. It trims the size of some of the tables we don't care about and exposes all of the command slots upstream to the SCSI layer. Also reduced the PM8001_MAX_CCB to 256 as pm8001 driver has memory limit depend on machine capability. If we increase the sg length, we need to trade-off it by decreasing PM8001_MAX_CCB. PM8001_MAX_CCB = 256 does not have any influence on normal use Link: https://lore.kernel.org/r/20200316074906.9119-2-deepak.ukey@microchip.comReported-by: Nkbuild test robot <lkp@intel.com> Acked-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: NRadha Ramachandran <radha@google.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 03 1月, 2020 1 次提交
-
-
由 Arnd Bergmann 提交于
The ata_sas_scsi_ioctl() function implements a number of HDIO_* commands for SCSI devices, it is used by all libata drivers as well as a few drivers that support SAS attached SATA drives. The only command that is not safe for compat ioctls here is HDIO_GET_32BIT. Change the implementation to check for in_compat_syscall() in order to do both cases correctly, and change all callers to use it as both native and compat callback pointers, including the indirect callers through sas_ioctl and ata_scsi_ioctl. Reviewed-by: NBen Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-
- 20 11月, 2019 1 次提交
-
-
由 Vikram Auradkar 提交于
With MSI-x enabled, the interrupt instances are <prefix><index> where the prefix is fixed for all module instances, making it a little harder to track down what's what. Link: https://lore.kernel.org/r/20191114100910.6153-13-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>
-