Re: mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Theo de Raadt
Jonathan Matthew  wrote:

> On Sat, Dec 28, 2019 at 03:23:51AM +0100, Klemens Nanni wrote:
> > On Sat, Dec 28, 2019 at 01:14:17PM +1100, Jonathan Gray wrote:
> > > drop the _PCIE and just have
> > > 
> > > product SYMBIOS SSS6200
> > Sure enough.  I added it in analogy to other devices.  What is the rule
> > here for such suffix?  Only when the same product/chip is available
> > as PCI *and* PCIE model or so?

pci vs pcie, what's the difference?



Re: mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Jonathan Matthew
On Sat, Dec 28, 2019 at 03:23:51AM +0100, Klemens Nanni wrote:
> On Sat, Dec 28, 2019 at 01:14:17PM +1100, Jonathan Gray wrote:
> > drop the _PCIE and just have
> > 
> > product SYMBIOS SSS6200
> Sure enough.  I added it in analogy to other devices.  What is the rule
> here for such suffix?  Only when the same product/chip is available
> as PCI *and* PCIE model or so?

I don't think there are particular rules there, we just have to use
something to distinguish different IDs for the same device.  Adding _PCIE
to this one doesn't really help, so I think it's better without.

ok jmatthew@

> 
> 
> Index: mpii.c
> ===
> RCS file: /cvs/src/sys/dev/pci/mpii.c,v
> retrieving revision 1.121
> diff -u -p -r1.121 mpii.c
> --- mpii.c12 Sep 2019 22:22:53 -  1.121
> +++ mpii.c28 Dec 2019 02:21:03 -
> @@ -413,6 +413,7 @@ mpii_dvatosge(struct mpii_sge *sge, u_in
>  static const struct pci_matchid mpii_devices[] = {
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2004 },
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2008 },
> + { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SSS6200 },
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_3 },
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_4 },
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_5 },
> Index: pcidevs
> ===
> RCS file: /cvs/src/sys/dev/pci/pcidevs,v
> retrieving revision 1.1902
> diff -u -p -r1.1902 pcidevs
> --- pcidevs   20 Nov 2019 16:33:00 -  1.1902
> +++ pcidevs   28 Dec 2019 02:20:53 -
> @@ -6195,6 +6195,7 @@ product SYMBIOS SAS2108_5   0x0077  SAS2108
>  product SYMBIOS SAS2108_10x0078  MegaRAID SAS2108 CRYPTO GEN2
>  product SYMBIOS SAS2108_20x0079  MegaRAID SAS2108 GEN2
>  product SYMBIOS SAS1078DE0x007c  SAS1078DE
> +product SYMBIOS SSS6200  0x007e  SSS6200
>  product SYMBIOS SAS2208_10x0080  SAS2208
>  product SYMBIOS SAS2208_20x0081  SAS2208
>  product SYMBIOS SAS2208_30x0082  SAS2208



Re: mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Klemens Nanni
On Sat, Dec 28, 2019 at 01:14:17PM +1100, Jonathan Gray wrote:
> drop the _PCIE and just have
> 
> product SYMBIOS SSS6200
Sure enough.  I added it in analogy to other devices.  What is the rule
here for such suffix?  Only when the same product/chip is available
as PCI *and* PCIE model or so?


Index: mpii.c
===
RCS file: /cvs/src/sys/dev/pci/mpii.c,v
retrieving revision 1.121
diff -u -p -r1.121 mpii.c
--- mpii.c  12 Sep 2019 22:22:53 -  1.121
+++ mpii.c  28 Dec 2019 02:21:03 -
@@ -413,6 +413,7 @@ mpii_dvatosge(struct mpii_sge *sge, u_in
 static const struct pci_matchid mpii_devices[] = {
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2004 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2008 },
+   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SSS6200 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_3 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_4 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_5 },
Index: pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1902
diff -u -p -r1.1902 pcidevs
--- pcidevs 20 Nov 2019 16:33:00 -  1.1902
+++ pcidevs 28 Dec 2019 02:20:53 -
@@ -6195,6 +6195,7 @@ product SYMBIOS SAS2108_5 0x0077  SAS2108
 product SYMBIOS SAS2108_1  0x0078  MegaRAID SAS2108 CRYPTO GEN2
 product SYMBIOS SAS2108_2  0x0079  MegaRAID SAS2108 GEN2
 product SYMBIOS SAS1078DE  0x007c  SAS1078DE
+product SYMBIOS SSS62000x007e  SSS6200
 product SYMBIOS SAS2208_1  0x0080  SAS2208
 product SYMBIOS SAS2208_2  0x0081  SAS2208
 product SYMBIOS SAS2208_3  0x0082  SAS2208



Re: mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Jonathan Gray
On Sat, Dec 28, 2019 at 02:35:39AM +0100, Klemens Nanni wrote:
> On Sat, Dec 28, 2019 at 11:10:28AM +1000, Jonathan Matthew wrote:
> > It'd be better to use the LSI chip name for this, which is SSS6200.  There 
> > are
> > other devices with different flash configurations using the same 
> > vendor/product
> > ID.  Searching ebay for 'lsi nytro' or 'lsi sss6200' will find a few 
> > different
> > varieties.
> That makes sense.  FWIW, FreeBSD also calls it by the chip name:
> 
> #define MPI2_MFGPAGE_DEVID_SSS6200  (0x007E)
> 
> OK?

drop the _PCIE and just have

product SYMBIOS SSS6200

> 
> 
> Index: mpii.c
> ===
> RCS file: /cvs/src/sys/dev/pci/mpii.c,v
> retrieving revision 1.121
> diff -u -p -r1.121 mpii.c
> --- mpii.c12 Sep 2019 22:22:53 -  1.121
> +++ mpii.c28 Dec 2019 01:32:41 -
> @@ -413,6 +413,7 @@ mpii_dvatosge(struct mpii_sge *sge, u_in
>  static const struct pci_matchid mpii_devices[] = {
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2004 },
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2008 },
> + { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SSS6200_PCIE },
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_3 },
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_4 },
>   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_5 },
> Index: pcidevs
> ===
> RCS file: /cvs/src/sys/dev/pci/pcidevs,v
> retrieving revision 1.1902
> diff -u -p -r1.1902 pcidevs
> --- pcidevs   20 Nov 2019 16:33:00 -  1.1902
> +++ pcidevs   28 Dec 2019 01:32:21 -
> @@ -6195,6 +6195,7 @@ product SYMBIOS SAS2108_5   0x0077  SAS2108
>  product SYMBIOS SAS2108_10x0078  MegaRAID SAS2108 CRYPTO GEN2
>  product SYMBIOS SAS2108_20x0079  MegaRAID SAS2108 GEN2
>  product SYMBIOS SAS1078DE0x007c  SAS1078DE
> +product SYMBIOS SSS6200_PCIE 0x007e  SSS6200
>  product SYMBIOS SAS2208_10x0080  SAS2208
>  product SYMBIOS SAS2208_20x0081  SAS2208
>  product SYMBIOS SAS2208_30x0082  SAS2208
> 
> 



Re: mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Klemens Nanni
On Sat, Dec 28, 2019 at 11:10:28AM +1000, Jonathan Matthew wrote:
> It'd be better to use the LSI chip name for this, which is SSS6200.  There are
> other devices with different flash configurations using the same 
> vendor/product
> ID.  Searching ebay for 'lsi nytro' or 'lsi sss6200' will find a few different
> varieties.
That makes sense.  FWIW, FreeBSD also calls it by the chip name:

#define MPI2_MFGPAGE_DEVID_SSS6200  (0x007E)

OK?


