kern/151564: [ciss] ciss(4) should increase CISS_MAX_LOGICAL to 107
Sean Bruno
seanbru at yahoo-inc.com
Fri Jan 11 20:20:01 UTC 2013
The following reply was made to PR kern/151564; it has been noted by GNATS.
From: Sean Bruno <seanbru at yahoo-inc.com>
To: bug-followup at FreeBSD.org, leon.kos at lecad.fs.uni-lj.si
Cc:
Subject: Re: kern/151564: [ciss] ciss(4) should increase CISS_MAX_LOGICAL
to 107
Date: Fri, 11 Jan 2013 12:15:41 -0800
--=-ORZ+S4oOqTjltqlLU7pH
Content-Type: multipart/mixed; boundary="=-qMd4ViJxxLLO8lizsr4e"
--=-qMd4ViJxxLLO8lizsr4e
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
After speaking with HP a bit about the MAX_LOGICAL/PHYSICAL things,
they've suggested that we simply ask the controller what the device can
support as per http://cciss.sourceforge.net/#docs revision 1.06
I came up with this patch that does that and I'm looking for more
review. Tested on a P400, P410 and P420 that I have. =20
If this is acceptable, please break the exposing of physical disks into
a seperate patch so I can review.
Sean
verbose output
ciss0: <HP Smart Array P400> port 0xe800-0xe8ff mem
0xfce00000-0xfcefffff,0xfcdff000-0xfcdfffff irq 16 at device 0.0 on pci6
ciss0: PERFORMANT Transport
ciss0: attempting to allocate 1 MSI-X vectors (4 supported)
msi: routing MSI-X IRQ 256 to local APIC 0 vector 52
ciss0: using IRQ 256 for MSI-X
ciss0: Using 1 MSIX interrupt
ciss0: using 1024 of 1024 available commands
ciss0: 2 logical drives configured
ciss0: firmware 5.26
ciss0: 1 SCSI channels
ciss0: signature 'CISS'
ciss0: valence 3
ciss0: supported I/O methods 0xe0000006<simple,performant>
ciss0: active I/O method 0x5<performant>
ciss0: 4G page base 0x00000000
ciss0: interrupt coalesce delay 0us
ciss0: interrupt coalesce count 16
ciss0: max outstanding commands 1024
ciss0: bus types 0x200000
ciss0: server name ''
ciss0: heartbeat 0xe57
ciss0: max logical: 64
ciss0: max physical: 255
ciss0: max logical: 128
ciss0: 13 physical devices
ciss0: 2 logical drives
ciss0: logical drive (b0t0): RAID 1(1+0), 285696MB online
ciss0: logical drive (b0t1): RAID 0, 1399808MB online
--=-qMd4ViJxxLLO8lizsr4e
Content-Disposition: attachment; filename="ciss_probe_logical_physical.diff"
Content-Type: text/x-patch; name="ciss_probe_logical_physical.diff"; charset="UTF-8"
Content-Transfer-Encoding: base64
SW5kZXg6IGNpc3MuYw0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PQ0KLS0tIGNpc3MuYwkocmV2aXNpb24gMjQ1MzEwKQ0K
KysrIGNpc3MuYwkod29ya2luZyBjb3B5KQ0KQEAgLTEyMDUsMTEgKzEyMDUsOSBAQA0KIA0KICAg
ICAvKiBwcmludCBpbmZvcm1hdGlvbiAqLw0KICAgICBpZiAoYm9vdHZlcmJvc2UpIHsNCi0jaWYg
MAkvKiBYWFggcHJveHkgdm9sdW1lcz8/PyAqLw0KIAljaXNzX3ByaW50ZihzYywgIiAgJWQgbG9n
aWNhbCBkcml2ZSVzIGNvbmZpZ3VyZWRcbiIsDQogCQkgICAgc2MtPmNpc3NfaWQtPmNvbmZpZ3Vy
ZWRfbG9naWNhbF9kcml2ZXMsDQogCQkgICAgKHNjLT5jaXNzX2lkLT5jb25maWd1cmVkX2xvZ2lj
YWxfZHJpdmVzID09IDEpID8gIiIgOiAicyIpOw0KLSNlbmRpZg0KIAljaXNzX3ByaW50ZihzYywg
IiAgZmlybXdhcmUgJTQuNHNcbiIsIHNjLT5jaXNzX2lkLT5ydW5uaW5nX2Zpcm13YXJlX3Jldmlz
aW9uKTsNCiAJY2lzc19wcmludGYoc2MsICIgICVkIFNDU0kgY2hhbm5lbHNcbiIsIHNjLT5jaXNz
X2lkLT5zY3NpX2J1c19jb3VudCk7DQogDQpAQCAtMTIzMiw2ICsxMjMwLDE2IEBADQogCQkgICAg
IlwyMFwxdWx0cmEyXDJ1bHRyYTNcMTBmaWJyZT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wcG9ydGVkOw0KKyAgICB1X2ludDMy
X3QJbWF4X3BoeXNpY2FsX3N1cHBvcnRlZDsNCisgICAgdV9pbnQzMl90CW1heF9waHlzaWNhbF9w
ZXJfbG9naWNhbDsNCisgICAgdV9pbnQzMl90CW1heF9wZXJmb21hbnRfbW9kZV9jbWRzOw0KKyAg
ICB1X2ludDMyX3QJbWF4X2Jsb2NrX2ZldGNoX2NvdW50Ow0KIH0gX19wYWNrZWQ7DQogDQogLyoN
Cg==
--=-qMd4ViJxxLLO8lizsr4e--
--=-ORZ+S4oOqTjltqlLU7pH
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)
iQEcBAABAgAGBQJQ8HLtAAoJEBkJRdwI6BaHnXYH/3W224hbAArOSCC3b7iOw6QK
BLaGTzbO6aMDYr3tUVmJumAa6xv85cwcRiaf/viDbb9LSeeJaf3esCalPeGMhJUa
ioNRx0QbdAFOPoVhqVhu+70BhAw3sqHe+2/rAHBDAqfgwKdTUyJQIH9ah+LmWWnO
lykGgEC7Yw1Wk6aDY7QBneA5jT6E1SL069JqY5c2q9x0nxHoCWXNO1e7ErAzvbEj
45P5d9bs3wlpdVa3CqDiTa+A8lA9QxuQ1TpPF0xgojxOXuOzaIJC7co+sbY5+uFt
8ZnRkW/fjCBY1LJPrVu3QRuXmGipqUAba5YZW7wI2tZE2NNKCxKNFjUUU4B6UqI=
=EgP7
-----END PGP SIGNATURE-----
--=-ORZ+S4oOqTjltqlLU7pH--
More information about the freebsd-scsi
mailing list