Opened 18 months ago

Closed 17 months ago

Last modified 17 months ago

#1694 closed defect (fixed)

SATA fix for 3snic raid controller

Reported by: steven.song Owned by: Christian Franke
Priority: minor Milestone: Release 7.4
Component: all Version:
Keywords: 3snic linux Cc:

Description

I fixed some issues when using SATA disks.

Please see attached log files.

Attachments (4)

os_linux.cpp.diff (3.1 KB ) - added by steven.song 18 months ago.
smartctl-x.log (12.5 KB ) - added by steven.song 18 months ago.
smartctl -x
3snic.dff (5.5 KB ) - added by steven.song 17 months ago.
smartctl-x.2.log (14.6 KB ) - added by steven.song 17 months ago.
updated smartctl-x.log

Download all attachments as: .zip

Change History (8)

by steven.song, 18 months ago

Attachment: os_linux.cpp.diff added

by steven.song, 18 months ago

Attachment: smartctl-x.log added

smartctl -x

comment:1 by Christian Franke, 18 months ago

Keywords: 3snic linux added
Milestone: undecided
Summary: Enhancement for 3snic raid controllerSATA fix for 3snic raid controller
Type: patchdefect

Thanks for the patch. Looks like the CK_COND issue is fixed now.

Remaining issues, some found by cppcheck (https://cppcheck.sourceforge.io/):

  • Line 1511: Non-boolean value returned from function returning bool: return (r) always returns nonzero, which is interpreted as true. IMPORTANT: Before submitting future patches, make sure to check also for sane behavior if ioctl() fails.
  • Line 1520: The cast of the first parameter is useless because it is already a pointer.
  • Line 1520: Always use C++-style casts instead of C-style casts for T=>pointer conversions, for example: memcpy(iop->sensep, reinterpret_cast<void *>(io_hdr_v4.response), len);
  • Hint: Never use legacy NULL (which is the same as 0 in C++) in new C++ code, use C++11 nullptr instead. Using the pointer as a boolean in conditions is allowed, for example if (iop->sensep && len > 0) ....
  • Hint: Lines 1449-1455: All three initial memset(...) are not needed, C++11 zero initialization is more safe. Simply append {}, for example: struct sg_io_v4 io_hdr_v4{};
  • Line 1515: Remove trailing whitespaces.
  • As usual provide a ChangeLog entry - in same diff/patch file please.

by steven.song, 17 months ago

Attachment: 3snic.dff added

by steven.song, 17 months ago

Attachment: smartctl-x.2.log added

updated smartctl-x.log

comment:2 by Christian Franke, 17 months ago

Milestone: undecidedRelease 7.4
Owner: set to Christian Franke
Status: newaccepted

comment:3 by Christian Franke, 17 months ago

Last edited 17 months ago by Christian Franke (previous) (diff)

comment:4 by Christian Franke, 17 months ago

Resolution: fixed
Status: acceptedclosed

Applied in r5457, thanks!

Note: See TracTickets for help on using tickets.