Index: mpii.c
===
RCS file: /cvs/src/sys/dev/pci/mpii.c,v
retrieving revision 1.121
diff -u -p -r1.121 mpii.c
--- mpii.c  12 Sep 2019 22:22:53 -  1.121
+++ mpii.c  28 Dec 2019 01:32:41 -
@@ -413,6 +413,7 @@ mpii_dvatosge(struct mpii_sge *sge, u_in
 static const struct pci_matchid mpii_devices[] = {
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2004 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2008 },
+   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SSS6200_PCIE },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_3 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_4 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_5 },
Index: pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1902
diff -u -p -r1.1902 pcidevs
--- pcidevs 20 Nov 2019 16:33:00 -  1.1902
+++ pcidevs 28 Dec 2019 01:32:21 -
@@ -6195,6 +6195,7 @@ product SYMBIOS SAS2108_5 0x0077  SAS2108
 product SYMBIOS SAS2108_1  0x0078  MegaRAID SAS2108 CRYPTO GEN2
 product SYMBIOS SAS2108_2  0x0079  MegaRAID SAS2108 GEN2
 product SYMBIOS SAS1078DE  0x007c  SAS1078DE
+product SYMBIOS SSS6200_PCIE   0x007e  SSS6200
 product SYMBIOS SAS2208_1  0x0080  SAS2208
 product SYMBIOS SAS2208_2  0x0081  SAS2208
 product SYMBIOS SAS2208_3  0x0082  SAS2208



Re: mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Jonathan Matthew
On Fri, Dec 27, 2019 at 05:54:56PM -0700, Theo de Raadt wrote:
> > +product SYMBIOS F80_PCIE   0x007e  Flash Accelerator F80 800GB eMLC
> 
> Please keep it short, these strings land in every kernel.
> 
> F80 eMLC
> 
> That is probably enough, on top of SYMBIOS vendorID.

It'd be better to use the LSI chip name for this, which is SSS6200.  There are
other devices with different flash configurations using the same vendor/product
ID.  Searching ebay for 'lsi nytro' or 'lsi sss6200' will find a few different
varieties.



Re: mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Klemens Nanni
On Fri, Dec 27, 2019 at 05:54:56PM -0700, Theo de Raadt wrote:
> Please keep it short, these strings land in every kernel.
> 
> F80 eMLC
> 
> That is probably enough, on top of SYMBIOS vendorID.
Sure, OK like that or should the define's "_PCIE" suffix go as well?

Index: mpii.c
===
RCS file: /cvs/src/sys/dev/pci/mpii.c,v
retrieving revision 1.121
diff -u -p -r1.121 mpii.c
--- mpii.c  12 Sep 2019 22:22:53 -  1.121
+++ mpii.c  27 Dec 2019 23:41:35 -
@@ -413,6 +413,7 @@ mpii_dvatosge(struct mpii_sge *sge, u_in
 static const struct pci_matchid mpii_devices[] = {
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2004 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2008 },
+   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_F80_PCIE },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_3 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_4 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_5 },
Index: pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1902
diff -u -p -r1.1902 pcidevs
--- pcidevs 20 Nov 2019 16:33:00 -  1.1902
+++ pcidevs 28 Dec 2019 01:02:23 -
@@ -6195,6 +6195,7 @@ product SYMBIOS SAS2108_5 0x0077  SAS2108
 product SYMBIOS SAS2108_1  0x0078  MegaRAID SAS2108 CRYPTO GEN2
 product SYMBIOS SAS2108_2  0x0079  MegaRAID SAS2108 GEN2
 product SYMBIOS SAS1078DE  0x007c  SAS1078DE
+product SYMBIOS F80_PCIE   0x007e  F80 eMLC
 product SYMBIOS SAS2208_1  0x0080  SAS2208
 product SYMBIOS SAS2208_2  0x0081  SAS2208
 product SYMBIOS SAS2208_3  0x0082  SAS2208



Re: mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Theo de Raadt
> +product SYMBIOS F80_PCIE   0x007e  Flash Accelerator F80 800GB eMLC

