diff options
author | Joe Perches <joe@perches.com> | 2010-01-04 06:52:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-06 23:44:02 -0500 |
commit | 35076402a9936fa8a73b57a1f97fecbeceeec34a (patch) | |
tree | a91e728754452f1e50a5811ac9c9fbfe07d71f22 /drivers | |
parent | 698244ace8b63896565022143ab19f141bc48993 (diff) |
drivers/net/mac8390.c: Indent case labels
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/mac8390.c | 252 |
1 files changed, 126 insertions, 126 deletions
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c index f8fa0c3f0f64..6b6f375440a2 100644 --- a/drivers/net/mac8390.c +++ b/drivers/net/mac8390.c | |||
@@ -164,70 +164,70 @@ static void word_memcpy_fromcard(void *tp, const void *fp, int count); | |||
164 | static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev) | 164 | static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev) |
165 | { | 165 | { |
166 | switch (dev->dr_sw) { | 166 | switch (dev->dr_sw) { |
167 | case NUBUS_DRSW_3COM: | 167 | case NUBUS_DRSW_3COM: |
168 | switch (dev->dr_hw) { | 168 | switch (dev->dr_hw) { |
169 | case NUBUS_DRHW_APPLE_SONIC_NB: | 169 | case NUBUS_DRHW_APPLE_SONIC_NB: |
170 | case NUBUS_DRHW_APPLE_SONIC_LC: | 170 | case NUBUS_DRHW_APPLE_SONIC_LC: |
171 | case NUBUS_DRHW_SONNET: | 171 | case NUBUS_DRHW_SONNET: |
172 | return MAC8390_NONE; | 172 | return MAC8390_NONE; |
173 | break; | ||
174 | default: | ||
175 | return MAC8390_APPLE; | ||
176 | break; | ||
177 | } | ||
178 | break; | 173 | break; |
179 | 174 | default: | |
180 | case NUBUS_DRSW_APPLE: | 175 | return MAC8390_APPLE; |
181 | switch (dev->dr_hw) { | ||
182 | case NUBUS_DRHW_ASANTE_LC: | ||
183 | return MAC8390_NONE; | ||
184 | break; | ||
185 | case NUBUS_DRHW_CABLETRON: | ||
186 | return MAC8390_CABLETRON; | ||
187 | break; | ||
188 | default: | ||
189 | return MAC8390_APPLE; | ||
190 | break; | ||
191 | } | ||
192 | break; | 176 | break; |
177 | } | ||
178 | break; | ||
193 | 179 | ||
194 | case NUBUS_DRSW_ASANTE: | 180 | case NUBUS_DRSW_APPLE: |
195 | return MAC8390_ASANTE; | 181 | switch (dev->dr_hw) { |
182 | case NUBUS_DRHW_ASANTE_LC: | ||
183 | return MAC8390_NONE; | ||
196 | break; | 184 | break; |
197 | 185 | case NUBUS_DRHW_CABLETRON: | |
198 | case NUBUS_DRSW_TECHWORKS: | 186 | return MAC8390_CABLETRON; |
199 | case NUBUS_DRSW_DAYNA2: | ||
200 | case NUBUS_DRSW_DAYNA_LC: | ||
201 | if (dev->dr_hw == NUBUS_DRHW_CABLETRON) | ||
202 | return MAC8390_CABLETRON; | ||
203 | else | ||
204 | return MAC8390_APPLE; | ||
205 | break; | 187 | break; |
206 | 188 | default: | |
207 | case NUBUS_DRSW_FARALLON: | 189 | return MAC8390_APPLE; |
208 | return MAC8390_FARALLON; | ||
209 | break; | 190 | break; |
191 | } | ||
192 | break; | ||
210 | 193 | ||
211 | case NUBUS_DRSW_KINETICS: | 194 | case NUBUS_DRSW_ASANTE: |
212 | switch (dev->dr_hw) { | 195 | return MAC8390_ASANTE; |
213 | case NUBUS_DRHW_INTERLAN: | 196 | break; |
214 | return MAC8390_INTERLAN; | 197 | |
215 | break; | 198 | case NUBUS_DRSW_TECHWORKS: |
216 | default: | 199 | case NUBUS_DRSW_DAYNA2: |
217 | return MAC8390_KINETICS; | 200 | case NUBUS_DRSW_DAYNA_LC: |
218 | break; | 201 | if (dev->dr_hw == NUBUS_DRHW_CABLETRON) |
219 | } | 202 | return MAC8390_CABLETRON; |
220 | break; | 203 | else |
204 | return MAC8390_APPLE; | ||
205 | break; | ||
206 | |||
207 | case NUBUS_DRSW_FARALLON: | ||
208 | return MAC8390_FARALLON; | ||
209 | break; | ||
221 | 210 | ||
222 | case NUBUS_DRSW_DAYNA: | 211 | case NUBUS_DRSW_KINETICS: |
223 | // These correspond to Dayna Sonic cards | 212 | switch (dev->dr_hw) { |
224 | // which use the macsonic driver | 213 | case NUBUS_DRHW_INTERLAN: |
225 | if (dev->dr_hw == NUBUS_DRHW_SMC9194 || | 214 | return MAC8390_INTERLAN; |
226 | dev->dr_hw == NUBUS_DRHW_INTERLAN ) | ||
227 | return MAC8390_NONE; | ||
228 | else | ||
229 | return MAC8390_DAYNA; | ||
230 | break; | 215 | break; |
216 | default: | ||
217 | return MAC8390_KINETICS; | ||
218 | break; | ||
219 | } | ||
220 | break; | ||
221 | |||
222 | case NUBUS_DRSW_DAYNA: | ||
223 | // These correspond to Dayna Sonic cards | ||
224 | // which use the macsonic driver | ||
225 | if (dev->dr_hw == NUBUS_DRHW_SMC9194 || | ||
226 | dev->dr_hw == NUBUS_DRHW_INTERLAN ) | ||
227 | return MAC8390_NONE; | ||
228 | else | ||
229 | return MAC8390_DAYNA; | ||
230 | break; | ||
231 | } | 231 | } |
232 | return MAC8390_NONE; | 232 | return MAC8390_NONE; |
233 | } | 233 | } |
@@ -373,54 +373,54 @@ struct net_device * __init mac8390_probe(int unit) | |||
373 | dev->mem_end = dev->mem_start + offset; | 373 | dev->mem_end = dev->mem_start + offset; |
374 | } else { | 374 | } else { |
375 | switch (cardtype) { | 375 | switch (cardtype) { |
376 | case MAC8390_KINETICS: | 376 | case MAC8390_KINETICS: |
377 | case MAC8390_DAYNA: /* it's the same */ | 377 | case MAC8390_DAYNA: /* it's the same */ |
378 | dev->base_addr = | 378 | dev->base_addr = |
379 | (int)(ndev->board->slot_addr + | 379 | (int)(ndev->board->slot_addr + |
380 | DAYNA_8390_BASE); | 380 | DAYNA_8390_BASE); |
381 | dev->mem_start = | 381 | dev->mem_start = |
382 | (int)(ndev->board->slot_addr + | 382 | (int)(ndev->board->slot_addr + |
383 | DAYNA_8390_MEM); | 383 | DAYNA_8390_MEM); |
384 | dev->mem_end = | 384 | dev->mem_end = |
385 | dev->mem_start + | 385 | dev->mem_start + |
386 | mac8390_memsize(dev->mem_start); | 386 | mac8390_memsize(dev->mem_start); |
387 | break; | 387 | break; |
388 | case MAC8390_INTERLAN: | 388 | case MAC8390_INTERLAN: |
389 | dev->base_addr = | 389 | dev->base_addr = |
390 | (int)(ndev->board->slot_addr + | 390 | (int)(ndev->board->slot_addr + |
391 | INTERLAN_8390_BASE); | 391 | INTERLAN_8390_BASE); |
392 | dev->mem_start = | 392 | dev->mem_start = |
393 | (int)(ndev->board->slot_addr + | 393 | (int)(ndev->board->slot_addr + |
394 | INTERLAN_8390_MEM); | 394 | INTERLAN_8390_MEM); |
395 | dev->mem_end = | 395 | dev->mem_end = |
396 | dev->mem_start + | 396 | dev->mem_start + |
397 | mac8390_memsize(dev->mem_start); | 397 | mac8390_memsize(dev->mem_start); |
398 | break; | 398 | break; |
399 | case MAC8390_CABLETRON: | 399 | case MAC8390_CABLETRON: |
400 | dev->base_addr = | 400 | dev->base_addr = |
401 | (int)(ndev->board->slot_addr + | 401 | (int)(ndev->board->slot_addr + |
402 | CABLETRON_8390_BASE); | 402 | CABLETRON_8390_BASE); |
403 | dev->mem_start = | 403 | dev->mem_start = |
404 | (int)(ndev->board->slot_addr + | 404 | (int)(ndev->board->slot_addr + |
405 | CABLETRON_8390_MEM); | 405 | CABLETRON_8390_MEM); |
406 | /* The base address is unreadable if 0x00 | 406 | /* The base address is unreadable if 0x00 |
407 | * has been written to the command register | 407 | * has been written to the command register |
408 | * Reset the chip by writing E8390_NODMA + | 408 | * Reset the chip by writing E8390_NODMA + |
409 | * E8390_PAGE0 + E8390_STOP just to be | 409 | * E8390_PAGE0 + E8390_STOP just to be |
410 | * sure | 410 | * sure |
411 | */ | 411 | */ |
412 | i = (void *)dev->base_addr; | 412 | i = (void *)dev->base_addr; |
413 | *i = 0x21; | 413 | *i = 0x21; |
414 | dev->mem_end = | 414 | dev->mem_end = |
415 | dev->mem_start + | 415 | dev->mem_start + |
416 | mac8390_memsize(dev->mem_start); | 416 | mac8390_memsize(dev->mem_start); |
417 | break; | 417 | break; |
418 | 418 | ||
419 | default: | 419 | default: |
420 | printk(KERN_ERR "Card type %s is" | 420 | printk(KERN_ERR "Card type %s is" |
421 | " unsupported, sorry\n", | 421 | " unsupported, sorry\n", |
422 | ndev->board->name); | 422 | ndev->board->name); |
423 | continue; | 423 | continue; |
424 | } | 424 | } |
425 | } | 425 | } |
426 | 426 | ||
@@ -540,33 +540,33 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd | |||
540 | } | 540 | } |
541 | 541 | ||
542 | /* Fill in model-specific information and functions */ | 542 | /* Fill in model-specific information and functions */ |
543 | switch(type) { | 543 | switch (type) { |
544 | case MAC8390_FARALLON: | 544 | case MAC8390_FARALLON: |
545 | case MAC8390_APPLE: | 545 | case MAC8390_APPLE: |
546 | switch(mac8390_testio(dev->mem_start)) { | 546 | switch (mac8390_testio(dev->mem_start)) { |
547 | case ACCESS_UNKNOWN: | 547 | case ACCESS_UNKNOWN: |
548 | printk("Don't know how to access card memory!\n"); | 548 | printk("Don't know how to access card memory!\n"); |
549 | return -ENODEV; | 549 | return -ENODEV; |
550 | break; | 550 | break; |
551 | 551 | ||
552 | case ACCESS_16: | 552 | case ACCESS_16: |
553 | /* 16 bit card, register map is reversed */ | 553 | /* 16 bit card, register map is reversed */ |
554 | ei_status.reset_8390 = &mac8390_no_reset; | 554 | ei_status.reset_8390 = &mac8390_no_reset; |
555 | ei_status.block_input = &slow_sane_block_input; | 555 | ei_status.block_input = &slow_sane_block_input; |
556 | ei_status.block_output = &slow_sane_block_output; | 556 | ei_status.block_output = &slow_sane_block_output; |
557 | ei_status.get_8390_hdr = &slow_sane_get_8390_hdr; | 557 | ei_status.get_8390_hdr = &slow_sane_get_8390_hdr; |
558 | ei_status.reg_offset = back4_offsets; | 558 | ei_status.reg_offset = back4_offsets; |
559 | break; | 559 | break; |
560 | 560 | ||
561 | case ACCESS_32: | 561 | case ACCESS_32: |
562 | /* 32 bit card, register map is reversed */ | 562 | /* 32 bit card, register map is reversed */ |
563 | ei_status.reset_8390 = &mac8390_no_reset; | 563 | ei_status.reset_8390 = &mac8390_no_reset; |
564 | ei_status.block_input = &sane_block_input; | 564 | ei_status.block_input = &sane_block_input; |
565 | ei_status.block_output = &sane_block_output; | 565 | ei_status.block_output = &sane_block_output; |
566 | ei_status.get_8390_hdr = &sane_get_8390_hdr; | 566 | ei_status.get_8390_hdr = &sane_get_8390_hdr; |
567 | ei_status.reg_offset = back4_offsets; | 567 | ei_status.reg_offset = back4_offsets; |
568 | access_bitmode = 1; | 568 | access_bitmode = 1; |
569 | break; | 569 | break; |
570 | } | 570 | } |
571 | break; | 571 | break; |
572 | 572 | ||