aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r--drivers/net/s2io.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 80efc05d4d64..9a1e32fb720b 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3598,10 +3598,12 @@ static int s2io_set_swapper(struct s2io_nic *sp)
3598 val64 = readq(&bar0->pif_rd_swapper_fb); 3598 val64 = readq(&bar0->pif_rd_swapper_fb);
3599 if (val64 != 0x0123456789ABCDEFULL) { 3599 if (val64 != 0x0123456789ABCDEFULL) {
3600 int i = 0; 3600 int i = 0;
3601 u64 value[] = { 0xC30000C3C30000C3ULL, /* FE=1, SE=1 */ 3601 static const u64 value[] = {
3602 0x8100008181000081ULL, /* FE=1, SE=0 */ 3602 0xC30000C3C30000C3ULL, /* FE=1, SE=1 */
3603 0x4200004242000042ULL, /* FE=0, SE=1 */ 3603 0x8100008181000081ULL, /* FE=1, SE=0 */
3604 0}; /* FE=0, SE=0 */ 3604 0x4200004242000042ULL, /* FE=0, SE=1 */
3605 0 /* FE=0, SE=0 */
3606 };
3605 3607
3606 while (i < 4) { 3608 while (i < 4) {
3607 writeq(value[i], &bar0->swapper_ctrl); 3609 writeq(value[i], &bar0->swapper_ctrl);
@@ -3627,10 +3629,12 @@ static int s2io_set_swapper(struct s2io_nic *sp)
3627 3629
3628 if (val64 != valt) { 3630 if (val64 != valt) {
3629 int i = 0; 3631 int i = 0;
3630 u64 value[] = { 0x00C3C30000C3C300ULL, /* FE=1, SE=1 */ 3632 static const u64 value[] = {
3631 0x0081810000818100ULL, /* FE=1, SE=0 */ 3633 0x00C3C30000C3C300ULL, /* FE=1, SE=1 */
3632 0x0042420000424200ULL, /* FE=0, SE=1 */ 3634 0x0081810000818100ULL, /* FE=1, SE=0 */
3633 0}; /* FE=0, SE=0 */ 3635 0x0042420000424200ULL, /* FE=0, SE=1 */
3636 0 /* FE=0, SE=0 */
3637 };
3634 3638
3635 while (i < 4) { 3639 while (i < 4) {
3636 writeq((value[i] | valr), &bar0->swapper_ctrl); 3640 writeq((value[i] | valr), &bar0->swapper_ctrl);