summaryrefslogtreecommitdiff
path: root/sys/dev/pci/optiide.c
AgeCommit message (Collapse)Author
2013-10-07Use the universal pciide_detach() for detach function of all remainingjakllsch
pciide-core drivers, except pciide at pnpbios which isn't actually PCI.
2012-07-31Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdcbouyer
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
2012-07-26Revert, with intention of restoring in a less invasive way, the SATA Portjakllsch
Multiplier code. ok christos@
2012-07-24Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 andjakllsch
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump. First step in reverting regressions to ata(4) subsystem during the addition of port multiplier support.
2012-07-15Some namespace protection (and add greppablity).dsl
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_. Don't use an enum for drive_type - you don't know how big it will be. Move driver_type to avoid implicit structure padding (esp on arm). This change is purely lexical and mechanical. Update to 6.99.9 - this wasn't done when the SATA PMP changes were made - I'm sure they warranted a bump.
2012-07-02Add sata Port MultiPlier (PMP) support to the ata bus layer,bouyer
as described in http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html PMP support in integrated to the atabus layer. struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive (renamed to ch_ndrives) closely reflects the size of the ch_drive[] array. Add helper functions atabus_alloc_drives() and atabus_free_drives() to manage ch_drive[]/ch_ndrives. Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify how much drive they really support (master/slave or single). ata_reset_drive() callback gains a uint32_t *sigp argument which, when not NULL, will contain the signature of the device being reset. While there, some cosmetic changes: - added a drive_type enum to ata_drive_datas, and stop encoding the probed drive type in drive_flags (we were out of drive flags anyway). - rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this really is - remove ata_channel->ata_drives, it's redundant with the pointer in ata_drive_datas - factor out the interpretation of SATA signatures in sata_interpet_sig() propagate these changes to the ATA HBA drivers, and add support for PMP to ahcisata(4) and siisata(4). Thanks to: - Protocase (http://www.protocase.com/) which provided a system with lots of controllers, SATA PMP and drive slots - Conservation Genomics Laboratory, Department of Biology, New Mexico State University for hosting the above system - Brook Milligan, who set up remote access and has been very responsive when SATA cable move was needed
2011-04-04Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),dyoung
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match predicate passed to pciide_compat_intr_establish() should ever modify their pci_attach_args argument, so make their pci_attach_args arguments const and deal with the fallout throughout the kernel. For the most part, these changes add a 'const' where there was no 'const' before, however, some drivers and MD code used to modify pci_attach_args. Now those drivers either copy their pci_attach_args and modify the copy, or refrain from modifying pci_attach_args: Xen: according to Manuel Bouyer, writing to pci_attach_args in pci_intr_map() was a leftover from Xen 2. Probably a bug. I stopped writing it. I have not tested this change. siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args. Probably a bug. I use a temporary variable. I have not tested this change. slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args. Probably a bug. Use a local pci_attach_args. I have not tested this change. viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the caller's pci_attach_args. Probably a bug. Make a local copy of the caller's pci_attach_args and modify the copy. I have not tested this change. While I'm here, make pci_mapreg_submap() static. With these changes in place, I have tested the compilation of these kernels: alpha GENERIC amd64 GENERIC XEN3_DOM0 arc GENERIC atari HADES MILAN-PCIIDE bebox GENERIC cats GENERIC cobalt GENERIC evbarm-eb NSLU2 evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200 KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425 evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3 evbmips64-el XLSATX evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266 OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT hp700 GENERIC i386 ALL XEN3_DOM0 XEN3_DOMU ibmnws GENERIC macppc GENERIC mvmeppc GENERIC netwinder GENERIC ofppc GENERIC prep GENERIC sandpoint GENERIC sgimips GENERIC32_IP2x sparc GENERIC_SUN4U KRUPS sparc64 GENERIC As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels with or without my patches in place: ### evbmips-el GDIUM nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop ### evbarm-el MPCSA_GENERIC src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc' ### ia64 GENERIC /tmp/genassym.28085/assym.c: In function 'f111': /tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb' /tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type ### sgimips GENERIC32_IP3x crmfb.o: In function `crmfb_attach': crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid' crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid' crmfb.c:(.text+0x234c): undefined reference to `edid_parse' crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse' crmfb.c:(.text+0x2354): undefined reference to `edid_print' crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
2010-11-05Pave the way for detachment of pciide(4)-family ATA controllers.jakllsch
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2008-03-18Split device_t and softc for ATA devices, as well as wd(4). Othercube
cosmetic changes where appropriate.
2007-02-09Merge newlock2 to head.ad
2006-11-16__unused removal on arguments; approved by core.christos
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2005-12-11merge ktrace-lwp.christos
2005-05-24add __KERNEL_RCSIDlukem
2004-08-21atastart() (called only at splbio(), and from interrupts) can changethorpej
drive_flags, to make sure all drive_flags manipulations are done at splbio().
2004-08-20Move most of wdc_softc into a new atac_softc structure that containsthorpej
info common to all types of ATA controllers.
2004-08-19- Add and use a CHAN_TO_WDC() macro to get the wdc_softc from anthorpej
ata_channel. - Add and use a CHAN_TO_WDC_REGS() macro to get the wdc_regs from an ata_channel. - Add and use a CHAN_TO_PCIIDE() macro to get the pciide_softc from an ata_channel. - Add and use a CHAN_TO_PCHAN() macro to get the pciide_channel from an ata_channel. (This one just hides a cast, and is really just for consistency with the others.)
2004-08-14- Split the register handles out of struct wdc_channel into a separatethorpej
wdc_regs structure, and array of which (indexed per channel) is pointed to by struct wdc_softc. - Move the resulting wdc_channel structure to atavar.h and rename it to ata_channel. Rename the corresponding flags. - Add a "ch_ndrive" member to struct ata_channel, which indicates the maximum number of drives that can be present on the channel. For now, this is always 2. Add an ATA_MAXDRIVES constant that places an upper limit on this value, also currently 2.
2004-08-13Don't bother with bits that tell of the presence of optional callbacks;thorpej
just check the function pointers for NULL.
2004-01-03More wdc_channel structure member namespace cleanup:thorpej
- channel -> ch_channel - wdc -> ch_wdc
2004-01-03Rename "struct channel_softc" to "struct wdc_channel".thorpej
2003-10-24Remove IDE_PCI_CLASS_OVERRIDE -- it wasn't actually used anywhere. In lieu ofmycroft
it, add a class/subclass check to drivers that do not (appear) to have a unique ID for the IDE controller. This includes aceride, cypide and optiide.
2003-10-11Cosmetic changes:thorpej
- Use static to unexport symbols that don't need to be exported. - ANSI'ify. - Some whitespace nits.
2003-10-08Split pciide in per-chip family driver, as proposed inbouyer
http://mail-index.netbsd.org/tech-kern/2003/09/25/0007.html We now have: acardide* at pci? dev ? function ? # Acard IDE controllers aceride* at pci? dev ? function ? # Acer Lab IDE controllers cmdide* at pci? dev ? function ? # CMD tech IDE controllers cypide* at pci? dev ? function ? # Cypress IDE controllers hptide* at pci? dev ? function ? # Triones/HighPoint IDE controllers optiide* at pci? dev ? function ? # Opti IDE controllers piixide* at pci? dev ? function ? # Intel IDE controllers pdcide* at pci? dev ? function ? # Promise IDE controllers siside* at pci? dev ? function ? # SiS IDE controllers slide* at pci? dev ? function ? # Symphony Labs IDE controllers viaide* at pci? dev ? function ? # VIA/AMD/Nvidia IDE controllers pciide* at pci? dev ? function ? flags 0x0000 # GENERIC pciide driver serverworks driver not commited yet; there are still copyright issues about it.