Commit ac1f90d6 authored by Sivakumar Subramani's avatar Sivakumar Subramani Committed by Jeff Garzik

S2IO: Making LED off during LINK_DOWN notification.

- Turning off LED for LINK_DOWN notification
- Return from rxd_owner_bit_reset function if call to set_rxd_buffer_pointer
  fails with ENOMEM
Signed-off-by: default avatarSivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 926930b2
...@@ -4127,6 +4127,11 @@ static void s2io_txpic_intr_handle(struct s2io_nic *sp) ...@@ -4127,6 +4127,11 @@ static void s2io_txpic_intr_handle(struct s2io_nic *sp)
val64 &= ~GPIO_INT_MASK_LINK_UP; val64 &= ~GPIO_INT_MASK_LINK_UP;
val64 |= GPIO_INT_MASK_LINK_DOWN; val64 |= GPIO_INT_MASK_LINK_DOWN;
writeq(val64, &bar0->gpio_int_mask); writeq(val64, &bar0->gpio_int_mask);
/* turn off LED */
val64 = readq(&bar0->adapter_control);
val64 = val64 &(~ADAPTER_LED_ON);
writeq(val64, &bar0->adapter_control);
} }
} }
val64 = readq(&bar0->gpio_int_mask); val64 = readq(&bar0->gpio_int_mask);
...@@ -6124,10 +6129,13 @@ static int rxd_owner_bit_reset(struct s2io_nic *sp) ...@@ -6124,10 +6129,13 @@ static int rxd_owner_bit_reset(struct s2io_nic *sp)
rx_blocks[j].rxds[k].virt_addr; rx_blocks[j].rxds[k].virt_addr;
if(sp->rxd_mode >= RXD_MODE_3A) if(sp->rxd_mode >= RXD_MODE_3A)
ba = &mac_control->rings[i].ba[j][k]; ba = &mac_control->rings[i].ba[j][k];
set_rxd_buffer_pointer(sp, rxdp, ba, if (set_rxd_buffer_pointer(sp, rxdp, ba,
&skb,(u64 *)&temp0_64, &skb,(u64 *)&temp0_64,
(u64 *)&temp1_64, (u64 *)&temp1_64,
(u64 *)&temp2_64, size); (u64 *)&temp2_64,
size) == ENOMEM) {
return 0;
}
set_rxd_buffer_size(sp, rxdp, size); set_rxd_buffer_size(sp, rxdp, size);
wmb(); wmb();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment