summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_isr.c
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2017-08-24 01:05:07 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-25 05:29:24 +0300
commite4e3a2ce9556cc4da40dadaf94c0d3395b6e91d9 (patch)
treeec62e4e40a506f2ce542d2d9a70306183ceb6f75 /drivers/scsi/qla2xxx/qla_isr.c
parentb2e8ae3f0e342a3308b4573790bd42528e51885a (diff)
downloadlinux-e4e3a2ce9556cc4da40dadaf94c0d3395b6e91d9.tar.xz
scsi: qla2xxx: Add ability to autodetect SFP type
SFP can come in 2 formats: short range/SR and long range/LR. For LR, user the can increase the number of Buffer to Buffer credits between end points via Cavium's command line tool. By default, FW uses a lower BB Credit value optimized for SR. This patch will read the SFP for each link up event and during chip reset sequence. If the SFP type and setting are mismatch, then the chip is reset 1 time to use the appropriate setting. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index df8a7f378e72..c58fb493dbd9 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -799,6 +799,11 @@ skip_rio:
vha->flags.management_server_logged_in = 0;
qla2x00_post_aen_work(vha, FCH_EVT_LINKUP, ha->link_data_rate);
+
+ if (AUTO_DETECT_SFP_SUPPORT(vha)) {
+ set_bit(DETECT_SFP_CHANGE, &vha->dpc_flags);
+ qla2xxx_wake_dpc(vha);
+ }
break;
case MBA_LOOP_DOWN: /* Loop Down Event */