Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53698
b: refs/heads/master
c: 1079a2d
h: refs/heads/master
v: v3
  • Loading branch information
Zachary Amsden authored and James Bottomley committed Apr 17, 2007
1 parent 79b7b7c commit 46935c4
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad1331a792f9f253bef362de9b6872c6b8f88c0c
refs/heads/master: 1079a2d251f24a7d9e7576217f5f738bc4218337
73 changes: 48 additions & 25 deletions trunk/drivers/scsi/BusLogic.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,17 +579,17 @@ static void __init BusLogic_InitializeProbeInfoListISA(struct BusLogic_HostAdapt
/*
Append the list of standard BusLogic MultiMaster ISA I/O Addresses.
*/
if (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe330 : check_region(0x330, BusLogic_MultiMasterAddressCount) == 0)
if (!BusLogic_ProbeOptions.LimitedProbeISA || BusLogic_ProbeOptions.Probe330)
BusLogic_AppendProbeAddressISA(0x330);
if (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe334 : check_region(0x334, BusLogic_MultiMasterAddressCount) == 0)
if (!BusLogic_ProbeOptions.LimitedProbeISA || BusLogic_ProbeOptions.Probe334)
BusLogic_AppendProbeAddressISA(0x334);
if (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe230 : check_region(0x230, BusLogic_MultiMasterAddressCount) == 0)
if (!BusLogic_ProbeOptions.LimitedProbeISA || BusLogic_ProbeOptions.Probe230)
BusLogic_AppendProbeAddressISA(0x230);
if (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe234 : check_region(0x234, BusLogic_MultiMasterAddressCount) == 0)
if (!BusLogic_ProbeOptions.LimitedProbeISA || BusLogic_ProbeOptions.Probe234)
BusLogic_AppendProbeAddressISA(0x234);
if (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe130 : check_region(0x130, BusLogic_MultiMasterAddressCount) == 0)
if (!BusLogic_ProbeOptions.LimitedProbeISA || BusLogic_ProbeOptions.Probe130)
BusLogic_AppendProbeAddressISA(0x130);
if (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe134 : check_region(0x134, BusLogic_MultiMasterAddressCount) == 0)
if (!BusLogic_ProbeOptions.LimitedProbeISA || BusLogic_ProbeOptions.Probe134)
BusLogic_AppendProbeAddressISA(0x134);
}

