Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Feb 2012 20:56:41 +0530
From:      "Desai, Kashyap" <Kashyap.Desai@lsi.com>
To:        Jason Wolfe <nitroboost@gmail.com>
Cc:        "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>, "McConnell, Stephen" <Stephen.McConnell@lsi.com>
Subject:   RE: LSI2008 controller clobbers first disk with new LSI mps driver
Message-ID:  <B2FD678A64EAAD45B089B123FDFC3ED72B96D34626@inbmail01.lsi.com>
References:  <CAAAm0r2NFhF=eh2bOPMnVN8E6e2o0KfaST0N-M_gWoJHpFOLmQ@mail.gmail.com> <CAAAm0r37H0Pf_HvFTqo%2B1RSCV%2BBkzD5EcXj5M40H9xGREr%2Bfow@mail.gmail.com> <B2FD678A64EAAD45B089B123FDFC3ED72B96D344CA@inbmail01.lsi.com> <CAAAm0r3MVHZixAKDF=ChD977PbNUC8dyiBFB=NzC30S8FeZ3Nw@mail.gmail.com> <B2FD678A64EAAD45B089B123FDFC3ED72B96D344F2@inbmail01.lsi.com> <CAAAm0r02bXNve6Do5C1m1RyzLhWA9xx97KKMeLhcHC66U2SF4g@mail.gmail.com> <B2FD678A64EAAD45B089B123FDFC3ED72B96D34500@inbmail01.lsi.com> <CAFPOs6pwb44oNabH5vabDPJyFutMKa5mhgvHY=HkQVpV20YiYw@mail.gmail.com> <CAAAm0r1pWN-F=madGdk7N%2BoRuZmSD5_MAYwLh6By126L0CTGuw@mail.gmail.com> <B2FD678A64EAAD45B089B123FDFC3ED72B96D34558@inbmail01.lsi.com> <CAAAm0r1x15_ho2MD0tX7Y7A6mnU2N6zihNOz_Qz=jpsyBkDCWQ@mail.gmail.com> <B2FD678A64EAAD45B089B123FDFC3ED72B96D3455B@inbmail01.lsi.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
--_002_B2FD678A64EAAD45B089B123FDFC3ED72B96D34626inbmail01lsic_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Alternative to below approach. You can better try applying attached patch.

This patch will dump necessary information from you test.
Please send me dmesg log (same as last time verbose mps debug log)

