• Quinn Tran's avatar
    scsi: qla2xxx: Add mode control for each physical port · 0645cb83
    Quinn Tran authored
    Add ability to allow each physical port to control operating mode.  Current
    code forces all ports to behave in one mode (i.e. initiator, target or
    dual). This patch allows user to select the operating mode for each port.
    
    - Driver must be loaded in dual mode to allow resource allocation
    
    modprobe qla2xxx qlini_mode=dual
    
    - In addition user can make adjustment to exchange resources using following
      command
    
    echo 1024 > /sys/class/scsi_host/host<x>/ql2xiniexchg
    echo 1024 > /sys/class/scsi_host/host<x>/ql2xexchoffld
    
    - trigger mode change and new setting of ql2xexchoffld|ql2xiniexchg
    
    echo [<value>] > /sys/class/scsi_host/host<x>/qlini_mode
    
    where, value can be one of following
      - enabled
      - disabled
      - dual
      - exclusive
    Signed-off-by: default avatarQuinn Tran <quinn.tran@cavium.com>
    Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    0645cb83
qla_init.c 229 KB