diff options
Diffstat (limited to 'drivers/isdn/hardware/mISDN/hfcmulti.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcmulti.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 2649ea55a9e8..1eac03f39d00 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -140,7 +140,7 @@ | |||
140 | * #define HFC_REGISTER_DEBUG | 140 | * #define HFC_REGISTER_DEBUG |
141 | */ | 141 | */ |
142 | 142 | ||
143 | static const char *hfcmulti_revision = "2.00"; | 143 | static const char *hfcmulti_revision = "2.02"; |
144 | 144 | ||
145 | #include <linux/module.h> | 145 | #include <linux/module.h> |
146 | #include <linux/pci.h> | 146 | #include <linux/pci.h> |
@@ -427,12 +427,12 @@ write_fifo_regio(struct hfc_multi *hc, u_char *data, int len) | |||
427 | { | 427 | { |
428 | outb(A_FIFO_DATA0, (hc->pci_iobase)+4); | 428 | outb(A_FIFO_DATA0, (hc->pci_iobase)+4); |
429 | while (len>>2) { | 429 | while (len>>2) { |
430 | outl(*(u32 *)data, hc->pci_iobase); | 430 | outl(cpu_to_le32(*(u32 *)data), hc->pci_iobase); |
431 | data += 4; | 431 | data += 4; |
432 | len -= 4; | 432 | len -= 4; |
433 | } | 433 | } |
434 | while (len>>1) { | 434 | while (len>>1) { |
435 | outw(*(u16 *)data, hc->pci_iobase); | 435 | outw(cpu_to_le16(*(u16 *)data), hc->pci_iobase); |
436 | data += 2; | 436 | data += 2; |
437 | len -= 2; | 437 | len -= 2; |
438 | } | 438 | } |
@@ -447,17 +447,19 @@ void | |||
447 | write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len) | 447 | write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len) |
448 | { | 448 | { |
449 | while (len>>2) { | 449 | while (len>>2) { |
450 | writel(*(u32 *)data, (hc->pci_membase)+A_FIFO_DATA0); | 450 | writel(cpu_to_le32(*(u32 *)data), |
451 | hc->pci_membase + A_FIFO_DATA0); | ||
451 | data += 4; | 452 | data += 4; |
452 | len -= 4; | 453 | len -= 4; |
453 | } | 454 | } |
454 | while (len>>1) { | 455 | while (len>>1) { |
455 | writew(*(u16 *)data, (hc->pci_membase)+A_FIFO_DATA0); | 456 | writew(cpu_to_le16(*(u16 *)data), |
457 | hc->pci_membase + A_FIFO_DATA0); | ||
456 | data += 2; | 458 | data += 2; |
457 | len -= 2; | 459 | len -= 2; |
458 | } | 460 | } |
459 | while (len) { | 461 | while (len) { |
460 | writeb(*data, (hc->pci_membase)+A_FIFO_DATA0); | 462 | writeb(*data, hc->pci_membase + A_FIFO_DATA0); |
461 | data++; | 463 | data++; |
462 | len--; | 464 | len--; |
463 | } | 465 | } |
@@ -468,12 +470,12 @@ read_fifo_regio(struct hfc_multi *hc, u_char *data, int len) | |||
468 | { | 470 | { |
469 | outb(A_FIFO_DATA0, (hc->pci_iobase)+4); | 471 | outb(A_FIFO_DATA0, (hc->pci_iobase)+4); |
470 | while (len>>2) { | 472 | while (len>>2) { |
471 | *(u32 *)data = inl(hc->pci_iobase); | 473 | *(u32 *)data = le32_to_cpu(inl(hc->pci_iobase)); |
472 | data += 4; | 474 | data += 4; |
473 | len -= 4; | 475 | len -= 4; |
474 | } | 476 | } |
475 | while (len>>1) { | 477 | while (len>>1) { |
476 | *(u16 *)data = inw(hc->pci_iobase); | 478 | *(u16 *)data = le16_to_cpu(inw(hc->pci_iobase)); |
477 | data += 2; | 479 | data += 2; |
478 | len -= 2; | 480 | len -= 2; |
479 | } | 481 | } |
@@ -490,18 +492,18 @@ read_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len) | |||
490 | { | 492 | { |
491 | while (len>>2) { | 493 | while (len>>2) { |
492 | *(u32 *)data = | 494 | *(u32 *)data = |
493 | readl((hc->pci_membase)+A_FIFO_DATA0); | 495 | le32_to_cpu(readl(hc->pci_membase + A_FIFO_DATA0)); |
494 | data += 4; | 496 | data += 4; |
495 | len -= 4; | 497 | len -= 4; |
496 | } | 498 | } |
497 | while (len>>1) { | 499 | while (len>>1) { |
498 | *(u16 *)data = | 500 | *(u16 *)data = |
499 | readw((hc->pci_membase)+A_FIFO_DATA0); | 501 | le16_to_cpu(readw(hc->pci_membase + A_FIFO_DATA0)); |
500 | data += 2; | 502 | data += 2; |
501 | len -= 2; | 503 | len -= 2; |
502 | } | 504 | } |
503 | while (len) { | 505 | while (len) { |
504 | *data = readb((hc->pci_membase)+A_FIFO_DATA0); | 506 | *data = readb(hc->pci_membase + A_FIFO_DATA0); |
505 | data++; | 507 | data++; |
506 | len--; | 508 | len--; |
507 | } | 509 | } |
@@ -3971,7 +3973,7 @@ open_bchannel(struct hfc_multi *hc, struct dchannel *dch, | |||
3971 | struct bchannel *bch; | 3973 | struct bchannel *bch; |
3972 | int ch; | 3974 | int ch; |
3973 | 3975 | ||
3974 | if (!test_bit(rq->adr.channel, &dch->dev.channelmap[0])) | 3976 | if (!test_channelmap(rq->adr.channel, dch->dev.channelmap)) |
3975 | return -EINVAL; | 3977 | return -EINVAL; |
3976 | if (rq->protocol == ISDN_P_NONE) | 3978 | if (rq->protocol == ISDN_P_NONE) |
3977 | return -EINVAL; | 3979 | return -EINVAL; |
@@ -4587,7 +4589,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m) | |||
4587 | list_add(&bch->ch.list, &dch->dev.bchannels); | 4589 | list_add(&bch->ch.list, &dch->dev.bchannels); |
4588 | hc->chan[ch].bch = bch; | 4590 | hc->chan[ch].bch = bch; |
4589 | hc->chan[ch].port = 0; | 4591 | hc->chan[ch].port = 0; |
4590 | test_and_set_bit(bch->nr, &dch->dev.channelmap[0]); | 4592 | set_channelmap(bch->nr, dch->dev.channelmap); |
4591 | } | 4593 | } |
4592 | /* set optical line type */ | 4594 | /* set optical line type */ |
4593 | if (port[Port_cnt] & 0x001) { | 4595 | if (port[Port_cnt] & 0x001) { |
@@ -4755,7 +4757,7 @@ init_multi_port(struct hfc_multi *hc, int pt) | |||
4755 | list_add(&bch->ch.list, &dch->dev.bchannels); | 4757 | list_add(&bch->ch.list, &dch->dev.bchannels); |
4756 | hc->chan[i + ch].bch = bch; | 4758 | hc->chan[i + ch].bch = bch; |
4757 | hc->chan[i + ch].port = pt; | 4759 | hc->chan[i + ch].port = pt; |
4758 | test_and_set_bit(bch->nr, &dch->dev.channelmap[0]); | 4760 | set_channelmap(bch->nr, dch->dev.channelmap); |
4759 | } | 4761 | } |
4760 | /* set master clock */ | 4762 | /* set master clock */ |
4761 | if (port[Port_cnt] & 0x001) { | 4763 | if (port[Port_cnt] & 0x001) { |
@@ -5050,12 +5052,12 @@ static void __devexit hfc_remove_pci(struct pci_dev *pdev) | |||
5050 | 5052 | ||
5051 | static const struct hm_map hfcm_map[] = { | 5053 | static const struct hm_map hfcm_map[] = { |
5052 | /*0*/ {VENDOR_BN, "HFC-1S Card (mini PCI)", 4, 1, 1, 3, 0, DIP_4S, 0}, | 5054 | /*0*/ {VENDOR_BN, "HFC-1S Card (mini PCI)", 4, 1, 1, 3, 0, DIP_4S, 0}, |
5053 | /*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S}, | 5055 | /*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S, 0}, |
5054 | /*2*/ {VENDOR_BN, "HFC-2S Card (mini PCI)", 4, 2, 1, 3, 0, DIP_4S, 0}, | 5056 | /*2*/ {VENDOR_BN, "HFC-2S Card (mini PCI)", 4, 2, 1, 3, 0, DIP_4S, 0}, |
5055 | /*3*/ {VENDOR_BN, "HFC-4S Card", 4, 4, 1, 2, 0, DIP_4S, 0}, | 5057 | /*3*/ {VENDOR_BN, "HFC-4S Card", 4, 4, 1, 2, 0, DIP_4S, 0}, |
5056 | /*4*/ {VENDOR_BN, "HFC-4S Card (mini PCI)", 4, 4, 1, 2, 0, 0, 0}, | 5058 | /*4*/ {VENDOR_BN, "HFC-4S Card (mini PCI)", 4, 4, 1, 2, 0, 0, 0}, |
5057 | /*5*/ {VENDOR_CCD, "HFC-4S Eval (old)", 4, 4, 0, 0, 0, 0, 0}, | 5059 | /*5*/ {VENDOR_CCD, "HFC-4S Eval (old)", 4, 4, 0, 0, 0, 0, 0}, |
5058 | /*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, 0, 0}, | 5060 | /*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, DIP_4S, 0}, |
5059 | /*7*/ {VENDOR_CCD, "HFC-4S", 4, 4, 1, 2, 0, 0, 0}, | 5061 | /*7*/ {VENDOR_CCD, "HFC-4S", 4, 4, 1, 2, 0, 0, 0}, |
5060 | /*8*/ {VENDOR_DIG, "HFC-4S Card", 4, 4, 0, 2, 0, 0, HFC_IO_MODE_REGIO}, | 5062 | /*8*/ {VENDOR_DIG, "HFC-4S Card", 4, 4, 0, 2, 0, 0, HFC_IO_MODE_REGIO}, |
5061 | /*9*/ {VENDOR_CCD, "HFC-4S Swyx 4xS0 SX2 QuadBri", 4, 4, 1, 2, 0, 0, 0}, | 5063 | /*9*/ {VENDOR_CCD, "HFC-4S Swyx 4xS0 SX2 QuadBri", 4, 4, 1, 2, 0, 0, 0}, |
@@ -5251,9 +5253,6 @@ HFCmulti_init(void) | |||
5251 | if (debug & DEBUG_HFCMULTI_INIT) | 5253 | if (debug & DEBUG_HFCMULTI_INIT) |
5252 | printk(KERN_DEBUG "%s: init entered\n", __func__); | 5254 | printk(KERN_DEBUG "%s: init entered\n", __func__); |
5253 | 5255 | ||
5254 | #ifdef __BIG_ENDIAN | ||
5255 | #error "not running on big endian machines now" | ||
5256 | #endif | ||
5257 | hfc_interrupt = symbol_get(ztdummy_extern_interrupt); | 5256 | hfc_interrupt = symbol_get(ztdummy_extern_interrupt); |
5258 | register_interrupt = symbol_get(ztdummy_register_interrupt); | 5257 | register_interrupt = symbol_get(ztdummy_register_interrupt); |
5259 | unregister_interrupt = symbol_get(ztdummy_unregister_interrupt); | 5258 | unregister_interrupt = symbol_get(ztdummy_unregister_interrupt); |