Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Aug 2023 13:47:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273289] smartpqi: fix panic on removal of SAS drive
Message-ID:  <bug-273289-227-vc1d9LvERl@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-273289-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-273289-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273289

--- Comment #8 from John F. Carr <jfc@mit.edu> ---
Created attachment 244386
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D244386&action=
=3Dedit
move free out of spinlock (new driver)

Because pqisrc_free_device has changed in the new driver a new patch is nee=
ded.
 I tested this by copying the new driver to 13.2-CURRENT, the version I am
running on my HPE server.  The new driver is very chatty, see below.  Inste=
ad
of a compile-time constant the variable logging_level in smartpqi_defines.h
should be a tunable and the default value should not include PQISRC_FLAGS_N=
OTE.

The driver appears to be trying to delete the drive twice.  See the "Invalid
device" note.

The following is the dmesg output triggered by removing and replacing a dri=
ve,
which would have caused a panic with the unpatched old driver.

[NOTE]:[ pqisrc_display_device_info ] [ 274 ]removed scsi BTL 0:8:0:  SEAGA=
TE=20
XS960SE70004     Physical     SSDSmartPathCap- En- Exp+ qd=3D65535
[NOTE]:[ pqisrc_remove_device ] [ 1443 ]vendor: SEAGATE XS960SE70004     mo=
del:
XS960SE70004     bus:0 target:8 lun:0 is_physical_device:0x1 expose_device:=
0x1
volume_offline 0x0 volume_status 0x0=20
[WARN]:[67:655.0][0,8,0][CPU
0][pqisrc_wait_for_device_commands_to_complete][430]:Device Outstanding IO
count =3D 0
[NOTE]:[ pqisrc_free_device ] [ 1643 ]Giving back target 8=20
[NOTE]:[ pqisrc_delete_softs_entry ] [ 363 ]Invalid device, either it was
already removed or never added
[NOTE]:[ pqisrc_free_device ] [ 1673 ]Removed memory for device : B 0: T 8:=
 L 0
da7 at smartpqi0 bus 0 scbus0 target 8 lun 0
da7: <SEAGATE XS960SE70004 0003>  s/n HLJ03TL80000822150Z3 detached
(da7:smartpqi0:0:8:0): Periph destroyed
[NOTE]:[ pqisrc_add_softs_entry ] [ 288 ]Added device [7 of 10]: B 0: T 8: =
L 0
[NOTE]:[ pqisrc_add_device ] [ 1420 ]vendor: SEAGATE XS960SE70004     model:
XS960SE70004     bus:0 target:8 lun:0 is_physical_device:0x1 expose_device:=
0x1
volume_offline 0x0 volume_status 0x0=20
[NOTE]:[ pqisrc_display_device_info ] [ 274 ]added scsi BTL 0:8:0:  SEAGATE=
=20
XS960SE70004     Physical     SSDSmartPathCap- En- Exp+ qd=3D65535
ses0: da7,pass8 in 'ArrayElement0007', SAS Slot: 1 phys at slot 8
ses0:  phy 0: SAS device type 1 phy 7 Target ( SSP )
ses0:  phy 0: parent 51402ec013d6a5b4 addr 5000c5003e85f2bd
da7 at smartpqi0 bus 0 scbus0 target 8 lun 0
da7: <SEAGATE XS960SE70004 0003> Fixed Direct Access SPC-5 SCSI device

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273289-227-vc1d9LvERl>