Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328844
b: refs/heads/master
c: 0143d8b
h: refs/heads/master
v: v3
  • Loading branch information
Chad Dupuis authored and James Bottomley committed Sep 24, 2012
1 parent 190ab4a commit ec6ee17
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 370d550ea4eda6889ae2fb8a5e9845d2276f1567
refs/heads/master: 0143d8b7460e790ee522dcef0072801e8818c4eb
41 changes: 35 additions & 6 deletions trunk/drivers/scsi/qla2xxx/qla_sup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,29 +1662,58 @@ qla24xx_beacon_blink(struct scsi_qla_host *vha)
spin_unlock_irqrestore(&ha->hardware_lock, flags);
}

static uint32_t
qla83xx_select_led_port(struct qla_hw_data *ha)
{
uint32_t led_select_value = 0;

if (!IS_QLA83XX(ha))
goto out;

if (ha->flags.port0)
led_select_value = QLA83XX_LED_PORT0;
else
led_select_value = QLA83XX_LED_PORT1;

out:
return led_select_value;
}

void
qla83xx_beacon_blink(struct scsi_qla_host *vha)
{
uint32_t led_select_value;
struct qla_hw_data *ha = vha->hw;
uint16_t led_cfg[6];
uint16_t orig_led_cfg[6];
uint32_t led_10_value, led_43_value;

if (!IS_QLA83XX(ha) && !IS_QLA81XX(ha))
return;

if (IS_QLA2031(ha) && ha->beacon_blink_led) {
if (ha->flags.port0)
led_select_value = QLA83XX_LED_PORT0;
else
led_select_value = QLA83XX_LED_PORT1;
if (!ha->beacon_blink_led)
return;

if (IS_QLA2031(ha)) {
led_select_value = qla83xx_select_led_port(ha);

qla83xx_wr_reg(vha, led_select_value, 0x40002000);
qla83xx_wr_reg(vha, led_select_value + 4, 0x40002000);
msleep(1000);
qla83xx_wr_reg(vha, led_select_value, 0x40004000);
qla83xx_wr_reg(vha, led_select_value + 4, 0x40004000);
} else if ((IS_QLA8031(ha) || IS_QLA81XX(ha)) && ha->beacon_blink_led) {
} else if (IS_QLA8031(ha)) {
led_select_value = qla83xx_select_led_port(ha);

qla83xx_rd_reg(vha, led_select_value, &led_10_value);
qla83xx_rd_reg(vha, led_select_value + 0x10, &led_43_value);
qla83xx_wr_reg(vha, led_select_value, 0x01f44000);
msleep(500);
qla83xx_wr_reg(vha, led_select_value, 0x400001f4);
msleep(1000);
qla83xx_wr_reg(vha, led_select_value, led_10_value);
qla83xx_wr_reg(vha, led_select_value + 0x10, led_43_value);
} else if (IS_QLA81XX(ha)) {
int rval;

/* Save Current */
Expand Down

0 comments on commit ec6ee17

Please sign in to comment.