History log of /haiku/src/add-ons/kernel/busses/scsi/ahci/ahci_controller.cpp
Revision Date Author Comments
# 629f071b 27-Feb-2024 X512 <danger_mail@list.ru>

pci: extend MSI interrupt vector number to 32 bits

Also increase MSI message data size to 32 bits according to PCIe spec.

Remove 0xff check for MSI interrupts because it is potentially valid
interrupt vector number. Reject 0xff only for legacy pin interrupts.

- MSI-X supports up to 2048 interrupts per device that do not fit to
`uint8`.

- Non-x86 systems may use separate interrupt vector ranges for
hard-wired interrupts and MSI interrupts so `uint8` is not enough to
represent all of them.

Change-Id: Iaf9ffb197ec23db0f97ffe3ea756d28d7bfc8705
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7433
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 3b91d73b 16-Dec-2022 X512 <danger_mail@list.ru>

bus & drivers: drop PCI_x86

Change-Id: I494deaf24a4793a5e0fe9fa46ecdce32f65e616a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6226
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 956f4507 22-May-2022 Trung Nguyen <trungnt282910@gmail.com>

kernel/vm: Remove default kernel read/write flags

`fix_protection` will not apply `B_KERNEL_READ_AREA` and
`B_KERNEL_WRITE_AREA` by default.

Kernel drivers that directly call `create_area` or `create_area_etc`
and do not pass any protection flags have been updated to
apply `B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA` instead.

Bug: #17751
Change-Id: I43e7ee6b5396e0309cdcff750e28262942c6d01c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5330
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# b8dd04e4 16-Jan-2016 Alexander von Gluck IV <kallisti5@unixzen.com>

ahci: Handle FBS on soft reset (unused still)

* Report FBS cap for #9098
* Should be 0-impact for now


# e3bd8449 19-Mar-2015 Jérôme Duval <jerome.duval@gmail.com>

ahci: fix build with warnings.


# 673f931b 19-Mar-2015 Jérôme Duval <jerome.duval@gmail.com>

ahci: correctly display version

* merge traces a bit.


# 776dbb03 15-Mar-2015 Jérôme Duval <jerome.duval@gmail.com>

ahci: added some definitions from the specification v1.2+

* print extended capabilities.


# c01fadca 30-Jul-2013 Jerome Duval <jerome.duval@gmail.com>

AHCI: add MSI support.


# 1f6d0a79 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

use template max() instead of max_c() macro


# 87b33446 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

