Thread (4 messages) 4 messages, 2 authors, 2007-06-24

Re: [PATCH 6/6] ide: add ide_pci_device_t.host_flags

From: Sergei Shtylyov <hidden>
Date: 2007-06-24 17:09:05

Hello.

Bartlomiej Zolnierkiewicz wrote:
quoted
quoted
Index: b/drivers/ide/pci/serverworks.c
===================================================================
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -448,9 +448,12 @@ static int __devinit init_setup_csb6 (st
			d->bootable = ON_BOARD;
	}

-	d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
-			dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
-		       (!(PCI_FUNC(dev->devfn) & 1))) ? 1 : 2;
+	if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
+	    dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
quoted
   I'd have left that aligning space alone. :-)
quoted
quoted
+	    (!(PCI_FUNC(dev->devfn) & 1)))
+		d->host_flags |= IDE_HFLAG_SINGLE;
+	else
quoted
+		d->host_flags &= IDE_HFLAG_SINGLE;
   Here's the offending code! Should've been:

	d->host_flags &= ~IDE_HFLAG_SINGLE;
Thanks for catching this.
    Such things usually just spring into the eye. :-)
Fixed, new patch below.
[PATCH] ide: add ide_pci_device_t.host_flags (take 2)

* Rename ide_pci_device_t.flags to ide_pci_device_t.host_flags
  and IDEPCI_FLAG_ISA_PORTS flag to IDE_HFLAG_ISA_PORTS.

* Add IDE_HFLAG_SINGLE flag for single channel devices.

* Convert core code and all IDE PCI drivers to use IDE_HFLAG_SINGLE
  and remove no longer needed ide_pci_device_t.channels field.

v2:
* Fix issues noticed by Sergei:
  - correct code alignment in scc_pata.c
  - s/IDE_HFLAG_SINGLE/~IDE_HFLAG_SINGLE/ in serverworks.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <redacted>

MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help