aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/FlashPoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/FlashPoint.c')
-rw-r--r--drivers/scsi/FlashPoint.c143
1 files changed, 71 insertions, 72 deletions
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c
index 696f31c5df76..37ee2cb60d20 100644
--- a/drivers/scsi/FlashPoint.c
+++ b/drivers/scsi/FlashPoint.c
@@ -304,7 +304,7 @@ struct nvram_info {
304#define MODEL_DW 4 304#define MODEL_DW 4
305 305
306 306
307typedef struct SCCBcard { 307struct sccb_card {
308 struct sccb * currentSCCB; 308 struct sccb * currentSCCB;
309 struct sccb_mgr_info * cardInfo; 309 struct sccb_mgr_info * cardInfo;
310 310
@@ -320,9 +320,8 @@ typedef struct SCCBcard {
320 struct nvram_info * pNvRamInfo; 320 struct nvram_info * pNvRamInfo;
321 struct sccb * discQ_Tbl[QUEUE_DEPTH]; 321 struct sccb * discQ_Tbl[QUEUE_DEPTH];
322 322
323}SCCBCARD; 323};
324 324
325typedef struct SCCBcard *PSCCBcard;
326 325
327 326
328#define F_TAG_STARTED 0x01 327#define F_TAG_STARTED 0x01
@@ -968,7 +967,7 @@ typedef struct SCCBscam_info {
968 967
969static unsigned char FPT_sisyncn(unsigned long port, unsigned char p_card, unsigned char syncFlag); 968static unsigned char FPT_sisyncn(unsigned long port, unsigned char p_card, unsigned char syncFlag);
970static void FPT_ssel(unsigned long port, unsigned char p_card); 969static void FPT_ssel(unsigned long port, unsigned char p_card);
971static void FPT_sres(unsigned long port, unsigned char p_card, PSCCBcard pCurrCard); 970static void FPT_sres(unsigned long port, unsigned char p_card, struct sccb_card * pCurrCard);
972static void FPT_shandem(unsigned long port, unsigned char p_card,struct sccb * pCurrSCCB); 971static void FPT_shandem(unsigned long port, unsigned char p_card,struct sccb * pCurrSCCB);
973static void FPT_stsyncn(unsigned long port, unsigned char p_card); 972static void FPT_stsyncn(unsigned long port, unsigned char p_card);
974static void FPT_sisyncr(unsigned long port,unsigned char sync_pulse, unsigned char offset); 973static void FPT_sisyncr(unsigned long port,unsigned char sync_pulse, unsigned char offset);
@@ -993,11 +992,11 @@ static void FPT_stwidn(unsigned long port, unsigned char p_card);
993static void FPT_siwidr(unsigned long port, unsigned char width); 992static void FPT_siwidr(unsigned long port, unsigned char width);
994 993
995 994
996static void FPT_queueSelectFail(PSCCBcard pCurrCard, unsigned char p_card); 995static void FPT_queueSelectFail(struct sccb_card * pCurrCard, unsigned char p_card);
997static void FPT_queueDisconnect(struct sccb * p_SCCB, unsigned char p_card); 996static void FPT_queueDisconnect(struct sccb * p_SCCB, unsigned char p_card);
998static void FPT_queueCmdComplete(PSCCBcard pCurrCard, struct sccb * p_SCCB, 997static void FPT_queueCmdComplete(struct sccb_card * pCurrCard, struct sccb * p_SCCB,
999 unsigned char p_card); 998 unsigned char p_card);
1000static void FPT_queueSearchSelect(PSCCBcard pCurrCard, unsigned char p_card); 999static void FPT_queueSearchSelect(struct sccb_card * pCurrCard, unsigned char p_card);
1001static void FPT_queueFlushSccb(unsigned char p_card, unsigned char error_code); 1000static void FPT_queueFlushSccb(unsigned char p_card, unsigned char error_code);
1002static void FPT_queueAddSccb(struct sccb * p_SCCB, unsigned char card); 1001static void FPT_queueAddSccb(struct sccb * p_SCCB, unsigned char card);
1003static unsigned char FPT_queueFindSccb(struct sccb * p_SCCB, unsigned char p_card); 1002static unsigned char FPT_queueFindSccb(struct sccb * p_SCCB, unsigned char p_card);
@@ -1038,7 +1037,7 @@ static void FPT_DiagEEPROM(unsigned long p_port);
1038 1037
1039 1038
1040 1039
1041static void FPT_dataXferProcessor(unsigned long port, PSCCBcard pCurrCard); 1040static void FPT_dataXferProcessor(unsigned long port, struct sccb_card * pCurrCard);
1042static void FPT_busMstrSGDataXferStart(unsigned long port, struct sccb * pCurrSCCB); 1041static void FPT_busMstrSGDataXferStart(unsigned long port, struct sccb * pCurrSCCB);
1043static void FPT_busMstrDataXferStart(unsigned long port, struct sccb * pCurrSCCB); 1042static void FPT_busMstrDataXferStart(unsigned long port, struct sccb * pCurrSCCB);
1044static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card, struct sccb * pCurrSCCB); 1043static void FPT_hostDataXferAbort(unsigned long port, unsigned char p_card, struct sccb * pCurrSCCB);
@@ -1046,10 +1045,10 @@ static void FPT_hostDataXferRestart(struct sccb * currSCCB);
1046 1045
1047 1046
1048static unsigned char FPT_SccbMgr_bad_isr(unsigned long p_port, unsigned char p_card, 1047static unsigned char FPT_SccbMgr_bad_isr(unsigned long p_port, unsigned char p_card,
1049 PSCCBcard pCurrCard, unsigned short p_int); 1048 struct sccb_card * pCurrCard, unsigned short p_int);
1050 1049
1051static void FPT_SccbMgrTableInitAll(void); 1050static void FPT_SccbMgrTableInitAll(void);
1052static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, unsigned char p_card); 1051static void FPT_SccbMgrTableInitCard(struct sccb_card * pCurrCard, unsigned char p_card);
1053static void FPT_SccbMgrTableInitTarget(unsigned char p_card, unsigned char target); 1052static void FPT_SccbMgrTableInitTarget(unsigned char p_card, unsigned char target);
1054 1053
1055 1054
@@ -1080,7 +1079,7 @@ static void FPT_autoLoadDefaultMap(unsigned long p_port);
1080 1079
1081 1080
1082static struct sccb_mgr_tar_info FPT_sccbMgrTbl[MAX_CARDS][MAX_SCSI_TAR] = { { { 0 } } }; 1081static struct sccb_mgr_tar_info FPT_sccbMgrTbl[MAX_CARDS][MAX_SCSI_TAR] = { { { 0 } } };
1083static SCCBCARD FPT_BL_Card[MAX_CARDS] = { { 0 } }; 1082static struct sccb_card FPT_BL_Card[MAX_CARDS] = { { 0 } };
1084static SCCBSCAM_INFO FPT_scamInfo[MAX_SCSI_TAR] = { { { 0 } } }; 1083static SCCBSCAM_INFO FPT_scamInfo[MAX_SCSI_TAR] = { { { 0 } } };
1085static struct nvram_info FPT_nvRamInfo[MAX_MB_CARDS] = { { 0 } }; 1084static struct nvram_info FPT_nvRamInfo[MAX_MB_CARDS] = { { 0 } };
1086 1085
@@ -1385,7 +1384,7 @@ static int FlashPoint_ProbeHostAdapter(struct sccb_mgr_info * pCardInfo)
1385 1384
1386static unsigned long FlashPoint_HardwareResetHostAdapter(struct sccb_mgr_info * pCardInfo) 1385static unsigned long FlashPoint_HardwareResetHostAdapter(struct sccb_mgr_info * pCardInfo)
1387{ 1386{
1388 PSCCBcard CurrCard = NULL; 1387 struct sccb_card * CurrCard = NULL;
1389 struct nvram_info * pCurrNvRam; 1388 struct nvram_info * pCurrNvRam;
1390 unsigned char i,j,thisCard, ScamFlg; 1389 unsigned char i,j,thisCard, ScamFlg;
1391 unsigned short temp,sync_bit_map,id; 1390 unsigned short temp,sync_bit_map,id;
@@ -1573,7 +1572,7 @@ static void FlashPoint_ReleaseHostAdapter(unsigned long pCurrCard)
1573 unsigned long *pScamTbl; 1572 unsigned long *pScamTbl;
1574 struct nvram_info * pCurrNvRam; 1573 struct nvram_info * pCurrNvRam;
1575 1574
1576 pCurrNvRam = ((PSCCBcard)pCurrCard)->pNvRamInfo; 1575 pCurrNvRam = ((struct sccb_card *)pCurrCard)->pNvRamInfo;
1577 1576
1578 if(pCurrNvRam){ 1577 if(pCurrNvRam){
1579 FPT_WrStack(pCurrNvRam->niBaseAddr, 0, pCurrNvRam->niModel); 1578 FPT_WrStack(pCurrNvRam->niBaseAddr, 0, pCurrNvRam->niModel);
@@ -1595,7 +1594,7 @@ static void FlashPoint_ReleaseHostAdapter(unsigned long pCurrCard)
1595 } 1594 }
1596 1595
1597 }else{ 1596 }else{
1598 FPT_WrStack(((PSCCBcard)pCurrCard)->ioPort, 0, 0); 1597 FPT_WrStack(((struct sccb_card *)pCurrCard)->ioPort, 0, 0);
1599 } 1598 }
1600} 1599}
1601 1600
@@ -1670,8 +1669,8 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1670 struct sccb * pSaveSccb; 1669 struct sccb * pSaveSccb;
1671 CALL_BK_FN callback; 1670 CALL_BK_FN callback;
1672 1671
1673 thisCard = ((PSCCBcard) pCurrCard)->cardIndex; 1672 thisCard = ((struct sccb_card *) pCurrCard)->cardIndex;
1674 ioport = ((PSCCBcard) pCurrCard)->ioPort; 1673 ioport = ((struct sccb_card *) pCurrCard)->ioPort;
1675 1674
1676 if((p_Sccb->TargID > MAX_SCSI_TAR) || (p_Sccb->Lun > MAX_LUN)) 1675 if((p_Sccb->TargID > MAX_SCSI_TAR) || (p_Sccb->Lun > MAX_LUN))
1677 { 1676 {
@@ -1688,19 +1687,19 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1688 FPT_sinits(p_Sccb,thisCard); 1687 FPT_sinits(p_Sccb,thisCard);
1689 1688
1690 1689
1691 if (!((PSCCBcard) pCurrCard)->cmdCounter) 1690 if (!((struct sccb_card *) pCurrCard)->cmdCounter)
1692 { 1691 {
1693 WR_HARPOON(ioport+hp_semaphore, (RD_HARPOON(ioport+hp_semaphore) 1692 WR_HARPOON(ioport+hp_semaphore, (RD_HARPOON(ioport+hp_semaphore)
1694 | SCCB_MGR_ACTIVE)); 1693 | SCCB_MGR_ACTIVE));
1695 1694
1696 if (((PSCCBcard) pCurrCard)->globalFlags & F_GREEN_PC) 1695 if (((struct sccb_card *) pCurrCard)->globalFlags & F_GREEN_PC)
1697 { 1696 {
1698 WR_HARPOON(ioport+hp_clkctrl_0, CLKCTRL_DEFAULT); 1697 WR_HARPOON(ioport+hp_clkctrl_0, CLKCTRL_DEFAULT);
1699 WR_HARPOON(ioport+hp_sys_ctrl, 0x00); 1698 WR_HARPOON(ioport+hp_sys_ctrl, 0x00);
1700 } 1699 }
1701 } 1700 }
1702 1701
1703 ((PSCCBcard)pCurrCard)->cmdCounter++; 1702 ((struct sccb_card *)pCurrCard)->cmdCounter++;
1704 1703
1705 if (RD_HARPOON(ioport+hp_semaphore) & BIOS_IN_USE) { 1704 if (RD_HARPOON(ioport+hp_semaphore) & BIOS_IN_USE) {
1706 1705
@@ -1708,10 +1707,10 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1708 | TICKLE_ME)); 1707 | TICKLE_ME));
1709 if(p_Sccb->OperationCode == RESET_COMMAND) 1708 if(p_Sccb->OperationCode == RESET_COMMAND)
1710 { 1709 {
1711 pSaveSccb = ((PSCCBcard) pCurrCard)->currentSCCB; 1710 pSaveSccb = ((struct sccb_card *) pCurrCard)->currentSCCB;
1712 ((PSCCBcard) pCurrCard)->currentSCCB = p_Sccb; 1711 ((struct sccb_card *) pCurrCard)->currentSCCB = p_Sccb;
1713 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard); 1712 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard);
1714 ((PSCCBcard) pCurrCard)->currentSCCB = pSaveSccb; 1713 ((struct sccb_card *) pCurrCard)->currentSCCB = pSaveSccb;
1715 } 1714 }
1716 else 1715 else
1717 { 1716 {
@@ -1723,10 +1722,10 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1723 1722
1724 if(p_Sccb->OperationCode == RESET_COMMAND) 1723 if(p_Sccb->OperationCode == RESET_COMMAND)
1725 { 1724 {
1726 pSaveSccb = ((PSCCBcard) pCurrCard)->currentSCCB; 1725 pSaveSccb = ((struct sccb_card *) pCurrCard)->currentSCCB;
1727 ((PSCCBcard) pCurrCard)->currentSCCB = p_Sccb; 1726 ((struct sccb_card *) pCurrCard)->currentSCCB = p_Sccb;
1728 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard); 1727 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard);
1729 ((PSCCBcard) pCurrCard)->currentSCCB = pSaveSccb; 1728 ((struct sccb_card *) pCurrCard)->currentSCCB = pSaveSccb;
1730 } 1729 }
1731 else 1730 else
1732 { 1731 {
@@ -1738,17 +1737,17 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1738 1737
1739 MDISABLE_INT(ioport); 1738 MDISABLE_INT(ioport);
1740 1739
1741 if((((PSCCBcard) pCurrCard)->globalFlags & F_CONLUN_IO) && 1740 if((((struct sccb_card *) pCurrCard)->globalFlags & F_CONLUN_IO) &&
1742 ((FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarStatus & TAR_TAG_Q_MASK) != TAG_Q_TRYING)) 1741 ((FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarStatus & TAR_TAG_Q_MASK) != TAG_Q_TRYING))
1743 lun = p_Sccb->Lun; 1742 lun = p_Sccb->Lun;
1744 else 1743 else
1745 lun = 0; 1744 lun = 0;
1746 if ((((PSCCBcard) pCurrCard)->currentSCCB == NULL) && 1745 if ((((struct sccb_card *) pCurrCard)->currentSCCB == NULL) &&
1747 (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarSelQ_Cnt == 0) && 1746 (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarSelQ_Cnt == 0) &&
1748 (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarLUNBusy[lun] 1747 (FPT_sccbMgrTbl[thisCard][p_Sccb->TargID].TarLUNBusy[lun]
1749 == 0)) { 1748 == 0)) {
1750 1749
1751 ((PSCCBcard) pCurrCard)->currentSCCB = p_Sccb; 1750 ((struct sccb_card *) pCurrCard)->currentSCCB = p_Sccb;
1752 FPT_ssel(p_Sccb->SccbIOPort,thisCard); 1751 FPT_ssel(p_Sccb->SccbIOPort,thisCard);
1753 } 1752 }
1754 1753
@@ -1756,10 +1755,10 @@ static void FlashPoint_StartCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1756 1755
1757 if(p_Sccb->OperationCode == RESET_COMMAND) 1756 if(p_Sccb->OperationCode == RESET_COMMAND)
1758 { 1757 {
1759 pSaveSccb = ((PSCCBcard) pCurrCard)->currentSCCB; 1758 pSaveSccb = ((struct sccb_card *) pCurrCard)->currentSCCB;
1760 ((PSCCBcard) pCurrCard)->currentSCCB = p_Sccb; 1759 ((struct sccb_card *) pCurrCard)->currentSCCB = p_Sccb;
1761 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard); 1760 FPT_queueSelectFail(&FPT_BL_Card[thisCard], thisCard);
1762 ((PSCCBcard) pCurrCard)->currentSCCB = pSaveSccb; 1761 ((struct sccb_card *) pCurrCard)->currentSCCB = pSaveSccb;
1763 } 1762 }
1764 else 1763 else
1765 { 1764 {
@@ -1794,9 +1793,9 @@ static int FlashPoint_AbortCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1794 struct sccb_mgr_tar_info * currTar_Info; 1793 struct sccb_mgr_tar_info * currTar_Info;
1795 1794
1796 1795
1797 ioport = ((PSCCBcard) pCurrCard)->ioPort; 1796 ioport = ((struct sccb_card *) pCurrCard)->ioPort;
1798 1797
1799 thisCard = ((PSCCBcard)pCurrCard)->cardIndex; 1798 thisCard = ((struct sccb_card *)pCurrCard)->cardIndex;
1800 1799
1801 if (!(RD_HARPOON(ioport+hp_page_ctrl) & G_INT_DISABLE)) 1800 if (!(RD_HARPOON(ioport+hp_page_ctrl) & G_INT_DISABLE))
1802 { 1801 {
@@ -1804,9 +1803,9 @@ static int FlashPoint_AbortCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1804 if (FPT_queueFindSccb(p_Sccb,thisCard)) 1803 if (FPT_queueFindSccb(p_Sccb,thisCard))
1805 { 1804 {
1806 1805
1807 ((PSCCBcard)pCurrCard)->cmdCounter--; 1806 ((struct sccb_card *)pCurrCard)->cmdCounter--;
1808 1807
1809 if (!((PSCCBcard)pCurrCard)->cmdCounter) 1808 if (!((struct sccb_card *)pCurrCard)->cmdCounter)
1810 WR_HARPOON(ioport+hp_semaphore,(RD_HARPOON(ioport+hp_semaphore) 1809 WR_HARPOON(ioport+hp_semaphore,(RD_HARPOON(ioport+hp_semaphore)
1811 & (unsigned char)(~(SCCB_MGR_ACTIVE | TICKLE_ME)) )); 1810 & (unsigned char)(~(SCCB_MGR_ACTIVE | TICKLE_ME)) ));
1812 1811
@@ -1819,7 +1818,7 @@ static int FlashPoint_AbortCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1819 1818
1820 else 1819 else
1821 { 1820 {
1822 if (((PSCCBcard)pCurrCard)->currentSCCB == p_Sccb) 1821 if (((struct sccb_card *)pCurrCard)->currentSCCB == p_Sccb)
1823 { 1822 {
1824 p_Sccb->SccbStatus = SCCB_ABORT; 1823 p_Sccb->SccbStatus = SCCB_ABORT;
1825 return(0); 1824 return(0);
@@ -1835,23 +1834,23 @@ static int FlashPoint_AbortCCB(unsigned long pCurrCard, struct sccb * p_Sccb)
1835 if(p_Sccb->Sccb_tag) 1834 if(p_Sccb->Sccb_tag)
1836 { 1835 {
1837 MDISABLE_INT(ioport); 1836 MDISABLE_INT(ioport);
1838 if (((PSCCBcard) pCurrCard)->discQ_Tbl[p_Sccb->Sccb_tag]==p_Sccb) 1837 if (((struct sccb_card *) pCurrCard)->discQ_Tbl[p_Sccb->Sccb_tag]==p_Sccb)
1839 { 1838 {
1840 p_Sccb->SccbStatus = SCCB_ABORT; 1839 p_Sccb->SccbStatus = SCCB_ABORT;
1841 p_Sccb->Sccb_scsistat = ABORT_ST; 1840 p_Sccb->Sccb_scsistat = ABORT_ST;
1842 p_Sccb->Sccb_scsimsg = SMABORT_TAG; 1841 p_Sccb->Sccb_scsimsg = SMABORT_TAG;
1843 1842
1844 if(((PSCCBcard) pCurrCard)->currentSCCB == NULL) 1843 if(((struct sccb_card *) pCurrCard)->currentSCCB == NULL)
1845 { 1844 {
1846 ((PSCCBcard) pCurrCard)->currentSCCB = p_Sccb; 1845 ((struct sccb_card *) pCurrCard)->currentSCCB = p_Sccb;
1847 FPT_ssel(ioport, thisCard); 1846 FPT_ssel(ioport, thisCard);
1848 } 1847 }
1849 else 1848 else
1850 { 1849 {
1851 pSaveSCCB = ((PSCCBcard) pCurrCard)->currentSCCB; 1850 pSaveSCCB = ((struct sccb_card *) pCurrCard)->currentSCCB;
1852 ((PSCCBcard) pCurrCard)->currentSCCB = p_Sccb; 1851 ((struct sccb_card *) pCurrCard)->currentSCCB = p_Sccb;
1853 FPT_queueSelectFail((PSCCBcard) pCurrCard, thisCard); 1852 FPT_queueSelectFail((struct sccb_card *) pCurrCard, thisCard);
1854 ((PSCCBcard) pCurrCard)->currentSCCB = pSaveSCCB; 1853 ((struct sccb_card *) pCurrCard)->currentSCCB = pSaveSCCB;
1855 } 1854 }
1856 } 1855 }
1857 MENABLE_INT(ioport); 1856 MENABLE_INT(ioport);
@@ -1887,7 +1886,7 @@ static unsigned char FlashPoint_InterruptPending(unsigned long pCurrCard)
1887{ 1886{
1888 unsigned long ioport; 1887 unsigned long ioport;
1889 1888
1890 ioport = ((PSCCBcard)pCurrCard)->ioPort; 1889 ioport = ((struct sccb_card *)pCurrCard)->ioPort;
1891 1890
1892 if (RD_HARPOON(ioport+hp_int_status) & INT_ASSERTED) 1891 if (RD_HARPOON(ioport+hp_int_status) & INT_ASSERTED)
1893 { 1892 {
@@ -1918,8 +1917,8 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1918 unsigned char i, target; 1917 unsigned char i, target;
1919 unsigned long ioport; 1918 unsigned long ioport;
1920 1919
1921 thisCard = ((PSCCBcard)pCurrCard)->cardIndex; 1920 thisCard = ((struct sccb_card *)pCurrCard)->cardIndex;
1922 ioport = ((PSCCBcard)pCurrCard)->ioPort; 1921 ioport = ((struct sccb_card *)pCurrCard)->ioPort;
1923 1922
1924 MDISABLE_INT(ioport); 1923 MDISABLE_INT(ioport);
1925 1924
@@ -1934,10 +1933,10 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1934 bm_status) 1933 bm_status)
1935 { 1934 {
1936 1935
1937 currSCCB = ((PSCCBcard)pCurrCard)->currentSCCB; 1936 currSCCB = ((struct sccb_card *)pCurrCard)->currentSCCB;
1938 1937
1939 if (hp_int & (FIFO | TIMEOUT | RESET | SCAM_SEL) || bm_status) { 1938 if (hp_int & (FIFO | TIMEOUT | RESET | SCAM_SEL) || bm_status) {
1940 result = FPT_SccbMgr_bad_isr(ioport,thisCard,((PSCCBcard)pCurrCard),hp_int); 1939 result = FPT_SccbMgr_bad_isr(ioport,thisCard,((struct sccb_card *)pCurrCard),hp_int);
1941 WRW_HARPOON((ioport+hp_intstat), (FIFO | TIMEOUT | RESET | SCAM_SEL)); 1940 WRW_HARPOON((ioport+hp_intstat), (FIFO | TIMEOUT | RESET | SCAM_SEL));
1942 bm_status = 0; 1941 bm_status = 0;
1943 1942
@@ -1960,7 +1959,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1960 while (!(RDW_HARPOON((ioport+hp_intstat)) & (BUS_FREE | RSEL))) ; 1959 while (!(RDW_HARPOON((ioport+hp_intstat)) & (BUS_FREE | RSEL))) ;
1961 } 1960 }
1962 1961
1963 if (((PSCCBcard)pCurrCard)->globalFlags & F_HOST_XFER_ACT) 1962 if (((struct sccb_card *)pCurrCard)->globalFlags & F_HOST_XFER_ACT)
1964 1963
1965 FPT_phaseChkFifo(ioport, thisCard); 1964 FPT_phaseChkFifo(ioport, thisCard);
1966 1965
@@ -1978,7 +1977,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
1978 else if (hp_int & ITAR_DISC) 1977 else if (hp_int & ITAR_DISC)
1979 { 1978 {
1980 1979
1981 if (((PSCCBcard)pCurrCard)->globalFlags & F_HOST_XFER_ACT) { 1980 if (((struct sccb_card *)pCurrCard)->globalFlags & F_HOST_XFER_ACT) {
1982 1981
1983 FPT_phaseChkFifo(ioport, thisCard); 1982 FPT_phaseChkFifo(ioport, thisCard);
1984 1983
@@ -2019,7 +2018,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
2019 WRW_HARPOON((ioport+hp_intstat), (BUS_FREE | ITAR_DISC)); 2018 WRW_HARPOON((ioport+hp_intstat), (BUS_FREE | ITAR_DISC));
2020 2019
2021 2020
2022 ((PSCCBcard)pCurrCard)->globalFlags |= F_NEW_SCCB_CMD; 2021 ((struct sccb_card *)pCurrCard)->globalFlags |= F_NEW_SCCB_CMD;
2023 2022
2024 } 2023 }
2025 2024
@@ -2030,7 +2029,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
2030 2029
2031 if (RDW_HARPOON((ioport+hp_intstat)) & ITAR_DISC) 2030 if (RDW_HARPOON((ioport+hp_intstat)) & ITAR_DISC)
2032 { 2031 {
2033 if (((PSCCBcard)pCurrCard)->globalFlags & F_HOST_XFER_ACT) 2032 if (((struct sccb_card *)pCurrCard)->globalFlags & F_HOST_XFER_ACT)
2034 { 2033 {
2035 FPT_phaseChkFifo(ioport, thisCard); 2034 FPT_phaseChkFifo(ioport, thisCard);
2036 } 2035 }
@@ -2047,7 +2046,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
2047 FPT_queueDisconnect(currSCCB,thisCard); 2046 FPT_queueDisconnect(currSCCB,thisCard);
2048 } 2047 }
2049 2048
2050 FPT_sres(ioport,thisCard,((PSCCBcard)pCurrCard)); 2049 FPT_sres(ioport,thisCard,((struct sccb_card *)pCurrCard));
2051 FPT_phaseDecode(ioport,thisCard); 2050 FPT_phaseDecode(ioport,thisCard);
2052 2051
2053 } 2052 }
@@ -2101,7 +2100,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
2101 2100
2102 WRW_HARPOON((ioport+hp_intstat), BUS_FREE); 2101 WRW_HARPOON((ioport+hp_intstat), BUS_FREE);
2103 2102
2104 if (((PSCCBcard)pCurrCard)->globalFlags & F_HOST_XFER_ACT) { 2103 if (((struct sccb_card *)pCurrCard)->globalFlags & F_HOST_XFER_ACT) {
2105 2104
2106 FPT_hostDataXferAbort(ioport,thisCard,currSCCB); 2105 FPT_hostDataXferAbort(ioport,thisCard,currSCCB);
2107 } 2106 }
@@ -2113,24 +2112,24 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
2113 else if (hp_int & ITICKLE) { 2112 else if (hp_int & ITICKLE) {
2114 2113
2115 WRW_HARPOON((ioport+hp_intstat), ITICKLE); 2114 WRW_HARPOON((ioport+hp_intstat), ITICKLE);
2116 ((PSCCBcard)pCurrCard)->globalFlags |= F_NEW_SCCB_CMD; 2115 ((struct sccb_card *)pCurrCard)->globalFlags |= F_NEW_SCCB_CMD;
2117 } 2116 }
2118 2117
2119 2118
2120 2119
2121 if (((PSCCBcard)pCurrCard)->globalFlags & F_NEW_SCCB_CMD) { 2120 if (((struct sccb_card *)pCurrCard)->globalFlags & F_NEW_SCCB_CMD) {
2122 2121
2123 2122
2124 ((PSCCBcard)pCurrCard)->globalFlags &= ~F_NEW_SCCB_CMD; 2123 ((struct sccb_card *)pCurrCard)->globalFlags &= ~F_NEW_SCCB_CMD;
2125 2124
2126 2125
2127 if (((PSCCBcard)pCurrCard)->currentSCCB == NULL) { 2126 if (((struct sccb_card *)pCurrCard)->currentSCCB == NULL) {
2128 2127
2129 FPT_queueSearchSelect(((PSCCBcard)pCurrCard),thisCard); 2128 FPT_queueSearchSelect(((struct sccb_card *)pCurrCard),thisCard);
2130 } 2129 }
2131 2130
2132 if (((PSCCBcard)pCurrCard)->currentSCCB != NULL) { 2131 if (((struct sccb_card *)pCurrCard)->currentSCCB != NULL) {
2133 ((PSCCBcard)pCurrCard)->globalFlags &= ~F_NEW_SCCB_CMD; 2132 ((struct sccb_card *)pCurrCard)->globalFlags &= ~F_NEW_SCCB_CMD;
2134 FPT_ssel(ioport,thisCard); 2133 FPT_ssel(ioport,thisCard);
2135 } 2134 }
2136 2135
@@ -2156,7 +2155,7 @@ static int FlashPoint_HandleInterrupt(unsigned long pCurrCard)
2156 * 2155 *
2157 *---------------------------------------------------------------------*/ 2156 *---------------------------------------------------------------------*/
2158static unsigned char FPT_SccbMgr_bad_isr(unsigned long p_port, unsigned char p_card, 2157static unsigned char FPT_SccbMgr_bad_isr(unsigned long p_port, unsigned char p_card,
2159 PSCCBcard pCurrCard, unsigned short p_int) 2158 struct sccb_card * pCurrCard, unsigned short p_int)
2160{ 2159{
2161 unsigned char temp, ScamFlg; 2160 unsigned char temp, ScamFlg;
2162 struct sccb_mgr_tar_info * currTar_Info; 2161 struct sccb_mgr_tar_info * currTar_Info;
@@ -2332,7 +2331,7 @@ static void FPT_SccbMgrTableInitAll()
2332 * 2331 *
2333 *---------------------------------------------------------------------*/ 2332 *---------------------------------------------------------------------*/
2334 2333
2335static void FPT_SccbMgrTableInitCard(PSCCBcard pCurrCard, unsigned char p_card) 2334static void FPT_SccbMgrTableInitCard(struct sccb_card * pCurrCard, unsigned char p_card)
2336{ 2335{
2337 unsigned char scsiID, qtag; 2336 unsigned char scsiID, qtag;
2338 2337
@@ -2492,7 +2491,7 @@ static void FPT_ssel(unsigned long port, unsigned char p_card)
2492 unsigned char auto_loaded, i, target, *theCCB; 2491 unsigned char auto_loaded, i, target, *theCCB;
2493 2492
2494 unsigned long cdb_reg; 2493 unsigned long cdb_reg;
2495 PSCCBcard CurrCard; 2494 struct sccb_card * CurrCard;
2496 struct sccb * currSCCB; 2495 struct sccb * currSCCB;
2497 struct sccb_mgr_tar_info * currTar_Info; 2496 struct sccb_mgr_tar_info * currTar_Info;
2498 unsigned char lastTag, lun; 2497 unsigned char lastTag, lun;
@@ -2797,7 +2796,7 @@ static void FPT_ssel(unsigned long port, unsigned char p_card)
2797 * 2796 *
2798 *---------------------------------------------------------------------*/ 2797 *---------------------------------------------------------------------*/
2799 2798
2800static void FPT_sres(unsigned long port, unsigned char p_card, PSCCBcard pCurrCard) 2799static void FPT_sres(unsigned long port, unsigned char p_card, struct sccb_card * pCurrCard)
2801{ 2800{
2802 2801
2803 unsigned char our_target, message, lun = 0, tag, msgRetryCount; 2802 unsigned char our_target, message, lun = 0, tag, msgRetryCount;
@@ -3110,7 +3109,7 @@ static void FPT_SendMsg(unsigned long port, unsigned char message)
3110static void FPT_sdecm(unsigned char message, unsigned long port, unsigned char p_card) 3109static void FPT_sdecm(unsigned char message, unsigned long port, unsigned char p_card)
3111{ 3110{
3112 struct sccb * currSCCB; 3111 struct sccb * currSCCB;
3113 PSCCBcard CurrCard; 3112 struct sccb_card * CurrCard;
3114 struct sccb_mgr_tar_info * currTar_Info; 3113 struct sccb_mgr_tar_info * currTar_Info;
3115 3114
3116 CurrCard = &FPT_BL_Card[p_card]; 3115 CurrCard = &FPT_BL_Card[p_card];
@@ -3909,7 +3908,7 @@ static void FPT_sresb(unsigned long port, unsigned char p_card)
3909 * Description: Setup for the Auto Sense command. 3908 * Description: Setup for the Auto Sense command.
3910 * 3909 *
3911 *---------------------------------------------------------------------*/ 3910 *---------------------------------------------------------------------*/
3912static void FPT_ssenss(PSCCBcard pCurrCard) 3911static void FPT_ssenss(struct sccb_card * pCurrCard)
3913{ 3912{
3914 unsigned char i; 3913 unsigned char i;
3915 struct sccb * currSCCB; 3914 struct sccb * currSCCB;
@@ -5151,7 +5150,7 @@ static void FPT_autoCmdCmplt(unsigned long p_port, unsigned char p_card)
5151 * 5150 *
5152 *---------------------------------------------------------------------*/ 5151 *---------------------------------------------------------------------*/
5153 5152
5154static void FPT_dataXferProcessor(unsigned long port, PSCCBcard pCurrCard) 5153static void FPT_dataXferProcessor(unsigned long port, struct sccb_card * pCurrCard)
5155{ 5154{
5156 struct sccb * currSCCB; 5155 struct sccb * currSCCB;
5157 5156
@@ -5699,7 +5698,7 @@ static void FPT_scini(unsigned char p_card, unsigned char p_our_id, unsigned cha
5699 unsigned long p_port; 5698 unsigned long p_port;
5700 5699
5701 unsigned char i,k,ScamFlg ; 5700 unsigned char i,k,ScamFlg ;
5702 PSCCBcard currCard; 5701 struct sccb_card * currCard;
5703 struct nvram_info * pCurrNvRam; 5702 struct nvram_info * pCurrNvRam;
5704 5703
5705 currCard = &FPT_BL_Card[p_card]; 5704 currCard = &FPT_BL_Card[p_card];
@@ -6931,7 +6930,7 @@ static void FPT_DiagEEPROM(unsigned long p_port)
6931 * 6930 *
6932 *---------------------------------------------------------------------*/ 6931 *---------------------------------------------------------------------*/
6933 6932
6934static void FPT_queueSearchSelect(PSCCBcard pCurrCard, unsigned char p_card) 6933static void FPT_queueSearchSelect(struct sccb_card * pCurrCard, unsigned char p_card)
6935{ 6934{
6936 unsigned char scan_ptr, lun; 6935 unsigned char scan_ptr, lun;
6937 struct sccb_mgr_tar_info * currTar_Info; 6936 struct sccb_mgr_tar_info * currTar_Info;
@@ -7062,7 +7061,7 @@ static void FPT_queueSearchSelect(PSCCBcard pCurrCard, unsigned char p_card)
7062 * 7061 *
7063 *---------------------------------------------------------------------*/ 7062 *---------------------------------------------------------------------*/
7064 7063
7065static void FPT_queueSelectFail(PSCCBcard pCurrCard, unsigned char p_card) 7064static void FPT_queueSelectFail(struct sccb_card * pCurrCard, unsigned char p_card)
7066{ 7065{
7067 unsigned char thisTarg; 7066 unsigned char thisTarg;
7068 struct sccb_mgr_tar_info * currTar_Info; 7067 struct sccb_mgr_tar_info * currTar_Info;
@@ -7101,7 +7100,7 @@ static void FPT_queueSelectFail(PSCCBcard pCurrCard, unsigned char p_card)
7101 * 7100 *
7102 *---------------------------------------------------------------------*/ 7101 *---------------------------------------------------------------------*/
7103 7102
7104static void FPT_queueCmdComplete(PSCCBcard pCurrCard, struct sccb * p_sccb, 7103static void FPT_queueCmdComplete(struct sccb_card * pCurrCard, struct sccb * p_sccb,
7105 unsigned char p_card) 7104 unsigned char p_card)
7106{ 7105{
7107 7106