gcc2 compile fix (gcc4 didn't complain)


# 2f0f9d87 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

cleanup variable naming for port count


# a63b046e 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

add missing line breaks in debug output


# 0d73f6ec 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

properly check intel port count and don't panic on more than 8.


# 6c9f2e94 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

set GHC.AE before performing reset (should be done by BIOS already)


# 863a181c 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

make sure there are no pending interrupts during setup


# 8040911a 10-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

Use implemented ports mask to check if maximum port count needs to be extended.

* This should fix #8953
* Also fix some harmless off-by-one errors


# 886f1456 02-Aug-2012 Rene Gollent <anevilyak@gmail.com>

Printf format adjustments to get ahci building on x86_64.


# 3553f189 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Use the correct type for physical addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37219 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 501ba967 08-Sep-2009 Marcus Overhagen <marcusoverhagen@gmail.com>

remove color usage from debug output


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1a4dcbd8 28-May-2008 Axel Dörfler <axeld@pinc-software.de>

* gPCI was never set anymore after my changes. I replaced it now by a fPCI
member in AHCIController, since, at least in theory, every PCI device could
come with its own module.
* Fixed exported module names to indicate compliance with the new device
manager.
* Apparently, GCC4 doesn't like mixing C++/C linkage even for variables anymore,
though it really shouldn't care about that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 368167ed 26-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Integration of the new driver architecture.
* Moved devfs from fs/ to device_manager/, and separated the legacy driver
support from it.
* Removed fast_log module.
* There are a couple of (temporary) regressions, though:
- legacy SATA and ISA IDE support is disabled, the drivers haven't been
ported yet.
- The not yet used ATA bus manager hasn't been ported yet, either.
- AHCI changes have not been tested.
- the listdev command has been removed from the build (as it currently
doesn't work anymore).
- device manager generated IDs currently are not freed anymore when a device
node is removed.
- generic drivers can't yet use the new driver architecture.
- simple busses that do not support device types won't work yet.
- legacy driver publishing/unpublishing (ie. what USB needs) has not been
tested, and may be broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33e97551 24-May-2008 Marcus Overhagen <marcusoverhagen@gmail.com>

Small cleanup of ahci driver. Also clear the PCI interrupt disable bit during setup.
Add PCI command ID (interrupt disable) define to PCI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25634 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af65a961 28-Nov-2007 Stephan Aßmus <superstippi@gmx.de>

* I don't know what's going on, but with this change, I can boot Haiku again
on my P35 with JMircon controller. I still have the "pci fixup" disabled
though. Without this change, I could boot until the blue desktop background
with cursor, but all the apps were in frozen state and would not display
on screen (F12 worked and showed Tracker and so on as running teams, but
I could not even move the mouse)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23015 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27367cc3 19-Nov-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Workaround for ICH6M: ports implemented mask 0 is no longer an error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22959 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f53094e7 10-Nov-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

fail gracefully when base address register or irq hasn't been assigned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 79844706 10-Nov-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Propagate is-ATAPI restriction to the SCSI bus manager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22874 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d722116 10-Nov-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Enable SATA ports 5 and 6 on Intel ICH8 and ICH9 based
systems, and possibly enable ports 7 and 8 in the future.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83447512 03-Oct-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Changed device detection. The driver now first uses device and vendor id to check
for devices. This allows using devices that are in IDE compatibility mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22419 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 747c1927 28-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

removed conditional testing code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22352 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2745621c 27-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

use defines from PCI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22333 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 20c8bc80 26-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

The Jmicron AHCI controller on my machine is always in PATA emulation mode,
despite using the "AHCI native" setting in the BIOS.
Added switching to AHCI mode during init, this makes it work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22322 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63f9ffef 26-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

make sure PCI command register is setup correctly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2c766017 25-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Cleanup of hard reset, works on Intel, doesn't work on Jmicron.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22307 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c32beda5 24-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

start dma later, reduce timeouts


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22298 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 22cf14cf 24-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

perform port reset and wait for devices to be detected


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22293 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c542d2bb 22-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Fixed memory allocation and field alignment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22277 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9382f576 11-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

correct port number handling
allocate memory for command list and fis


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22221 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 23c7bf9d 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

enable interrupts


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22147 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25f926d8 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

forward scsi request to the ports


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22146 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f733fe9 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

added Interrupt handling framework


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22145 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3d416484 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

implemented controller reset and AHCI enable, init a port object for each implemented device port


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22144 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 105f6223 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

print proper values for zero-based numbers


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22141 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 093a713d 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

map registers and print some information


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22137 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 036a8857 28-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

added a workaround to prevent loading the driver multiple times for the same device


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22099 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f6fa362 27-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed driver initialization - you are supposed to call init_driver()
and uninit_driver() yourself. We're also using this to let the controller
access the pci_device object.
* Fixed some style violations for your pleasure ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22082 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc002ebb 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

print PCI vendor and device ID


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 183bd9f4 26-Aug-2007 Jérôme Duval <korli@users.berlios.de>

black on black isn't easy to read : it's better to switch to the default color


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22077 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83a2d4db 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

make sure the request failes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22076 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 48a55608 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

added a completely broken way to get the pci_device


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22075 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ddf18870 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Moved PCI access code, but the compiler refuses to convert 'device_node_info*' to 'pci_device_info*' in argument passing...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22070 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 21255d1f 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

moved controller specific functionality into it's own class


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22069 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e3bd84493ea3edd812b86c13d8b6e2021c65b2cd 19-Mar-2015 Jérôme Duval <jerome.duval@gmail.com>

ahci: fix build with warnings.


# 673f931b62e47bc6570765b27f0ffc000d2c8fe3 19-Mar-2015 Jérôme Duval <jerome.duval@gmail.com>

ahci: correctly display version

* merge traces a bit.


# 776dbb038f33d5c863b8a9212eb088a6132d26c6 15-Mar-2015 Jérôme Duval <jerome.duval@gmail.com>

ahci: added some definitions from the specification v1.2+

* print extended capabilities.


# c01fadcadb0f00bfeac3e7c5572f9ebdd8301799 30-Jul-2013 Jerome Duval <jerome.duval@gmail.com>

AHCI: add MSI support.


# 1f6d0a79c927877cdf2aa5a6c6475a2488090f5f 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

use template max() instead of max_c() macro


# 87b33446e13a699d703d4c1678d0fe91901a2e98 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

gcc2 compile fix (gcc4 didn't complain)


# 2f0f9d8780ed3f7ec4804f2aba568868f75251f3 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

cleanup variable naming for port count


# a63b046e90d48e47b2b88a519057b43344976f90 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

add missing line breaks in debug output


# 0d73f6ec8a4a4d2359d2b26882f74ed699a03727 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

properly check intel port count and don't panic on more than 8.


# 6c9f2e94e7c3aba5b34ca9970fdfbf04ac0a3913 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

set GHC.AE before performing reset (should be done by BIOS already)


# 863a181c0bb346b2494c4815d31d21c8dc355bea 14-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

make sure there are no pending interrupts during setup


# 8040911a25d7459b5c007eb35c65cb4abe05eaaa 10-Sep-2012 Marcus Overhagen <marcus@overhagen.de>

Use implemented ports mask to check if maximum port count needs to be extended.

* This should fix #8953
* Also fix some harmless off-by-one errors


# 886f1456afb2fa1c6fdae82cde908e5e3e4217d4 02-Aug-2012 Rene Gollent <anevilyak@gmail.com>

Printf format adjustments to get ahci building on x86_64.


# 3553f1894dc98c2124813b2393aa9e80f11de2bb 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Use the correct type for physical addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37219 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 501ba9675989ad39474756d9c3cce54f1feaa559 08-Sep-2009 Marcus Overhagen <marcusoverhagen@gmail.com>

remove color usage from debug output


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1a4dcbd8dedf06b9625fcf6ad4c74b14cb796803 28-May-2008 Axel Dörfler <axeld@pinc-software.de>

* gPCI was never set anymore after my changes. I replaced it now by a fPCI
member in AHCIController, since, at least in theory, every PCI device could
come with its own module.
* Fixed exported module names to indicate compliance with the new device
manager.
* Apparently, GCC4 doesn't like mixing C++/C linkage even for variables anymore,
though it really shouldn't care about that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 368167ede8118f72da8c9ac5bb98ce9b46a8a639 26-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Integration of the new driver architecture.
* Moved devfs from fs/ to device_manager/, and separated the legacy driver
support from it.
* Removed fast_log module.
* There are a couple of (temporary) regressions, though:
- legacy SATA and ISA IDE support is disabled, the drivers haven't been
ported yet.
- The not yet used ATA bus manager hasn't been ported yet, either.
- AHCI changes have not been tested.
- the listdev command has been removed from the build (as it currently
doesn't work anymore).
- device manager generated IDs currently are not freed anymore when a device
node is removed.
- generic drivers can't yet use the new driver architecture.
- simple busses that do not support device types won't work yet.
- legacy driver publishing/unpublishing (ie. what USB needs) has not been
tested, and may be broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33e9755153f1f988d77a3946ec6cc9936ebfd01b 24-May-2008 Marcus Overhagen <marcusoverhagen@gmail.com>

Small cleanup of ahci driver. Also clear the PCI interrupt disable bit during setup.
Add PCI command ID (interrupt disable) define to PCI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25634 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af65a961b9f0524c817b7410b9a9478ceeb873d2 28-Nov-2007 Stephan Aßmus <superstippi@gmx.de>

* I don't know what's going on, but with this change, I can boot Haiku again
on my P35 with JMircon controller. I still have the "pci fixup" disabled
though. Without this change, I could boot until the blue desktop background
with cursor, but all the apps were in frozen state and would not display
on screen (F12 worked and showed Tracker and so on as running teams, but
I could not even move the mouse)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23015 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27367cc30809568f4fd7480ee160af46511209f9 19-Nov-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Workaround for ICH6M: ports implemented mask 0 is no longer an error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22959 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f53094e7eada5330f9f4da7abe832cc4d87cfb55 10-Nov-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

fail gracefully when base address register or irq hasn't been assigned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 79844706c278112c1e949850c11757de3fd26fc0 10-Nov-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Propagate is-ATAPI restriction to the SCSI bus manager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22874 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d722116c290ffd9efb7bc3b11d8946c1c7bb68f 10-Nov-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Enable SATA ports 5 and 6 on Intel ICH8 and ICH9 based
systems, and possibly enable ports 7 and 8 in the future.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83447512ed157f2fbe0165c57a924aad1de14c43 03-Oct-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Changed device detection. The driver now first uses device and vendor id to check
for devices. This allows using devices that are in IDE compatibility mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22419 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 747c1927fdbfebead39c44442005f6b437dc8cae 28-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

removed conditional testing code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22352 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2745621c91ac19d3152ec700b7c4ba2d1dad9b10 27-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

use defines from PCI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22333 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 20c8bc80d511b5cb81d6c6afba238c05bf16a32b 26-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

The Jmicron AHCI controller on my machine is always in PATA emulation mode,
despite using the "AHCI native" setting in the BIOS.
Added switching to AHCI mode during init, this makes it work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22322 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63f9ffef37555f2178c9d1fd95dcfd0862ab01bd 26-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

make sure PCI command register is setup correctly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2c7660170913bd0bbd02c6fe1e812cec3e091ec0 25-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Cleanup of hard reset, works on Intel, doesn't work on Jmicron.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22307 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c32beda5c4072f95c506426cb2f2576225b4cecc 24-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

start dma later, reduce timeouts


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22298 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 22cf14cfbeb75dfc24947cb395368050f919b127 24-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

perform port reset and wait for devices to be detected


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22293 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c542d2bbf183288a3639d1c722521d0a6a37038e 22-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Fixed memory allocation and field alignment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22277 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9382f576917776521166203d7a1ecde8aaab8341 11-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

correct port number handling
allocate memory for command list and fis


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22221 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 23c7bf9da26683abc0900581c71d0929f6246606 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

enable interrupts


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22147 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25f926d8e4b852f0d88a63ce005c18309205407b 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

forward scsi request to the ports


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22146 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f733fe93bda89631a901a417e0cbca1b00b97c0 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

added Interrupt handling framework


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22145 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3d41648479b388410eaecae895cc5bcf6f931408 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

implemented controller reset and AHCI enable, init a port object for each implemented device port


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22144 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 105f6223108a543bed34c92210b81edfd7173898 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

print proper values for zero-based numbers


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22141 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 093a713df2e9cf464741c78b3e8bc37df8d0a2b1 01-Sep-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

map registers and print some information


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22137 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 036a8857a688d19fa7d268315d2df9253112e573 28-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

added a workaround to prevent loading the driver multiple times for the same device


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22099 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f6fa362cfa47f22a0c789a42d35556d7ac25a31 27-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed driver initialization - you are supposed to call init_driver()
and uninit_driver() yourself. We're also using this to let the controller
access the pci_device object.
* Fixed some style violations for your pleasure ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22082 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc002ebb357463c5911d414fc6107ce91f0484a0 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

print PCI vendor and device ID


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 183bd9f43432c8cb5cf41e21bfe113e48c171e05 26-Aug-2007 Jérôme Duval <korli@users.berlios.de>

black on black isn't easy to read : it's better to switch to the default color


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22077 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83a2d4db1a797747b7c4d58f64088ef9a0d6d928 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

make sure the request failes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22076 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 48a55608e6e5e34e123d00c5e7f07581fcf70473 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

added a completely broken way to get the pci_device


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22075 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ddf188703a85ec5f8b0a9bffa71ff6048f7260a5 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Moved PCI access code, but the compiler refuses to convert 'device_node_info*' to 'pci_device_info*' in argument passing...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22070 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 21255d1fc7c8179fbcb979c4600884605b8973c3 26-Aug-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

moved controller specific functionality into it's own class


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22069 a95241bf-73f2-0310-859d-f6bbb57e9c96