Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Oct 2016 14:18:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 212914] CAM: SATA drives are getting deleted and then re-added after controller rescan
Message-ID:  <bug-212914-8-pZJ4O949MP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-212914-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-212914-8@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=3D212914

--- Comment #3 from Kashyap <kashyap.desai@broadcom.com> ---
Here is CAMDEBUG enabled logs  for SAS Drives. This is a working case -

Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug:
xpt_run_allocq(0xfffff80060a62e00)
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0): Probe
PROBE_EXTENDED_INQUIRY to PROBE_SERIAL_NUM
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0): xpt_schedule
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug:
xpt_run_allocq(0xfffff80060a62e00)
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0): xpt_setup_ccb
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: calling periph_start()
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0): probestart
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0):
Oct 14 18:56:06 freeBSD11_RC1 kernel: xpt_action: func 0x901 XPT_SCSI_IO
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0):
xpt_action_default: func 0x901 XPT_SCSI_IO
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:
Oct 14 18:56:06 freeBSD11_RC1 kernel: 73:0): xpt_action_default: func=3D 0x=
901
XPT_SCSI_IO status 0
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0):
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_release_devq(0, 0, 0, 0)
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0): xpt_setup_ccb
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0): xpt_action: f=
unc
0x5 XPT_REL_SIMQ
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0):
Oct 14 18:56:06 freeBSD11_RC1 kernel: xpt_action_default: func 0x5 XPT_REL_=
SIMQ
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0):
xpt_release_devq(1, 1)
Oct 14 18:56:06 freeBSD11_RC1 kernel: (noperiph:mrsas0:1:73:0):
Oct 14 18:56:06 freeBSD11_RC1 kernel: xpt_release_devq_device(1, 1) 1->0
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: xpt_schedule_dev
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: Inserting onto queue
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: xpt_run_devq
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: running device
0xfffff8000f04d000
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0):
xpt_freeze_devq(1)
Oct 14 18:56:06 freeBSD11_RC1 kernel: (noperiph:mrsas0:1:73:0):
xpt_freeze_devq_device(1) 0->1
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0):
Oct 14 18:56:06 freeBSD11_RC1 kernel: . CDB: 12 01 80 00 ff 00
Oct 14 18:56:06 freeBSD11_RC1 kernel: (probe0:mrsas0:1:73:0):
xpt_action_default: func=3D 0x5 XPT_REL_SIMQ status 0x1
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug:
xpt_run_allocq(0xfffff8000f000900)
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: calling periph_start()
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: xpt_schedule_dev
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: Inserting onto queue
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: xpt_run_devq
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: running device
0xfffff8000f165800
Oct 14 18:56:06 freeBSD11_RC1 kernel: cam_debug: xpt_run_devq


See below similar logs from SATA Drives. - This is non working case -

Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): Probe
PROBE_EXTENDED_INQUIRY to PROBE_SERIAL_NUM
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): xpt_schedule
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
cam_release_devq(0, 0, 0, 0)
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): xpt_setup_ccb
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): xpt_action: f=
unc
0x5 XPT_REL_SIMQ
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_action_default: func 0x5 XPT_REL_SIMQ
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_release_devq(1, 1)
Oct 14 18:52:04 freeBSD11_RC1 kernel: (noperiph:mrsas0:1:71:0):
xpt_release_devq_device(1, 1) 2->1
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_action_default: func=3D 0x5 XPT_REL_SIMQ status 0x1
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): xpt_setup_ccb
Oct 14 18:52:04 freeBSD11_RC1 kernel: cam_debug: calling periph_start()
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): probestart
Oct 14 18:52:04 freeBSD11_RC1 kernel: cam_debug: (probe0:xpt_run_devq
Oct 14 18:52:04 freeBSD11_RC1 kernel: mrsas0:1:cam_debug: 71:xpt_release_ccb
Oct 14 18:52:04 freeBSD11_RC1 kernel: 0): cam_debug: xpt_action: func 0x901
XPT_SCSI_IO
Oct 14 18:52:04 freeBSD11_RC1 kernel: xpt_run_allocq(0xfffff8000f000900)
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_action_default: func 0x901 XPT_SCSI_IO
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_action_default: func=3D 0x901 XPT_SCSI_IO status 0
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
cam_release_devq(0, 0, 0, 0)
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): xpt_setup_ccb
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): xpt_action: f=
unc
0x5 XPT_REL_SIMQ
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_action_default: func 0x5 XPT_REL_SIMQ
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_release_devq(1, 1)
Oct 14 18:52:04 freeBSD11_RC1 kernel: (noperiph:mrsas0:1:71:0):
xpt_release_devq_device(1, 1) 1->0
Oct 14 18:52:04 freeBSD11_RC1 kernel: cam_debug: xpt_schedule_dev
Oct 14 18:52:04 freeBSD11_RC1 kernel: cam_debug: Inserting onto queue
Oct 14 18:52:04 freeBSD11_RC1 kernel: cam_debug: xpt_run_devq
Oct 14 18:52:04 freeBSD11_RC1 kernel: cam_debug: running device
0xfffff8000f046000
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_freeze_devq(1)
Oct 14 18:52:04 freeBSD11_RC1 kernel: (noperiph:mrsas0:1:71:0):
xpt_freeze_devq_device(1) 0->1
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): . CDB: 12 01 =
80
00 ff 00
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_action_default: func=3D 0x5 XPT_REL_SIMQ status 0x1
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): xpt_done: fun=
c=3D
0x901 XPT_SCSI_IO status 0x1
Oct 14 18:52:04 freeBSD11_RC1 kernel: cam_debug: xpt_run_devq
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0): probedone
Oct 14 18:52:04 freeBSD11_RC1 kernel: (noperiph:mrsas0:1:71:0): xpt_async: =
func
0x70f XPT_ASYNC aync_code 256 AC_LOST_DEVICE
Oct 14 18:52:04 freeBSD11_RC1 kernel: (probe0:mrsas0:1:71:0):
xpt_freeze_devq(1)


>From the CAM layer code, I think xpt_async() is called from below location @
probedone. Not sure why there is a Checksum failure for SATA drives every t=
ime.
I will debug further. Any pointers ? Same h/w works fine on FREEBSD10.3. Is
there any extra logic added after FreeBSD10.3 ?


                        /*
                         * XXX Do we need to do a TUR in order to ensure
                         *     that the device really hasn't changed???
                         */
                        if ((changed !=3D 0)
                         && ((softc->flags & PROBE_NO_ANNOUNCE) =3D=3D 0))
                                xpt_async(AC_LOST_DEVICE, path, NULL);
                }
                if (serial_buf !=3D NULL)
                        free(serial_buf, M_CAMXPT);

                if (changed !=3D 0) {
                        /*
                         * Now that we have all the necessary
                         * information to safely perform transfer
                         * negotiations... Controllers don't perform
                         * any negotiation or tagged queuing until
                         * after the first XPT_SET_TRAN_SETTINGS ccb is
                         * received.  So, on a new device, just retrieve
                         * the user settings, and set them as the current
                         * settings to set the device up.
                         */
                        proberequestdefaultnegotiation(periph);
                        xpt_release_ccb(done_ccb);

                        /*
                         * Perform a TUR to allow the controller to
                         * perform any necessary transfer negotiation.
                         */
                        PROBE_SET_ACTION(softc, PROBE_TUR_FOR_NEGOTIATION);
                        xpt_schedule(periph, priority);
                        goto out;
                }


Thanks, Kashyap

--=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-212914-8-pZJ4O949MP>