Вы находитесь на странице: 1из 4

1.

Checkout driver source

svn co http://srcserver.lvn.broadcom.net:8080/svndata/eio-repos/trunk/eio-sw/

To checkout a particular revision


svn co -r39394 http://srcserver.lvn.broadcom.net:8080/svndata/eio-repos/trunk/eio-
sw/driver

insmod ocs_fc_ramd.ko num_luns=2 ramdisc_size=500M initiator=0 target=1 loglevel=5


global_ramdisc=0 hw_cmpl_context=0
insmod ocs_fc_ramd.ko num_luns=2 ramdisc_size=500M initiator=0 target=1 loglevel=5
logmask=0x3f global_ramdisc=0 hw_cmpl_context=0
insmod ocs_fc_ramd.ko num_luns=2 ramdisc_size=500M initiator=0 target=1 loglevel=5
2. Driver documents are at
/eio-sw/doc

3. Driver is at
/eio-sw/driver

4. Three backends
RAMD, SCST, LIO

ramd backend => eio-sw/driver/linux/ocs_fc_ramd


SCST backend => eio-sw/driver/linux/ocs_fc_scst
LIO backend => eio-sw/driver/linux/ocs_fc_lio

5. Compile the ocs_fc_ramd driver

cd eio-sw/driver/linux/ocs_fc_ramd
make clean; make

driver module is "ocs_fc_ramd.ko"

6. Load the driver

First make sure lpfc driver is not loaded.

modprobe scsi_transport_fc ( by default it will be loaded, if it is not there,


issue this command )
rmmod lpfc
insmod ./ocs_fc_ramd.ko initiator=0 target=1 ramdisc_size=900m num_luns=1
global_ramdisc=0

7. To see the driver logs

dmesg
dmesg -c => clear the logs

review board
===============
http://cmengapps1.lvn.broadcom.net/dashboard/

svn commit and diff


====================
svn diff -x -p

while new review request file is /trunk/eio-sw/driver/

svn commit --editor-cmd=vim --username=tt021297

BZ 202565:"description of bug" ==>inside the file write this with correct


description

After this go to bug number in bugzilla and change the status to fixed

On Initiator side
====================
1. Load the initiator driver
modprobe lpfc

2. See the targets


[root@localhost work]# lsscsi -sg
[1:0:0:0] disk ATA ST500NM0011 SN03 /dev/sda /dev/sg0 500GB
[17:0:0:0] disk EMULEX ocs-ramd 0000 /dev/sdb /dev/sg1 943MB

3. To issue IO operations
pain -f/dev/sdc 10MB -b512B -t1 -Q32 -n -u -q5 -w -o -Y1
"pain -h " for help

insmod ./ocs_fc_ramd.ko initiator=0 target=1 ramdisc_size=900m num_luns=1


global_ramdisc=0 loglevel=5 logmask=0x3f

Understand queues
EQ, CQ, WQ, RQ, MQ

====================================

1. cd eio-sw/tools/user/elxsdkutil
make clean; make

2. ./elxsdkutil help

3. To upgrade firmware
./elxsdkutil write -f /home/arindam/fw_imgs/11.2.178.0/lancer_A.grp -d 0

================================

Starting point for IO in driver

ocs_hal_eq_process()

Parse eq etry, extract cq_id.

Using cq_id, process that completion queue


ocs_hal_cq_process()

Initialization:

ocs_setup_msix()
rc = request_irq(ocs_os->msix_vec[i].vector,
ocs_intr_msix,
IRQF_DISABLED, DRV_NAME,
&ocs_os->intr_context[i]);

Interaction between driver and backend


==============================

Target
Initiator

Sends
write command,

Receives unsolicited command in RQ

Notifies backend. Backend will callback

Sends XFER_RDY to initiator


Receives
XFER_RDY, sends data

Gets solicited data in WQ

Passes it to backend,
Backend callbacks driver.
Driver sends response to initiator

Initiator receives response. Is the response is good, over.

Refer page 19 in scst document.

Protocol specific
===============================
FLOGI
PLOGI
PRLI
SCN
Section 5.5 in IBM fc book attached.

Also attaching Hardware document for reference.


==============================================
eio_sw/driver

[root@localhost driver]# ls
bsd common linux scsi_target sdk_compile.sh uspace

[root@localhost driver]# rm -rf bsd

[root@localhost driver]# cd common/


[root@localhost common]# rm -rf hal3
[root@localhost common]# rm -rf ihal/
[root@localhost common]# rm -rf ocs_workload/
[root@localhost common]# rm -rf ocs_iscsi

[root@localhost common]# cd ../linux/


[root@localhost linux]# rm -rf *iscsi*

[root@localhost linux]# cd ..

Build ctags using


ctags -R

Build cscope using


cscope -R
=====================

IPMI
========

10.192.237.90 ADMIN/ADMIN

10.192.237.92

Patch commands to trunk


==========================
create one file with yyyy.patch
patch -p 1 -i yyyy.patch

Вам также может понравиться