#
adf340f0 |
|
08-Oct-2012 |
Axel Dörfler <axeld@pinc-software.de> |
Style cleanup.
|
#
9b9cb227 |
|
08-Oct-2012 |
Axel Dörfler <axeld@pinc-software.de> |
Consolidated and fixed device_geometry computation. * The only implementation that would accept more than 2 TB was the one in scsi_disk. But even that one was limited to 63 TB. * Now there is a new utility function devfs_compute_geometry_size() which does it correctly for sizes up to 2^64 which should be good enough for quite some time :-) * This fixes bug #8992.
|
#
14429e89 |
|
08-Jan-2010 |
Michael Lotz <mmlr@mlotz.ch> |
Reverted the part of r31520 that made devfs_unpublish_partition() take a raw device path + child partition name. When a "raw" device is unpublished the node removal notification triggers the partition and child partitions to be unpublished/removed. Since in that case the "raw" node is already unpublished trying to resolve it in devfs_unpublish_partition() again to unpublish the child partitions would fail, leaving the child partition nodes behind. When a new raw device would then become available publishing its partitions would fail because of these left behind nodes, causing bug #4587. Seeing that this code is more compact and straight forward anyway I don't quite see why it was changed in the first place. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34967 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a365e1cf |
|
11-Jul-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Patch by Bryce Groff, some changes by myself: * devfs: - devfs_[un]publish_partition(): They no longer get the partition path as parameter, but rather the device path and the partition name. - Added devfs_rename_partition(), which renames an already published partition node. * KPartition/KDiskDevice: - Replaced the fPublished flag by fPublishedName, the name under which the partition is published. This simplifies UnpublishDevice() and makes it practically infallible. - Added GetFileName(), which only returns the partition's file name. Simplified GetPath() by using it. - When a partition is added/removed the subsequent sibling partitions get a new index. Now we also rename their published device nodes (and those of their descendents). When something goes wrong we unpublish the concerned partition's device to be on the safe side. Would be a shame to accidentally format the wrong partition, eh? :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31520 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
|
#
a77ed12b |
|
27-Feb-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Removed obsolete "ident" parameter from devfs_publish_device(). * driver_entry::api_version now stores the actual version instead of a pointer to it. * Renamed node_path_entry to path_entry and reused it for driver reloading: handle_driver_events() will now also check for drivers to add in the sDriversToAdd list. * Added new devfs_driver_added(), and devfs_driver_removed() functions that trigger certain driver actions. * Implemented notifying devfs on B_ENTRY_CREATED, B_ENTRY_REMOVED, and B_ENTRY_MOVED events in probe.cpp. The watched directory inode numbers are now stored in a hash for B_ENTRY_MOVED. * unpublish_driver() did not actually delete the node, it only marked it removable since we never get/put the node. We now do, and so the node is actually removed as intended. * Added "devfs_driver" KDL command. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24152 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bbea21a2 |
|
06-Dec-2007 |
Michael Lotz <mmlr@mlotz.ch> |
Forgot the header change in the last commit. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23073 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d73d20e8 |
|
18-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed warning when compiling the PS/2 bus manager. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22615 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9e8dc2a9 |
|
14-Jul-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
[Sorry, couldn't split this one up any further.] * Images preloaded by the boot loader had to be modules to be of any use to the kernel. Extended the mechanism so that any images not accepted by the module code would later be tried to be added as drivers by the devfs. This is a little hacky ATM, since the devfs manages the drivers using a hash map keyed by the drivers inode ID, which those drivers obviously don't have. * The devfs emulates read_pages() using read(), if the device driver doesn't implement the former (all old-style drivers), thus making it possible to BFS, which uses the file cache which in turn requires read_pages(), on the device. write_pages() emulation is still missing. * Replaced the kernel_args::boot_disk structure by a KMessage, which can more flexibly be extended and deals more gracefully with arbitrarily-size data. The disk_identifier structure still exists, though. It is added as message field in cases where needed (non net boot). Moved the boot_drive_number field of the bios_ia32 platform specific args into the message. * Made the stage 1 PXE boot loader superfluous. Moved the relevant initialization code into the stage 2 loader, which can now be loaded directly via PXE. * The PXE boot loader does now download a boot tgz archive via TFTP. It does no longer use the RemoteDisk protocol (it could actually be removed from the boot loader). It also parses the DHCP options in the DHCPACK packet provided by PXE and extracts the root path to be mounted by the kernel. * Reorganized the boot volume search in the kernel (vfs_boot.cpp) and added support for network boot. In this case the net stack is initialized and the network interface the boot loader used is brought up and configured. Since NBD and RemoteDisk are our only options for net boot (and those aren't really configurable dynamically) ATM, the the boot device is found automatically by the disk device manager. Booting via PXE does work to some degree now. The most grievous problem is that loading certain drivers or kernel modules (or related activity) causes a reboot (likely a triple fault, though one wonders where our double fault handler is on vacation). Namely the keyboard and mouse input server add-ons need to be deactivated as well as the media server. A smaller problem is the net server, which apparently tries to (re-)configure the network interface we're using to boot, which obviously doesn't work out that well. So, if all this stuff is disabled Haiku does fully boot, when using the RemoteDisk protocol (not being able to use keyboard or mouse doesn't make this a particular fascinating experience, though ;-)). I had no luck with NBD -- it seemed to have protocol problems with the servers I tried. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
606e0d36 |
|
27-Mar-2006 |
Axel Dörfler <axeld@pinc-software.de> |
* Factored out the vnode disconnection code from fs_unmount() to a separate function, and added a vfs_disconnect_vnode() for other kernel components. * devfs_unpublish_device() can now optionally make use of this call. * Fixed the type check of devfs' unpublish_node(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16907 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
065aa7f6 |
|
27-Mar-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Added a basic unpublishing function for drivers, not yet tested, though (and even though it looks so simple, I see no reason why it shouldn't work 8-)). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16906 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
80f6ef8b |
|
02-Jun-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Moved load_driver() and load_driver_symbols() over to devfs. Added new devfs_add_driver() function that the device manager will now call to register new drivers. Devfs will now keep a list of known drivers and remembers, if they have been initialized already - a driver can now safely scan the directory it's in while being scanned itself without having its hooks called twice. Devfs is now using a recursive lock instead of a mutex (that's not really a requirement right now, but would allow us to keep the fs lock during scanning). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12933 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52fe8bf7 |
|
18-Mar-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Minor header cleanup: moved some headers to better matching directories, removed unused headers. Adapted sources to still compile with the new header locations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11913 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
adf340f0ed7fd0cd6c3d1a1313f54e8488fdeb6d |
|
08-Oct-2012 |
Axel Dörfler <axeld@pinc-software.de> |
Style cleanup.
|
#
9b9cb227c7835fa55076dafac035a25e30b089ff |
|
08-Oct-2012 |
Axel Dörfler <axeld@pinc-software.de> |
Consolidated and fixed device_geometry computation. * The only implementation that would accept more than 2 TB was the one in scsi_disk. But even that one was limited to 63 TB. * Now there is a new utility function devfs_compute_geometry_size() which does it correctly for sizes up to 2^64 which should be good enough for quite some time :-) * This fixes bug #8992.
|
#
14429e896e713224e2c0773523ef3c132df02c0d |
|
08-Jan-2010 |
Michael Lotz <mmlr@mlotz.ch> |
Reverted the part of r31520 that made devfs_unpublish_partition() take a raw device path + child partition name. When a "raw" device is unpublished the node removal notification triggers the partition and child partitions to be unpublished/removed. Since in that case the "raw" node is already unpublished trying to resolve it in devfs_unpublish_partition() again to unpublish the child partitions would fail, leaving the child partition nodes behind. When a new raw device would then become available publishing its partitions would fail because of these left behind nodes, causing bug #4587. Seeing that this code is more compact and straight forward anyway I don't quite see why it was changed in the first place. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34967 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a365e1cfbb80d7d2ee91e6515fa7090906cd5a4e |
|
11-Jul-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Patch by Bryce Groff, some changes by myself: * devfs: - devfs_[un]publish_partition(): They no longer get the partition path as parameter, but rather the device path and the partition name. - Added devfs_rename_partition(), which renames an already published partition node. * KPartition/KDiskDevice: - Replaced the fPublished flag by fPublishedName, the name under which the partition is published. This simplifies UnpublishDevice() and makes it practically infallible. - Added GetFileName(), which only returns the partition's file name. Simplified GetPath() by using it. - When a partition is added/removed the subsequent sibling partitions get a new index. Now we also rename their published device nodes (and those of their descendents). When something goes wrong we unpublish the concerned partition's device to be on the safe side. Would be a shame to accidentally format the wrong partition, eh? :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31520 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
|
#
a77ed12b25104c012f78fb018f011fc808abcb95 |
|
27-Feb-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Removed obsolete "ident" parameter from devfs_publish_device(). * driver_entry::api_version now stores the actual version instead of a pointer to it. * Renamed node_path_entry to path_entry and reused it for driver reloading: handle_driver_events() will now also check for drivers to add in the sDriversToAdd list. * Added new devfs_driver_added(), and devfs_driver_removed() functions that trigger certain driver actions. * Implemented notifying devfs on B_ENTRY_CREATED, B_ENTRY_REMOVED, and B_ENTRY_MOVED events in probe.cpp. The watched directory inode numbers are now stored in a hash for B_ENTRY_MOVED. * unpublish_driver() did not actually delete the node, it only marked it removable since we never get/put the node. We now do, and so the node is actually removed as intended. * Added "devfs_driver" KDL command. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24152 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bbea21a256ec63301d2f9417d83f9db7551246c2 |
|
06-Dec-2007 |
Michael Lotz <mmlr@mlotz.ch> |
Forgot the header change in the last commit. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23073 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d73d20e85c66c2d252751eb997de3b9881f300fe |
|
18-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed warning when compiling the PS/2 bus manager. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22615 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9e8dc2a9bbbe768acdfd224a6a4af01918bb4ce0 |
|
14-Jul-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
[Sorry, couldn't split this one up any further.] * Images preloaded by the boot loader had to be modules to be of any use to the kernel. Extended the mechanism so that any images not accepted by the module code would later be tried to be added as drivers by the devfs. This is a little hacky ATM, since the devfs manages the drivers using a hash map keyed by the drivers inode ID, which those drivers obviously don't have. * The devfs emulates read_pages() using read(), if the device driver doesn't implement the former (all old-style drivers), thus making it possible to BFS, which uses the file cache which in turn requires read_pages(), on the device. write_pages() emulation is still missing. * Replaced the kernel_args::boot_disk structure by a KMessage, which can more flexibly be extended and deals more gracefully with arbitrarily-size data. The disk_identifier structure still exists, though. It is added as message field in cases where needed (non net boot). Moved the boot_drive_number field of the bios_ia32 platform specific args into the message. * Made the stage 1 PXE boot loader superfluous. Moved the relevant initialization code into the stage 2 loader, which can now be loaded directly via PXE. * The PXE boot loader does now download a boot tgz archive via TFTP. It does no longer use the RemoteDisk protocol (it could actually be removed from the boot loader). It also parses the DHCP options in the DHCPACK packet provided by PXE and extracts the root path to be mounted by the kernel. * Reorganized the boot volume search in the kernel (vfs_boot.cpp) and added support for network boot. In this case the net stack is initialized and the network interface the boot loader used is brought up and configured. Since NBD and RemoteDisk are our only options for net boot (and those aren't really configurable dynamically) ATM, the the boot device is found automatically by the disk device manager. Booting via PXE does work to some degree now. The most grievous problem is that loading certain drivers or kernel modules (or related activity) causes a reboot (likely a triple fault, though one wonders where our double fault handler is on vacation). Namely the keyboard and mouse input server add-ons need to be deactivated as well as the media server. A smaller problem is the net server, which apparently tries to (re-)configure the network interface we're using to boot, which obviously doesn't work out that well. So, if all this stuff is disabled Haiku does fully boot, when using the RemoteDisk protocol (not being able to use keyboard or mouse doesn't make this a particular fascinating experience, though ;-)). I had no luck with NBD -- it seemed to have protocol problems with the servers I tried. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
606e0d364e0c814450efb2ba37bd216d6a1241fc |
|
27-Mar-2006 |
Axel Dörfler <axeld@pinc-software.de> |
* Factored out the vnode disconnection code from fs_unmount() to a separate function, and added a vfs_disconnect_vnode() for other kernel components. * devfs_unpublish_device() can now optionally make use of this call. * Fixed the type check of devfs' unpublish_node(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16907 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
065aa7f66c719fb849ab4e966e70f9cee69fdda4 |
|
27-Mar-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Added a basic unpublishing function for drivers, not yet tested, though (and even though it looks so simple, I see no reason why it shouldn't work 8-)). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16906 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
80f6ef8bd82faca18694349b22c34b561eefe55f |
|
02-Jun-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Moved load_driver() and load_driver_symbols() over to devfs. Added new devfs_add_driver() function that the device manager will now call to register new drivers. Devfs will now keep a list of known drivers and remembers, if they have been initialized already - a driver can now safely scan the directory it's in while being scanned itself without having its hooks called twice. Devfs is now using a recursive lock instead of a mutex (that's not really a requirement right now, but would allow us to keep the fs lock during scanning). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12933 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52fe8bf7a88e5cc78b1a5340545987fa483af990 |
|
18-Mar-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Minor header cleanup: moved some headers to better matching directories, removed unused headers. Adapted sources to still compile with the new header locations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11913 a95241bf-73f2-0310-859d-f6bbb57e9c96
|