← All posts tagged code

BWAHAHAHAHAHAHAHA!
poro:~% dmesg|grep puc
puc0 at pci3 dev 5 function 0 "Moxa C104H" rev 0x02: ports: 4 com
com2 at puc0 port 0 apic 2 int 20: ns16550a, 16 byte fifo
com3 at puc0 port 1 apic 2 int 20: ns16550a, 16 byte fifo
com4 at puc0 port 2 apic 2 int 20: ns16550a, 16 byte fifo
com5 at puc0 port 3 apic 2 int 20: ns16550a, 16 byte fifo
puc1 at pci3 dev 6 function 0 "Moxa CP-104JU" rev 0x00: ports: 4 com
com6 at puc1 port 0 apic 2 int 21: st16650, 32 byte fifo
com7 at puc1 port 1 apic 2 int 21: st16650, 32 byte fifo
com8 at puc1 port 2 apic 2 int 21: st16650, 32 byte fifo
com9 at puc1 port 3 apic 2 int 21: st16650, 32 byte fifo

error = ixgbe_init_shared_code(hw);
	if (error == IXGBE_ERR_SFP_NOT_PRESENT) {
за исключением того, что init_shared_code просто забивает поинтеры на функции
для разных чипов и к SFP отношения не имеет... как жеж заебал этот говнокод!

myx0 at pci7 dev 0 function 0 "Myricom Z8E" rev 0x01: msi, model 10G-PCIE2-8C2-2S, address 00:60:dd:45:4f:b0
myx1 at pci9 dev 0 function 0 "Myricom Z8E" rev 0x01: msi, model 10G-PCIE2-8C2-2S, address 00:60:dd:45:4f:b1

$ ifconfig myx0                                                                
myx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:60:dd:45:4f:b0
        priority: 0
        media: Ethernet autoselect (autoselect full-duplex,rxpause,txpause)
        status: active
        inet6 fe80::260:ddff:fe45:4fb0%myx0 prefixlen 64 scopeid 0x7
        inet 10.201.1.2 netmask 0xffffff00 broadcast 10.201.1.255
$ vmstat -i      
interrupt                       total     rate
pyro0                          130162      356
bge0                              803        2
mpi0                             2244        6
com0                              117        0
clock                           73259      200
myx0                           127918      350
Total                          334503      916

# bioctl -c 1 -l sd0d,sd1d softraid0
sd2 at scsibus1 targ 1 lun 0: <OPENBSD, SR RAID 1, 005> SCSI2 0/direct fixed
sd2: 69938MB, 512 bytes/sector, 143234040 sectors
softraid0: SR RAID 1 volume attached as sd2

а то что с ними делать?

mpi0 at pci15 dev 1 function 0 "Symbios Logic SAS1064" rev 0x02: msi
scsibus0 at mpi0: 63 targets
sd0 at scsibus0 targ 0 lun 0: <FUJITSU, MAY2073RCSUN72G, 0701> SCSI2 0/direct fixed naa.500000e0194d97b0
sd0: 70007MB, 512 bytes/sector, 143374738 sectors
sd1 at scsibus0 targ 1 lun 0: <FUJITSU, MAY2073RCSUN72G, 0701> SCSI2 0/direct fixed naa.500000e0172b2060
sd1: 70007MB, 512 bytes/sector, 143374738 sectors

back-to-back:
m4:~$ ifconfig ix
ix0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:25:90:6d:44:f2
        priority: 0
        media: Ethernet autoselect (10GbaseT full-duplex)
        status: active
ix1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:25:90:6d:44:f3
        priority: 0
        media: Ethernet autoselect (10GbaseT full-duplex)
        status: active

m4:~$ dmesg | grep ^ix                                                         
ix0 at pci2 dev 0 function 0 "Intel X540T" rev 0x01: msi, address 00:25:90:6d:44:f2
ix1 at pci2 dev 0 function 1 "Intel X540T" rev 0x01: msi, address 00:25:90:6d:44:f3
m4:~$ sudo ifconfig ix0  
ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:25:90:6d:44:f2
        priority: 0
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active
        inet6 fe80::225:90ff:fe6d:44f2%ix0 prefixlen 64 scopeid 0x1

родил конструкцию для FSM чтобы не кушать горизонтальное
пространство (aka уложиться в 80 символов):

	do switch (state) {
	case ST_XXX:
		...
		break;
	...
	} while (state != ST_FINISH);

пришло еще кое-какое неподдерживаемое железо (-:
"Intel X540T" rev 0x01 at pci2 dev 0 function 0 not configured
"Intel X540T" rev 0x01 at pci2 dev 0 function 1 not configured
"ServerEngines BladeEngine3 10GbE" rev 0x02 at pci3 dev 0 function 0 not configured
"ServerEngines BladeEngine3 10GbE" rev 0x02 at pci3 dev 0 function 1 not configured

mpii0 at pci4 dev 0 function 0 "Symbios Logic SAS2004" rev 0x03: msi
scsibus0 at mpii0: 128 targets
sd0 at scsibus0 targ 1 lun 0: <LSI, Logical Volume, 3000> SCSI4 0/direct fixed naa.600508e00000000021e6f5411d191c0a
sd0: 33378MB, 512 bytes/sector, 68358144 sectors
sd1 at scsibus0 targ 5 lun 0: <ATA, FUJITSU MHW2080B, 001E> SCSI4 0/direct fixed naa.500000e040aa8b46
sd1: 76319MB, 512 bytes/sector, 156301488 sectors

m4:~$ sudo bioctl mpii0
Volume      Status               Size Device
    mpii0 0 Online        34999369216 sd0     RAID1
          0 Online        36420075008 0:1.0   noencl <HP DG036A9BB6>
          1 Online        36420075008 0:0.0   noencl <HP DG036A8B53>

пингуем Integrated Management Module (IMM):
cdce0 at uhub4 port 5 configuration 1 interface 0 "IBM RNDIS/Ethernet Gadget" rev 2.00/3.25 addr 4
cdce0: address 2a:cb:0a:5c:3e:00

m4:~$ sudo ifconfig cdce0 169.254.90.90/16
m4:~$ ping -c 1 169.254.95.118
PING 169.254.95.118 (169.254.95.118): 56 data bytes
64 bytes from 169.254.95.118: icmp_seq=0 ttl=64 time=8.055 ms
--- 169.254.95.118 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 8.055/8.055/8.055/0.000 ms