public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Yet more PCI fixes for 2.5.70
Date: Tue, 10 Jun 2003 11:49:25 -0700	[thread overview]
Message-ID: <10552709651054@kroah.com> (raw)
In-Reply-To: <10552709651213@kroah.com>

ChangeSet 1.1329, 2003/06/09 15:36:48-07:00, greg@kroah.com

PCI: remove pci_present() from drivers/char/sx.c


 drivers/char/sx.c |  116 +++++++++++++++++++++++++++---------------------------
 1 files changed, 58 insertions(+), 58 deletions(-)


diff -Nru a/drivers/char/sx.c b/drivers/char/sx.c
--- a/drivers/char/sx.c	Tue Jun 10 11:21:40 2003
+++ b/drivers/char/sx.c	Tue Jun 10 11:21:40 2003
@@ -2460,69 +2460,68 @@
 	}
 
 #ifdef CONFIG_PCI
-	if (pci_present ()) {
 #ifndef TWO_ZERO
-		while ((pdev = pci_find_device (PCI_VENDOR_ID_SPECIALIX, 
-		                                PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, 
-			                              pdev))) {
-			if (pci_enable_device(pdev))
-				continue;
+	while ((pdev = pci_find_device (PCI_VENDOR_ID_SPECIALIX, 
+					PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, 
+					      pdev))) {
+		if (pci_enable_device(pdev))
+			continue;
 #else
-			for (i=0;i< SX_NBOARDS;i++) {
-				if (pcibios_find_device (PCI_VENDOR_ID_SPECIALIX, 
-				                         PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, i,
-					                       &pci_bus, &pci_fun)) break;
+	for (i=0;i< SX_NBOARDS;i++) {
+		if (pcibios_find_device (PCI_VENDOR_ID_SPECIALIX, 
+					 PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, i,
+					       &pci_bus, &pci_fun))
+			break;
 #endif
-			/* Specialix has a whole bunch of cards with
-			   0x2000 as the device ID. They say its because
-			   the standard requires it. Stupid standard. */
-			/* It seems that reading a word doesn't work reliably on 2.0.
-			   Also, reading a non-aligned dword doesn't work. So we read the
-			   whole dword at 0x2c and extract the word at 0x2e (SUBSYSTEM_ID)
-			   ourselves */
-			/* I don't know why the define doesn't work, constant 0x2c does --REW */ 
-			pci_read_config_dword (pdev, 0x2c, &tint);
-			tshort = (tint >> 16) & 0xffff;
-			sx_dprintk (SX_DEBUG_PROBE, "Got a specialix card: %x.\n", tint);
-			/* sx_dprintk (SX_DEBUG_PROBE, "pdev = %d/%d	(%x)\n", pdev, tint); */ 
-			if ((tshort != 0x0200) && (tshort != 0x0300)) {
-				sx_dprintk (SX_DEBUG_PROBE, "But it's not an SX card (%d)...\n", 
-				            tshort);
-				continue;
-			}
-			board = &boards[found];
+		/* Specialix has a whole bunch of cards with
+		   0x2000 as the device ID. They say its because
+		   the standard requires it. Stupid standard. */
+		/* It seems that reading a word doesn't work reliably on 2.0.
+		   Also, reading a non-aligned dword doesn't work. So we read the
+		   whole dword at 0x2c and extract the word at 0x2e (SUBSYSTEM_ID)
+		   ourselves */
+		/* I don't know why the define doesn't work, constant 0x2c does --REW */ 
+		pci_read_config_dword (pdev, 0x2c, &tint);
+		tshort = (tint >> 16) & 0xffff;
+		sx_dprintk (SX_DEBUG_PROBE, "Got a specialix card: %x.\n", tint);
+		/* sx_dprintk (SX_DEBUG_PROBE, "pdev = %d/%d	(%x)\n", pdev, tint); */ 
+		if ((tshort != 0x0200) && (tshort != 0x0300)) {
+			sx_dprintk (SX_DEBUG_PROBE, "But it's not an SX card (%d)...\n", 
+				    tshort);
+			continue;
+		}
+		board = &boards[found];
 
-			board->flags &= ~SX_BOARD_TYPE;
-			board->flags |= (tshort == 0x200)?SX_PCI_BOARD:
-			                                  SX_CFPCI_BOARD;
+		board->flags &= ~SX_BOARD_TYPE;
+		board->flags |= (tshort == 0x200)?SX_PCI_BOARD:
+						  SX_CFPCI_BOARD;
 
-			/* CF boards use base address 3.... */
-			if (IS_CF_BOARD (board))
-				board->hw_base = pci_resource_start (pdev, 3);
-			else
-				board->hw_base = pci_resource_start (pdev, 2);
-			board->base2 = 
-			board->base = (ulong) ioremap(board->hw_base, WINDOW_LEN (board));
-			if (!board->base) {
-				printk(KERN_ERR "ioremap failed\n");
-				/* XXX handle error */
-			}
-
-			/* Most of the stuff on the CF board is offset by
-			   0x18000 ....  */
-			if (IS_CF_BOARD (board)) board->base += 0x18000;
-
-			board->irq = pdev->irq;
-
-			sx_dprintk (SX_DEBUG_PROBE, "Got a specialix card: %x/%lx(%d) %x.\n", 
-			            tint, boards[found].base, board->irq, board->flags);
-
-			if (probe_sx (board)) {
-				found++;
-				fix_sx_pci (pdev, board);
-			} else 
-				iounmap ((char *) (board->base));
-		}
+		/* CF boards use base address 3.... */
+		if (IS_CF_BOARD (board))
+			board->hw_base = pci_resource_start (pdev, 3);
+		else
+			board->hw_base = pci_resource_start (pdev, 2);
+		board->base2 = 
+		board->base = (ulong) ioremap(board->hw_base, WINDOW_LEN (board));
+		if (!board->base) {
+			printk(KERN_ERR "ioremap failed\n");
+			/* XXX handle error */
+		}
+
+		/* Most of the stuff on the CF board is offset by
+		   0x18000 ....  */
+		if (IS_CF_BOARD (board)) board->base += 0x18000;
+
+		board->irq = pdev->irq;
+
+		sx_dprintk (SX_DEBUG_PROBE, "Got a specialix card: %x/%lx(%d) %x.\n", 
+			    tint, boards[found].base, board->irq, board->flags);
+
+		if (probe_sx (board)) {
+			found++;
+			fix_sx_pci (pdev, board);
+		} else 
+			iounmap ((char *) (board->base));
 	}
 #endif
 
@@ -2648,4 +2647,5 @@
 
 module_init(sx_init);
 module_exit(sx_exit);
+
 


  reply	other threads:[~2003-06-10 19:29 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-10 18:49 [PATCH] Yet more PCI fixes for 2.5.70 Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49   ` Greg KH
2003-06-10 18:49     ` Greg KH [this message]
2003-06-10 18:49       ` Greg KH
2003-06-10 18:49         ` Greg KH
2003-06-10 18:49           ` Greg KH
2003-06-10 18:49             ` Greg KH
2003-06-10 18:49               ` Greg KH
2003-06-10 18:49                 ` Greg KH
2003-06-10 18:49                   ` Greg KH
2003-06-10 18:49                     ` Greg KH
2003-06-10 18:49                       ` Greg KH
2003-06-10 18:49                         ` Greg KH
2003-06-10 18:49                           ` Greg KH
2003-06-10 18:49                             ` Greg KH
2003-06-10 18:49                               ` Greg KH
2003-06-10 18:49                                 ` Greg KH
2003-06-10 18:49                                   ` Greg KH
2003-06-10 18:49                                     ` Greg KH
2003-06-10 18:49                                       ` Greg KH
2003-06-10 18:49                                         ` Greg KH
2003-06-10 18:49                                           ` Greg KH
2003-06-10 18:49                                             ` Greg KH
2003-06-10 18:49                                               ` Greg KH
2003-06-10 18:49                                                 ` Greg KH
2003-06-10 18:49                                                   ` Greg KH
2003-06-10 18:49                                                     ` Greg KH
2003-06-10 18:49                                                       ` Greg KH
2003-06-10 18:49                                                         ` Greg KH
2003-06-10 18:49                                                           ` Greg KH
2003-06-10 18:49                                                             ` Greg KH
2003-06-10 18:49                                                               ` Greg KH
2003-06-10 18:49                                                                 ` Greg KH
2003-06-10 18:49                                                                   ` Greg KH
2003-06-10 18:49                                                                     ` Greg KH
2003-06-10 18:49                                                                       ` Greg KH
2003-06-10 18:49                                                                         ` Greg KH
2003-06-10 18:49                                                                           ` Greg KH
2003-06-10 18:49                                                                             ` Greg KH
2003-06-10 18:49                                                                               ` Greg KH
2003-06-10 18:49                                                                                 ` Greg KH
2003-06-10 18:49                                                                                   ` Greg KH
2003-06-10 18:49                                                                                     ` Greg KH
2003-06-10 18:49                                                                                       ` Greg KH
2003-06-10 18:49                                                                                         ` Greg KH
2003-06-10 18:49                                                                                           ` Greg KH
2003-06-10 18:49                                                                                             ` Greg KH
2003-06-10 18:49                                                                                               ` Greg KH
2003-06-10 18:49                                                                                                 ` Greg KH
2003-06-10 18:49                                                                                                   ` Greg KH
2003-06-10 18:49                                                                                                     ` Greg KH
2003-06-10 18:49                                                                                                       ` Greg KH
2003-06-10 18:49                                                                                                         ` Greg KH
2003-06-10 18:49                                                                                                           ` Greg KH
2003-06-10 18:49                                                                                                             ` Greg KH
2003-06-10 18:49                                                                                                               ` Greg KH
2003-06-10 18:49                                                                                                                 ` Greg KH
2003-06-10 18:49                                                                                                                   ` Greg KH
2003-06-10 18:49                                                                                                                     ` Greg KH
2003-06-10 18:49                                                                                                                       ` Greg KH
2003-06-10 18:49                                                                                                                         ` Greg KH
2003-06-10 18:49                                                                                                                           ` Greg KH
2003-06-10 18:49                                                                                                                             ` Greg KH
2003-06-10 18:49                                                                                                                               ` Greg KH
2003-06-10 18:49                                                                                                                                 ` Greg KH
2003-06-10 18:49                                                                                                                                   ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2003-06-10 18:33 [BK PATCH] " Greg KH
2003-06-10 18:49 ` [PATCH] " Greg KH
2003-06-10 18:49   ` Greg KH
2003-06-10 18:49     ` Greg KH
2003-06-10 18:49       ` Greg KH
2003-06-10 18:49         ` Greg KH
2003-06-10 18:49           ` Greg KH
2003-06-10 18:49             ` Greg KH
2003-06-10 18:49               ` Greg KH
2003-06-10 18:49                 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10552709651054@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox