Jeff wrote: > Kuan Luo wrote: > > One idea, only simply adding > > if (!swncq_enabled) > > nv_port_info[SWNCQ].flags &= ~ATA_FLAG_NCQ; > > > > ppi[0] = &nv_port_info[type]; > > rc = ata_pci_prepare_sff_host(pdev, ppi, &host); > > > > I don't know if this is appropriate > > > As long as the structure is not read-only ('const'), that is OK. > > And just for future reference, make sure you're aware of the > implications of this applying to all sata_nv-aware PCI IDs. If you > present multiple SATA devices on a PCI bus, or have multiple > PCI cards > (rare in NV's case, I guess) the probe function will be > called multiple > times. You might even want to put that code into the module init > function, rather than the probe function. > > Jeff > > My idea is not comprehensive. Your analysis are reasonable. Then you may apply either method in previous mail. Jeff wrote > if (type == SWNCQ && !swncq_enabled) > type = GENERIC; > >Or, if you prefer, we could take the opposite route, _not_ set SWNCQ in >the pci_device_id table, and instead do something like > > if (type >= MCP65 && swncq_enabled) > type = SWNCQ; > >(MCP65 is just a pulled-out-of-thin-air example) > >Regards, > > Jeff ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html