diff options
Diffstat (limited to 'drivers/scsi/advansys.c')
-rw-r--r-- | drivers/scsi/advansys.c | 152 |
1 files changed, 75 insertions, 77 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 374c4edf4fcb..dcfaee66a8b9 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -9526,7 +9526,7 @@ advansys_queuecommand_lck(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd * | |||
9526 | 9526 | ||
9527 | static DEF_SCSI_QCMD(advansys_queuecommand) | 9527 | static DEF_SCSI_QCMD(advansys_queuecommand) |
9528 | 9528 | ||
9529 | static ushort __devinit AscGetEisaChipCfg(PortAddr iop_base) | 9529 | static ushort AscGetEisaChipCfg(PortAddr iop_base) |
9530 | { | 9530 | { |
9531 | PortAddr eisa_cfg_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) | | 9531 | PortAddr eisa_cfg_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) | |
9532 | (PortAddr) (ASC_EISA_CFG_IOP_MASK); | 9532 | (PortAddr) (ASC_EISA_CFG_IOP_MASK); |
@@ -9537,8 +9537,8 @@ static ushort __devinit AscGetEisaChipCfg(PortAddr iop_base) | |||
9537 | * Return the BIOS address of the adapter at the specified | 9537 | * Return the BIOS address of the adapter at the specified |
9538 | * I/O port and with the specified bus type. | 9538 | * I/O port and with the specified bus type. |
9539 | */ | 9539 | */ |
9540 | static unsigned short __devinit | 9540 | static unsigned short AscGetChipBiosAddress(PortAddr iop_base, |
9541 | AscGetChipBiosAddress(PortAddr iop_base, unsigned short bus_type) | 9541 | unsigned short bus_type) |
9542 | { | 9542 | { |
9543 | unsigned short cfg_lsw; | 9543 | unsigned short cfg_lsw; |
9544 | unsigned short bios_addr; | 9544 | unsigned short bios_addr; |
@@ -9569,7 +9569,7 @@ AscGetChipBiosAddress(PortAddr iop_base, unsigned short bus_type) | |||
9569 | return bios_addr; | 9569 | return bios_addr; |
9570 | } | 9570 | } |
9571 | 9571 | ||
9572 | static uchar __devinit AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) | 9572 | static uchar AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) |
9573 | { | 9573 | { |
9574 | ushort cfg_lsw; | 9574 | ushort cfg_lsw; |
9575 | 9575 | ||
@@ -9583,7 +9583,7 @@ static uchar __devinit AscSetChipScsiID(PortAddr iop_base, uchar new_host_id) | |||
9583 | return (AscGetChipScsiID(iop_base)); | 9583 | return (AscGetChipScsiID(iop_base)); |
9584 | } | 9584 | } |
9585 | 9585 | ||
9586 | static unsigned char __devinit AscGetChipScsiCtrl(PortAddr iop_base) | 9586 | static unsigned char AscGetChipScsiCtrl(PortAddr iop_base) |
9587 | { | 9587 | { |
9588 | unsigned char sc; | 9588 | unsigned char sc; |
9589 | 9589 | ||
@@ -9593,8 +9593,8 @@ static unsigned char __devinit AscGetChipScsiCtrl(PortAddr iop_base) | |||
9593 | return sc; | 9593 | return sc; |
9594 | } | 9594 | } |
9595 | 9595 | ||
9596 | static unsigned char __devinit | 9596 | static unsigned char AscGetChipVersion(PortAddr iop_base, |
9597 | AscGetChipVersion(PortAddr iop_base, unsigned short bus_type) | 9597 | unsigned short bus_type) |
9598 | { | 9598 | { |
9599 | if (bus_type & ASC_IS_EISA) { | 9599 | if (bus_type & ASC_IS_EISA) { |
9600 | PortAddr eisa_iop; | 9600 | PortAddr eisa_iop; |
@@ -9608,7 +9608,7 @@ AscGetChipVersion(PortAddr iop_base, unsigned short bus_type) | |||
9608 | } | 9608 | } |
9609 | 9609 | ||
9610 | #ifdef CONFIG_ISA | 9610 | #ifdef CONFIG_ISA |
9611 | static void __devinit AscEnableIsaDma(uchar dma_channel) | 9611 | static void AscEnableIsaDma(uchar dma_channel) |
9612 | { | 9612 | { |
9613 | if (dma_channel < 4) { | 9613 | if (dma_channel < 4) { |
9614 | outp(0x000B, (ushort)(0xC0 | dma_channel)); | 9614 | outp(0x000B, (ushort)(0xC0 | dma_channel)); |
@@ -9638,7 +9638,7 @@ static int AscStopQueueExe(PortAddr iop_base) | |||
9638 | return (0); | 9638 | return (0); |
9639 | } | 9639 | } |
9640 | 9640 | ||
9641 | static ASC_DCNT __devinit AscGetMaxDmaCount(ushort bus_type) | 9641 | static ASC_DCNT AscGetMaxDmaCount(ushort bus_type) |
9642 | { | 9642 | { |
9643 | if (bus_type & ASC_IS_ISA) | 9643 | if (bus_type & ASC_IS_ISA) |
9644 | return ASC_MAX_ISA_DMA_COUNT; | 9644 | return ASC_MAX_ISA_DMA_COUNT; |
@@ -9648,7 +9648,7 @@ static ASC_DCNT __devinit AscGetMaxDmaCount(ushort bus_type) | |||
9648 | } | 9648 | } |
9649 | 9649 | ||
9650 | #ifdef CONFIG_ISA | 9650 | #ifdef CONFIG_ISA |
9651 | static ushort __devinit AscGetIsaDmaChannel(PortAddr iop_base) | 9651 | static ushort AscGetIsaDmaChannel(PortAddr iop_base) |
9652 | { | 9652 | { |
9653 | ushort channel; | 9653 | ushort channel; |
9654 | 9654 | ||
@@ -9660,7 +9660,7 @@ static ushort __devinit AscGetIsaDmaChannel(PortAddr iop_base) | |||
9660 | return (channel + 4); | 9660 | return (channel + 4); |
9661 | } | 9661 | } |
9662 | 9662 | ||
9663 | static ushort __devinit AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) | 9663 | static ushort AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channel) |
9664 | { | 9664 | { |
9665 | ushort cfg_lsw; | 9665 | ushort cfg_lsw; |
9666 | uchar value; | 9666 | uchar value; |
@@ -9678,7 +9678,7 @@ static ushort __devinit AscSetIsaDmaChannel(PortAddr iop_base, ushort dma_channe | |||
9678 | return 0; | 9678 | return 0; |
9679 | } | 9679 | } |
9680 | 9680 | ||
9681 | static uchar __devinit AscGetIsaDmaSpeed(PortAddr iop_base) | 9681 | static uchar AscGetIsaDmaSpeed(PortAddr iop_base) |
9682 | { | 9682 | { |
9683 | uchar speed_value; | 9683 | uchar speed_value; |
9684 | 9684 | ||
@@ -9689,7 +9689,7 @@ static uchar __devinit AscGetIsaDmaSpeed(PortAddr iop_base) | |||
9689 | return speed_value; | 9689 | return speed_value; |
9690 | } | 9690 | } |
9691 | 9691 | ||
9692 | static uchar __devinit AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) | 9692 | static uchar AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) |
9693 | { | 9693 | { |
9694 | speed_value &= 0x07; | 9694 | speed_value &= 0x07; |
9695 | AscSetBank(iop_base, 1); | 9695 | AscSetBank(iop_base, 1); |
@@ -9699,7 +9699,7 @@ static uchar __devinit AscSetIsaDmaSpeed(PortAddr iop_base, uchar speed_value) | |||
9699 | } | 9699 | } |
9700 | #endif /* CONFIG_ISA */ | 9700 | #endif /* CONFIG_ISA */ |
9701 | 9701 | ||
9702 | static ushort __devinit AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) | 9702 | static ushort AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) |
9703 | { | 9703 | { |
9704 | int i; | 9704 | int i; |
9705 | PortAddr iop_base; | 9705 | PortAddr iop_base; |
@@ -9786,7 +9786,7 @@ static ushort __devinit AscInitAscDvcVar(ASC_DVC_VAR *asc_dvc) | |||
9786 | return warn_code; | 9786 | return warn_code; |
9787 | } | 9787 | } |
9788 | 9788 | ||
9789 | static int __devinit AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) | 9789 | static int AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) |
9790 | { | 9790 | { |
9791 | int retry; | 9791 | int retry; |
9792 | 9792 | ||
@@ -9801,12 +9801,12 @@ static int __devinit AscWriteEEPCmdReg(PortAddr iop_base, uchar cmd_reg) | |||
9801 | return 0; | 9801 | return 0; |
9802 | } | 9802 | } |
9803 | 9803 | ||
9804 | static void __devinit AscWaitEEPRead(void) | 9804 | static void AscWaitEEPRead(void) |
9805 | { | 9805 | { |
9806 | mdelay(1); | 9806 | mdelay(1); |
9807 | } | 9807 | } |
9808 | 9808 | ||
9809 | static ushort __devinit AscReadEEPWord(PortAddr iop_base, uchar addr) | 9809 | static ushort AscReadEEPWord(PortAddr iop_base, uchar addr) |
9810 | { | 9810 | { |
9811 | ushort read_wval; | 9811 | ushort read_wval; |
9812 | uchar cmd_reg; | 9812 | uchar cmd_reg; |
@@ -9821,8 +9821,8 @@ static ushort __devinit AscReadEEPWord(PortAddr iop_base, uchar addr) | |||
9821 | return read_wval; | 9821 | return read_wval; |
9822 | } | 9822 | } |
9823 | 9823 | ||
9824 | static ushort __devinit | 9824 | static ushort AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, |
9825 | AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | 9825 | ushort bus_type) |
9826 | { | 9826 | { |
9827 | ushort wval; | 9827 | ushort wval; |
9828 | ushort sum; | 9828 | ushort sum; |
@@ -9868,7 +9868,7 @@ AscGetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | |||
9868 | return sum; | 9868 | return sum; |
9869 | } | 9869 | } |
9870 | 9870 | ||
9871 | static int __devinit AscTestExternalLram(ASC_DVC_VAR *asc_dvc) | 9871 | static int AscTestExternalLram(ASC_DVC_VAR *asc_dvc) |
9872 | { | 9872 | { |
9873 | PortAddr iop_base; | 9873 | PortAddr iop_base; |
9874 | ushort q_addr; | 9874 | ushort q_addr; |
@@ -9890,12 +9890,12 @@ static int __devinit AscTestExternalLram(ASC_DVC_VAR *asc_dvc) | |||
9890 | return (sta); | 9890 | return (sta); |
9891 | } | 9891 | } |
9892 | 9892 | ||
9893 | static void __devinit AscWaitEEPWrite(void) | 9893 | static void AscWaitEEPWrite(void) |
9894 | { | 9894 | { |
9895 | mdelay(20); | 9895 | mdelay(20); |
9896 | } | 9896 | } |
9897 | 9897 | ||
9898 | static int __devinit AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) | 9898 | static int AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) |
9899 | { | 9899 | { |
9900 | ushort read_back; | 9900 | ushort read_back; |
9901 | int retry; | 9901 | int retry; |
@@ -9914,8 +9914,7 @@ static int __devinit AscWriteEEPDataReg(PortAddr iop_base, ushort data_reg) | |||
9914 | } | 9914 | } |
9915 | } | 9915 | } |
9916 | 9916 | ||
9917 | static ushort __devinit | 9917 | static ushort AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) |
9918 | AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) | ||
9919 | { | 9918 | { |
9920 | ushort read_wval; | 9919 | ushort read_wval; |
9921 | 9920 | ||
@@ -9935,8 +9934,8 @@ AscWriteEEPWord(PortAddr iop_base, uchar addr, ushort word_val) | |||
9935 | return (read_wval); | 9934 | return (read_wval); |
9936 | } | 9935 | } |
9937 | 9936 | ||
9938 | static int __devinit | 9937 | static int AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, |
9939 | AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | 9938 | ushort bus_type) |
9940 | { | 9939 | { |
9941 | int n_error; | 9940 | int n_error; |
9942 | ushort *wbuf; | 9941 | ushort *wbuf; |
@@ -10031,8 +10030,8 @@ AscSetEEPConfigOnce(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | |||
10031 | return n_error; | 10030 | return n_error; |
10032 | } | 10031 | } |
10033 | 10032 | ||
10034 | static int __devinit | 10033 | static int AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, |
10035 | AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | 10034 | ushort bus_type) |
10036 | { | 10035 | { |
10037 | int retry; | 10036 | int retry; |
10038 | int n_error; | 10037 | int n_error; |
@@ -10050,7 +10049,7 @@ AscSetEEPConfig(PortAddr iop_base, ASCEEP_CONFIG *cfg_buf, ushort bus_type) | |||
10050 | return n_error; | 10049 | return n_error; |
10051 | } | 10050 | } |
10052 | 10051 | ||
10053 | static ushort __devinit AscInitFromEEP(ASC_DVC_VAR *asc_dvc) | 10052 | static ushort AscInitFromEEP(ASC_DVC_VAR *asc_dvc) |
10054 | { | 10053 | { |
10055 | ASCEEP_CONFIG eep_config_buf; | 10054 | ASCEEP_CONFIG eep_config_buf; |
10056 | ASCEEP_CONFIG *eep_config; | 10055 | ASCEEP_CONFIG *eep_config; |
@@ -10215,7 +10214,7 @@ static ushort __devinit AscInitFromEEP(ASC_DVC_VAR *asc_dvc) | |||
10215 | return (warn_code); | 10214 | return (warn_code); |
10216 | } | 10215 | } |
10217 | 10216 | ||
10218 | static int __devinit AscInitGetConfig(struct Scsi_Host *shost) | 10217 | static int AscInitGetConfig(struct Scsi_Host *shost) |
10219 | { | 10218 | { |
10220 | struct asc_board *board = shost_priv(shost); | 10219 | struct asc_board *board = shost_priv(shost); |
10221 | ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; | 10220 | ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; |
@@ -10269,7 +10268,7 @@ static int __devinit AscInitGetConfig(struct Scsi_Host *shost) | |||
10269 | return asc_dvc->err_code; | 10268 | return asc_dvc->err_code; |
10270 | } | 10269 | } |
10271 | 10270 | ||
10272 | static int __devinit AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) | 10271 | static int AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) |
10273 | { | 10272 | { |
10274 | struct asc_board *board = shost_priv(shost); | 10273 | struct asc_board *board = shost_priv(shost); |
10275 | ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; | 10274 | ASC_DVC_VAR *asc_dvc = &board->dvc_var.asc_dvc_var; |
@@ -10383,7 +10382,7 @@ static int __devinit AscInitSetConfig(struct pci_dev *pdev, struct Scsi_Host *sh | |||
10383 | * on big-endian platforms so char fields read as words are actually being | 10382 | * on big-endian platforms so char fields read as words are actually being |
10384 | * unswapped on big-endian platforms. | 10383 | * unswapped on big-endian platforms. |
10385 | */ | 10384 | */ |
10386 | static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config __devinitdata = { | 10385 | static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config = { |
10387 | ADV_EEPROM_BIOS_ENABLE, /* cfg_lsw */ | 10386 | ADV_EEPROM_BIOS_ENABLE, /* cfg_lsw */ |
10388 | 0x0000, /* cfg_msw */ | 10387 | 0x0000, /* cfg_msw */ |
10389 | 0xFFFF, /* disc_enable */ | 10388 | 0xFFFF, /* disc_enable */ |
@@ -10421,7 +10420,7 @@ static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config __devinitdata = { | |||
10421 | 0 /* num_of_err */ | 10420 | 0 /* num_of_err */ |
10422 | }; | 10421 | }; |
10423 | 10422 | ||
10424 | static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar __devinitdata = { | 10423 | static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar = { |
10425 | 0, /* cfg_lsw */ | 10424 | 0, /* cfg_lsw */ |
10426 | 0, /* cfg_msw */ | 10425 | 0, /* cfg_msw */ |
10427 | 0, /* -disc_enable */ | 10426 | 0, /* -disc_enable */ |
@@ -10459,7 +10458,7 @@ static ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar __devinitdata = { | |||
10459 | 0 /* num_of_err */ | 10458 | 0 /* num_of_err */ |
10460 | }; | 10459 | }; |
10461 | 10460 | ||
10462 | static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config __devinitdata = { | 10461 | static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config = { |
10463 | ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ | 10462 | ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ |
10464 | 0x0000, /* 01 cfg_msw */ | 10463 | 0x0000, /* 01 cfg_msw */ |
10465 | 0xFFFF, /* 02 disc_enable */ | 10464 | 0xFFFF, /* 02 disc_enable */ |
@@ -10524,7 +10523,7 @@ static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config __devinitdata = { | |||
10524 | 0 /* 63 reserved */ | 10523 | 0 /* 63 reserved */ |
10525 | }; | 10524 | }; |
10526 | 10525 | ||
10527 | static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar __devinitdata = { | 10526 | static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar = { |
10528 | 0, /* 00 cfg_lsw */ | 10527 | 0, /* 00 cfg_lsw */ |
10529 | 0, /* 01 cfg_msw */ | 10528 | 0, /* 01 cfg_msw */ |
10530 | 0, /* 02 disc_enable */ | 10529 | 0, /* 02 disc_enable */ |
@@ -10589,7 +10588,7 @@ static ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar __devinitdata = | |||
10589 | 0 /* 63 reserved */ | 10588 | 0 /* 63 reserved */ |
10590 | }; | 10589 | }; |
10591 | 10590 | ||
10592 | static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config __devinitdata = { | 10591 | static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config = { |
10593 | ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ | 10592 | ADV_EEPROM_BIOS_ENABLE, /* 00 cfg_lsw */ |
10594 | 0x0000, /* 01 cfg_msw */ | 10593 | 0x0000, /* 01 cfg_msw */ |
10595 | 0xFFFF, /* 02 disc_enable */ | 10594 | 0xFFFF, /* 02 disc_enable */ |
@@ -10654,7 +10653,7 @@ static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config __devinitdata = { | |||
10654 | 0 /* 63 reserved */ | 10653 | 0 /* 63 reserved */ |
10655 | }; | 10654 | }; |
10656 | 10655 | ||
10657 | static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar __devinitdata = { | 10656 | static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar = { |
10658 | 0, /* 00 cfg_lsw */ | 10657 | 0, /* 00 cfg_lsw */ |
10659 | 0, /* 01 cfg_msw */ | 10658 | 0, /* 01 cfg_msw */ |
10660 | 0, /* 02 disc_enable */ | 10659 | 0, /* 02 disc_enable */ |
@@ -10723,7 +10722,7 @@ static ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar __devinitdata = | |||
10723 | /* | 10722 | /* |
10724 | * Wait for EEPROM command to complete | 10723 | * Wait for EEPROM command to complete |
10725 | */ | 10724 | */ |
10726 | static void __devinit AdvWaitEEPCmd(AdvPortAddr iop_base) | 10725 | static void AdvWaitEEPCmd(AdvPortAddr iop_base) |
10727 | { | 10726 | { |
10728 | int eep_delay_ms; | 10727 | int eep_delay_ms; |
10729 | 10728 | ||
@@ -10742,7 +10741,7 @@ static void __devinit AdvWaitEEPCmd(AdvPortAddr iop_base) | |||
10742 | /* | 10741 | /* |
10743 | * Read the EEPROM from specified location | 10742 | * Read the EEPROM from specified location |
10744 | */ | 10743 | */ |
10745 | static ushort __devinit AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) | 10744 | static ushort AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) |
10746 | { | 10745 | { |
10747 | AdvWriteWordRegister(iop_base, IOPW_EE_CMD, | 10746 | AdvWriteWordRegister(iop_base, IOPW_EE_CMD, |
10748 | ASC_EEP_CMD_READ | eep_word_addr); | 10747 | ASC_EEP_CMD_READ | eep_word_addr); |
@@ -10753,8 +10752,8 @@ static ushort __devinit AdvReadEEPWord(AdvPortAddr iop_base, int eep_word_addr) | |||
10753 | /* | 10752 | /* |
10754 | * Write the EEPROM from 'cfg_buf'. | 10753 | * Write the EEPROM from 'cfg_buf'. |
10755 | */ | 10754 | */ |
10756 | static void __devinit | 10755 | static void AdvSet3550EEPConfig(AdvPortAddr iop_base, |
10757 | AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) | 10756 | ADVEEP_3550_CONFIG *cfg_buf) |
10758 | { | 10757 | { |
10759 | ushort *wbuf; | 10758 | ushort *wbuf; |
10760 | ushort addr, chksum; | 10759 | ushort addr, chksum; |
@@ -10820,8 +10819,8 @@ AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) | |||
10820 | /* | 10819 | /* |
10821 | * Write the EEPROM from 'cfg_buf'. | 10820 | * Write the EEPROM from 'cfg_buf'. |
10822 | */ | 10821 | */ |
10823 | static void __devinit | 10822 | static void AdvSet38C0800EEPConfig(AdvPortAddr iop_base, |
10824 | AdvSet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) | 10823 | ADVEEP_38C0800_CONFIG *cfg_buf) |
10825 | { | 10824 | { |
10826 | ushort *wbuf; | 10825 | ushort *wbuf; |
10827 | ushort *charfields; | 10826 | ushort *charfields; |
@@ -10887,8 +10886,8 @@ AdvSet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) | |||
10887 | /* | 10886 | /* |
10888 | * Write the EEPROM from 'cfg_buf'. | 10887 | * Write the EEPROM from 'cfg_buf'. |
10889 | */ | 10888 | */ |
10890 | static void __devinit | 10889 | static void AdvSet38C1600EEPConfig(AdvPortAddr iop_base, |
10891 | AdvSet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) | 10890 | ADVEEP_38C1600_CONFIG *cfg_buf) |
10892 | { | 10891 | { |
10893 | ushort *wbuf; | 10892 | ushort *wbuf; |
10894 | ushort *charfields; | 10893 | ushort *charfields; |
@@ -10956,8 +10955,8 @@ AdvSet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) | |||
10956 | * | 10955 | * |
10957 | * Return a checksum based on the EEPROM configuration read. | 10956 | * Return a checksum based on the EEPROM configuration read. |
10958 | */ | 10957 | */ |
10959 | static ushort __devinit | 10958 | static ushort AdvGet3550EEPConfig(AdvPortAddr iop_base, |
10960 | AdvGet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) | 10959 | ADVEEP_3550_CONFIG *cfg_buf) |
10961 | { | 10960 | { |
10962 | ushort wval, chksum; | 10961 | ushort wval, chksum; |
10963 | ushort *wbuf; | 10962 | ushort *wbuf; |
@@ -10999,8 +10998,8 @@ AdvGet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) | |||
10999 | * | 10998 | * |
11000 | * Return a checksum based on the EEPROM configuration read. | 10999 | * Return a checksum based on the EEPROM configuration read. |
11001 | */ | 11000 | */ |
11002 | static ushort __devinit | 11001 | static ushort AdvGet38C0800EEPConfig(AdvPortAddr iop_base, |
11003 | AdvGet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) | 11002 | ADVEEP_38C0800_CONFIG *cfg_buf) |
11004 | { | 11003 | { |
11005 | ushort wval, chksum; | 11004 | ushort wval, chksum; |
11006 | ushort *wbuf; | 11005 | ushort *wbuf; |
@@ -11042,8 +11041,8 @@ AdvGet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) | |||
11042 | * | 11041 | * |
11043 | * Return a checksum based on the EEPROM configuration read. | 11042 | * Return a checksum based on the EEPROM configuration read. |
11044 | */ | 11043 | */ |
11045 | static ushort __devinit | 11044 | static ushort AdvGet38C1600EEPConfig(AdvPortAddr iop_base, |
11046 | AdvGet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) | 11045 | ADVEEP_38C1600_CONFIG *cfg_buf) |
11047 | { | 11046 | { |
11048 | ushort wval, chksum; | 11047 | ushort wval, chksum; |
11049 | ushort *wbuf; | 11048 | ushort *wbuf; |
@@ -11092,7 +11091,7 @@ AdvGet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) | |||
11092 | * | 11091 | * |
11093 | * Note: Chip is stopped on entry. | 11092 | * Note: Chip is stopped on entry. |
11094 | */ | 11093 | */ |
11095 | static int __devinit AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc) | 11094 | static int AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc) |
11096 | { | 11095 | { |
11097 | AdvPortAddr iop_base; | 11096 | AdvPortAddr iop_base; |
11098 | ushort warn_code; | 11097 | ushort warn_code; |
@@ -11242,7 +11241,7 @@ static int __devinit AdvInitFrom3550EEP(ADV_DVC_VAR *asc_dvc) | |||
11242 | * | 11241 | * |
11243 | * Note: Chip is stopped on entry. | 11242 | * Note: Chip is stopped on entry. |
11244 | */ | 11243 | */ |
11245 | static int __devinit AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc) | 11244 | static int AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc) |
11246 | { | 11245 | { |
11247 | AdvPortAddr iop_base; | 11246 | AdvPortAddr iop_base; |
11248 | ushort warn_code; | 11247 | ushort warn_code; |
@@ -11441,7 +11440,7 @@ static int __devinit AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc) | |||
11441 | * | 11440 | * |
11442 | * Note: Chip is stopped on entry. | 11441 | * Note: Chip is stopped on entry. |
11443 | */ | 11442 | */ |
11444 | static int __devinit AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc) | 11443 | static int AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc) |
11445 | { | 11444 | { |
11446 | AdvPortAddr iop_base; | 11445 | AdvPortAddr iop_base; |
11447 | ushort warn_code; | 11446 | ushort warn_code; |
@@ -11661,8 +11660,7 @@ static int __devinit AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc) | |||
11661 | * For a non-fatal error return a warning code. If there are no warnings | 11660 | * For a non-fatal error return a warning code. If there are no warnings |
11662 | * then 0 is returned. | 11661 | * then 0 is returned. |
11663 | */ | 11662 | */ |
11664 | static int __devinit | 11663 | static int AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) |
11665 | AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) | ||
11666 | { | 11664 | { |
11667 | struct asc_board *board = shost_priv(shost); | 11665 | struct asc_board *board = shost_priv(shost); |
11668 | ADV_DVC_VAR *asc_dvc = &board->dvc_var.adv_dvc_var; | 11666 | ADV_DVC_VAR *asc_dvc = &board->dvc_var.adv_dvc_var; |
@@ -11769,7 +11767,7 @@ static struct scsi_host_template advansys_template = { | |||
11769 | .use_clustering = ENABLE_CLUSTERING, | 11767 | .use_clustering = ENABLE_CLUSTERING, |
11770 | }; | 11768 | }; |
11771 | 11769 | ||
11772 | static int __devinit advansys_wide_init_chip(struct Scsi_Host *shost) | 11770 | static int advansys_wide_init_chip(struct Scsi_Host *shost) |
11773 | { | 11771 | { |
11774 | struct asc_board *board = shost_priv(shost); | 11772 | struct asc_board *board = shost_priv(shost); |
11775 | struct adv_dvc_var *adv_dvc = &board->dvc_var.adv_dvc_var; | 11773 | struct adv_dvc_var *adv_dvc = &board->dvc_var.adv_dvc_var; |
@@ -11882,8 +11880,8 @@ static void advansys_wide_free_mem(struct asc_board *board) | |||
11882 | } | 11880 | } |
11883 | } | 11881 | } |
11884 | 11882 | ||
11885 | static int __devinit advansys_board_found(struct Scsi_Host *shost, | 11883 | static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop, |
11886 | unsigned int iop, int bus_type) | 11884 | int bus_type) |
11887 | { | 11885 | { |
11888 | struct pci_dev *pdev; | 11886 | struct pci_dev *pdev; |
11889 | struct asc_board *boardp = shost_priv(shost); | 11887 | struct asc_board *boardp = shost_priv(shost); |
@@ -12428,7 +12426,7 @@ static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] = { | |||
12428 | * 10: 12 | 12426 | * 10: 12 |
12429 | * 11: 15 | 12427 | * 11: 15 |
12430 | */ | 12428 | */ |
12431 | static unsigned int __devinit advansys_isa_irq_no(PortAddr iop_base) | 12429 | static unsigned int advansys_isa_irq_no(PortAddr iop_base) |
12432 | { | 12430 | { |
12433 | unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); | 12431 | unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); |
12434 | unsigned int chip_irq = ((cfg_lsw >> 2) & 0x03) + 10; | 12432 | unsigned int chip_irq = ((cfg_lsw >> 2) & 0x03) + 10; |
@@ -12437,7 +12435,7 @@ static unsigned int __devinit advansys_isa_irq_no(PortAddr iop_base) | |||
12437 | return chip_irq; | 12435 | return chip_irq; |
12438 | } | 12436 | } |
12439 | 12437 | ||
12440 | static int __devinit advansys_isa_probe(struct device *dev, unsigned int id) | 12438 | static int advansys_isa_probe(struct device *dev, unsigned int id) |
12441 | { | 12439 | { |
12442 | int err = -ENODEV; | 12440 | int err = -ENODEV; |
12443 | PortAddr iop_base = _asc_def_iop_base[id]; | 12441 | PortAddr iop_base = _asc_def_iop_base[id]; |
@@ -12477,7 +12475,7 @@ static int __devinit advansys_isa_probe(struct device *dev, unsigned int id) | |||
12477 | return err; | 12475 | return err; |
12478 | } | 12476 | } |
12479 | 12477 | ||
12480 | static int __devexit advansys_isa_remove(struct device *dev, unsigned int id) | 12478 | static int advansys_isa_remove(struct device *dev, unsigned int id) |
12481 | { | 12479 | { |
12482 | int ioport = _asc_def_iop_base[id]; | 12480 | int ioport = _asc_def_iop_base[id]; |
12483 | advansys_release(dev_get_drvdata(dev)); | 12481 | advansys_release(dev_get_drvdata(dev)); |
@@ -12487,7 +12485,7 @@ static int __devexit advansys_isa_remove(struct device *dev, unsigned int id) | |||
12487 | 12485 | ||
12488 | static struct isa_driver advansys_isa_driver = { | 12486 | static struct isa_driver advansys_isa_driver = { |
12489 | .probe = advansys_isa_probe, | 12487 | .probe = advansys_isa_probe, |
12490 | .remove = __devexit_p(advansys_isa_remove), | 12488 | .remove = advansys_isa_remove, |
12491 | .driver = { | 12489 | .driver = { |
12492 | .owner = THIS_MODULE, | 12490 | .owner = THIS_MODULE, |
12493 | .name = DRV_NAME, | 12491 | .name = DRV_NAME, |
@@ -12505,7 +12503,7 @@ static struct isa_driver advansys_isa_driver = { | |||
12505 | * 110: 15 | 12503 | * 110: 15 |
12506 | * 111: invalid | 12504 | * 111: invalid |
12507 | */ | 12505 | */ |
12508 | static unsigned int __devinit advansys_vlb_irq_no(PortAddr iop_base) | 12506 | static unsigned int advansys_vlb_irq_no(PortAddr iop_base) |
12509 | { | 12507 | { |
12510 | unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); | 12508 | unsigned short cfg_lsw = AscGetChipCfgLsw(iop_base); |
12511 | unsigned int chip_irq = ((cfg_lsw >> 2) & 0x07) + 9; | 12509 | unsigned int chip_irq = ((cfg_lsw >> 2) & 0x07) + 9; |
@@ -12514,7 +12512,7 @@ static unsigned int __devinit advansys_vlb_irq_no(PortAddr iop_base) | |||
12514 | return chip_irq; | 12512 | return chip_irq; |
12515 | } | 12513 | } |
12516 | 12514 | ||
12517 | static int __devinit advansys_vlb_probe(struct device *dev, unsigned int id) | 12515 | static int advansys_vlb_probe(struct device *dev, unsigned int id) |
12518 | { | 12516 | { |
12519 | int err = -ENODEV; | 12517 | int err = -ENODEV; |
12520 | PortAddr iop_base = _asc_def_iop_base[id]; | 12518 | PortAddr iop_base = _asc_def_iop_base[id]; |
@@ -12561,14 +12559,14 @@ static int __devinit advansys_vlb_probe(struct device *dev, unsigned int id) | |||
12561 | 12559 | ||
12562 | static struct isa_driver advansys_vlb_driver = { | 12560 | static struct isa_driver advansys_vlb_driver = { |
12563 | .probe = advansys_vlb_probe, | 12561 | .probe = advansys_vlb_probe, |
12564 | .remove = __devexit_p(advansys_isa_remove), | 12562 | .remove = advansys_isa_remove, |
12565 | .driver = { | 12563 | .driver = { |
12566 | .owner = THIS_MODULE, | 12564 | .owner = THIS_MODULE, |
12567 | .name = "advansys_vlb", | 12565 | .name = "advansys_vlb", |
12568 | }, | 12566 | }, |
12569 | }; | 12567 | }; |
12570 | 12568 | ||
12571 | static struct eisa_device_id advansys_eisa_table[] __devinitdata = { | 12569 | static struct eisa_device_id advansys_eisa_table[] = { |
12572 | { "ABP7401" }, | 12570 | { "ABP7401" }, |
12573 | { "ABP7501" }, | 12571 | { "ABP7501" }, |
12574 | { "" } | 12572 | { "" } |
@@ -12595,7 +12593,7 @@ struct eisa_scsi_data { | |||
12595 | * 110: invalid | 12593 | * 110: invalid |
12596 | * 111: invalid | 12594 | * 111: invalid |
12597 | */ | 12595 | */ |
12598 | static unsigned int __devinit advansys_eisa_irq_no(struct eisa_device *edev) | 12596 | static unsigned int advansys_eisa_irq_no(struct eisa_device *edev) |
12599 | { | 12597 | { |
12600 | unsigned short cfg_lsw = inw(edev->base_addr + 0xc86); | 12598 | unsigned short cfg_lsw = inw(edev->base_addr + 0xc86); |
12601 | unsigned int chip_irq = ((cfg_lsw >> 8) & 0x07) + 10; | 12599 | unsigned int chip_irq = ((cfg_lsw >> 8) & 0x07) + 10; |
@@ -12604,7 +12602,7 @@ static unsigned int __devinit advansys_eisa_irq_no(struct eisa_device *edev) | |||
12604 | return chip_irq; | 12602 | return chip_irq; |
12605 | } | 12603 | } |
12606 | 12604 | ||
12607 | static int __devinit advansys_eisa_probe(struct device *dev) | 12605 | static int advansys_eisa_probe(struct device *dev) |
12608 | { | 12606 | { |
12609 | int i, ioport, irq = 0; | 12607 | int i, ioport, irq = 0; |
12610 | int err; | 12608 | int err; |
@@ -12677,7 +12675,7 @@ static int __devinit advansys_eisa_probe(struct device *dev) | |||
12677 | return err; | 12675 | return err; |
12678 | } | 12676 | } |
12679 | 12677 | ||
12680 | static __devexit int advansys_eisa_remove(struct device *dev) | 12678 | static int advansys_eisa_remove(struct device *dev) |
12681 | { | 12679 | { |
12682 | int i; | 12680 | int i; |
12683 | struct eisa_scsi_data *data = dev_get_drvdata(dev); | 12681 | struct eisa_scsi_data *data = dev_get_drvdata(dev); |
@@ -12701,12 +12699,12 @@ static struct eisa_driver advansys_eisa_driver = { | |||
12701 | .driver = { | 12699 | .driver = { |
12702 | .name = DRV_NAME, | 12700 | .name = DRV_NAME, |
12703 | .probe = advansys_eisa_probe, | 12701 | .probe = advansys_eisa_probe, |
12704 | .remove = __devexit_p(advansys_eisa_remove), | 12702 | .remove = advansys_eisa_remove, |
12705 | } | 12703 | } |
12706 | }; | 12704 | }; |
12707 | 12705 | ||
12708 | /* PCI Devices supported by this driver */ | 12706 | /* PCI Devices supported by this driver */ |
12709 | static struct pci_device_id advansys_pci_tbl[] __devinitdata = { | 12707 | static struct pci_device_id advansys_pci_tbl[] = { |
12710 | {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, | 12708 | {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, |
12711 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 12709 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
12712 | {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_ABP940, | 12710 | {PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_ABP940, |
@@ -12724,7 +12722,7 @@ static struct pci_device_id advansys_pci_tbl[] __devinitdata = { | |||
12724 | 12722 | ||
12725 | MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); | 12723 | MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); |
12726 | 12724 | ||
12727 | static void __devinit advansys_set_latency(struct pci_dev *pdev) | 12725 | static void advansys_set_latency(struct pci_dev *pdev) |
12728 | { | 12726 | { |
12729 | if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) || | 12727 | if ((pdev->device == PCI_DEVICE_ID_ASP_1200A) || |
12730 | (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) { | 12728 | (pdev->device == PCI_DEVICE_ID_ASP_ABP940)) { |
@@ -12737,8 +12735,8 @@ static void __devinit advansys_set_latency(struct pci_dev *pdev) | |||
12737 | } | 12735 | } |
12738 | } | 12736 | } |
12739 | 12737 | ||
12740 | static int __devinit | 12738 | static int advansys_pci_probe(struct pci_dev *pdev, |
12741 | advansys_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 12739 | const struct pci_device_id *ent) |
12742 | { | 12740 | { |
12743 | int err, ioport; | 12741 | int err, ioport; |
12744 | struct Scsi_Host *shost; | 12742 | struct Scsi_Host *shost; |
@@ -12791,7 +12789,7 @@ advansys_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
12791 | return err; | 12789 | return err; |
12792 | } | 12790 | } |
12793 | 12791 | ||
12794 | static void __devexit advansys_pci_remove(struct pci_dev *pdev) | 12792 | static void advansys_pci_remove(struct pci_dev *pdev) |
12795 | { | 12793 | { |
12796 | advansys_release(pci_get_drvdata(pdev)); | 12794 | advansys_release(pci_get_drvdata(pdev)); |
12797 | pci_release_regions(pdev); | 12795 | pci_release_regions(pdev); |
@@ -12802,7 +12800,7 @@ static struct pci_driver advansys_pci_driver = { | |||
12802 | .name = DRV_NAME, | 12800 | .name = DRV_NAME, |
12803 | .id_table = advansys_pci_tbl, | 12801 | .id_table = advansys_pci_tbl, |
12804 | .probe = advansys_pci_probe, | 12802 | .probe = advansys_pci_probe, |
12805 | .remove = __devexit_p(advansys_pci_remove), | 12803 | .remove = advansys_pci_remove, |
12806 | }; | 12804 | }; |
12807 | 12805 | ||
12808 | static int __init advansys_init(void) | 12806 | static int __init advansys_init(void) |