Call ata_legacy() only once on attach and save it's result.
authorHasso Tepper <hasso@estpak.ee>
Thu, 18 Dec 2008 03:03:47 +0000 (05:03 +0200)
committerHasso Tepper <hasso@estpak.ee>
Thu, 18 Dec 2008 03:11:23 +0000 (05:11 +0200)
commite0e6ca4b314f94d53cfb2bd835e27fa08fd78a78
treed82b0a58eeb0731a291482ab0bfb09b1fd10a174
parent968a617d3755bdeaf17aeb5103404479b04e0a24
Call ata_legacy() only once on attach and save it's result.

Scanning PCI configuration registers (which are not going to change) on
every interrupt looks expensive, especially when interrupt is shared.
Profiling (in FreeBSD) shows 3% of time spent by atapci0 on pure network
load due to IRQ sharing with em0.

Obtained-from: FreeBSD
sys/dev/disk/nata/ata-chipset.c
sys/dev/disk/nata/ata-pci.c
sys/dev/disk/nata/ata-pci.h