` Kashyap

> -----Original Message-----
> From: Desai, Kashyap
> Sent: Monday, February 20, 2012 3:55 PM
> To: Jason Wolfe
> Cc: freebsd-scsi@freebsd.org; McConnell, Stephen
> Subject: RE: LSI2008 controller clobbers first disk with new LSI mps
> driver
>=20
> Jason,
>=20
> I tried to reproduce similar issue using multiple h/w but not success in
> reproduction.
> Also code does not looks very obvious issues which can be identify
> through code review.
>=20
> Can you send me the output of below command.
>=20
> "lsiutil -a 0 100 > /tmp/a.out"
>=20
> ` Kashyap
>=20
> > -----Original Message-----
> > From: owner-freebsd-scsi@freebsd.org [mailto:owner-freebsd-
> > scsi@freebsd.org] On Behalf Of Desai, Kashyap
> > Sent: Saturday, February 18, 2012 1:28 AM
> > To: Jason Wolfe
> > Cc: freebsd-scsi@freebsd.org; McConnell, Stephen
> > Subject: RE: LSI2008 controller clobbers first disk with new LSI mps
> > driver
> >
> > Jason,
> >
> > Thanks for the data. Now, I am able to understand real issue.  See
> below
> > details from debug logs.
> > See my comment with << marks.
> >
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f5cdb5
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x000a> <2/0>
> > mps0: Target id 0x8 added
> > <<------------------------------------->>
> > Here suppose to be a boot device and it is device connected to slot-0,
> > detected
> > Very well as first device at driver. Assigned Target id =3D 8.
> > This is as expected.
> > <<------------------------------------->>
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f49c01
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x000b> <2/1>
> > mps0: Target id 0x9 added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f6c799
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x000c> <2/2>
> > mps0: Target id 0xa added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033e562f5
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x000d> <2/3>
> > mps0: Target id 0xb added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f49a41
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x000e> <2/4>
> > mps0: Target id 0xc added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f5efe9
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x000f> <2/5>
> > mps0: Target id 0xd added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f49a11
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x0010> <2/6>
> > mps0: Target id 0xe added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f49c71
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x0011> <2/7>
> > mps0: Target id 0xf added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f40fb1
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x0012> <2/8>
> > mps0: Target id 0x10 added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f6cba9
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x0013> <2/9>
> > mps0: Target id 0x11 added
> > mps0: (13)->(mpssas_fw_work) Event Free: [1c]
> > mps0: (13)->(mpssas_fw_work) Working on  Event: [1c]
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f650cd
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x0014> <2/10>
> > mps0: Target id 0x12 added
> > mps0: SAS Address from SAS device page0 =3D 5000c50033f29109
> > mps0: Found device <401<SspTarg>,End Device> <6.0Gbps> <0x0015> <2/11>
> > mps0: Target id 0x13 added
> > <<-- Now Driver detects SES devices. -->>
> > _But_ unfortunetly driver assign Target-id =3D 8 to the SES device.
> > This will override device mapping table of Drive and Target-id =3D 8 is
> no
> > more your boot device which was detected very first.
> > This needs to be fix in driver. I am currently not in office. (Working
> > at Asia pacific time zone)
> > I will have a look of this and provide you some solution.
> > <<------------------------------------->>
> > mps0: SAS Address from SAS device page0 =3D 500304800126e3fd
> > mps0: Found device <4451<SmpInit,SspInit,SspTarg,SepDev>,End Device>
> > <6.0Gbps> <0x0016> <2/0>
> > mps0: Target id 0x8 added
> > mps0: mpssas_startup_decrement releasing simq
> > mps0: Queueing rescan for (xpt0:mps0:0:-1:-1):
> >
> >
> > ~ Kashyap
> >
> > > -----Original Message-----
> > > From: Jason Wolfe [mailto:nitroboost@gmail.com]
> > > Sent: Saturday, February 18, 2012 1:00 AM
> > > To: Desai, Kashyap
> > > Cc: Maksim Yevmenkin; freebsd-scsi@freebsd.org
> > > Subject: Re: LSI2008 controller clobbers first disk with new LSI mps
> > > driver
> > >
> > > Kashyap,
> > >
> > > The boot drive is always the first disk, enclosure 0, and should be
> > da0.
> > > It is the same model as the other 11 disks also.
> > >
> > > PCI  ENCL LUN VENDOR   PRODUCT          PRODUCT     SIZE \
> > > SLOT SLOT NUM NAME     IDENTIFIER       REVISION    NVDATA
> > > ---- ---- --- -------- ---------------- ----------- ---------
> > >   5           LSI      SAS2008-IT       10.00.02.00  0A:02:00:04
> > >   5    0   0  SEAGATE  ST91000640SS     0001           953 GB
> > > <-------- boot drive/wanted da0/masked by ses device
> > >   5    1   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5    2   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5    3   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5    4   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5    5   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5    6   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5    7   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5    8   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5    9   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5   10   0  SEAGATE  ST91000640SS     0001           953 GB
> > >   5   11   0  SEAGATE  ST91000640SS     0001           953 GB
> > >
> > > Attached is the verbose dmesg with the mps.debuglevel set.
> > >
> > > Jason
> > >
> > > On Fri, Feb 17, 2012 at 11:54 AM, Desai, Kashyap
> > <Kashyap.Desai@lsi.com>
> > > wrote:
> > > >
> > > >
> > > > OK, So you have your / partion on da0. (this drive is attached to
> > > > which phy ?) Since all Drive are from same manufacture and Same
> > > variant, it is difficult to collect data from this dmesg log.
> > > >
> > > > Can you put the following in /boot/loader.conf:
> > > >
> > > > hw.mps.debug_level=3D0xd
> > > >
> > > > Here is some context of the target id generation logic in <mps>
> > > >
> > > > Older driver available in FreeBSD-8 Stable, will not have any
> logic
> > in
> > > driver to generate Target id mapping.
> > > > So it will give da0 device name to the drive which is detected
> First
> > > by FW.
> > > >
> > > > With newer driver story is little different. Drive will find the
> DPM
> > > > page in FW for particular drive detected by FW and it will do
> > mapping
> > > Either by Enclosure slot mapping / Device mapping.
> > > >
> > > > I am trying to see how best I can solve your issue.
> > > >
> > > > Also, In this case which device has actually you wants to be da0 ?
> (
> > I
> > > > mean boot driver has got which device name ? )
> > > >
> > > > Let me see your another dmesg output.
> > > >
> > > > ` Kashyap
> > _______________________________________________
> > freebsd-scsi@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> > To unsubscribe, send any mail to "freebsd-scsi-
> unsubscribe@freebsd.org"

--_002_B2FD678A64EAAD45B089B123FDFC3ED72B96D34626inbmail01lsic_
Content-Type: application/octet-stream; name="dump_mapping_svn.patch"
Content-Description: dump_mapping_svn.patch
Content-Disposition: attachment; filename="dump_mapping_svn.patch"; size=4091; 
	creation-date="Mon, 20 Feb 2012 15:26:08 GMT";
	modification-date="Mon, 20 Feb 2012 20:29:30 GMT"
Content-Transfer-Encoding: base64

SW5kZXg6IG1wc19tYXBwaW5nLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbXBzX21hcHBpbmcuYwkocmV2aXNp
b24gMjMxOTM2KQorKysgbXBzX21hcHBpbmcuYwkod29ya2luZyBjb3B5KQpAQCAtMTQ1OCw3ICsx
NDU4LDM1IEBACiAJ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RFKQogCQkgICAgPT0g
TVBJMl9JT0NQQUdFOF9GTEFHU19ERVZJQ0VfUEVSU0lTVEVOQ0VfTUFQUElORykgewogCQlpZiAo
ZGV2aWNlX2luZm8gJiBNUEkyX1NBU19ERVZJQ0VfSU5GT19TQVRBX0RFVklDRSkgewpJbmRleDog
bXBzdmFyLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PQotLS0gbXBzdmFyLmgJKHJldmlzaW9uIDIzMTkzNikKKysrIG1w
c3Zhci5oCSh3b3JraW5nIGNvcHkpCkBAIC03NDIsNiArNzQyLDcgQEAKIHZvaWQgbXBzX21hcHBp
bmdfY2hlY2tfZGV2aWNlcyhzdHJ1Y3QgbXBzX3NvZnRjICosIGludCk7CiBpbnQgbXBzX21hcHBp
bmdfYWxsb2NhdGVfbWVtb3J5KHN0cnVjdCBtcHNfc29mdGMgKnNjKTsKIHVuc2lnbmVkIGludCBt
cHNfbWFwcGluZ19nZXRfc2FzX2lkKHN0cnVjdCBtcHNfc29mdGMgKiwgdWludDY0X3QgLCB1MTYp
Owordm9pZCBtcHNfZHVtcF9kZXZfbWFwcGluZ190YWJsZShzdHJ1Y3QgbXBzX3NvZnRjICopOwog
dW5zaWduZWQgaW50IG1wc19tYXBwaW5nX2dldF9zYXNfaWRfZnJvbV9oYW5kbGUoc3RydWN0IG1w
c19zb2Z0YyAqc2MsCiAgICAgdTE2IGhhbmRsZSk7CiB1bnNpZ25lZCBpbnQgbXBzX21hcHBpbmdf
Z2V0X3JhaWRfaWQoc3RydWN0IG1wc19zb2Z0YyAqc2MsIHU2NCB3d2lkLAo=

--_002_B2FD678A64EAAD45B089B123FDFC3ED72B96D34626inbmail01lsic_--



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