for the disk.
- Add a new function, disk_ioctl(), that does generic disk ioctl handling.
DIOCGDISKINFO is handled here now, and others will be added in the future.
- In the wd driver, fill in the dk_info member of struct disk and use the
new disk_ioctl() function.
schemas. Disk information and disk geometry are designed to replace
information currently conveyed to user space using struct disklabel.
- Add a dk_info member to struct disk; a reference to a disk information
dictionary. This dictionary is to be allocated and the reference stored
in struct disk by individual drivers.
- disk_detach0() will release dk_info if non-NULL.
- Convert the wd(4) driver to stash geometry and other disk properties
as the "disk-info" property in its properties dictionary. This needs
some cleanup, but will serve as an example of what to do with other
disk drivers.
- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
a u_int64_t variable). Fixes 1 to 2 TB disks in qemu. Tested with
1200GB and to a lesser extent 2047GB sparse files. For reference
an empty FFS1 filesystem on a 1200GB sparse file uses 19GB of disk.
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
and in a better way than what is done in wddump() (which also does it
for DMA transfers, limiting the dump speed significantly). So remove
code splitting transfers in wd->sc_multi chunks from wddump(), and call
wd->atabus->ata_bio() with the whole transfers.
Problem reported by Frank Kardel, and patch tested by him.
system hangs whenever a read or write request to sector 0xfffffff occurs.
The hang appears to happen when:
status = bus_space_read_1(wdr->cmd_iot, wdr->cmd_iohs[wd_status], 0);
is executed in __wdcwait(), and it is not possible to enter the debugger or
make the system respond at all after this point.
Whilst not necessarily the most prudent solution to handling the large number
of drives that exhibit this problem, it is currently the popular workaround.
[An alternative approach is to just always drop to LBA48 if the request
happens to pass by sector 0xfffffff and the drive reported as larger than
0xfffffff sectors. My understanding is that the 32 bit addressing below
0x10000000 is purely there as a performance booster, not to resolve a
compatibility issue.]
WDCC_FLUSHCACHE command. So for drive < ATA4, test WDC_CMD2_FC in atap_cmd_set2
before returning ENODEV.
Problem reported and fix tested by Michael Gerhards on port-sparc64.
Use it for ST3200822A, which has a broken firmware and return an error
when accessing sector 0xfffffff with a LBA command.
Patch tested by David Brownlee.