public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device (241p11)
  2001-01-29 22:00 [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device (241p11) Rasmus Andersen
@ 2001-01-29 21:50 ` Gérard Roudier
  2001-01-31 18:58   ` [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Gérard Roudier @ 2001-01-29 21:50 UTC (permalink / raw)
  To: Rasmus Andersen; +Cc: linux-kernel, linux-scsi



You missed that SYMBIOS devices can be attached by RAID firmware and,
that, in such situation, the kernel should avoid tampering the SYMBIOS
device. The [ncr|sym]53c8xx drivers are aware of that, and donnot attach
SYMBIOS devices owned by RAID.

If the pci_enable_device() thing is to be added to the drivers, it must
preferently be placed after the checking against RAID attachement.

(look for 0x52414944 in the driver source which is the signature tested by
the drivers, or look into beta SYM-2).

Gérard.

On Mon, 29 Jan 2001, Rasmus Andersen wrote:

> Hi.
> 
> The following patch makes drivers/scsi/sym53c8xx.c and (by way of
> sym53c8xx_comm.h::sym53c8xx__detect) ncr53c8xx.c do a
> pci_enable_device after finding a device.
> 
> It applies against ac12 and 241p11.
> 
> Comments?
> 
> 
> --- linux-ac11-clean/drivers/scsi/sym53c8xx.c	Mon Jan  1 19:23:21 2001
> +++ linux-ac11/drivers/scsi/sym53c8xx.c	Thu Jan 25 23:12:06 2001
> @@ -13294,6 +13294,8 @@
>  			++j;
>  			continue;
>  		}
> +		if (pci_enable_device(pcidev))
> +			continue;
>  		/* Some HW as the HP LH4 may report twice PCI devices */
>  		for (i = 0; i < count ; i++) {
>  			if (devtbl[i].slot.bus	     == PciBusNumber(pcidev) && 
> --- linux-ac11-clean/drivers/scsi/sym53c8xx_comm.h	Mon Oct 16 21:56:50 2000
> +++ linux-ac11/drivers/scsi/sym53c8xx_comm.h	Fri Jan 26 22:54:19 2001
> @@ -2754,6 +2754,8 @@
>  			++j;
>  			continue;
>  		}
> +		if (pci_enable_device(pcidev))
> +			continue;
>  		/* Some HW as the HP LH4 may report twice PCI devices */
>  		for (i = 0; i < count ; i++) {
>  			if (devtbl[i].slot.bus	     == PciBusNumber(pcidev) && 
> 
> -- 
> Regards,
>         Rasmus(rasmus@jaquet.dk)
> 
> When C++ is your hammer, everything looks like a thumb.      Steven M. Haflich
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device (241p11)
@ 2001-01-29 22:00 Rasmus Andersen
  2001-01-29 21:50 ` Gérard Roudier
  0 siblings, 1 reply; 4+ messages in thread
From: Rasmus Andersen @ 2001-01-29 22:00 UTC (permalink / raw)
  To: groudier; +Cc: linux-kernel, linux-scsi

Hi.

The following patch makes drivers/scsi/sym53c8xx.c and (by way of
sym53c8xx_comm.h::sym53c8xx__detect) ncr53c8xx.c do a
pci_enable_device after finding a device.

It applies against ac12 and 241p11.

Comments?


--- linux-ac11-clean/drivers/scsi/sym53c8xx.c	Mon Jan  1 19:23:21 2001
+++ linux-ac11/drivers/scsi/sym53c8xx.c	Thu Jan 25 23:12:06 2001
@@ -13294,6 +13294,8 @@
 			++j;
 			continue;
 		}
+		if (pci_enable_device(pcidev))
+			continue;
 		/* Some HW as the HP LH4 may report twice PCI devices */
 		for (i = 0; i < count ; i++) {
 			if (devtbl[i].slot.bus	     == PciBusNumber(pcidev) && 
--- linux-ac11-clean/drivers/scsi/sym53c8xx_comm.h	Mon Oct 16 21:56:50 2000
+++ linux-ac11/drivers/scsi/sym53c8xx_comm.h	Fri Jan 26 22:54:19 2001
@@ -2754,6 +2754,8 @@
 			++j;
 			continue;
 		}
+		if (pci_enable_device(pcidev))
+			continue;
 		/* Some HW as the HP LH4 may report twice PCI devices */
 		for (i = 0; i < count ; i++) {
 			if (devtbl[i].slot.bus	     == PciBusNumber(pcidev) && 

-- 
Regards,
        Rasmus(rasmus@jaquet.dk)

When C++ is your hammer, everything looks like a thumb.      Steven M. Haflich
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device
  2001-01-29 21:50 ` Gérard Roudier
@ 2001-01-31 18:58   ` Alan Cox
  2001-01-31 19:56     ` Gérard Roudier
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2001-01-31 18:58 UTC (permalink / raw)
  To: Gérard Roudier; +Cc: Rasmus Andersen, linux-kernel, linux-scsi

> If the pci_enable_device() thing is to be added to the drivers, it must
> preferently be placed after the checking against RAID attachement.

You cant check the signature until the device has been enabled. Maybe you
could poke the LSI guys and find out how windows PnP stuff handles this.

I think the proposed change is ok because if the board is enabled then the 
enabling code won't touch it.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device
  2001-01-31 18:58   ` [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device Alan Cox
@ 2001-01-31 19:56     ` Gérard Roudier
  0 siblings, 0 replies; 4+ messages in thread
From: Gérard Roudier @ 2001-01-31 19:56 UTC (permalink / raw)
  To: Alan Cox; +Cc: Rasmus Andersen, linux-kernel, linux-scsi



On Wed, 31 Jan 2001, Alan Cox wrote:

> > If the pci_enable_device() thing is to be added to the drivers, it must
> > preferently be placed after the checking against RAID attachement.
> 
> You cant check the signature until the device has been enabled. Maybe you
> could poke the LSI guys and find out how windows PnP stuff handles this.

Personnaly I donnot need to know how windows handle this in order to
figure out how it should be properly handled.

In theory, the signature should be checked prior to any change in the
device configuration space. But since PCI BIOS assigning of resource
windows is complete mess-up, the O/S has to probe BAR sizes. The probing
of BAR sizes does not seem to harm. This done, given that it is possible
then to first check the signature and to leave quiet the device if it is
owned by RAID, there is no valuable reason to still tamper the device for
nothing if it is not to be attached.

> I think the proposed change is ok because if the board is enabled then the 
> enabling code won't touch it.

Can you swear that the code will never change ?

Anyway, the current code at least enables response to IO and to MEM based
on existing BARs. This probably does not harm but this should be done on
behalf of the software driver and based on actually _used_ resources. On
the other hand, the complex enabling of IRQ is really something we want to
avoid in situation where it is not actually useful.

End of story, since moving pci_enable_device() in its preferred place as I
suggested is an obvious minute change.

  Gérard.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-01-31 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-29 22:00 [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device (241p11) Rasmus Andersen
2001-01-29 21:50 ` Gérard Roudier
2001-01-31 18:58   ` [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device Alan Cox
2001-01-31 19:56     ` Gérard Roudier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox