pocopico / rp-ext

GNU General Public License v2.0
529 stars 363 forks source link

mpt2/3sas can not work on ds918p/ds920p #130

Open cca2878 opened 2 years ago

cca2878 commented 2 years ago

The Synology Assistant can not find the host. But no abnormal message show on screen.

cca2878 commented 2 years ago

Also:https://github.com/tossp/redpill-tool-chain/issues/169

cca2878 commented 2 years ago

dmesg:

:: Loading kernel modules from extensions ...
Loading kmod #0 "raid_class.ko" for pocopico.mpt3sas (args: )
Loading kmod #1 "scsi_transport_sas.ko" for pocopico.mp[    3.337032] mpt3sas version 09.102.00.00 loaded
t3sas (args: )
Loading kmod #2 "mpt3sas.ko" for pocopico.mpt3sas (args: )
[    3.342765] mpt3sas 0000:0b:00.0: enabling device (0000 -> 0002)
[    3.343459] mpt2sas_cm0: 64 BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (1950096 kB)
[    3.399030] mpt2sas_cm0: MSI-X vectors supported: 16, no of cores: 2, max_msix_vectors: -1
[    3.400047] mpt2sas0-msix0: PCI-MSI-X enabled: IRQ 57
[    3.401030] mpt2sas0-msix1: PCI-MSI-X enabled: IRQ 58
[    3.402030] mpt2sas_cm0: iomem(0x00000000fe240000), mapped(0xffffc90000140000), size(65536)
[    3.403030] mpt2sas_cm0: ioport(0x0000000000004000), size(256)
[    3.503035] mpt2sas_cm0: Allocated physical memory: size(16365 kB)
[    3.503054] mpt2sas_cm0: Current Controller Queue Depth(9979),Max Controller Queue Depth(10240)
[    3.504028] mpt2sas_cm0: Scatter Gather Elements per IO(128)
[    3.550080] mpt2sas_cm0: LSISAS2308: FWVersion(20.00.07.00), ChipRevision(0x05), BiosVersion(07.39.02.00)
[    3.551031] mpt2sas_cm0: Protocol=(
[    3.551051] Initiator,Target
[    3.551091] ), Capabilities=(
[    3.551130] TLR,EEDP
[    3.551170] ,Snapshot Buffer,Diag Trace Buffer
[    3.551210] ,Task Set Full,NCQ
[    3.551249] )
[    3.551337] scsi host30: Fusion MPT SAS Host
[    3.552239] mpt2sas_cm0: sending port enable !!
[    3.554728] mpt2sas_cm0: host_add: handle(0x0007), sas_addr(0x500605b005837ab6), phys(8)
[    3.560259] scsi 30:0:0:0: Direct-Access     HGST     HUS724040ALS641          MS01 PQ: 0 ANSI: 6
[    3.560866] scsi 30:0:0:0: SSP: handle(0x000f), sas_addr(0x5000cca03b56b76d), phy(0), device_name(0x5000cca03b56b76f)
[    3.561206] scsi 30:0:0:0: SSP: enclosure_logical_id(0x500605b005837ab0), slot(3)
[    3.562623] <redpill/scsi_notifier.c:65> Probing SCSI device using sd_probe_shim
[    3.563237] <redpill/scsi_notifier.c:77> Triggering SCSI_EVT_DEV_PROBING notifications
[    3.563742] <redpill/sata_port_shim.c:64> Found new disk vendor="HGST    HUS724040ALS641 MS01PBHJPE2X" model="HUS724040ALS641         " connected to "Fusion MPT SAS Host" HBA over non-SATA port (type=3) - fixing to SATA port (type=1)
[    3.565209] <redpill/boot_shim_base.c:33> Checking if SATA disk is a shim target - id=0 channel=0 vendor="HGST    HUS724040ALS641 MS01PBHJPE2X" model="HUS724040ALS641         "
[    3.566386] <redpill/boot_shim_base.c:43> Device has capacity of ~3815447 MiB - it WILL NOT be shimmed (>1024)
[    3.567036] <redpill/scsi_notifier.c:87> Calling original sd_probe()
[    3.567441] BUG: unable to handle kernel paging request at ffffffffa00e7530
[    3.567821] IP: [<ffffffff813f7797>] sd_probe+0x6d7/0x900
[    3.568020] PGD 7ae0d067 PUD 7ae0e063 PMD 79dc0067 PTE 0
[    3.568031] Oops: 0000 [#1] SMP 
[    3.568031] Modules linked in: mpt3sas(OE+) scsi_transport_sas(OE) raid_class(OE) usb_storage xhci_pci xhci_hcd usbcore usb_common redpill(OE)
[    3.568031] CPU: 0 PID: 4776 Comm: kworker/u4:29 Tainted: G           OE   4.4.180+ #42218
[    3.568031] Hardware name: VMware, Inc. VMware7,1/440BX Desktop Reference Platform, BIOS VMW71.00V.18227214.B64.2106252220 06/25/2021
[    3.568031] Workqueue: fw_event_mpt2sas0 _firmware_event_work [mpt3sas]
[    3.568031] task: ffff880079128000 ti: ffff880064ecc000 task.ti: ffff880064ecc000
[    3.568031] RIP: 0010:[<ffffffff813f7797>]  [<ffffffff813f7797>] sd_probe+0x6d7/0x900
[    3.568031] RSP: 0018:ffff880064ecf710  EFLAGS: 00010246
[    3.568031] RAX: ffff880079373000 RBX: ffff8800793771a0 RCX: 000000000000a7ef
[    3.568031] RDX: 000000000000a7ee RSI: ffffffffa00db4db RDI: ffffffffa00e22b0
[    3.568031] RBP: ffff880064ecf778 R08: 0000000000019720 R09: ffffffff812dbd33
[    3.568031] R10: ffffea0001c46600 R11: 0000000000019b60 R12: ffff88006a39a800
[    3.568031] R13: ffffffffa00e22b0 R14: ffff880079377000 R15: 0000000000000000
[    3.568031] FS:  00007f7f1dddd740(0000) GS:ffff880101800000(0000) knlGS:0000000000000000
[    3.568031] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    3.568031] CR2: ffffffffa00e7530 CR3: 000000007ae0a000 CR4: 00000000003406b0
[    3.568031] Stack:
[    3.568031]  ffffffff8109bd19 ffff88007937300c ffff880079373000 0000000000000000
[    3.568031]  ffff880064ecf788 ffff880064ecf740 0000000000000000 ffffffffa001a28d
[    3.568031]  ffff8800793771a0 0000000000000000 ffff880079377000 0000000000000002
[    3.568031] Call Trace:
[    3.568031]  [<ffffffff8109bd19>] ? vprintk_default+0x9/0x10
[    3.568031]  [<ffffffffa0003a0f>] sd_probe_shim+0x16f/0x1b8 [redpill]
[    3.568031]  [<ffffffff813b7157>] driver_probe_device+0x1a7/0x300
[    3.568031]  [<ffffffff813b73bb>] __device_attach_driver+0x8b/0xa0
[    3.568031]  [<ffffffff813b7330>] ? __driver_attach+0x80/0x80
[    3.568031]  [<ffffffff813b53ba>] bus_for_each_drv+0x5a/0x90
[    3.568031]  [<ffffffff813b6efc>] __device_attach+0x9c/0x120
[    3.568031]  [<ffffffff813b740e>] device_initial_probe+0xe/0x10
[    3.568031]  [<ffffffff813b63e0>] bus_probe_device+0x90/0xa0
[    3.568031]  [<ffffffff813b42bb>] device_add+0x3db/0x610
[    3.568031]  [<ffffffff813e9959>] scsi_sysfs_add_sdev+0x89/0x250
[    3.568031]  [<ffffffff813db8df>] ? scsi_attach_vpd+0x14f/0x1b0
[    3.568031]  [<ffffffff813e6ba6>] scsi_probe_and_add_lun+0xfc6/0x11b0
[    3.568031]  [<ffffffff811721d5>] ? kmem_cache_alloc_trace+0x135/0x150
[    3.568031]  [<ffffffff813e73f5>] __scsi_scan_target+0xe5/0x570
[    3.568031]  [<ffffffff813b474c>] ? device_create+0x3c/0x40
[    3.568031]  [<ffffffff813c1737>] ? __pm_runtime_resume+0x47/0x60
[    3.568031]  [<ffffffff813e7960>] scsi_scan_target+0xe0/0xf0
[    3.568031]  [<ffffffffa00ac934>] sas_rphy_add+0x114/0x180 [scsi_transport_sas]
[    3.568031]  [<ffffffffa00d0579>] mpt3sas_transport_port_add+0x319/0xbe0 [mpt3sas]
[    3.568031]  [<ffffffffa00c0f77>] ? mpt3sas_config_get_enclosure_pg0+0xa7/0xc0 [mpt3sas]
[    3.568031]  [<ffffffffa00c8f2d>] _scsih_add_device+0x38d/0x5f0 [mpt3sas]
[    3.568031]  [<ffffffffa00cb1d5>] _firmware_event_work+0xaf5/0x1fc0 [mpt3sas]
[    3.568031]  [<ffffffff810765e8>] ? check_preempt_curr+0x28/0x90
[    3.568031]  [<ffffffff810783ce>] ? wake_up_new_task+0x11e/0x1b0
[    3.568031]  [<ffffffff81082bd4>] ? set_next_entity+0xa4/0x850
[    3.568031]  [<ffffffff8107071a>] worker_run_work+0x9a/0xe0
[    3.568031]  [<ffffffffa00ca6e0>] ? scsih_target_reset+0x1c0/0x1c0 [mpt3sas]
[    3.568031]  [<ffffffff81067f0b>] process_one_work+0x1db/0x4e0
[    3.568031]  [<ffffffff8106823d>] worker_thread+0x2d/0x4a0
[    3.568031]  [<ffffffff81068210>] ? process_one_work+0x4e0/0x4e0
[    3.568031]  [<ffffffff8106cae3>] kthread+0xd3/0xf0
[    3.568031]  [<ffffffff8106ca10>] ? kthread_worker_fn+0x160/0x160
[    3.568031]  [<ffffffff81568faf>] ret_from_fork+0x3f/0x80
[    3.568031]  [<ffffffff8106ca10>] ? kthread_worker_fn+0x160/0x160
[    3.568031] Code: b4 fc ff ff 4d 8b ad b0 07 00 00 4d 85 ed 74 c2 4c 89 ef e8 dc de 02 00 84 c0 75 0f 48 8b 44 24 10 c7 80 2c 04 00 00 01 00 00 00 <49> 8b 95 80 52 00 00 4c 8d bb dd 05 00 00 48 8b 82 88 00 00 00 
[    3.568031] RIP  [<ffffffff813f7797>] sd_probe+0x6d7/0x900
[    3.568031]  RSP <ffff880064ecf710>
[    3.568031] CR2: ffffffffa00e7530
[    3.568031] ---[ end trace 07e764b79299f640 ]---
[    3.637063] BUG: unable to handle kernel paging request at ffffffffffffffd8
[    3.638034] IP: [<ffffffff8106cf9b>] kthread_data+0xb/0x20
[    3.638045] PGD 7ae0d067 PUD 7ae0f067 PMD 0 
[    3.638045] Oops: 0000 [#2] SMP 
[    3.638045] Modules linked in: mpt3sas(OE+) scsi_transport_sas(OE) raid_class(OE) usb_storage xhci_pci xhci_hcd usbcore usb_common redpill(OE)
[    3.638045] CPU: 0 PID: 4776 Comm: kworker/u4:29 Tainted: G      D    OE   4.4.180+ #42218
[    3.638045] Hardware name: VMware, Inc. VMware7,1/440BX Desktop Reference Platform, BIOS VMW71.00V.18227214.B64.2106252220 06/25/2021
[    3.638045] task: ffff880079128000 ti: ffff880064ecc000 task.ti: ffff880064ecc000
[    3.638045] RIP: 0010:[<ffffffff8106cf9b>]  [<ffffffff8106cf9b>] kthread_data+0xb/0x20
[    3.638045] RSP: 0018:ffff880064ecf420  EFLAGS: 00010002
[    3.638045] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[    3.638045] RDX: ffff880100c04080 RSI: 0000000000000000 RDI: ffff880079128000
[    3.638045] RBP: ffff880064ecf420 R08: ffff880101816368 R09: 00000000d8c900cc
[    3.638045] R10: 0000000000000000 R11: ffff880079128060 R12: ffff880079128000
[    3.638045] R13: ffff880101816300 R14: ffff880101816300 R15: 0000000000000000
[    3.638045] FS:  00007f7f1dddd740(0000) GS:ffff880101800000(0000) knlGS:0000000000000000
[    3.638045] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    3.638045] CR2: 0000000000000028 CR3: 000000007ae0a000 CR4: 00000000003406b0
[    3.638045] Stack:
[    3.638045]  ffff880064ecf438 ffffffff81068f3c 0000000000016300 ffff880064ecf488
[    3.638045]  ffffffff81564e1b 0000000071710078 ffff880064ecf480 ffff880079128000
[    3.638045]  ffff880079128000 ffff880064ecf4d8 ffff880064ecf088 ffff880100d10000
[    3.638045] Call Trace:
[    3.638045]  [<ffffffff81068f3c>] wq_worker_sleeping+0xc/0x90
[    3.638045]  [<ffffffff81564e1b>] __schedule+0x36b/0x7a0
[    3.638045]  [<ffffffff81565276>] schedule+0x26/0x70
[    3.638045]  [<ffffffff81052b26>] do_exit+0x686/0xa60
[    3.638045]  [<ffffffff81008174>] oops_end+0x84/0xb0
[    3.638045]  [<ffffffff8104013d>] no_context+0xfd/0x2a0
[    3.638045]  [<ffffffff810403eb>] __bad_area_nosemaphore+0x10b/0x1f0
[    3.638045]  [<ffffffff810404de>] bad_area_nosemaphore+0xe/0x10
[    3.638045]  [<ffffffff8104089e>] __do_page_fault+0x1ee/0x3e0
[    3.638045]  [<ffffffff81040a9c>] do_page_fault+0xc/0x10
[    3.638045]  [<ffffffff8156aa12>] page_fault+0x22/0x30
[    3.638045]  [<ffffffff812dbd33>] ? ida_get_new_above+0x1c3/0x1e0
[    3.638045]  [<ffffffff813f7797>] ? sd_probe+0x6d7/0x900
[    3.638045]  [<ffffffff8109bd19>] ? vprintk_default+0x9/0x10
[    3.638045]  [<ffffffffa0003a0f>] sd_probe_shim+0x16f/0x1b8 [redpill]
[    3.638045]  [<ffffffff813b7157>] driver_probe_device+0x1a7/0x300
[    3.638045]  [<ffffffff813b73bb>] __device_attach_driver+0x8b/0xa0
[    3.638045]  [<ffffffff813b7330>] ? __driver_attach+0x80/0x80
[    3.638045]  [<ffffffff813b53ba>] bus_for_each_drv+0x5a/0x90
[    3.638045]  [<ffffffff813b6efc>] __device_attach+0x9c/0x120
[    3.638045]  [<ffffffff813b740e>] device_initial_probe+0xe/0x10
[    3.638045]  [<ffffffff813b63e0>] bus_probe_device+0x90/0xa0
[    3.638045]  [<ffffffff813b42bb>] device_add+0x3db/0x610
[    3.638045]  [<ffffffff813e9959>] scsi_sysfs_add_sdev+0x89/0x250
[    3.638045]  [<ffffffff813db8df>] ? scsi_attach_vpd+0x14f/0x1b0
[    3.638045]  [<ffffffff813e6ba6>] scsi_probe_and_add_lun+0xfc6/0x11b0
[    3.638045]  [<ffffffff811721d5>] ? kmem_cache_alloc_trace+0x135/0x150
[    3.638045]  [<ffffffff813e73f5>] __scsi_scan_target+0xe5/0x570
[    3.638045]  [<ffffffff813b474c>] ? device_create+0x3c/0x40
[    3.638045]  [<ffffffff813c1737>] ? __pm_runtime_resume+0x47/0x60
[    3.638045]  [<ffffffff813e7960>] scsi_scan_target+0xe0/0xf0
[    3.638045]  [<ffffffffa00ac934>] sas_rphy_add+0x114/0x180 [scsi_transport_sas]
[    3.638045]  [<ffffffffa00d0579>] mpt3sas_transport_port_add+0x319/0xbe0 [mpt3sas]
[    3.638045]  [<ffffffffa00c0f77>] ? mpt3sas_config_get_enclosure_pg0+0xa7/0xc0 [mpt3sas]
[    3.638045]  [<ffffffffa00c8f2d>] _scsih_add_device+0x38d/0x5f0 [mpt3sas]
[    3.638045]  [<ffffffffa00cb1d5>] _firmware_event_work+0xaf5/0x1fc0 [mpt3sas]
[    3.638045]  [<ffffffff810765e8>] ? check_preempt_curr+0x28/0x90
[    3.638045]  [<ffffffff810783ce>] ? wake_up_new_task+0x11e/0x1b0
[    3.638045]  [<ffffffff81082bd4>] ? set_next_entity+0xa4/0x850
[    3.638045]  [<ffffffff8107071a>] worker_run_work+0x9a/0xe0
[    3.638045]  [<ffffffffa00ca6e0>] ? scsih_target_reset+0x1c0/0x1c0 [mpt3sas]
[    3.638045]  [<ffffffff81067f0b>] process_one_work+0x1db/0x4e0
[    3.638045]  [<ffffffff8106823d>] worker_thread+0x2d/0x4a0
[    3.638045]  [<ffffffff81068210>] ? process_one_work+0x4e0/0x4e0
[    3.638045]  [<ffffffff8106cae3>] kthread+0xd3/0xf0
[    3.638045]  [<ffffffff8106ca10>] ? kthread_worker_fn+0x160/0x160
[    3.638045]  [<ffffffff81568faf>] ret_from_fork+0x3f/0x80
[    3.638045]  [<ffffffff8106ca10>] ? kthread_worker_fn+0x160/0x160
[    3.638045] Code: 03 50 00 49 8b 04 24 48 85 c0 75 e6 e9 07 ff ff ff 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 8b 87 c8 04 00 00 55 48 89 e5 <48> 8b 40 d8 5d c3 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 
[    3.638045] RIP  [<ffffffff8106cf9b>] kthread_data+0xb/0x20
[    3.638045]  RSP <ffff880064ecf420>
[    3.638045] CR2: ffffffffffffffd8
[    3.638045] ---[ end trace 07e764b79299f641 ]---
[    3.638045] Fixing recursive fault but reboot is needed!

In this repo: https://github.com/oceange8/redpill-tool-chain/tree/master/exts, the mpt3sas driver has been modified and it works well.But it only supports ds918p.