diff options
Diffstat (limited to 'drivers/scsi/BusLogic.c')
-rw-r--r-- | drivers/scsi/BusLogic.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 3075204915c8..e874b8944875 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
@@ -192,7 +192,7 @@ static void BusLogic_InitializeCCBs(struct BusLogic_HostAdapter *HostAdapter, vo | |||
192 | BusLogic_CreateInitialCCBs allocates the initial CCBs for Host Adapter. | 192 | BusLogic_CreateInitialCCBs allocates the initial CCBs for Host Adapter. |
193 | */ | 193 | */ |
194 | 194 | ||
195 | static boolean __init BusLogic_CreateInitialCCBs(struct BusLogic_HostAdapter *HostAdapter) | 195 | static bool __init BusLogic_CreateInitialCCBs(struct BusLogic_HostAdapter *HostAdapter) |
196 | { | 196 | { |
197 | int BlockSize = BusLogic_CCB_AllocationGroupSize * sizeof(struct BusLogic_CCB); | 197 | int BlockSize = BusLogic_CCB_AllocationGroupSize * sizeof(struct BusLogic_CCB); |
198 | void *BlockPointer; | 198 | void *BlockPointer; |
@@ -238,7 +238,7 @@ static void BusLogic_DestroyCCBs(struct BusLogic_HostAdapter *HostAdapter) | |||
238 | multiple host adapters share the same IRQ Channel. | 238 | multiple host adapters share the same IRQ Channel. |
239 | */ | 239 | */ |
240 | 240 | ||
241 | static void BusLogic_CreateAdditionalCCBs(struct BusLogic_HostAdapter *HostAdapter, int AdditionalCCBs, boolean SuccessMessageP) | 241 | static void BusLogic_CreateAdditionalCCBs(struct BusLogic_HostAdapter *HostAdapter, int AdditionalCCBs, bool SuccessMessageP) |
242 | { | 242 | { |
243 | int BlockSize = BusLogic_CCB_AllocationGroupSize * sizeof(struct BusLogic_CCB); | 243 | int BlockSize = BusLogic_CCB_AllocationGroupSize * sizeof(struct BusLogic_CCB); |
244 | int PreviouslyAllocated = HostAdapter->AllocatedCCBs; | 244 | int PreviouslyAllocated = HostAdapter->AllocatedCCBs; |
@@ -362,10 +362,8 @@ static int BusLogic_Command(struct BusLogic_HostAdapter *HostAdapter, enum BusLo | |||
362 | interrupt could occur if the IRQ Channel was previously enabled by another | 362 | interrupt could occur if the IRQ Channel was previously enabled by another |
363 | BusLogic Host Adapter or another driver sharing the same IRQ Channel. | 363 | BusLogic Host Adapter or another driver sharing the same IRQ Channel. |
364 | */ | 364 | */ |
365 | if (!HostAdapter->IRQ_ChannelAcquired) { | 365 | if (!HostAdapter->IRQ_ChannelAcquired) |
366 | local_irq_save(ProcessorFlags); | 366 | local_irq_save(ProcessorFlags); |
367 | local_irq_disable(); | ||
368 | } | ||
369 | /* | 367 | /* |
370 | Wait for the Host Adapter Ready bit to be set and the Command/Parameter | 368 | Wait for the Host Adapter Ready bit to be set and the Command/Parameter |
371 | Register Busy bit to be reset in the Status Register. | 369 | Register Busy bit to be reset in the Status Register. |
@@ -639,9 +637,9 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd | |||
639 | struct BusLogic_ProbeInfo *PrimaryProbeInfo = &BusLogic_ProbeInfoList[BusLogic_ProbeInfoCount]; | 637 | struct BusLogic_ProbeInfo *PrimaryProbeInfo = &BusLogic_ProbeInfoList[BusLogic_ProbeInfoCount]; |
640 | int NonPrimaryPCIMultiMasterIndex = BusLogic_ProbeInfoCount + 1; | 638 | int NonPrimaryPCIMultiMasterIndex = BusLogic_ProbeInfoCount + 1; |
641 | int NonPrimaryPCIMultiMasterCount = 0, PCIMultiMasterCount = 0; | 639 | int NonPrimaryPCIMultiMasterCount = 0, PCIMultiMasterCount = 0; |
642 | boolean ForceBusDeviceScanningOrder = false; | 640 | bool ForceBusDeviceScanningOrder = false; |
643 | boolean ForceBusDeviceScanningOrderChecked = false; | 641 | bool ForceBusDeviceScanningOrderChecked = false; |
644 | boolean StandardAddressSeen[6]; | 642 | bool StandardAddressSeen[6]; |
645 | struct pci_dev *PCI_Device = NULL; | 643 | struct pci_dev *PCI_Device = NULL; |
646 | int i; | 644 | int i; |
647 | if (BusLogic_ProbeInfoCount >= BusLogic_MaxHostAdapters) | 645 | if (BusLogic_ProbeInfoCount >= BusLogic_MaxHostAdapters) |
@@ -1011,7 +1009,7 @@ static void __init BusLogic_InitializeProbeInfoList(struct BusLogic_HostAdapter | |||
1011 | BusLogic_Failure prints a standardized error message, and then returns false. | 1009 | BusLogic_Failure prints a standardized error message, and then returns false. |
1012 | */ | 1010 | */ |
1013 | 1011 | ||
1014 | static boolean BusLogic_Failure(struct BusLogic_HostAdapter *HostAdapter, char *ErrorMessage) | 1012 | static bool BusLogic_Failure(struct BusLogic_HostAdapter *HostAdapter, char *ErrorMessage) |
1015 | { | 1013 | { |
1016 | BusLogic_AnnounceDriver(HostAdapter); | 1014 | BusLogic_AnnounceDriver(HostAdapter); |
1017 | if (HostAdapter->HostAdapterBusType == BusLogic_PCI_Bus) { | 1015 | if (HostAdapter->HostAdapterBusType == BusLogic_PCI_Bus) { |
@@ -1030,7 +1028,7 @@ static boolean BusLogic_Failure(struct BusLogic_HostAdapter *HostAdapter, char * | |||
1030 | BusLogic_ProbeHostAdapter probes for a BusLogic Host Adapter. | 1028 | BusLogic_ProbeHostAdapter probes for a BusLogic Host Adapter. |
1031 | */ | 1029 | */ |
1032 | 1030 | ||
1033 | static boolean __init BusLogic_ProbeHostAdapter(struct BusLogic_HostAdapter *HostAdapter) | 1031 | static bool __init BusLogic_ProbeHostAdapter(struct BusLogic_HostAdapter *HostAdapter) |
1034 | { | 1032 | { |
1035 | union BusLogic_StatusRegister StatusRegister; | 1033 | union BusLogic_StatusRegister StatusRegister; |
1036 | union BusLogic_InterruptRegister InterruptRegister; | 1034 | union BusLogic_InterruptRegister InterruptRegister; |
@@ -1101,8 +1099,8 @@ static boolean __init BusLogic_ProbeHostAdapter(struct BusLogic_HostAdapter *Hos | |||
1101 | SCSI Bus Reset. | 1099 | SCSI Bus Reset. |
1102 | */ | 1100 | */ |
1103 | 1101 | ||
1104 | static boolean BusLogic_HardwareResetHostAdapter(struct BusLogic_HostAdapter | 1102 | static bool BusLogic_HardwareResetHostAdapter(struct BusLogic_HostAdapter |
1105 | *HostAdapter, boolean HardReset) | 1103 | *HostAdapter, bool HardReset) |
1106 | { | 1104 | { |
1107 | union BusLogic_StatusRegister StatusRegister; | 1105 | union BusLogic_StatusRegister StatusRegister; |
1108 | int TimeoutCounter; | 1106 | int TimeoutCounter; |
@@ -1205,11 +1203,11 @@ static boolean BusLogic_HardwareResetHostAdapter(struct BusLogic_HostAdapter | |||
1205 | Host Adapter. | 1203 | Host Adapter. |
1206 | */ | 1204 | */ |
1207 | 1205 | ||
1208 | static boolean __init BusLogic_CheckHostAdapter(struct BusLogic_HostAdapter *HostAdapter) | 1206 | static bool __init BusLogic_CheckHostAdapter(struct BusLogic_HostAdapter *HostAdapter) |
1209 | { | 1207 | { |
1210 | struct BusLogic_ExtendedSetupInformation ExtendedSetupInformation; | 1208 | struct BusLogic_ExtendedSetupInformation ExtendedSetupInformation; |
1211 | unsigned char RequestedReplyLength; | 1209 | unsigned char RequestedReplyLength; |
1212 | boolean Result = true; | 1210 | bool Result = true; |
1213 | /* | 1211 | /* |
1214 | FlashPoint Host Adapters do not require this protection. | 1212 | FlashPoint Host Adapters do not require this protection. |
1215 | */ | 1213 | */ |
@@ -1239,7 +1237,7 @@ static boolean __init BusLogic_CheckHostAdapter(struct BusLogic_HostAdapter *Hos | |||
1239 | from Host Adapter and initializes the Host Adapter structure. | 1237 | from Host Adapter and initializes the Host Adapter structure. |
1240 | */ | 1238 | */ |
1241 | 1239 | ||
1242 | static boolean __init BusLogic_ReadHostAdapterConfiguration(struct BusLogic_HostAdapter | 1240 | static bool __init BusLogic_ReadHostAdapterConfiguration(struct BusLogic_HostAdapter |
1243 | *HostAdapter) | 1241 | *HostAdapter) |
1244 | { | 1242 | { |
1245 | struct BusLogic_BoardID BoardID; | 1243 | struct BusLogic_BoardID BoardID; |
@@ -1686,14 +1684,14 @@ static boolean __init BusLogic_ReadHostAdapterConfiguration(struct BusLogic_Host | |||
1686 | Host Adapter. | 1684 | Host Adapter. |
1687 | */ | 1685 | */ |
1688 | 1686 | ||
1689 | static boolean __init BusLogic_ReportHostAdapterConfiguration(struct BusLogic_HostAdapter | 1687 | static bool __init BusLogic_ReportHostAdapterConfiguration(struct BusLogic_HostAdapter |
1690 | *HostAdapter) | 1688 | *HostAdapter) |
1691 | { | 1689 | { |
1692 | unsigned short AllTargetsMask = (1 << HostAdapter->MaxTargetDevices) - 1; | 1690 | unsigned short AllTargetsMask = (1 << HostAdapter->MaxTargetDevices) - 1; |
1693 | unsigned short SynchronousPermitted, FastPermitted; | 1691 | unsigned short SynchronousPermitted, FastPermitted; |
1694 | unsigned short UltraPermitted, WidePermitted; | 1692 | unsigned short UltraPermitted, WidePermitted; |
1695 | unsigned short DisconnectPermitted, TaggedQueuingPermitted; | 1693 | unsigned short DisconnectPermitted, TaggedQueuingPermitted; |
1696 | boolean CommonSynchronousNegotiation, CommonTaggedQueueDepth; | 1694 | bool CommonSynchronousNegotiation, CommonTaggedQueueDepth; |
1697 | char SynchronousString[BusLogic_MaxTargetDevices + 1]; | 1695 | char SynchronousString[BusLogic_MaxTargetDevices + 1]; |
1698 | char WideString[BusLogic_MaxTargetDevices + 1]; | 1696 | char WideString[BusLogic_MaxTargetDevices + 1]; |
1699 | char DisconnectString[BusLogic_MaxTargetDevices + 1]; | 1697 | char DisconnectString[BusLogic_MaxTargetDevices + 1]; |
@@ -1835,7 +1833,7 @@ static boolean __init BusLogic_ReportHostAdapterConfiguration(struct BusLogic_Ho | |||
1835 | Host Adapter. | 1833 | Host Adapter. |
1836 | */ | 1834 | */ |
1837 | 1835 | ||
1838 | static boolean __init BusLogic_AcquireResources(struct BusLogic_HostAdapter *HostAdapter) | 1836 | static bool __init BusLogic_AcquireResources(struct BusLogic_HostAdapter *HostAdapter) |
1839 | { | 1837 | { |
1840 | if (HostAdapter->IRQ_Channel == 0) { | 1838 | if (HostAdapter->IRQ_Channel == 0) { |
1841 | BusLogic_Error("NO LEGAL INTERRUPT CHANNEL ASSIGNED - DETACHING\n", HostAdapter); | 1839 | BusLogic_Error("NO LEGAL INTERRUPT CHANNEL ASSIGNED - DETACHING\n", HostAdapter); |
@@ -1903,7 +1901,7 @@ static void BusLogic_ReleaseResources(struct BusLogic_HostAdapter *HostAdapter) | |||
1903 | of the Host Adapter from its initial power on or hard reset state. | 1901 | of the Host Adapter from its initial power on or hard reset state. |
1904 | */ | 1902 | */ |
1905 | 1903 | ||
1906 | static boolean BusLogic_InitializeHostAdapter(struct BusLogic_HostAdapter | 1904 | static bool BusLogic_InitializeHostAdapter(struct BusLogic_HostAdapter |
1907 | *HostAdapter) | 1905 | *HostAdapter) |
1908 | { | 1906 | { |
1909 | struct BusLogic_ExtendedMailboxRequest ExtendedMailboxRequest; | 1907 | struct BusLogic_ExtendedMailboxRequest ExtendedMailboxRequest; |
@@ -2002,7 +2000,7 @@ static boolean BusLogic_InitializeHostAdapter(struct BusLogic_HostAdapter | |||
2002 | through Host Adapter. | 2000 | through Host Adapter. |
2003 | */ | 2001 | */ |
2004 | 2002 | ||
2005 | static boolean __init BusLogic_TargetDeviceInquiry(struct BusLogic_HostAdapter | 2003 | static bool __init BusLogic_TargetDeviceInquiry(struct BusLogic_HostAdapter |
2006 | *HostAdapter) | 2004 | *HostAdapter) |
2007 | { | 2005 | { |
2008 | u16 InstalledDevices; | 2006 | u16 InstalledDevices; |
@@ -2739,7 +2737,7 @@ static irqreturn_t BusLogic_InterruptHandler(int IRQ_Channel, void *DeviceIdenti | |||
2739 | already have been acquired by the caller. | 2737 | already have been acquired by the caller. |
2740 | */ | 2738 | */ |
2741 | 2739 | ||
2742 | static boolean BusLogic_WriteOutgoingMailbox(struct BusLogic_HostAdapter | 2740 | static bool BusLogic_WriteOutgoingMailbox(struct BusLogic_HostAdapter |
2743 | *HostAdapter, enum BusLogic_ActionCode ActionCode, struct BusLogic_CCB *CCB) | 2741 | *HostAdapter, enum BusLogic_ActionCode ActionCode, struct BusLogic_CCB *CCB) |
2744 | { | 2742 | { |
2745 | struct BusLogic_OutgoingMailbox *NextOutgoingMailbox; | 2743 | struct BusLogic_OutgoingMailbox *NextOutgoingMailbox; |
@@ -3058,7 +3056,7 @@ static int BusLogic_AbortCommand(struct scsi_cmnd *Command) | |||
3058 | currently executing SCSI Commands as having been Reset. | 3056 | currently executing SCSI Commands as having been Reset. |
3059 | */ | 3057 | */ |
3060 | 3058 | ||
3061 | static int BusLogic_ResetHostAdapter(struct BusLogic_HostAdapter *HostAdapter, boolean HardReset) | 3059 | static int BusLogic_ResetHostAdapter(struct BusLogic_HostAdapter *HostAdapter, bool HardReset) |
3062 | { | 3060 | { |
3063 | struct BusLogic_CCB *CCB; | 3061 | struct BusLogic_CCB *CCB; |
3064 | int TargetID; | 3062 | int TargetID; |
@@ -3309,7 +3307,7 @@ Target Requested Completed Requested Completed Requested Completed\n\ | |||
3309 | static void BusLogic_Message(enum BusLogic_MessageLevel MessageLevel, char *Format, struct BusLogic_HostAdapter *HostAdapter, ...) | 3307 | static void BusLogic_Message(enum BusLogic_MessageLevel MessageLevel, char *Format, struct BusLogic_HostAdapter *HostAdapter, ...) |
3310 | { | 3308 | { |
3311 | static char Buffer[BusLogic_LineBufferSize]; | 3309 | static char Buffer[BusLogic_LineBufferSize]; |
3312 | static boolean BeginningOfLine = true; | 3310 | static bool BeginningOfLine = true; |
3313 | va_list Arguments; | 3311 | va_list Arguments; |
3314 | int Length = 0; | 3312 | int Length = 0; |
3315 | va_start(Arguments, HostAdapter); | 3313 | va_start(Arguments, HostAdapter); |
@@ -3347,7 +3345,7 @@ static void BusLogic_Message(enum BusLogic_MessageLevel MessageLevel, char *Form | |||
3347 | and updates the pointer if the keyword is recognized and false otherwise. | 3345 | and updates the pointer if the keyword is recognized and false otherwise. |
3348 | */ | 3346 | */ |
3349 | 3347 | ||
3350 | static boolean __init BusLogic_ParseKeyword(char **StringPointer, char *Keyword) | 3348 | static bool __init BusLogic_ParseKeyword(char **StringPointer, char *Keyword) |
3351 | { | 3349 | { |
3352 | char *Pointer = *StringPointer; | 3350 | char *Pointer = *StringPointer; |
3353 | while (*Keyword != '\0') { | 3351 | while (*Keyword != '\0') { |