From: Petr Vandrovec Date: Wed, 11 Jan 2006 19:31:07 +0000 (-0800) Subject: [SCSI] Pass proper device from BusLogic to SCSI layer X-Git-Tag: v2.6.16-rc1~162^2~46 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=745caf71d99c5d4ff4c9e4c0f74e64c429fed531;p=linux-2.6 [SCSI] Pass proper device from BusLogic to SCSI layer While trying to get SUSE's SLES9 working on system with more than 4GB we've noticed that SCSI layer happilly passes addresses over 4GB to the buslogic driver, which is quite a big problem as buslogic can generate only 32bit busmastering cycles. Fortunately in the current kernels this problem does not exist anymore as SCSI layer now assumes 4GB capable device by default, but it is still good idea to pass correct device structure to the SCSI layer. If nothing else, /sys/block/sda/device now points to /sys/devices/pci0000:00/0000:00:10.0/host0/... instead of /sys/devices/platform/host0/... like it did in the past. Change does nothing for ISA based BusLogic adapters, they'll still end under platform (and they are probably broken for long time as I do not see anything forcing ISA 16MB limit for them). Signed-off-by: Petr Vandrovec Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 9d6040bfa0..1c45934329 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -2216,6 +2216,7 @@ static int __init BusLogic_init(void) HostAdapter->PCI_Address = ProbeInfo->PCI_Address; HostAdapter->Bus = ProbeInfo->Bus; HostAdapter->Device = ProbeInfo->Device; + HostAdapter->PCI_Device = ProbeInfo->PCI_Device; HostAdapter->IRQ_Channel = ProbeInfo->IRQ_Channel; HostAdapter->AddressCount = BusLogic_HostAdapterAddressCount[HostAdapter->HostAdapterType]; /* @@ -2296,7 +2297,7 @@ static int __init BusLogic_init(void) scsi_host_put(Host); } else { BusLogic_InitializeHostStructure(HostAdapter, Host); - scsi_add_host(Host, NULL); + scsi_add_host(Host, HostAdapter->PCI_Device ? &HostAdapter->PCI_Device->dev : NULL); scsi_scan_host(Host); BusLogicHostAdapterCount++; }