Expand Down Expand Up @@ -795,7 +795,9 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
host adapters are probed.
*/
if (!BusLogic_ProbeOptions.NoProbeISA)
if (PrimaryProbeInfo->IO_Address == 0 && (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe330 : check_region(0x330, BusLogic_MultiMasterAddressCount) == 0)) {
if (PrimaryProbeInfo->IO_Address == 0 &&
(!BusLogic_ProbeOptions.LimitedProbeISA ||
BusLogic_ProbeOptions.Probe330)) {
PrimaryProbeInfo->HostAdapterType = BusLogic_MultiMaster;
PrimaryProbeInfo->HostAdapterBusType = BusLogic_ISA_Bus;
PrimaryProbeInfo->IO_Address = 0x330;
Expand All @@ -805,15 +807,25 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
omitting the Primary I/O Address which has already been handled.
*/
if (!BusLogic_ProbeOptions.NoProbeISA) {
if (!StandardAddressSeen[1] && (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe334 : check_region(0x334, BusLogic_MultiMasterAddressCount) == 0))
if (!StandardAddressSeen[1] &&
(!BusLogic_ProbeOptions.LimitedProbeISA ||
BusLogic_ProbeOptions.Probe334))
BusLogic_AppendProbeAddressISA(0x334);
if (!StandardAddressSeen[2] && (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe230 : check_region(0x230, BusLogic_MultiMasterAddressCount) == 0))
if (!StandardAddressSeen[2] &&
(!BusLogic_ProbeOptions.LimitedProbeISA ||
BusLogic_ProbeOptions.Probe230))
BusLogic_AppendProbeAddressISA(0x230);
if (!StandardAddressSeen[3] && (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe234 : check_region(0x234, BusLogic_MultiMasterAddressCount) == 0))
if (!StandardAddressSeen[3] &&
(!BusLogic_ProbeOptions.LimitedProbeISA ||
BusLogic_ProbeOptions.Probe234))
BusLogic_AppendProbeAddressISA(0x234);
if (!StandardAddressSeen[4] && (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe130 : check_region(0x130, BusLogic_MultiMasterAddressCount) == 0))
if (!StandardAddressSeen[4] &&
(!BusLogic_ProbeOptions.LimitedProbeISA ||
BusLogic_ProbeOptions.Probe130))
BusLogic_AppendProbeAddressISA(0x130);
if (!StandardAddressSeen[5] && (BusLogic_ProbeOptions.LimitedProbeISA ? BusLogic_ProbeOptions.Probe134 : check_region(0x134, BusLogic_MultiMasterAddressCount) == 0))
if (!StandardAddressSeen[5] &&
(!BusLogic_ProbeOptions.LimitedProbeISA ||
BusLogic_ProbeOptions.Probe134))
BusLogic_AppendProbeAddressISA(0x134);
}
/*
Expand Down Expand Up @@ -2220,22 +2232,35 @@ static int __init BusLogic_init(void)
HostAdapter->PCI_Device = ProbeInfo->PCI_Device;
HostAdapter->IRQ_Channel = ProbeInfo->IRQ_Channel;
HostAdapter->AddressCount = BusLogic_HostAdapterAddressCount[HostAdapter->HostAdapterType];

/*
Make sure region is free prior to probing.
*/
if (!request_region(HostAdapter->IO_Address, HostAdapter->AddressCount,
"BusLogic"))
continue;
/*
Probe the Host Adapter. If unsuccessful, abort further initialization.
*/
if (!BusLogic_ProbeHostAdapter(HostAdapter))
if (!BusLogic_ProbeHostAdapter(HostAdapter)) {
release_region(HostAdapter->IO_Address, HostAdapter->AddressCount);
continue;
}
/*
Hard Reset the Host Adapter. If unsuccessful, abort further
initialization.
*/
if (!BusLogic_HardwareResetHostAdapter(HostAdapter, true))
if (!BusLogic_HardwareResetHostAdapter(HostAdapter, true)) {
release_region(HostAdapter->IO_Address, HostAdapter->AddressCount);
continue;
}
/*
Check the Host Adapter. If unsuccessful, abort further initialization.
*/
if (!BusLogic_CheckHostAdapter(HostAdapter))
if (!BusLogic_CheckHostAdapter(HostAdapter)) {
release_region(HostAdapter->IO_Address, HostAdapter->AddressCount);
continue;
}
/*
Initialize the Driver Options field if provided.
*/
Expand All @@ -2246,16 +2271,6 @@ static int __init BusLogic_init(void)
and Electronic Mail Address.
*/
BusLogic_AnnounceDriver(HostAdapter);
/*
Register usage of the I/O Address range. From this point onward, any
failure will be assumed to be due to a problem with the Host Adapter,
rather than due to having mistakenly identified this port as belonging
to a BusLogic Host Adapter. The I/O Address range will not be
released, thereby preventing it from being incorrectly identified as
any other type of Host Adapter.
*/
if (!request_region(HostAdapter->IO_Address, HostAdapter->AddressCount, "BusLogic"))
continue;
/*
Register the SCSI Host structure.
*/
Expand All @@ -2280,6 +2295,12 @@ static int __init BusLogic_init(void)
Acquire the System Resources necessary to use the Host Adapter, then
Create the Initial CCBs, Initialize the Host Adapter, and finally
perform Target Device Inquiry.
From this point onward, any failure will be assumed to be due to a
problem with the Host Adapter, rather than due to having mistakenly
identified this port as belonging to a BusLogic Host Adapter. The
I/O Address range will not be released, thereby preventing it from
being incorrectly identified as any other type of Host Adapter.
*/
if (BusLogic_ReadHostAdapterConfiguration(HostAdapter) &&
BusLogic_ReportHostAdapterConfiguration(HostAdapter) &&
Expand Down Expand Up @@ -3598,6 +3619,7 @@ static void __exit BusLogic_exit(void)

__setup("BusLogic=", BusLogic_Setup);

#ifdef MODULE
static struct pci_device_id BusLogic_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
Expand All @@ -3607,6 +3629,7 @@ static struct pci_device_id BusLogic_pci_tbl[] __devinitdata = {
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ }
};
#endif
MODULE_DEVICE_TABLE(pci, BusLogic_pci_tbl);

module_init(BusLogic_init);
Expand Down

0 comments on commit 46935c4

Please sign in to comment.