On Tue, Dec 10, 2024 at 08:38:57AM +0530, Aneesh Kumar K.V wrote: > > Hi Dan, > > > +#define PCI_IDE_CAP_SELECTIVE_STREAMS_NUM(x) (((x) >> 16) & 0xff) /* Selective IDE Streams */ > > Should this be > > #define PCI_IDE_CAP_SELECTIVE_STREAMS_NUM(x) ((((x) >> 16) & 0xff) + 1) /* Selective IDE Streams */ Is it better keep the literal SPEC definition here in pci_reg.h? And ... > > We do loop as below in ide.c > > for (int i = 0; i < PCI_IDE_CAP_SELECTIVE_STREAMS_NUM(val); i++) { for (int i = 0; i < PCI_IDE_CAP_SELECTIVE_STREAMS_NUM(val) + 1; i++) { Thanks, Yilun > if (i == 0) { > pci_read_config_dword(pdev, sel_ide_cap, &val); > nr_ide_mem = PCI_IDE_SEL_CAP_ASSOC_NUM(val); > > -aneesh >