Please keep it short, these strings land in every kernel.

F80 eMLC

That is probably enough, on top of SYMBIOS vendorID.



mpii: attach Flash Accelerator F80 800G eMLC

2019-12-27 Thread Klemens Nanni
vendor "Symbios Logic", unknown product 0x007e (class mass storage 
subclass SAS, rev 0x03) at pci19 dev 0 function 0 not configured

Such devices can be found on SPARC T4 machines, they are eMLC flash
accelerator cards.

After looking into mpii(4) and jmatthew guessing that attaching them
might just work, here's a diff to do so:

mpii1 at pci19 dev 0 function 0 "Symbios Logic Flash Accelerator F80 
800GB eMLC" rev 0x03: msi
mpii1: ELP-4x200-4d-n, firmware 113.5.3.1 IR, MPI 2.0
scsibus2 at mpii1: 17 targets
sd1 at scsibus2 targ 5 lun 0:  
naa.5002361000375143
sd2 at scsibus2 targ 6 lun 0:  
naa.5002361000375077
sd3 at scsibus2 targ 7 lun 0:  
naa.5002361000375087
sd4 at scsibus2 targ 8 lun 0:  
naa.5002361000375236

It exports four disks of which all look identical except for existing
labels/filesystems:

# disklabel sd2
# /dev/rsd2c:
type: SCSI
disk: SCSI disk
label: ATA-2E256-TU2-51
duid: 
flags: vendor
bytes/sector: 512
sectors/track: 56
tracks/cylinder: 224
sectors/cylinder: 12544
cylinders: 31138
total sectors: 390625001
boundstart: 0
boundend: 390625001
drivedata: 0 
16 partitions:

#size   offset  fstype [fsize bsize   cpg]
  a:   2634240  4.2BSD   2048 1638416 
  b:   263424   263424  unused
  c:3906250010  unused
  g:390068224   526848  4.2BSD   2048 1638416 

I can successfully create labels on the disk and write with decent speed:

# dd if=/dev/zero of=/mnt/10G bs=1m count=$((10*1024)) conv=fsync
10240+0 records in
10240+0 records out
10737418240 bytes transferred in 23.696 secs (453123305 bytes/sec)


Is that product name appropiate or rather too long?  Other models such
as the F40 feature 400G for example.

OK?

Index: mpii.c
===
RCS file: /cvs/src/sys/dev/pci/mpii.c,v
retrieving revision 1.121
diff -u -p -r1.121 mpii.c
--- mpii.c  12 Sep 2019 22:22:53 -  1.121
+++ mpii.c  27 Dec 2019 23:41:35 -
@@ -413,6 +413,7 @@ mpii_dvatosge(struct mpii_sge *sge, u_in
 static const struct pci_matchid mpii_devices[] = {
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2004 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2008 },
+   { PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_F80_PCIE },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_3 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_4 },
{ PCI_VENDOR_SYMBIOS,   PCI_PRODUCT_SYMBIOS_SAS2108_5 },
Index: pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1902
diff -u -p -r1.1902 pcidevs
--- pcidevs 20 Nov 2019 16:33:00 -  1.1902
+++ pcidevs 27 Dec 2019 23:01:18 -
@@ -6195,6 +6195,7 @@ product SYMBIOS SAS2108_5 0x0077  SAS2108
 product SYMBIOS SAS2108_1  0x0078  MegaRAID SAS2108 CRYPTO GEN2
 product SYMBIOS SAS2108_2  0x0079  MegaRAID SAS2108 GEN2
 product SYMBIOS SAS1078DE  0x007c  SAS1078DE
+product SYMBIOS F80_PCIE   0x007e  Flash Accelerator F80 800GB eMLC
 product SYMBIOS SAS2208_1  0x0080  SAS2208
 product SYMBIOS SAS2208_2  0x0081  SAS2208
 product SYMBIOS SAS2208_3  0x0082  SAS2208